Results 1 to 2 of 2
I launched qemu virtual machine with this options
qemu-system-x86_64 -s -S
I did not set any data images because i just want to try gdb. I am going to spet ...
- 09-13-2011 #1Just Joined!
- Join Date
- Jun 2011
- Posts
- 4
debugging with gdb and qemu
I launched qemu virtual machine with this options
I did not set any data images because i just want to try gdb. I am going to spet some instructions through BIOS startup code.qemu-system-x86_64 -s -S
So i connected to virtual machine with gdb
Now that what i do(gdb) target remote localhost:1234
Remote debugging using localhost:1234
0x0000fff0 in ?? ()
As you see for some reason all instructions in memory are displayed as(gdb) x/i $pc
=> 0xfff0: add %al,(%eax)
(gdb) display/i $pc
1: x/i $pc
=> 0xfff0: add %al,(%eax)
(gdb) si
0x0000e05b in ?? ()
1: x/i $pc
=> 0xe05b: add %al,(%eax)
(gdb) si
0x0000c81e in ?? ()
1: x/i $pc
=> 0xc81e: add %al,(%eax)
(gdb) si
0x0000c821 in ?? ()
1: x/i $pc
=> 0xc821: add %al,(%eax)
(gdb) si
0x0000c827 in ?? ()
1: x/i $pc
=> 0xc827: add %al,(%eax)
(gdb)This is equivalent as if the whole memory contained zeroes. But it doesn't! You see ho $pc changes? it does not increment 2 bytes all the time.add %al,(%eax)
What the promblem with gdb agai???
- 09-13-2011 #2
I don't know about how to debug using qemu. But you want to debug kernel source code -then using User mode linux is an easy/better approach.
- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------


Reply With Quote
