qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] GDB debugging of QEMU.


From: Yaodong Yang
Subject: Re: [Qemu-devel] GDB debugging of QEMU.
Date: Fri, 9 Aug 2013 13:45:41 -0500

It works! Thank you very much!

Best,
Yaodong
----------------------------------------------
Yaodong Yang
Ph.D. Student
Department of Computer Science & Engineering
University of Nebraska-Lincoln 




On Aug 9, 2013, at 12:25 PM, Max Filippov <address@hidden> wrote:

On Fri, Aug 9, 2013 at 9:14 PM, Peter Maydell <address@hidden> wrote:
On 9 August 2013 18:11, Yaodong Yang <address@hidden> wrote:
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.)

You also need --args when you pass arguments to the application
being debugged, so the command line looks like

sudo gdb --args /usr/local/kvm/bin/qemu-system/x86_64 -s -enable-kvm -hda

--
Thanks.
-- Max


reply via email to

[Prev in Thread] Current Thread [Next in Thread]