logo       

Re: kgdb on arm for 2.6: msg#00105

linux.kernel.debugging.kgdb.bugs

Subject: Re: kgdb on arm for 2.6

Lance Spaulding wrote:
George Anzinger wrote:

Lance Spaulding wrote:

Amit Kale wrote:

arm processor doesn't contain hardware support for single step. gdb is aware of this and uses breakpoints for this purpose. It sends an 's' packet, which if failed tells gdb that stub doesn't support single stepping. Gdb uses breakpoints after that.

-Amit

How do I get gdb to do this? When I try to single-step I get the "invalid reply" message then gdb is basically hung. I'm using gdb v6.1. Also for reference, single-stepping works fine on the same platform using a old (~ 2 years) version of kgdb and a 2.4 kernel. It's just the new 2.6 version of kgdb that I can't get working right.



I suspect that the new code is not "correctly" rejecting the "s". Could you, with the old 2.4 version, do:
set debug remote 1
si


Then, if you like, you could compare with the new version. I suspect the reply to the "si" command is different. It looks like the current reply is <nil> (i.e. there is a packet but it is just $#<CS> which are all overhead characters).


There is something very wrong here. The old code did not even attempt a $s command where as the new kgdb did get a $s. I suspect that there is history that we need to know to understand this. Could you try this again with set debug remote 1 on from the start (put it in you .gdbinit file). Then make the first command the "si".

I assume you are using the same gdb for each of these. Right?

George



Here's a step using the old kgdb and 2.4:

(gdb) set debug remote 1
(gdb) si
Sending packet: $m1312c,4#f7...Ack
Packet received: 00a81be9
Sending packet: $m7c3ef8,4#9d...Ack
Packet received: e44c0100
Sending packet: $Z0,14ce4,4#77...Ack
Packet received:
Packet Z0 (software-breakpoint) is NOT supported
Sending packet: $m14ce4,4#2e...Ack
Packet received: 040014e3
Sending packet: $X14ce4,0:#4f...Ack
Packet received: OK
binary downloading suppported by target
Sending packet: $X14ce4,4:\001\000\237ï#e2...Ack
Packet received: OK
Sending packet: $Hc0#db...Ack
Packet received: OK
Sending packet: $c#63...Ack
Packet received: OK
Packet received: S05
Sending packet: $g#67...Ack
Packet received: 13000000044005f00100000000000000030000000c4005f002000000184005f093000040004b8100503f7c00203f7c0013000000003f7c0013000000e44c01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000093000060
Sending packet: $X14ce4,4:\004\000\024ã#4e...Ack
Packet received: OK
Sending packet: $m14ce4,4#2e...Ack
Packet received: 040014e3
Sending packet: $m14ce4,4#2e...Ack
Packet received: 040014e3
Sending packet: $m14ce4,4#2e...Ack
Packet received: 040014e3
Sending packet: $m14c48,4#01...Ack
Packet received: 0dc0a0e1
Sending packet: $m14c4c,4#2c...Ack
Packet received: f0d92de9
Sending packet: $m14c50,4#fa...Ack
Packet received: b4309fe5
Sending packet: $m14c54,4#fe...Ack
Packet received: 002093e5
Sending packet: $m14c58,4#02...Ack
Packet received: 04b04ce2
Sending packet: $m14c5c,4#2d...Ack
Packet received: 020c12e3
Sending packet: $m14c60,4#fb...Ack
Packet received: a8709f15
kgdb_isr (irq=19, dev_id=0xf0054004, regs=0x1) at hphook.c:208
(gdb)

And here's an attempted step using the new kgdb and 2.6:

0x000451b0 in $d () at kernel/kgdb.c:1795
(gdb) set debug remote 1
(gdb) si
Sending packet: $vCont?#49...Ack
Packet received:
Packet vCont (verbose-resume) is NOT supported
Sending packet: $Hc0#db...Ack
Packet received: OK
Sending packet: $s#73...Ack
Packet received:
warning: Invalid remote reply:

Any help appreciated.

Thanks,
Lance


--
George Anzinger george@xxxxxxxxxx
HRT (High-res-timers): http://sourceforge.net/projects/high-res-timers/


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise