Skip to contentSkip to conversation

QEMU via GDB

Qemu-devel Davide 2 participants 2 messages Oct 21, 2011

lore
Share & tools
lore

Davide

author
#0 lore raw

Dear all,
I am trying to debug QEMU via GDB.

I configured and compiled QEMU with debugging flags, i.e., # CFLAGS="-g3 -O0" ./configure --disable-gfx-check

and run gdb:

# gdb ./i386-linux-user/qemu-i386

(gdb) break main
(gdb) run

Starting program: /home/test/femu/i386-linux-user/qemu-i386 Failed to read a valid object file image from memory. Warning:
Cannot insert breakpoint 1.
Error accessing memory address 0x2f7df: Input/output error.

Is there any extra flag to be specified with the GDB for QEMU debugging? I am wondering if the QEMU virtual machine creates any problem to the GDB virtual machine.

Thanks.

G.

#1 lore raw

What is your configure parameters?
I think you could try like this:
./configure --enable-debug --extra-cflags="-g3 -O0"

And I did not find options like disable-gfx-check.

2011/10/21 Davide <[email protected]>:

Quoted 35 lines

Dear all,
I am trying to debug QEMU via GDB.

I configured and compiled QEMU with debugging flags, i.e., # CFLAGS="-g3 -O0" ./configure --disable-gfx-check

and run gdb:

# gdb ./i386-linux-user/qemu-i386

(gdb) break main
(gdb) run

Starting program: /home/test/femu/i386-linux-user/qemu-i386 Failed to read a valid object file image from memory. Warning:
Cannot insert breakpoint 1.
Error accessing memory address 0x2f7df: Input/output error.

Is there any extra flag to be specified with the GDB for QEMU debugging? I am wondering if the QEMU virtual machine creates any problem to the GDB virtual machine.

Thanks.

G.