GDB breakpoint problems attaching to QEMU

Posted by Rickard von Essen on Super User See other posts from Super User or by Rickard von Essen
Published on 2009-12-06T22:40:18Z Indexed on 2010/06/06 7:53 UTC
Read the original article Hit count: 984

Filed under:
|
|

Hi,

I have the following problem. When I connect gdb to qemu for debugging it won't break on breakpoints. I can set breakpoints, break with ctrl-c etc.

Any clues how this can be fixed?

I have:

$ 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".

This is an example session: (And yes this is 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

Any ideas are welcome.

© Super User or respective owner

Related posts about kvm

Related posts about qemu