[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] GDB debugging of QEMU.
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] GDB debugging of QEMU. |
Date: |
Fri, 9 Aug 2013 18:14:09 +0100 |
On 9 August 2013 18:11, Yaodong Yang <address@hidden> wrote:
> I think I did not make my question clear. I do not know
> 1. how to add "-g" flag when compile QEMU, in order to use gdb
This is what passing --enable-debug to configure does.
> 2. how to invoke QEMU with gdb,
> because my previous attempt failed. "gdb sudo
> /usr/local/kvm/bin/qemu-system/x86_64 -s -enable-kvm -hda"
This won't work because you're running gdb as your own
user and attempting to debug a program running as root.
'sudo gdb qemu-system-x86_64 ...' will probably work.
(Also, you almost certainly want to run gdb on the binary
that you just built rather than on the binary in
/usr/local/kvm/bin which is presumably whatever older
version was last installed.)
-- PMM