GDB-Haltepunktprobleme bei der Verbindung mit QEMU

2103
RedGrittyBrick

Ich habe das folgende Problem: Wenn ich gdb zum Debuggen mit qemu verbinde, wird es an Haltepunkten nicht unterbrochen. Ich kann Haltepunkte setzen, mit ctrl+ brechen cusw.

Gibt es Hinweise, wie dies behoben werden kann?

Ich habe:

$ qemu --version QEMU PC emulator version 0.11.0 (qemu-kvm-0.11.0), Copyright (c) 2003-2008 Fabrice Bellard $ gdb --version GNU gdb (GDB) 7.0-ubuntu. This GDB was configured as "x86_64-linux-gnu". 

Dies ist eine Beispielsitzung: (Und ja, das sind Pintos)

gdb -x src/misc/gdb-macros kernel.o GNU gdb (GDB) 7.0-ubuntu Copyright (snip...) License (snip...) This GDB was configured as "x86_64-linux-gnu". Reading symbols from ../../threads/build/kernel.o...done. (gdb) debugpintos 0x0000fff0 in ?? () (gdb) break main Breakpoint 1 at 0xc01000b6: file ../../threads/init.c, line 68. (gdb) info break Num Type Disp Enb Address What 1 breakpoint keep y 0xc01000b6 in main at ../../threads/init.c:68 (gdb) cont Continuing. Remote connection closed 

Irgendwelche Ideen sind willkommen.

1

2 Antworten auf die Frage

1
Patrick

I have similar problems with linux kernel 2.6.25.20, I tried to break on start_kernel and panic, but it does not work, but if I run it, and quickly ctrl-c gdb, then I can successfully break at the breakpoint, it magically worked. I don't know why... maybe it's section entry problems. or maybe it's qemu version problem... whatever. but it works for the moment...

1

I have upgraded to version:

$ qemu --version QEMU PC emulator version 0.12.50, Copyright (c) 2003-2008 Fabrice Bellard 

And now it works fine for me.