* [Qemu-devel] Debugging guest OS
@ 2005-06-02 12:43 Mariano Wahlmann
2005-06-02 14:12 ` [Qemu-devel] " Ben Pfaff
0 siblings, 1 reply; 7+ messages in thread
From: Mariano Wahlmann @ 2005-06-02 12:43 UTC (permalink / raw)
To: qemu-devel
I want to know, if it's posible to debug an guest OS like bochs, i mean
disassemble current instruction, step by step running, possibility of
change registers values, etc. I try to use GDB, but i think this is for
debbuging qemu itself.
any clues?
thanks
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] Re: Debugging guest OS
2005-06-02 12:43 [Qemu-devel] Debugging guest OS Mariano Wahlmann
@ 2005-06-02 14:12 ` Ben Pfaff
2005-06-02 15:20 ` Mariano Wahlmann
0 siblings, 1 reply; 7+ messages in thread
From: Ben Pfaff @ 2005-06-02 14:12 UTC (permalink / raw)
To: qemu-devel
Mariano Wahlmann <wahlmann@agro.uba.ar> writes:
> I want to know, if it's posible to debug an guest OS like bochs, i
> mean disassemble current instruction, step by step running,
> possibility of change registers values, etc. I try to use GDB, but i
> think this is for debbuging qemu itself.
You can use gdb on the guest if you invoke qemu with -s.
--
Ben Pfaff
email: blp@cs.stanford.edu
web: http://benpfaff.org
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Re: Debugging guest OS
2005-06-02 14:12 ` [Qemu-devel] " Ben Pfaff
@ 2005-06-02 15:20 ` Mariano Wahlmann
2005-06-02 15:35 ` Paul Brook
2005-06-02 20:46 ` Fabrice Bellard
0 siblings, 2 replies; 7+ messages in thread
From: Mariano Wahlmann @ 2005-06-02 15:20 UTC (permalink / raw)
To: qemu-devel
Ben Pfaff wrote:
>Mariano Wahlmann <wahlmann@agro.uba.ar> writes:
>
>
>
>>I want to know, if it's posible to debug an guest OS like bochs, i
>>mean disassemble current instruction, step by step running,
>>possibility of change registers values, etc. I try to use GDB, but i
>>think this is for debbuging qemu itself.
>>
>>
>
>You can use gdb on the guest if you invoke qemu with -s.
>
>
that's right, thanks
but in order to disassemble i have to do "display /i $cs * 16 + $eip",
this is for real mode, what is the syntaxis for protected mode?
is there any varible that contains a pointer to current virtual address
of the next instruction.
--
________________________________________________________
Mariano Agustín Wahlmann
Administrador de Red
Facultad de Agronomía - Buenos Aires - Argentina
Te.: (+54 11) 4524-8000 int.8108
email: mailto:wahlmann@agro.uba.ar
www: http://www.agro.uba.ar
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Re: Debugging guest OS
2005-06-02 15:20 ` Mariano Wahlmann
@ 2005-06-02 15:35 ` Paul Brook
2005-06-02 16:32 ` Mariano Wahlmann
2005-06-02 20:46 ` Fabrice Bellard
1 sibling, 1 reply; 7+ messages in thread
From: Paul Brook @ 2005-06-02 15:35 UTC (permalink / raw)
To: qemu-devel
On Thursday 02 June 2005 16:20, Mariano Wahlmann wrote:
> but in order to disassemble i have to do "display /i $cs * 16 + $eip",
> this is for real mode, what is the syntaxis for protected mode?
> is there any varible that contains a pointer to current virtual address
> of the next instruction.
Usually it will just be $eip
Technically you need to add the current code segment offset, but most (all?)
x86 OS use a flat memory model, so this is zero.
Paul
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Re: Debugging guest OS
2005-06-02 15:35 ` Paul Brook
@ 2005-06-02 16:32 ` Mariano Wahlmann
2005-06-02 16:55 ` Paul Brook
0 siblings, 1 reply; 7+ messages in thread
From: Mariano Wahlmann @ 2005-06-02 16:32 UTC (permalink / raw)
To: qemu-devel
Paul Brook wrote:
>On Thursday 02 June 2005 16:20, Mariano Wahlmann wrote:
>
>
>>but in order to disassemble i have to do "display /i $cs * 16 + $eip",
>>this is for real mode, what is the syntaxis for protected mode?
>>is there any varible that contains a pointer to current virtual address
>>of the next instruction.
>>
>>
>
>Usually it will just be $eip
>
>Technically you need to add the current code segment offset, but most (all?)
>x86 OS use a flat memory model, so this is zero.
>
>Paul
>
>
>
i think this is not true, you can have so many desciptors on gdt table,
not all start at has 0 as base address.
The way that i find to do that, is to look in "info register" on qemu
monitor, and look what is the current base for cs and add it to eip.
This is a very uneasy way.
>_______________________________________________
>Qemu-devel mailing list
>Qemu-devel@nongnu.org
>http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
>
>
--
________________________________________________________
Mariano Agustín Wahlmann
Administrador de Red
Facultad de Agronomía - Buenos Aires - Argentina
Te.: (+54 11) 4524-8000 int.8108
email: mailto:wahlmann@agro.uba.ar
www: http://www.agro.uba.ar
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Re: Debugging guest OS
2005-06-02 16:32 ` Mariano Wahlmann
@ 2005-06-02 16:55 ` Paul Brook
0 siblings, 0 replies; 7+ messages in thread
From: Paul Brook @ 2005-06-02 16:55 UTC (permalink / raw)
To: qemu-devel
On Thursday 02 June 2005 17:32, Mariano Wahlmann wrote:
> Paul Brook wrote:
> >On Thursday 02 June 2005 16:20, Mariano Wahlmann wrote:
> >>but in order to disassemble i have to do "display /i $cs * 16 + $eip",
> >>this is for real mode, what is the syntaxis for protected mode?
> >>is there any varible that contains a pointer to current virtual address
> >>of the next instruction.
> >
> >Usually it will just be $eip
> >
> >Technically you need to add the current code segment offset, but most
> > (all?) x86 OS use a flat memory model, so this is zero.
> >
> >Paul
>
> i think this is not true, you can have so many desciptors on gdt table,
> not all start at has 0 as base address.
> The way that i find to do that, is to look in "info register" on qemu
> monitor, and look what is the current base for cs and add it to eip.
> This is a very uneasy way.
Right, that's why I said "usually" and "most".
Paul
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Re: Debugging guest OS
2005-06-02 15:20 ` Mariano Wahlmann
2005-06-02 15:35 ` Paul Brook
@ 2005-06-02 20:46 ` Fabrice Bellard
1 sibling, 0 replies; 7+ messages in thread
From: Fabrice Bellard @ 2005-06-02 20:46 UTC (permalink / raw)
To: qemu-devel
Mariano Wahlmann wrote:
>
>
> Ben Pfaff wrote:
>
>> Mariano Wahlmann <wahlmann@agro.uba.ar> writes:
>>
>>
>>
>>> I want to know, if it's posible to debug an guest OS like bochs, i
>>> mean disassemble current instruction, step by step running,
>>> possibility of change registers values, etc. I try to use GDB, but i
>>> think this is for debbuging qemu itself.
>>>
>>
>>
>> You can use gdb on the guest if you invoke qemu with -s.
>>
>>
> that's right, thanks
> but in order to disassemble i have to do "display /i $cs * 16 + $eip",
> this is for real mode, what is the syntaxis for protected mode?
> is there any varible that contains a pointer to current virtual address
> of the next instruction.
In QEMU you have $pc which gives the correct value.
Fabrice.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-06-02 20:52 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-02 12:43 [Qemu-devel] Debugging guest OS Mariano Wahlmann
2005-06-02 14:12 ` [Qemu-devel] " Ben Pfaff
2005-06-02 15:20 ` Mariano Wahlmann
2005-06-02 15:35 ` Paul Brook
2005-06-02 16:32 ` Mariano Wahlmann
2005-06-02 16:55 ` Paul Brook
2005-06-02 20:46 ` Fabrice Bellard
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).