objdump: interpretation of stabs debuginformation

Roul Oldenburger oldenburger.roul@rheinmetall-de.com
Mon Oct 6 15:07:00 GMT 2003


Hi Ian,
thanks for your help!

You are right I do want to use objdump --debugging.
Unfortunately we are using an older version of binutils which freezes if 
I choose the debugging option.

But using the recent version, objdump's output looks almost like I need it.
Are the ids assigned the same way the type numbers are?

Is there a document explaining how the output is to interpret?
What I mean is - which might be the right way to parse the information 
automatically? For example:


struct awu_siso_shared_memory__exercise_description { /* size 16 id 3229 */
   awu_siso_shared_memory__exercise_status_selection___XDLU_0__4 status; 
/* bitsize 8, bitpos 0 */
   integer noofselectedstations; /* bitsize 32, bitpos 32 */
   struct awu_siso_shared_memory__speed_range_description /* id 3294 */ 
speed; /* bitsize 64, bitpos 32 */
   awu_siso_shared_memory__stationsselectedarray selectedstations; /* 
bitsize 48, bitpos 64 */
};

In some cases it is obvious .. a component is a substructure, another is 
  an integer or other basic type but in other cases it is an enum or an 
array of another structure, which is not shown at once.

So if there is a specification or other document explaining how to 
determine an entry I could use that to be sure.

Roul



Ian Lance Taylor wrote:
> Roul Oldenburger <oldenburger.roul@rheinmetall-de.com> writes:
> 
> 
>>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.
> 
> 
> You may want to look at objdump --debugging.
> 
> 
>>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.
> 
> 
> In an executable, the stabs for different .o files are simply appended
> (with some elimination of information duplicated in .h files).  A
> particular type number is only valid within a given file.  Each file's
> entries start with one or more consecutive N_SO strings.
> 
> 
>>Where can I find the stabs format specification which is used for objdump?
> 
> 
> In the file
>     gdb/doc/stabs.texinfo
> or online at
>     http://sources.redhat.com/gdb/download/onlinedocs/stabs.html
> 
> Ian

-- 
Mit freundlichen Grüßen

^-----------------------------------------------------------+
| Rheinmetall Defence Electronics GmbH     Brüggeweg 54     |
|                                          Postbox 44 84 44 |
| Roul Oldenburger                         28284 Bremen     |
| SPMU                                     Germany          |
| Software Development                                      |
|                                                           |
|      Phone: +49 421 457 2410                              |
|      Email: oldenburger.roul@rheinmetall-de.com           |
|      Web:   http://www.rheinmetall.com/                   |
|             http://www.rheinmetall-de.com/                |
*-----------------------------------------------------------/



More information about the Binutils mailing list