This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
objdump: interpretation of stabs debuginformation
- From: Roul Oldenburger <oldenburger dot roul at rheinmetall-de dot com>
- To: binutils at sources dot redhat dot com
- Date: Thu, 02 Oct 2003 12:53:36 +0200
- Subject: objdump: interpretation of stabs debuginformation
Hello everyone,
I have a question concerning the specification of the stabs
debuginformation format and how to interpret the information displayed
by objdump in certain cases. I would be happy if you could point me in
the right direction or show where I am wrong.
I do 'objdump --stabs my_executable' and try to parse the output.
The aim is to reconstruct type descriptions of structures which might be
nested in an arbitrary depth ... down to the basictypes of the final
components.
Given the full name of the top structure and the package it is defined
in, the parser manages to parse objdumps output down to the point where
the basictypes of the components have to be determined.
Here I am stuck because there seems to be no simple 1 to 1 relationship
between the given typenumbers of a component and the description of this
type.
As an example I have the description of a structure 'sonar_description'
given in the package 'awu_siso_shared_memory':
73884 LSYM 0 0 00000000 1565985
awu_siso_shared_memory__sonar_description:T(0,426)=s2500status:(0,123),0,8;\
73885 LSYM 0 0 00000000 1566062
ref_count:(0,5),32,32;id:(0,7),64,32;transmit_method:(0,139),96,8;\
73886 LSYM 0 0 00000000 1566130
transmit_power_level:(0,397),128,32;measuring_range:(0,382),160,384;\
73887 LSYM 0 0 00000000 1566200
search_sector:(0,400),544,32;search_rotation:(0,148),576,8;\
73888 LSYM 0 0 00000000 1566261
cw_pulse:(0,425),608,32;multi_number_of:(0,7),640,32;\
73889 LSYM 0 0 00000000 1566316
multi_duration_of:(0,33),672,64;;
The given information decribes the structure, but if I want to determine
of what type the component 'multi_duration_of' is (grep
':t(0,33)=[r|@]'), I will get multiple possibilities:
210 LSYM 0 71 00000000 8722
awu_common__debug_mode_range___XDLU_1__1:t(0,33)=@s8;r(0,27);1;1;
371 LSYM 0 84 00000000 12939
awu_common__types__nlink_t:t(0,33)=r(0,29);0;-1;
441 LSYM 0 44 00000000 15165
awu_common__stdio__TTstringS2bP1___XDLU_1__71:t(0,33)=r(0,1);1;71;
6592 LSYM 0 120 00000000 184371
system__address:t(0,33)=r(0,33);0;-1;
19690 LSYM 0 109 00000000 425771
duration___XF_1_1000000000:t(0,33)=@s64;r(0,33);01000000000000000000000;0777777777777777777777;
180473 LSYM 0 120 00000000 184371
122185 LSYM 0 100 00000000 2948958
system__secondary_stack__Tmark_idB:t(0,33)=r(0,33);0;-1;
6835 LSYM 0 81 00000000 75724
awu_common__ipc__Tipc_permissionB:t(0,33)=r(0,33);-2147483648;2147483647;
In fact the type is duration, but my problem is to distinguish between
the different possibilities ... so looking for the type number only is
not enough.
Where am I wrong?
Where can I find the stabs format specification which is used for objdump?
Thanks for your comments and help :-)
Roul Oldenburger