dbxout.c stabs output problem
Ian Lance Taylor
ian@cygnus.com
Tue Jul 14 16:12:00 GMT 1998
Date: Tue, 14 Jul 1998 14:27:50 -0700
From: Henry Sobotka <sobotka@axess.com>
Compiled with -g -S, gcc 2.7 produces the following stabs for longlong:
.stabs
"longlong:t20=s8lo:3,0,32;hi:3,32,32;$_0::21=##22=*20;:__3$_0;2A.23=##22;:__3$_0RC3$_0;2A.;__as::24=##25=&20;:3$_0RC3$_0;2A.;;",128,0,3,0
which can easily be parsed based on the info in the stabs manual. But
with ecgs/pgcc (gcc 2.8 stabs) we get:
.stabs
"longlong:t24=s8lo:3,0,32;hi:3,32,32;__as::25=#24,26=&24,27=*24,28=&29=s8lo:3,0,32;hi:3,32,32;__as::25:__as__3$_0RC3$_0;2A.;$_0::30=#24,27,27,28,20;:__3$_0RC3$_0;2A.31=#24,27,27,20;:__3$_0;2A.;;,20;:__as__3$_0RC3$_0;2A.;$_0::30:__3$_0RC3$_0;2A.31:__3$_0;2A.;;",128,0,3,0
Fed this stabs, emxomf breaks on the last 20 (in the ";;,20;:__as__"
sequence) with an "invalid type for member function __as" message. t20
here is the basic void type, i.e.
.stabs "void:t20=20",128,0,0,0
The front end is clearly doing a lot more with struct longlong than it
did before.
I think the basic change is that g++ is now generating parameter
information for the automatically generated assignment and copy
constructors. I'm not sure where emxomf is breaking down, but this
string can be parsed by gdb and by objdump --debugging.
This string is using two things which are not documented in
stabs.texinfo. The single '#' stab ends at the next ';', not the next
'#' as stated by stabs.texinfo. If a function described in this
manner is *not* a varargs function, then the last argument type will
be void. This last is really a consequence of internal gcc argument
handling, and I tend to think that it is a bug that gcc outputs stabs
in this manner.
Here is the break down of your string:
longlong: Name longlong defined as
t24= type 24 defined as
s8 structure of size 8
lo:3,0,32; field lo, type 3, bitpos 0, bitsize 32
hi:3,32,32; field hi, type 3, bitpos 32, bitsize 32
__as:: member function __as of
25=# type 25 defined as method
24, class type 24 (the type being defined)
26=&24, return type 26 = reference to 24
27=*24, first argument 27 = pointer to 24
28=&29= second argument 28 = reference to 29 =
s8 structure of size 8
lo:3,0,32; field lo, type 3, bitpos 0, bitsize 32
hi:3,32,32; field hi, type 3, bitpos 32, bitsize 32
__as::25: member function __as of type 25
__as__3$_0RC3$_0; real name $_0::operator=($_0 const &)
2A.; public, non-const, non-virtual
$_0::30= member function $_0 of type 30 =
#24, method, class type 24
27, return type 27
27, first argument type 27
28, second argment type 28
20; void last argument means non-varargs
:__3$_0RC3$_0; real name $_0::$_0($_0 const &)
2A. public, non-const, non-virtual
31= another member function $_0, type 31 =
#24, method, class type 24
27, return type 27
27, first argument type 27
20; void last argument means non-varargs
:__3$_0; real name $_0::$_0(void)
2A.; public, non-const, non-virtual
; end definition of type 28
,20; void last argument means non-varargs
:__as__3$_0RC3$_0; real name $_0::operator=($_0 const &)
2A.; public, non-const, non-virtual
$_0::30: member function $_0 of type 30
__3$_0RC3$_0; real name $_0::$_0($_0 const &)
2A. public, non-const, non-virtual
31: another member function $_0, type 31
__3$_0; real name $_0::$_0(void)
2A.; public, non-const, non-virtual
; end definition of type 24
More information about the Gcc-bugs
mailing list