Giter Site home page Giter Site logo

Comments (5)

rainers avatar rainers commented on September 13, 2024

Sounds like a worthwhile extension. Do you have an example pair of exe/dbg files so I can have a look how well this might be suited, especially considering the format of the DBG file and the contained CodeView entries?

from cv2pdb.

AlexWhiter avatar AlexWhiter commented on September 13, 2024

Here's an archive with a small sample: https://yadi.sk/d/B9sY97BJ3TsVcV
test.exe is just a simple program with recursion (to check if WinDBG can correctly unwind the stack using the resulting PDB), and test.dbg is a corresponding DBG made with map2dbd utility.

I've also added test_with_embedded_DBG.exe file which is test.exe with manually added CV data. cv2pdb can correctly process this file.

I couldn't find any documentation on the DBG file structure, but the headers are documented and declared in WinNT.h, look for IMAGE_SEPARATE_DEBUG_HEADER.
The file layout seems to be as follows:

  1. IMAGE_SEPARATE_DEBUG_HEADER
  2. Several IMAGE_SECTION_HEADERs (count = Header.NumberOfSections)
  3. Optional ExportSymbols (size = Header.ExportedNamesSize, usually zero)
  4. One or more IMAGE_DEBUG_DIRECTORY (size = Header.DebugDirectorySize)
  5. The data blocks described by the IMAGE_DEBUG_DIRECTORY entries.

from cv2pdb.

rainers avatar rainers commented on September 13, 2024

The data looks pretty simple to process. I've added conversion of DBG to PDB (see d67da0e), but this still misses embedding the RSDS debug-link into the executable.

If you want to implement it I'll be happy to review and merge.

from cv2pdb.

AlexWhiter avatar AlexWhiter commented on September 13, 2024

Great!
I'll try to implement this.

from cv2pdb.

AlexWhiter avatar AlexWhiter commented on September 13, 2024

Seems to be working. Thanks! :)

from cv2pdb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.