* SIGILL on gdbserver/ARM/uclibc @ 2008-01-07 10:31 Harald Schiöberg 2008-01-07 13:15 ` Daniel Jacobowitz 0 siblings, 1 reply; 5+ messages in thread From: Harald Schiöberg @ 2008-01-07 10:31 UTC (permalink / raw) To: gdb I know that this issue is on the list every other year, but I found no working solution for my problem. I'm currently trying to run gdb/gdbserver on OpenWRT/ARM (uclibc-0.9.29/gcc-4.1.2, tried gdb 6.3 and 6.7.1, target is xscale (armv5te), host is ubuntu x86_64, OpenWRT builds gdb with gdb_cv_func_sigsetjmp=yes \ $(PKG_BUILD_DIR)/configure \ --prefix=$(TOOLCHAIN_DIR) \ --build=$(GNU_HOST_NAME) \ --host=$(GNU_HOST_NAME) \ --target=$(REAL_GNU_TARGET_NAME) \ $(DISABLE_NLS) \ --without-uiout \ --disable-tui --disable-gdbtk --without-x \ --without-included-gettext \ --enable-threads \ # --disable-gdbmi ## this was commented out for 6.7.1 to compile I'm getting SIGILL after a breakpoint on the target. some session-log from 6.7.1: (gdb) target remote 172.17.2.190:4000 Remote debugging using 172.17.2.190:4000 warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code. 0x400009d0 in ?? () (gdb) b main Note: breakpoint 1 also set at pc 0x8570. Breakpoint 2 at 0x8570: file hello.c, line 6. (gdb) c Continuing. Program received signal SIGILL, Illegal instruction. 0x00008574 in main () at hello.c:6 6 for (i=0; i< 10; i++) (gdb) s Program terminated with signal SIGILL, Illegal instruction. The program no longer exists. (gdb) show osabi The current OS ABI is "auto" (currently "GNU/Linux"). The default OS ABI is "GNU/Linux". (gdb) set osabi GNU/Linux (gdb) show osabi The current OS ABI is "GNU/Linux". The default OS ABI is "GNU/Linux". (gdb) target remote 172.17.2.190:4000 Remote debugging using 172.17.2.190:4000 warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code. 0x400009d0 in ?? () (gdb) b main Note: breakpoints 1 and 2 also set at pc 0x8570. Breakpoint 3 at 0x8570: file hello.c, line 6. (gdb) c Continuing. Program received signal SIGILL, Illegal instruction. 0x00008574 in main () at hello.c:6 6 for (i=0; i< 10; i++) (gdb) s breakpoint.c:7845: internal-error: insert_single_step_breakpoint: Assertion `single_step _breakpoints[1] == NULL' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) y -- Harald Schiöberg Technische Universität Berlin | T-Laboratories | FG INET www: http://www.net.t-labs.tu-berlin.de Phone: +49-(0)30-8353-58476 | Fax: +49-(0)391 534 783 47 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: SIGILL on gdbserver/ARM/uclibc 2008-01-07 10:31 SIGILL on gdbserver/ARM/uclibc Harald Schiöberg @ 2008-01-07 13:15 ` Daniel Jacobowitz 2008-01-07 13:49 ` Harald Schiöberg 0 siblings, 1 reply; 5+ messages in thread From: Daniel Jacobowitz @ 2008-01-07 13:15 UTC (permalink / raw) To: Harald Schiöberg; +Cc: gdb On Mon, Jan 07, 2008 at 11:30:42AM +0100, Harald Schiöberg wrote: > I'm getting SIGILL after a breakpoint on the target. Figure out what instruction GDB is inserting, by using "set debug remote 1" and watching the memory writes. Try running that instruction using asm("") on your target. If it doesn't generate a SIGTRAP, then either GDB is confused and using the wrong instruction, or your kernel is confused and generating the wrong signal. > (gdb) target remote 172.17.2.190:4000 > Remote debugging using 172.17.2.190:4000 > warning: Unable to find dynamic linker breakpoint function. > GDB will be unable to debug shared library initializers > and track explicitly loaded dynamic code. See "set sysroot". -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: SIGILL on gdbserver/ARM/uclibc 2008-01-07 13:15 ` Daniel Jacobowitz @ 2008-01-07 13:49 ` Harald Schiöberg 2008-01-07 15:20 ` Daniel Jacobowitz 0 siblings, 1 reply; 5+ messages in thread From: Harald Schiöberg @ 2008-01-07 13:49 UTC (permalink / raw) To: Harald Schiöberg, gdb -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Daniel Jacobowitz wrote: > On Mon, Jan 07, 2008 at 11:30:42AM +0100, Harald Schiöberg wrote: >> I'm getting SIGILL after a breakpoint on the target. > > Figure out what instruction GDB is inserting, by using "set debug > remote 1" and watching the memory writes. Try running that > instruction using asm("") on your target. If it doesn't generate a > SIGTRAP, then either GDB is confused and using the wrong instruction, > or your kernel is confused and generating the wrong signal. uhm, where do I find some info about reading the debug output. (gdb) set debug remote 1 (gdb) set sysroot /data/harald/root/ (gdb) target remote 172.17.2.190:4000 Remote debugging using 172.17.2.190:4000 Sending packet: $qSupported#37...Ack Packet received: PacketSize=7cf;QPassSignals+;qXfer:libraries:read+;qXfer:auxv:read+ Packet qSupported (supported-packets) is supported Sending packet: $Hc-1#09...Ack Packet received: E01 Sending packet: $qC#b4...Ack Packet received: QC902 Sending packet: $qOffsets#4b...Ack Packet received: Sending packet: $?#3f...Ack Packet received: T050b:00000000;0d:be968e10;0f:400009d0; Sending packet: $m10668,4#d2...Ack Packet received: 00000000 Sending packet: $m10668,4#d2...Ack Packet received: 00000000 Sending packet: $m10668,4#d2...Ack Packet received: 00000000 warning: no loadable sections found in added symbol-file /data/harald/root/lib/ld-uClibc .so.0 Sending packet: $qSymbol::#5b...Ack Packet received: OK Packet qSymbol (symbol-lookup) is supported warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code. Sending packet: $qXfer:auxv:read::0,7ca#a5...Ack Packet received: l\000\000\000\020\000\000\000\223\000\000\000\006\000\000\020\000\000\0 00\000\021\000\000\000d\000\000\000\003\000\000\2004\000\000\000\004\000\000\000 \000\00 0\000\005\000\000\000\006\000\000\000\a@\000\000\000\000\000\000\b\000\000\000\000\000\0 00\000\t\000\000\204L\000\000\000\013\000\000\000\000\000\000\000\f\000\000\000\000\000\ 000\000\r\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\027\000\000\000\00 0\000\000\000\017�\226\216�000\000\000\000\000\000\000\000 Sending packet: $m400009d0,4#8e...Ack Packet received: e1a0000d Sending packet: $m400009cc,4#c0...Ack Packet received: 00000000 Sending packet: $m400009d0,4#8e...Ack Packet received: e1a0000d Sending packet: $m400009cc,4#c0...Ack Packet received: 00000000 Sending packet: $m400009d0,4#8e...Ack Packet received: e1a0000d Sending packet: $m400009d0,4#8e...Ack Packet received: e1a0000d Sending packet: $m400009d0,4#8e...Ack Packet received: e1a0000d 0x400009d0 in ?? () Sending packet: $qSymbol::#5b...Ack Packet received: OK (gdb) b main Breakpoint 1 at 0x8570: file hello.c, line 6. (gdb) c Continuing. Sending packet: $Z0,844c,4#19...Ack Packet received: Packet Z0 (software-breakpoint) is NOT supported Sending packet: $m844c,4#d0...Ack Packet received: e3a0b000 Sending packet: $X844c,0:#f1...Ack Packet received: OK binary downloading suppported by target Sending packet: $X844c,4:�237\000\001#84...Ack Packet received: OK Sending packet: $m8570,4#a1...Ack Packet received: e3a03000 Sending packet: $X8570,4:�237\000\001#55...Ack Packet received: OK Sending packet: $QPassSignals:e;10;14;17;1a;1b;1c;21;24;25;4c;#8f...Ack Packet received: OK Sending packet: $vCont?#49...Ack Packet received: vCont;c;C;s;S Packet vCont (verbose-resume) is supported Sending packet: $vCont;c#a8...Ack Packet received: T040b:be968d8c;0d:be968d7c;0f:00008574; Program received signal SIGILL, Illegal instruction. Sending packet: $X844c,4:ã °\000#28...Ack Packet received: OK Sending packet: $X8570,4:�\000#79...Ack Packet received: OK Sending packet: $m8574,4#a5...Ack Packet received: e50b3010 Sending packet: $m8570,4#a1...Ack Packet received: e3a03000 Sending packet: $m8574,4#a5...Ack Packet received: e50b3010 Sending packet: $m8570,4#a1...Ack Packet received: e3a03000 Sending packet: $m8574,4#a5...Ack Packet received: e50b3010 Sending packet: $m8574,4#a5...Ack Packet received: e50b3010 Sending packet: $m8574,4#a5...Ack Packet received: e50b3010 0x00008574 in main () at hello.c:6 6 for (i=0; i< 10; i++) > >> (gdb) target remote 172.17.2.190:4000 >> Remote debugging using 172.17.2.190:4000 >> warning: Unable to find dynamic linker breakpoint function. >> GDB will be unable to debug shared library initializers >> and track explicitly loaded dynamic code. > > See "set sysroot". - -- Harald Schiöberg Technische Universität Berlin | T-Laboratories | FG INET www: http://www.net.t-labs.tu-berlin.de Phone: +49-(0)30-8353-58476 | Fax: +49-(0)391 534 783 47 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHgi3hJgyxs71kcx4RAhGvAJ0dTieY5HPoeweCfJH9uy7k9kdldwCeMaYm iPW0o4cblWFWUEONRF1GyhY= =8jbK -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: SIGILL on gdbserver/ARM/uclibc 2008-01-07 13:49 ` Harald Schiöberg @ 2008-01-07 15:20 ` Daniel Jacobowitz 2008-01-07 17:32 ` Harald Schiöberg 0 siblings, 1 reply; 5+ messages in thread From: Daniel Jacobowitz @ 2008-01-07 15:20 UTC (permalink / raw) To: Harald Schiöberg; +Cc: gdb On Mon, Jan 07, 2008 at 02:49:21PM +0100, Harald Schiöberg wrote: > uhm, where do I find some info about reading the debug output. In the manual. But I can pick out the instruction for you, here... > Sending packet: $X844c,4:�237\000\001#84...Ack Of course your mailer seems to have garbled that a little so I can't tell exactly what character it was. But it's something 0237 000 001. That's arm_linux_arm_be_breakpoint. If you're using arm-linux-gnueabi, it's wrong; if you're using old-ABI it should be correct. > warning: no loadable sections found in added symbol-file > /data/harald/root/lib/ld-uClibc > .so.0 Is that really the right file? It looks corrupt. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: SIGILL on gdbserver/ARM/uclibc 2008-01-07 15:20 ` Daniel Jacobowitz @ 2008-01-07 17:32 ` Harald Schiöberg 0 siblings, 0 replies; 5+ messages in thread From: Harald Schiöberg @ 2008-01-07 17:32 UTC (permalink / raw) To: Harald Schiöberg, gdb -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Daniel Jacobowitz wrote: > On Mon, Jan 07, 2008 at 02:49:21PM +0100, Harald Schiöberg wrote: >> uhm, where do I find some info about reading the debug output. > > In the manual. But I can pick out the instruction for you, here... > >> Sending packet: $X844c,4:�237\000\001#84...Ack > > Of course your mailer seems to have garbled that a little so I can't > tell exactly what character it was. But it's something 0237 000 001. > That's arm_linux_arm_be_breakpoint. If you're using > arm-linux-gnueabi, it's wrong; if you're using old-ABI it should be > correct. > thank you, for everyone searching the archive: "set arm abi AAPCS" (instead of default APCS) fixed it. >> warning: no loadable sections found in added symbol-file >> /data/harald/root/lib/ld-uClibc >> .so.0 > > Is that really the right file? It looks corrupt. not yet sure what it is, but: root@OpenWrt:/nfs/tmp# ldd ./hello libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4000e000) libc.so.0 => /lib/libc.so.0 (0x40020000) libc.so.0 => /lib/libc.so.0 (0x40083000) ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x40000000) he furthermore now claims: warning: no loadable sections found in added symbol-file /data/harald/root/lib/libgcc_s.so.1 warning: no loadable sections found in added symbol-file /data/harald/root/lib/libc.so.0 I have to dig a little bit deeper, most likely OpenWRT is guilty here, unless gdb does something really weird. Thanks a lot Harald - -- Harald Schiöberg Technische Universität Berlin | T-Laboratories | FG INET www: http://www.net.t-labs.tu-berlin.de Phone: +49-(0)30-8353-58476 | Fax: +49-(0)391 534 783 47 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHgmISJgyxs71kcx4RAsCmAKDSCXCrjgqgB6yqoGq298C/RKXbHwCg0X4m CyRJBawVugTYLck1dLmECwo= =aEIf -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-01-07 17:32 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2008-01-07 10:31 SIGILL on gdbserver/ARM/uclibc Harald Schiöberg 2008-01-07 13:15 ` Daniel Jacobowitz 2008-01-07 13:49 ` Harald Schiöberg 2008-01-07 15:20 ` Daniel Jacobowitz 2008-01-07 17:32 ` Harald Schiöberg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).