Parsing Microsoft Debug Symbol Tables...

Discussion in 'C Programming' started by Mel, Dec 6, 2005.

  1. Mel

    Mel Guest

    i have a need to access variables from outside of my applications. i
    need to parse the compiler created symbol tables and store them so that
    i can reference them later. these include C++ object handles,
    variables, both static and otherwise.

    can someone point me in the right direction
    thanks
    Mel, Dec 6, 2005
    #1
    1. Advertising

  2. Mel

    pete Guest

    Mel wrote:
    >
    > i have a need to access variables from outside of my applications. i
    > need to parse the compiler created symbol
    > tables and store them so that
    > i can reference them later. these include C++ object handles,
    > variables, both static and otherwise.
    >
    > can someone point me in the right direction


    http://www.ungerhu.com/jxh/clc.welcome.txt

    --
    pete
    pete, Dec 6, 2005
    #2
    1. Advertising

  3. Mel

    Flash Gordon Guest

    Mel wrote:
    > i have a need to access variables from outside of my applications. i
    > need to parse the compiler created symbol tables and store them so that
    > i can reference them later. these include C++ object handles,
    > variables, both static and otherwise.
    >
    > can someone point me in the right direction


    The right direction is a Microsoft group, here we don't know what format
    is used on Windows for storing such things in a symbol table.
    --
    Flash Gordon
    Living in interesting times.
    Although my email address says spam, it is real and I read it.
    Flash Gordon, Dec 6, 2005
    #3
  4. In article <-gordon.me.uk>,
    Flash Gordon <> wrote:
    >Mel wrote:
    >> i have a need to access variables from outside of my applications. i
    >> need to parse the compiler created symbol tables and store them so that
    >> i can reference them later. these include C++ object handles,
    >> variables, both static and otherwise.
    >>
    >> can someone point me in the right direction

    >
    >The right direction is a Microsoft group, here we don't know what format
    >is used on Windows for storing such things in a symbol table.


    The funny thing is - even though my first reaction to this was the usual
    "Can't discuss it here", with, of course, the emotional-hot-button "M" word
    being a major part of that - the fact is, that I think a program to parse
    these files, whatever these files are, they are, presumably text files, and
    for whatever definition of "parse" you want to use, could almost certainly
    be written in Standard C.

    Therefore, discussion of such a program would not be OT here.

    Discussion of what to do with the output of such a program would still be
    OT, of course.
    Kenny McCormack, Dec 6, 2005
    #4
  5. Mel

    jacob navia Guest

    Mel a écrit :
    > i have a need to access variables from outside of my applications. i
    > need to parse the compiler created symbol tables and store them so that
    > i can reference them later. these include C++ object handles,
    > variables, both static and otherwise.
    >
    > can someone point me in the right direction
    > thanks
    >

    The right direction is to use dbghelp.dll, a dll provided
    by microsoft for this purpose.

    It has all you need to read microsoft debug info,
    and it shields the application from changes in
    the internal format.

    The procedure to follow would be just to generate the
    program data base (.pdb) and use that dll to read it.


    jacob
    jacob navia, Dec 6, 2005
    #5
  6. Mel

    Flash Gordon Guest

    Kenny McCormack wrote:
    > In article <-gordon.me.uk>,
    > Flash Gordon <> wrote:
    >> Mel wrote:
    >>> i have a need to access variables from outside of my applications. i
    >>> need to parse the compiler created symbol tables and store them so that
    >>> i can reference them later. these include C++ object handles,
    >>> variables, both static and otherwise.
    >>>
    >>> can someone point me in the right direction

    >> The right direction is a Microsoft group, here we don't know what format
    >> is used on Windows for storing such things in a symbol table.

    >
    > The funny thing is - even though my first reaction to this was the usual
    > "Can't discuss it here", with, of course, the emotional-hot-button "M" word
    > being a major part of that - the fact is, that I think a program to parse
    > these files, whatever these files are, they are, presumably text files, and
    > for whatever definition of "parse" you want to use, could almost certainly
    > be written in Standard C.


    Yes, I agree. My problem is that we don't know what these formats are so
    we certainly can't help in the first stage, which is finding out the
    formats. This applies whether the files are text or binary. <fx: wanders
    off for a look> they are binary. Although you could still process them
    in standard C of course, given the format.

    > Therefore, discussion of such a program would not be OT here.


    Agreed, given it is written in standard C and we are told what the
    format is.

    > Discussion of what to do with the output of such a program would still be
    > OT, of course.


    True.

    I would also point out that Jacob is claiming there is a dll to do the
    hard work, whether he is right or not and the details of how to use it
    don't belong in this group, but IMHO it shows my intuition that
    discussing it in a microsoft group would be better where they might know
    about this dll.
    --
    Flash Gordon
    Living in interesting times.
    Although my email address says spam, it is real and I read it.
    Flash Gordon, Dec 6, 2005
    #6
  7. Mel

    Flash Gordon Guest

    jacob navia wrote:
    > Mel a écrit :
    >> i have a need to access variables from outside of my applications. i
    >> need to parse the compiler created symbol tables and store them so that
    >> i can reference them later. these include C++ object handles,
    >> variables, both static and otherwise.
    >>
    >> can someone point me in the right direction
    >> thanks
    >>

    > The right direction is to use dbghelp.dll, a dll provided
    > by microsoft for this purpose.


    <snip>

    Jacob, could you please also redirect discussion of such non-standard
    items to a group where they are topical rather than leaving the
    discussion here.
    --
    Flash Gordon
    Living in interesting times.
    Although my email address says spam, it is real and I read it.
    Flash Gordon, Dec 6, 2005
    #7
  8. Mel

    Mel Guest

    if you run an "nm" on your executable or "*.dll" files you will get
    tons of info. They are binary, but obvousely nm can make sense of it,
    why can't i ?
    Mel, Dec 6, 2005
    #8
  9. Mel

    jacob navia Guest

    Flash Gordon wrote:
    > jacob navia wrote:
    >
    >> Mel a écrit :
    >>
    >>> i have a need to access variables from outside of my applications. i
    >>> need to parse the compiler created symbol tables and store them so that
    >>> i can reference them later. these include C++ object handles,
    >>> variables, both static and otherwise.
    >>>
    >>> can someone point me in the right direction
    >>> thanks
    >>>

    >> The right direction is to use dbghelp.dll, a dll provided
    >> by microsoft for this purpose.

    >
    >
    > <snip>
    >
    > Jacob, could you please also redirect discussion of such non-standard
    > items to a group where they are topical rather than leaving the
    > discussion here.


    I just say to him where he should look,
    I did not further any discussion, but just proposed him how to
    proceed.
    jacob navia, Dec 6, 2005
    #9
  10. Mel

    Flash Gordon Guest

    Mel wrote:
    > if you run an "nm" on your executable or "*.dll" files you will get
    > tons of info. They are binary, but obvousely nm can make sense of it,
    > why can't i ?


    Please provide context. See http://cfaj.freeshell.org/google/

    If you provide a specification of the format, and your attempt to write
    code to read it, we can help you with your code. However, we don't know
    what the format is and people here are unlikely to want to bother
    finding out if you can't be bothered to.
    --
    Flash Gordon
    Living in interesting times.
    Although my email address says spam, it is real and I read it.
    Flash Gordon, Dec 6, 2005
    #10
  11. Mel

    Flash Gordon Guest

    jacob navia wrote:
    > Flash Gordon wrote:
    >> jacob navia wrote:


    <snip>

    >> Jacob, could you please also redirect discussion of such non-standard
    >> items to a group where they are topical rather than leaving the
    >> discussion here.

    >
    > I just say to him where he should look,
    > I did not further any discussion, but just proposed him how to
    > proceed.


    By posting an answer here without telling the OP where it should be
    discussed then the person you are responding to is likely to think that
    this is an acceptable place for the discussion.
    --
    Flash Gordon
    Living in interesting times.
    Although my email address says spam, it is real and I read it.
    Flash Gordon, Dec 6, 2005
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Charles A. Lackman
    Replies:
    1
    Views:
    1,340
    smith
    Dec 8, 2004
  2. SpamProof
    Replies:
    0
    Views:
    544
    SpamProof
    Oct 21, 2003
  3. baumann@pan
    Replies:
    1
    Views:
    742
    Richard Bos
    Apr 15, 2005
  4. Mel
    Replies:
    1
    Views:
    285
    mlimber
    Dec 6, 2005
  5. Song Ma
    Replies:
    2
    Views:
    226
    Charles Oliver Nutter
    Jul 20, 2008
Loading...

Share This Page