Received: from eggs.gnu.org ([140.186.70.92]:48443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9Z01-0006mH-DZ for qemu-devel@nongnu.org; Fri, 30 Sep 2011 05:03:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R9Yzw-0004mp-Bp for qemu-devel@nongnu.org; Fri, 30 Sep 2011 05:03:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9Yzw-0004mi-4r for qemu-devel@nongnu.org; Fri, 30 Sep 2011 05:03:12 -0400 Date: Fri, 30 Sep 2011 10:03:09 +0100 From: "Richard W.M. Jones" Message-ID: <20110930090309.GG22380@amd.home.annexia.org> References: <20110930074251.GA3972@amd.home.annexia.org> <4E858290.8000903@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E858290.8000903@siemens.com> Subject: Re: [Qemu-devel] How to capture guest %rip from a qemu process without monitor? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: qemu-devel@nongnu.org On Fri, Sep 30, 2011 at 10:49:20AM +0200, Jan Kiszka wrote: > On 2011-09-30 09:42, Richard W.M. Jones wrote: > > > > I've finally managed to reproduce a very infrequent kernel boot hang > > by forcing TCG (so it runs slower, bug seems to be timing sensitive) > > and running a boot test in a loop thousands of times. > > > > I'd like to find out where in the guest kernel this is looping. > > > > Unfortunately I don't have access to the monitor so "info registers" > > won't work, but I can attach to the qemu process with gdb. > > > > Which TCG struct contains %rip, other registers? What other useful > > information can be captured using only gdb? > > Print first_cpu->eip, maybe also first_cpu->segs[1] to dump the CS > segment cache (relevant while in real mode). Perfect thanks! *first_cpu contains a wealth of info. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw