[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Breaking on start of MBR
From: |
Johannes Schindelin |
Subject: |
Re: [Qemu-devel] Breaking on start of MBR |
Date: |
Tue, 10 Jan 2006 19:57:45 +0100 (CET) |
Hi,
On Tue, 10 Jan 2006, Jan Rupar wrote:
> I'm trying to use QEMU step through some MBR assembly code by using
> gdb remotely, and I can't figure out where to set the breakpoint. I
> know that on a native PC the MBR code gets relocated to 0x7c00, but
> that didn't work when running through QEMU. I'm using the -S switch
> to stop the emulator at the beginning. How would you guys do it?
I'd do the following: start QEmu itself in gdb, breakpoint at raw_read(),
let QEmu run until the sector_num == 0, and then set the current env's
singlestep_enabled member to 1.
You might have to recompile the code after adjusting it a bit (for example
to get the current env, or to go into an if() clause when sector_num ==
0).
Hth,
Dscho