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: Max Filippov
Subject: Re: [Qemu-devel] GDB debugging of QEMU.
Date: Fri, 9 Aug 2013 21:25:34 +0400

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]