From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57071) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7pzK-0005DD-VR for qemu-devel@nongnu.org; Fri, 09 Aug 2013 12:56:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V7pzE-0002l6-Ve for qemu-devel@nongnu.org; Fri, 09 Aug 2013 12:56:30 -0400 Received: from mail-la0-f52.google.com ([209.85.215.52]:45895) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7pzE-0002ks-P9 for qemu-devel@nongnu.org; Fri, 09 Aug 2013 12:56:24 -0400 Received: by mail-la0-f52.google.com with SMTP id fq13so3182587lab.11 for ; Fri, 09 Aug 2013 09:56:23 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Peter Maydell Date: Fri, 9 Aug 2013 17:56:03 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] GDB debugging of QEMU. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Yaodong Yang Cc: qemu-devel@nongnu.org On 9 August 2013 17:45, Yaodong Yang wrote: > I tried the following commands. > > ./configure --enable-debug --disable-werror --enable-kvm > --prefix=/usr/local/kvm --disable-werror is usually not a good idea for developers. > make -j4 > > sudo make install > > gdb sudo /usr/local/kvm/bin/qemu-system/x86_64 -s -enable-kvm -hda > ubuntu.img -m 1024. Why are you running qemu as root here? (ie why 'sudo'?) > Could someone give me some guidance on how to use gdb in QEMU. > I know the basic usage of gdb for simple .c file, but I really > do not know how to use it in QEMU. There is no particular difference. QEMU is a bigger program but has no particular gotchas for being debugged. -- PMM