QEMU does not communicate properly with GDB with a 64 bit guest
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Expired
|
Undecided
|
Unassigned |
Bug Description
I have been trying to figure out why I cannot debug a 64 bit kernel of my own invention.
I launch qemu-system-x86_64 with the -s -S flags, we also specify -cpu core2duo -vga std and a -hda with an ext2 FS holding our multiboot kernel and GRUB2.
When I try to set breakpoints and "continue" in GDB (7.2) using the very latest HEAD (b6601141cd2a17
0x0000000000000000 in ?? ()
(gdb) break main
Breakpoint 1 at 0x101730: file src/kernel/init.c, line 18.
(gdb) c
Program received signal SIGTRAP, Trace/breakpoint trap.
0x0000000000000000 in ?? ()
(gdb)
Note that in this case, main lies in 64 bit mode. However, trying to break on _start yields virtually the same effect and _start is 32 bit code.
By doing a git bisect, I managed to narrow the commit that introduced this bug to 5f30fa18ad043a8
I might be doing something incorrectly on my end but this seemed to fix the problem.
Perhaps the pertinent thing to do would be to revert 5f30fa18ad043a8
Can you still reproduce this problem with the latest version of QEMU, or can we close this ticket nowadays?