none
Debug PDB files, eh symbol tables? can they be read?. RRS feed

  • Question

  • Hi folks, doing an bit of knowledge gathering based on a book I'm reading about language patterns (writing DSLs).

    The book uses Java and it talks about how you can read the bytecode and more importantly the symbol tables stored in Java's .class files. In other words you don't need to do any parsing as such beause the compiler does it for you.

    Thats pretty cool so I'm looking at a .NET application and correct me if I am wrong but... 

    Do the debug .pdb files generated by .NET contain the symbol table (or symbol tables) for the compiled code (the .pdb file was generated from)?  I think it does....

    do you know of any tools for exploring .pdb files?  (might help me visualise concepts in the book)

    Thanks for reading.
    www.dsmyth.net | www.dsmyth.net/wiki
    Tuesday, September 8, 2009 8:31 PM

Answers

  • Oh I seem to have found an answer to my own question.... thats still happening damn thought I'd stopped that.

    http://cciast.codeplex.com/


    However I will leave the question open as I would like to read about any experience you may have, or any advice you can give, about working with PDB files or on tools for reading PDB files.

    So please if you have any information please share, I'll be very grateful.
    www.dsmyth.net | www.dsmyth.net/wiki
    • Marked as answer by Derek Smyth Thursday, September 10, 2009 2:27 PM
    Tuesday, September 8, 2009 8:38 PM
  • The standard way to read info from a .pdb file is the DbgHelp API.   Meant to be used from unmanaged C/C++, the language used for most debuggers.  I remember tinkering with a COM wrapper for this API but can't remember what it was called.  Writing debuggers in managed code is possible too, you'll want to check out the MDbg sample.   Ask questions about it in the .NET Diagnostic Tools forum.

    Hans Passant.
    • Marked as answer by Derek Smyth Thursday, September 10, 2009 2:27 PM
    Thursday, September 10, 2009 11:07 AM
    Moderator

All replies

  • Oh I seem to have found an answer to my own question.... thats still happening damn thought I'd stopped that.

    http://cciast.codeplex.com/


    However I will leave the question open as I would like to read about any experience you may have, or any advice you can give, about working with PDB files or on tools for reading PDB files.

    So please if you have any information please share, I'll be very grateful.
    www.dsmyth.net | www.dsmyth.net/wiki
    • Marked as answer by Derek Smyth Thursday, September 10, 2009 2:27 PM
    Tuesday, September 8, 2009 8:38 PM
  • The standard way to read info from a .pdb file is the DbgHelp API.   Meant to be used from unmanaged C/C++, the language used for most debuggers.  I remember tinkering with a COM wrapper for this API but can't remember what it was called.  Writing debuggers in managed code is possible too, you'll want to check out the MDbg sample.   Ask questions about it in the .NET Diagnostic Tools forum.

    Hans Passant.
    • Marked as answer by Derek Smyth Thursday, September 10, 2009 2:27 PM
    Thursday, September 10, 2009 11:07 AM
    Moderator
  • Hi nobugz,

    Thanks for that brilliant advice. You've done it again.

    You've changed my point of view quite a bit as the whole idea of looking at the PDB files was to see if they contained any information helpful in building language parsing applications (DSLs), and it never even occurred to me (duh!!) that writing a debugger for a DSL would be something worth learning about.

    Thanks again. Going to poke around at bit see what I can learn.
    www.dsmyth.net | www.dsmyth.net/wiki
    Thursday, September 10, 2009 2:27 PM