qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Debugging with paging enabled
@ 2006-11-08  2:30 Marcel Kilgus
  2006-11-08 21:13 ` [Qemu-devel] " Marcel Kilgus
  0 siblings, 1 reply; 14+ messages in thread
From: Marcel Kilgus @ 2006-11-08  2:30 UTC (permalink / raw)
  To: qemu-devel

Hi,

I'm using QEMU 0.8.2 to debug a new experimental OS (x86) I'm
currently writing for my university. So this is not based on Linux and
the "-kernel" option, instead I use a floppy image and load my kernel
using GRUB.

Now debugging was a breeze so far, but while implementing virtual
memory I'm hitting a huge problem. The kernel is loaded by GRUB at
physical address 0x100000 and, IIRC like Linux, I simply remap that to
be mirrored at 0xc0000000 using the page table. Afterwards I define my
kernel code and data segments to be based there as well, so that all
offsets in the code are still right. This works fine.

But after these initialisations I have problems with breakpoints:

    (gdb) b timer_handler
    Breakpoint 1 at 0x108294: file cpu_x86.c, line 29.
    (gdb) c

now never returns, even though the code does run. If I do

    (gdb) b *0xc0108294
    Breakpoint 1 at 0xc0108294
    (gdb) c
    Continuing.

    Program received signal SIGTRAP, Trace/breakpoint trap.
    timer_handler at cpu_x86.c:71

I get the exception. Trying to continue with step or next results in a
complete GDB crash. It only works properly if I set both breakpoints:

    (gdb) b timer_handler
    Breakpoint 1 at 0x108294: file cpu_x86.c, line 29.
    (gdb) b *0xc0108294
    Breakpoint 2 at 0xc0108294
    (gdb) c
    Continuing.

    Breakpoint 1, timer_handler at cpu_x86.c:71

Having to always set them both in the high and low area is a bit
cumbersome to say the least. Any suggestion on what I'm missing or can
do to get breakpoints working properly again?

Many thanks in advance, Marcel

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2006-11-10 19:07 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-08  2:30 [Qemu-devel] Debugging with paging enabled Marcel Kilgus
2006-11-08 21:13 ` [Qemu-devel] " Marcel Kilgus
2006-11-08 22:15   ` Fabrice Bellard
2006-11-08 23:33     ` Marcel Kilgus
2006-11-08 23:42       ` Daniel Jacobowitz
2006-11-08 23:57         ` Marcel Kilgus
2006-11-09  2:24           ` Daniel Jacobowitz
2006-11-10 13:14           ` andrzej zaborowski
2006-11-10 14:31             ` Marcel Kilgus
2006-11-10 15:56               ` Paul Brook
2006-11-10 16:14                 ` Marcel Kilgus
2006-11-10 17:10                 ` Daniel Jacobowitz
2006-11-10 19:01                   ` Marcel Kilgus
2006-11-10 19:07                     ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).