Parsing Microsoft Debug Symbol Tables...

M

Mel

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
 
F

Flash Gordon

Mel said:
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.
 
K

Kenny McCormack

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.
 
J

jacob navia

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
 
F

Flash Gordon

Kenny said:
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.
 
F

Flash Gordon

jacob said:
Mel a écrit :
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.
 
M

Mel

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 ?
 
J

jacob navia

Flash said:
<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.
 
F

Flash Gordon

Mel said:
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.
 
F

Flash Gordon

jacob said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top