On 01/26/2012 12:03 AM, Mayank Kaushik wrote:
> Hi,
> 
> (Apologies if this is a repost. I sent an earlier, similar mail to
> this list but I think it got dropped.)
> 
> I'm trying to setup kernel debugging for my Pandaboard, which has a TI
> OMAP4460 (ARMv7 ISA/ dual-core Cortex A9).
> I'm able to do an "echo g > /proc/sysrq-trigger" and have gdb connect
> to the�target board over a USB to serial cable, view backtraces, set
> and stop at breakpoints; but as soon as I try to single step, the
> session hangs.
> Even nexti, stepi etc hang. I'm able to do a "finish" though.
> 
> The target is running Ubuntu, kernel 2.6.38-1209-omap4:
> Linux 2.6.38-1209-omap4 #16 SMP PREEMPT Sat Nov 5 15:53:03 CDT 2011
> armv7l armv7l armv7l GNU/Linux
> 
> The gdb-version I'm using from the host is 7.3.1, I compiled with
> support for arm-elf targets:
> 
> $ sudo ./arm-gdb ./vmlinux-arm
> GNU gdb (GDB) 7.3.1
> This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=arm-elf".
> 
> Connecting to the target:
> (gdb) bt
> #0 �kgdb_breakpoint () at /sources/ubuntu-natty/kernel/debug/debug_core.c:959
> #1 �0xc0325ce4 in __handle_sysrq (key=0x67, check_mask=<optimized
> out>) at /sources/ubuntu-natty/drivers/tty/sysrq.c:522
> #2 �0xc0325db4 in write_sysrq_trigger (file=<optimized out>,
> buf=<optimized out>, count=0x2, ppos=<optimized out>) at
> /sources/ubuntu-natty/drivers/tty/sysrq.c:870
> (...)
> 
> I turned on "set debug remote 1" just before issuing a single-step
> command, and here's the spew:
> 
> (gdb) set debug remote 1
> (gdb) n
> 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:
> (...session hangs...)
> 
> At this point I am able to hit Ctrl-C, and attach to the target again.
> The target is still at the same instruction as before when I
> re-attach.
> Does linux/KGDB have trouble with single stepping this target?
> 
> Any help would be appreciated.

My experience is that single-stepping doesn't work on ARM in KDB.
I'm not sure if KGDB is uses the same single-stepping infrastructure as
KDB or not.  If so, it's completely non-functional from what I can tell.
 -- Tim

=============================
Tim Bird
Architecture Group Chair, CE Workgroup of the Linux Foundation
Senior Staff Engineer, Sony Network Entertainment
=============================


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Kgdb-bugreport mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to