From mboxrd@z Thu Jan 1 00:00:00 1970 From: Elena Zannoni To: Rainer Orth Cc: gdb-patches@sources.redhat.com Subject: Re: 5.1 PATCH: Allow gdb to link on mips-sgi-irix5.3 Date: Thu, 26 Jul 2001 15:13:00 -0000 Message-id: <15200.38909.248525.7107@krustylu.cygnus.com> References: <15200.36561.946734.92731@xayide.TechFak.Uni-Bielefeld.DE> X-SW-Source: 2001-07/msg00663.html Rainer Orth writes: > I just tried the current CVS version, configured on IRIX 6.2 for > mips-sgi-irix5.3, to allow debugging O32 binaries on IRIX 6 during my work > to re-integrate O32 ABI support for IRIX 6 into GCC. > > gdb failed to link, though: > > ld32: ERROR 33 : Unresolved text symbol "no_shared_libraries" -- 1st referenced by libgdb.a(remote.o). > > The patch below fixes this. > > Unfortunately, the resulting gdb does not work at all: > > * Trying to debug a trivial hello world compiled with cc -32 -g (i.e. with > mdebug debugging information) lets gdb abort with an internal error: > > % cc -32 -g -o hello-cc hello.c > % gdb/gdb ./hello-cc > GNU gdb 2001-07-26-cvs (MI_OUT) > Copyright 2001 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you are > welcome to change it and/or distribute copies of it under certain conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for details. > This GDB was configured as "mips-sgi-irix5.3".../vol/gnu/src/gdb/src/gdb/mdebugread.c:2443: gdb-internal-error: sect_index_data not initialized > For ths particualr error, can you take a look at the threads: http://sources.redhat.com/ml/gdb-patches/2001-05/msg00178.html http://sources.redhat.com/ml/gdb-patches/2001-05/msg00187.html A similar problem was reported but a fix was not generated. Hopefully the discussion there that can help pinpoint your problem. What are the sections in your file? > * Trying the same thing with a gcc-compiled binary (using gas, so stabs are > in use) is not much better: > > % gcc -g -o hello-gcc hello.c > % gdb/gdb ./hello-gcc > GNU gdb 2001-07-26-cvs (MI_OUT) > Copyright 2001 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you are > welcome to change it and/or distribute copies of it under certain conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for details. > This GDB was configured as "mips-sgi-irix5.3"... > (gdb) b main > Breakpoint 1 at 0x400c44: file /homes/ro/src/c/test/hello.c, line 7. > (gdb) run > Starting program: /vol/gcc/obj/gdb/5.3/./hello-gcc > /vol/gnu/src/gdb/src/gdb/regcache.c:281: gdb-internal-error: legacy_read_register_gen: Assertion `regnum >= 0 && regnum < (NUM_REGS + NUM_PSEUDO_REGS)' failed. > This seems to be a bogus regnumber that is outside the range defined for your target. Elena > Both programs can be debugged with gdb 5.0 ;-( > > Rainer > > ----------------------------------------------------------------------------- > Rainer Orth, Faculty of Technology, Bielefeld University > > Email: ro@TechFak.Uni-Bielefeld.DE > > > Thu Jul 26 23:27:26 2001 Rainer Orth > > * config/mips/irix5.mh (NATDEPFILES): Add solib.o. > > Index: config/mips/irix5.mh > =================================================================== > RCS file: /cvs/src/src/gdb/config/mips/irix5.mh,v > retrieving revision 1.2 > diff -u -p -r1.2 irix5.mh > --- irix5.mh 2000/06/12 06:09:05 1.2 > +++ irix5.mh 2001/07/26 21:31:57 > @@ -2,7 +2,7 @@ > XDEPFILES= > XM_FILE= xm-irix5.h > NAT_FILE= nm-irix5.h > -NATDEPFILES= fork-child.o irix5-nat.o corelow.o procfs.o \ > +NATDEPFILES= fork-child.o solib.o irix5-nat.o corelow.o procfs.o \ > proc-api.o proc-events.o proc-flags.o proc-why.o > > XM_CLIBS=-lbsd -lsun