ELF stabs debugging format wackyness with include files.

ELF stabs debugging format wackyness with include files.

Post by Steven Bro » Tue, 22 Dec 1998 04:00:00



I've been trying to figure out enough about stabs to implement a small
ammount of them in an object file, but there's one thing I'm just lost on.
From my understanding, a SOL symbol marks the start of an include file, and
all symbols after that belong to that include file.  The problem is, this
isn't true according to objdump.

I wrote a quick example using two files, hello.c and hello2.c.  A function
hello2 is included from hello2.c from hello.c.

hello.c:
int main() {

Quote:}

#include "hello2.c"

hello2.c:
int hello2() {

Quote:}

From my understanding, there should be a SOL symbol for hello2.c, then a FUN
symbol for hello2(), but what I get in a objdump --stabs is:

6      FUN    0      1      08048420 79     hello2:F1
7      SOL    0      0      08048420 89     hello2.c

The FUN symbol comes before the SOL symbol.  I'm confused.  Am I mixed up
and it's the value that matters not the order, or is this some sort of
exception to the rule?  Gdb understands this just fine, so it's not wrong
this way.  Would it hurt anything to have the FUN symbol after
the SOL symbol?  Also, are there better docs on stabs than the stabs texinfo
file?  It's full of 'fixme's and unknowns.

 
 
 

ELF stabs debugging format wackyness with include files.

Post by Andreas Schwa » Tue, 22 Dec 1998 04:00:00


|> Also, are there better docs on stabs than the stabs texinfo
|> file?  It's full of 'fixme's and unknowns.

Read the source, Luke. :-)
See dbxout.c in gcc and stabsread.c in gdb.

--
Andreas Schwab                                      "And now for something