From: Lukas Heiniger <lukas.heiniger@fela.ch>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb@sources.redhat.com
Subject: Re: SIGTRAP or SIG32 when remote debugging threads
Date: Wed, 24 Mar 2004 14:44:00 -0000 [thread overview]
Message-ID: <200403241411.16660.lukas.heiniger@fela.ch> (raw)
In-Reply-To: <20040323191337.GA28050@nevyn.them.org>
On Tuesday 23 March 2004 20:13, Daniel Jacobowitz wrote:
> On Tue, Mar 23, 2004 at 05:55:45PM +0100, Lukas Heiniger wrote:
> > (gdb) set solib-absolute-prefix /home/hynix/arm/arm-linux
> > (gdb) set solib-absolute-prefix /home/hynix/arm/arm-linux
> > (gdb) c
> > Continuing.
> >
> > Program received signal SIG32, Real-time event 32.
> > 0x40088534 in ?? ()
> >
> > (gdb) set solib-absolute-prefix /home/hynix/arm/arm-linux
> > Reading symbols from /home/hynix/arm/arm-linux/lib/libm.so.6...done.
> > Loaded symbols for /home/hynix/arm/arm-linux/lib/libm.so.6
>
> This suggests that the dynamic linker breakpoint wasn't hit. You may
> want to use 'set debug remote 1' and 'set debug target 1' to try to
> figure out where the breakpoint was set, and why it wasn't hit.
>
> > 2 Thread 2049 0x400fa7b8 in tcsetattr (fd=1, optional_actions=1,
> > termios_p=0x0) at ../sysdeps/unix/sysv/linux/tcsetattr.c:92
> > 1 Thread 1024 0x40088534 in __sigsuspend (set=0xbffffc6c) at
> > ../sysdeps/ unix/sysv/linux/sigsuspend.c:54
>
> These are taken from the debug information; they're relative to the
> objdir when your target glibc was built. They don't necessarily refer
> to on-disk files.
Thanks again for your quick answer.
It looks like setting and hitting the shlib event breakpoint works.
As much as I understand, the problem is that in the first target_xfer_memory
(see below) the pointer to the dynamic section is 0 (in the line that begins
with 15 00 ...). elf_locate_base therefore returns 0 for the debug_base and
the list of currently loaded shared objects is not built.
After the program has been continued, the second target_xfer_memory (invoked
upon specifiying solib-absoulute-prefix again) returns a valid pointer
to the dynamic section and the libs are loaded.
Is this normal behaviour or is there anything I can do about it?
Lukas Heiniger
...
(gdb) set solib-absolute-prefix /home/hynix/target_fs
(gdb) target remote /dev/ttyS0
Remote debugging using /dev/ttyS0
Sending packet: $Hc-1#09...Ack
Packet received: OK
Sending packet: $qC#b4...Ack
Packet received:
Sending packet: $qOffsets#4b...Ack
Packet received:
Sending packet: $?#3f...Ack
Packet received: T050b:00000000;0d:50feffbf;0f:70250040;
target_wait (-1, status) = 42000, status->kind = stopped, signal = SIGTRAP
target_terminal_ours ()
Sending packet: $m40002570,4#5f...Ack
Packet received: 0d00a0e1
target_xfer_memory (0x40002570, xxx, 4, read, xxx) = 4, bytes = 0d 00 a0 e1
0x40002570 in ?? ()
Sending packet: $m20328e4,b0#c3...Ack
Packet received:
...
target_xfer_memory (0x20328e4, xxx, 176, read, xxx) = 176, bytes =
01 00 00 00 01 00 00 00 01 00 00 00 57 00 00 00
01 00 00 00 19 01 00 00 0c 00 00 00 84 12 00 02
0d 00 00 00 74 14 02 02 04 00 00 00 30 01 00 02
05 00 00 00 a0 0a 00 02 06 00 00 00 50 04 00 02
0a 00 00 00 83 03 00 00 0b 00 00 00 10 00 00 00
15 00 00 00 00 00 00 00 03 00 00 00 5c 27 03 02
02 00 00 00 f0 02 00 00 14 00 00 00 11 00 00 00
17 00 00 00 94 0f 00 02 11 00 00 00 84 0f 00 02
12 00 00 00 10 00 00 00 13 00 00 00 08 00 00 00
fe ff ff 6f 04 0f 00 02 ff ff ff 6f 03 00 00 00
f0 ff ff 6f 38 0e 00 02 00 00 00 00 00 00 00 00
Sending packet: $qSymbol::#5b...Ack
Packet received: qSymbol:5f5f707468726561645f746872656164735f6576656e7473
Packet qSymbol (symbol-lookup) is supported
Sending packet:
$qSymbol::5f5f707468726561645f746872656164735f6576656e7473#47...Ack
Packet received: OK
(gdb) maint info breakpoints
Num Type Disp Enb Address What
-1 longjmp resume keep n 0x00000000
-2 shlib events keep y 0x4000c3fc
(gdb) c
Continuing.
Sending packet: $Z0,4000c3fc,4#39...Ack
Packet received:
Packet Z0 (software-breakpoint) is NOT supported
Sending packet: $m4000c3fc,4#f0...Ack
Packet received: 002094e5
target_xfer_memory (0x4000c3fc, xxx, 4, read, xxx) = 4, bytes = 00 20 94 e5
Sending packet: $X4000c3fc,0:#11...Ack
Packet received:
binary downloading NOT suppported by target
Sending packet: $M4000c3fc,4:01009fef#35...Ack
Packet received: OK
target_xfer_memory (0x4000c3fc, xxx, 4, write, xxx) = 4, bytes =
01 00 9f ef
target_insert_breakpoint (0x4000c3fc, xxx) = 0
target_terminal_inferior ()
Sending packet: $vCont?#49...Ack
Packet received: vCont;c;C;s;S
Packet vCont (verbose-resume) is supported
Sending packet: $vCont;c#a8...Ack
target_resume (-1, continue, 0)
Packet received: T4d0b:68fcffbf;0d:4cfcffbf;0f:34850840;
target_wait (-1, status) = 42000, status->kind = stopped, signal = SIG32
target_terminal_ours_for_output ()
Program received signal SIG32, Real-time event 32.
Sending packet: $M4000c3fc,4:002094e5#d3...Ack
Packet received: OK
target_xfer_memory (0x4000c3fc, xxx, 4, write, xxx) = 4, bytes = 00 20 94 e5
target_remove_breakpoint (0x4000c3fc, xxx) = 0
target_terminal_ours ()
Sending packet: $m40088534,4#6d...Ack
Packet received: 0040a0e1
target_xfer_memory (0x40088534, xxx, 4, read, xxx) = 4, bytes = 00 40 a0 e1
0x40088534 in ?? ()
(gdb) set solib-absolute-prefix /home/hynix/target_fs
Sending packet: $m20328e4,b0#c3...Ack
Packet received:
...
target_xfer_memory (0x20328e4, xxx, 176, read, xxx) = 176, bytes =
01 00 00 00 01 00 00 00 01 00 00 00 57 00 00 00
01 00 00 00 19 01 00 00 0c 00 00 00 84 12 00 02
0d 00 00 00 74 14 02 02 04 00 00 00 30 01 00 02
05 00 00 00 a0 0a 00 02 06 00 00 00 50 04 00 02
0a 00 00 00 83 03 00 00 0b 00 00 00 10 00 00 00
15 00 00 00 50 d2 01 40 03 00 00 00 5c 27 03 02
02 00 00 00 f0 02 00 00 14 00 00 00 11 00 00 00
17 00 00 00 94 0f 00 02 11 00 00 00 84 0f 00 02
12 00 00 00 10 00 00 00 13 00 00 00 08 00 00 00
fe ff ff 6f 04 0f 00 02 ff ff ff 6f 03 00 00 00
f0 ff ff 6f 38 0e 00 02 00 00 00 00 00 00 00 00
Sending packet: $m4001d254,4#91...Ack
Packet received: 70d20140
target_xfer_memory (0x4001d254, xxx, 4, read, xxx) = 4, bytes =
70 d2 01 40
Sending packet: $m4001d270,14#c0...Ack
... now loading shared libs ...
next prev parent reply other threads:[~2004-03-24 13:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-19 17:30 Lukas Heiniger
2004-03-19 18:31 ` Daniel Jacobowitz
2004-03-22 13:21 ` Lukas Heiniger
2004-03-22 17:33 ` Daniel Jacobowitz
2004-03-23 19:25 ` Lukas Heiniger
2004-03-23 20:41 ` Daniel Jacobowitz
2004-03-24 14:44 ` Lukas Heiniger [this message]
2004-03-24 14:54 ` Daniel Jacobowitz
2004-03-24 15:09 ` Lukas Heiniger
2004-03-24 15:44 ` Daniel Jacobowitz
2004-03-25 14:29 ` Lukas Heiniger
2004-03-25 15:37 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200403241411.16660.lukas.heiniger@fela.ch \
--to=lukas.heiniger@fela.ch \
--cc=drow@false.org \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox