[Dwarf-Discuss] DWARF has initial condition values? if not where then?
Long, Dan T
dan.t.long at lmco.com
Thu Dec 6 13:02:24 PST 2012
Are the variables’ initial condition values stored in the DWARF files?
For example (Ada language with gnat compiler):
type A_type is
B : Integer := 10;
C : Float := 2.5;
D : Boolean := true;
EE : Integer := 100;
FF : Float := 77.007;
Where are the initial condition values: 10, 2.5, true, and 100 stored in DWARF files? Or where in the compiled code are they? I used readelf –w filename.o > filename.dwarf then
I looked at its DWARF file and I can see the definition of structure A along with B, C, D type definitions and EE type too but I cannot find 10, 2.5, true nor 100 values anywhere.
I needs to extract the variable names, types and initial values for input into a mySQL database.
PS: Part of the dwarf output:
Raw dump of debug contents of section .debug_line:
DWARF Version: 2
Prologue Length: 304
> What language is this? ISO C/C++ does not have "Integer" or "Float" as keywords, nor does it permit assignments within a structure declaration.
I am sorry it was a bad attempt at pseudo Ada...
> You might sign up for the DWARF Discussion mailing list and post questions there: http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org
> Include the actual source which you have a problem with and the output from readelf or dwarfdump showing the DWARF data.
Unfortunately, I can not do this since the system I am working on is isolated from the internet so I have to retype all the "data."
More information about the Dwarf-Discuss