From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G3e1X-0008CK-Do for qemu-devel@nongnu.org; Thu, 20 Jul 2006 15:17:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G3e1V-0008C3-RU for qemu-devel@nongnu.org; Thu, 20 Jul 2006 15:17:27 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G3e1V-0008C0-PK for qemu-devel@nongnu.org; Thu, 20 Jul 2006 15:17:25 -0400 Received: from [66.93.172.17] (helo=nevyn.them.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1G3e1l-0005Me-6h for qemu-devel@nongnu.org; Thu, 20 Jul 2006 15:17:41 -0400 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1G3e1U-0006cd-0W for qemu-devel@nongnu.org; Thu, 20 Jul 2006 15:17:24 -0400 Date: Thu, 20 Jul 2006 15:17:23 -0400 From: Daniel Jacobowitz Subject: Re: [Qemu-devel] Trouble with GDB & Some 'Can it be done' Debugging questions Message-ID: <20060720191723.GA25347@nevyn.them.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Wed, Jul 19, 2006 at 08:43:57AM +0000, Steve Ellenoff wrote: > #3) Anytime I try to dump the instruction at the current IP such as: > (gdb) x /10i $eip > > I get this - which means it's not actually reading or displaying the memory > properly, since those look to be what you would see if it was all 0 in > memory (or maybe it's all 0xff - whichever).l > > 0xe05f: add %al,(%eax) qemu doesn't report memory errors to GDB. It reports -1 values instead. This is annoying. I think I posted a patch for it once and never followed up when it was ignored. It might be reading the wrong address; it might be confused due to segmenting; it might be looking at something that would require a TLB fault. > #4) Can you use gdb to debug and set breakpoints on binary code you don't > have any source code or other file for the binary, except the binary file > itself? Everything I've read so far on GDB (and especially any GDB Gui > front end) seems to suggest it's not possible. That would really suck. Sure you can. It will just work. -- Daniel Jacobowitz CodeSourcery