Retriving information from DWARF 2.0 object file. (NSwamy)
25 Sep 2001 00:19:04 -0400

          From comp.compilers

Related articles
Retriving information from DWARF 2.0 object file. (2001-09-25)
Re:Retrieving information from DWARF 2.0 object file (2001-09-26)
| List of all articles for this month |

From: (NSwamy)
Newsgroups: comp.compilers
Date: 25 Sep 2001 00:19:04 -0400
Keywords: linker, debug
Posted-Date: 25 Sep 2001 00:19:04 EDT

Hi all,

I'm writing a tool that will dump all the global & static variables
present in the object file in DWARF 2.0 format. I'm aiming to dump the
following information for each variable, Viz. Name, Physical
location(address) in memory, Size(in bits/bytes), and data type.

I got valuable information from the web site

SGI website contains free source code to retrive various info from the
object file. But i didn't get any information regarding getting the
"address of a variable". I also went through the Dwarf 2.0 standard.
But that doesn't clearly say how to get this. I just know that this
information is present in the ".debug_loc" section of the object file.

Can anybody give me some hints as to how to retrieve the address &
data type of a variable from a DWARF 2.0 object file ??? Any
information regarding this would be of great help to me.

Thanks in advance,

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.