Also noted here: http://osdir.com/ml/gnu.binutils/2002-08/msg00624.html If the SUNPro C++ compiler is used with the "-xs -g" (embed debugging symbols in executable, debugging enabled) options, 'objdump -g' fails to output the debugging stabs: $ objdump -g foo.o foo.o: file format elf32-sparc Bad stab: uv4;0;32 Last stabs entries before error: n_type n_desc n_value string 198 0 0000000000000000 short:t(0,2)=bs2;0;16 198 0 0000000000000000 int:t(0,3)=bs4;0;32 198 0 0000000000000000 long:t(0,4)=bs4;0;32 198 0 0000000000000000 long long:t(0,5)=bs8;0;64 198 0 0000000000000000 unsigned char:t(0,6)=buc1;0;8 198 0 0000000000000000 unsigned short:t(0,7)=bu2;0;16 198 0 0000000000000000 unsigned:t(0,8)=bu4;0;32 198 0 0000000000000000 unsigned long:t(0,9)=bu4;0;32 198 0 0000000000000000 unsigned long long:t(0,10)=bu8;0;64 198 0 0000000000000000 signed char:t(0,11)=bsc1;0;8 198 0 0000000000000000 wchar_t:t(0,12)=buc4;0;32 198 0 0000000000000000 void:t(0,13)=bs0;0;0 198 0 0000000000000000 float:t(0,14)=R1;4 198 0 0000000000000000 double:t(0,15)=R2;8 198 0 0000000000000000 long double:t(0,16)=R6;16 198 0 0000000000000000 ...:t(0,17)=buv4;0;32
$ cat /tmp/foo.cc int main(void) { return 0; } $ CC -xs -g -o /tmp/foo /tmp/foo.cc $ objdump -g /tmp/foo <produces the error in the description>
Created attachment 2968 [details] Solaris binary exhibiting the problem in the description Run 'objdump -g' on this file to reproduce the problem.
Created attachment 2970 [details] Patch to add "cbv" intrinsic encoding parsing support. This information was gleaned from the following OpenSolaris code: http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/tools/ctf/cvt/ctf.c#281
Hi Andrew, Thanks for reporting this problem, and for providing a fix as well. I have checked your patch in (to the mainline only) along with this changelog entry. Cheers Nick binutils/ChangeLog 2008-09-30 Andrew Paprocki <andrew@ishiboo.com> PR 6922 * stabs.c (parse_stab_sun_builtin_type): Parse, but ignore SUN's 'b' and 'v' extensions.