bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

IRIX and debugging symbols


From: Carlo Wood
Subject: IRIX and debugging symbols
Date: Sat, 16 Dec 2000 02:51:00 +0100
User-agent: Mutt/1.2.5i

Hiya,

at the moment I am trying to port libcwd (which uses libbfd) to IRIX.

I am having a weird problem that I can't figure out on my own :(.
When I compile a program on IRIX, the resulting executable
doesn't contain debugging symbols according to binutils (like
libbfd and nm).  Needless to say, it DOES contain debugging
symbols as I can see with for instance the native `/usr/bin/nm'.

Apparently the binary format that IRIX native linker uses is
not understood by libbfd.  But binutils/libbfd does support IRIX
(doesn't it?).


An example:

~>uname -a
IRIX jones 6.5 07201610 IP22

~>cat test.c
int a_global;
int main(void) { return 0; }

~>gcc -v -g test.c
Reading specs from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.2/2.95.2/specs
gcc version 2.95.2 19991024 (release)
 /usr/freeware/lib/gcc-lib/mips-sgi-irix6.2/2.95.2/cpp -lang-c -v -D__GNUC__=2 
-D__GNUC_MINOR__=95 -Dunix -Dmips -Dsgi -Dhost_mips -DMIPSEB -D_MIPSEB 
-DSYSTYPE_SVR4 -D_LONGLONG -D_SVR4_SOURCE -D_MODERN_C -D__DSO__ -D__unix__ 
-D__mips__ -D__sgi__ -D__host_mips__ -D__MIPSEB__ -D_MIPSEB -D__SYSTYPE_SVR4__ 
-D_LONGLONG -D_SVR4_SOURCE -D_MODERN_C -D__DSO__ -D__unix -D__mips -D__sgi 
-D__host_mips -D__MIPSEB -D__SYSTYPE_SVR4 -Asystem(unix) -Asystem(svr4) 
-Acpu(mips) -Amachine(sgi) -D__CHAR_UNSIGNED__ -g -D__LANGUAGE_C -D_LANGUAGE_C 
-DLANGUAGE_C -D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int 
-D__EXTENSIONS__ -D_SGI_SOURCE -D_MIPS_FPSET=32 -D_MIPS_ISA=_MIPS_ISA_MIPS3 
-D_ABIN32=2 -D_MIPS_SIM=_ABIN32 -D_MIPS_SZINT=32 -D_MIPS_SZLONG=32 
-D_MIPS_SZPTR=32 -D_COMPILER_VERSION=601 -U__mips -D__mips=3 -D__mips64 test.c 
/var/tmp/cckDPkpb.i
GNU CPP version 2.95.2 19991024 (release) [AL 1.1, MM 40] SGI running IRIX 6.x
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.2/2.95.2/../../../../mips-sgi-irix6.2/include
 /usr/freeware/lib/gcc-lib/mips-sgi-irix6.2/2.95.2/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
 /usr/freeware/lib/gcc-lib/mips-sgi-irix6.2/2.95.2/include/g++
End of omitted list.
 /usr/freeware/lib/gcc-lib/mips-sgi-irix6.2/2.95.2/cc1 /var/tmp/cckDPkpb.i 
-quiet -dumpbase test.c -g -version -o /var/tmp/ccAlRNPd.s
GNU C version 2.95.2 19991024 (release) (mips-sgi-irix6.2) compiled by GNU C 
version 2.95.2 19991024 (release).
 /usr/bin/as -g0 -nocpp -show -G 0 -w -n32 -o /var/tmp/cc6uxmza.o 
/var/tmp/ccAlRNPd.s
/usr/bin/../lib32/cmplrs/as -DEFAULT:abi=n32:isa=mips4:proc=r5k -g0 -nocpp 
-show -G 0 -w -n32 -o /var/tmp/cc6uxmza.o /var/tmp/ccAlRNPd.s
/usr/lib32/cmplrs/asm -EB -pic2 -elf -g0 -G0 -w -mips4 -n32 -O0 -t5_ll_sc_bug 
/var/tmp/ccAlRNPd.s -o /var/tmp/cc6uxmza.o 
 /usr/freeware/lib/gcc-lib/mips-sgi-irix6.2/2.95.2/collect2 -call_shared 
-no_unresolved -init __do_global_ctors -fini __do_global_dtors -_SYSTYPE_SVR4 
-woff 131 -n32 /usr/lib32/mips3/crt1.o 
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.2/2.95.2/crtbegin.o 
-L/usr/freeware/lib/gcc-lib/mips-sgi-irix6.2/2.95.2 
-L/usr/freeware/mips-sgi-irix6.2/lib -L/usr/bin -L/usr/freeware/lib 
/var/tmp/cc6uxmza.o -dont_warn_unused -lgcc -warn_unused -L/usr/lib32/mips3 
-L/usr/lib32 -dont_warn_unused -lc -warn_unused -dont_warn_unused -lgcc 
-warn_unused /usr/freeware/lib/gcc-lib/mips-sgi-irix6.2/2.95.2/crtend.o 
/usr/lib32/mips3/crtn.o

~>/usr/bin/nm ./a.out
Symbols from ./a.out:

[Index]   Value      Size    Type  Bind  Other     Shndx   Name

[1]     |         0|     374|SECT |LOCL |DEFAULT  |MIPS_DATA|.debug_abbrev
[2]     |         0|    2120|SECT |LOCL |DEFAULT  |MIPS_DATA|.debug_frame
[3]     |         0|     224|SECT |LOCL |DEFAULT  |MIPS_DATA|.debug_aranges
[4]     |         0|     943|SECT |LOCL |DEFAULT  |MIPS_DATA|.debug_line
[5]     |         0|    2381|SECT |LOCL |DEFAULT  |MIPS_DATA|.debug_info
[6]     |         0|     449|SECT |LOCL |DEFAULT  |MIPS_DATA|.debug_pubnames
[7]     | 268438864|   10416|SECT |LOCL |DEFAULT  |MIPS_TEXT|.text
[8]     | 268449280|      24|SECT |LOCL |DEFAULT  |MIPS_TEXT|.init
[9]     | 268517376|     476|SECT |LOCL |DEFAULT  |MIPS_DATA|.rodata
[10]    | 268517856|       4|SECT |LOCL |DEFAULT  |MIPS_DATA|.data
[11]    | 268517860|       8|SECT |LOCL |DEFAULT  |MIPS_DATA|.dtors
[12]    | 268517868|       4|SECT |LOCL |DEFAULT  |MIPS_DATA|.eh_frame
[13]    | 268517872|       8|SECT |LOCL |DEFAULT  |MIPS_DATA|.ctors
[14]    | 268518032|      84|SECT |LOCL |DEFAULT  |MIPS_DATA|.bss
[15]    |         0|       0|SECT |GLOB |PROTECTED|MIPS_TEXT|__dso_displacement
[16]    | 268435456|       0|SECT |GLOB |PROTECTED|MIPS_TEXT|__elf_header
[17]    | 268435508|       0|SECT |GLOB 
|PROTECTED|MIPS_TEXT|__program_header_table
[18]    | 268438812|       0|SECT |GLOB |DEFAULT  |MIPS_TEXT|_ftext
[19]    | 268438812|       0|SECT |GLOB |DEFAULT  |MIPS_TEXT|ftext
[20]    | 268438864|     268|FUNC |GLOB |DEFAULT  |MIPS_TEXT|__start
...etc
[33]    | 268518112|       4|OBJT |GLOB |DEFAULT  |MIPS_ACOMMON|a_global
...etc

~>nm --version
GNU nm 2.10.1
Copyright 1997, 98, 99, 2000 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.

~>nm ./a.out
nm: ./a.out: no symbols


The same happens when I use -ggdb

Please help.

-- 
Carlo Wood <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]