No replies
12 Posts

Pinned topic ppu-gdb hangs on start

‏2010-07-11T13:51:13Z |
I'm trying to debug a piece of code in the SystemSim using ppu-gdb. This sometimes works, sometimes not. More often than not, when I launch ppu-gdb, it just hangs.

root@(none) ~# ppu-gdb ./psim.out
GNU gdb
Copyright (C) 2007 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 "powerpc64-linux"...
Using host libthread_db library "/lib64/".
(gdb) run
Starting program: /root/psim.out

When it does run, I get messages regarding threads and all. The program uses pthreads and spawns four threads, two of which immediately call "spe_context_run()", but I don't think the debugger even gets there (there should be some output before it gets to that).

If I interrupt the debugger, I get the following:

Program received signal SIGINT, Interrupt.
0x000004000001a6c0 in ._dl_debug_state () from /lib64/
(gdb) where
#0 0x000004000001a6c0 in ._dl_debug_state () from /lib64/
#1 0x00000400000081d0 in .dl_main () from /lib64/
#2 0x0000040000022264 in ._dl_sysdep_start () from /lib64/
#3 0x0000040000006ce4 in ._dl_start_final () from /lib64/
#4 0x0000040000006fbc in ._dl_start () from /lib64/
#5 0x00000400000054d0 in ._start () from /lib64/
(gdb) info threads

I.e. the debugger is not in my executable and seem to hang somewhere in the loader. As I mentioned above, this does not happen all the time.

Any ideas or workarounds?

Cheers, Pedro