Received: from [140.186.70.92] (port=55501 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P0GNV-0001iH-C2 for qemu-devel@nongnu.org; Mon, 27 Sep 2010 12:16:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P0GMe-0007aj-UH for qemu-devel@nongnu.org; Mon, 27 Sep 2010 12:16:33 -0400 Received: from smtp.siriusit.co.uk ([81.187.123.5]:60711 helo=ra.siriusit.co.uk) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0GMe-0007a4-JB for qemu-devel@nongnu.org; Mon, 27 Sep 2010 12:15:40 -0400 Received: from [192.168.1.83] (mcavea@[192.168.1.83]) by ra.siriusit.co.uk (8.13.3/8.13.3) with ESMTP id o8RGFw17027677 for ; Mon, 27 Sep 2010 17:15:58 +0100 Message-ID: <4CA0C325.6090803@siriusit.co.uk> Date: Mon, 27 Sep 2010 17:15:33 +0100 From: Mark Cave-Ayland MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Tracing memory accesses via gdbstub and SPARC64 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel Hi all, What is the best way of being able track accesses to a specific location via gdbstub? I'm trying to investigate a potential memory-clobbering bug in OpenBIOS on SPARC64 but using "watch" on a variable via gdbstub causes gdb to segfault, e.g.: build@zeno:~/src/openbios/openbios-devel$ sparc64-linux-gdb GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=sparc64-linux". (gdb) file obj-sparc64/openbios-builtin.elf.nostrip Reading symbols from /home/build/src/openbios/openbios-devel/obj-sparc64/openbios-builtin.elf.nostrip...done. (gdb) watch foo Watchpoint 1: foo (gdb) target remote :1234 Remote debugging using :1234 [New Thread 1] 0x000001fff0000020 in ?? () (gdb) cont Continuing. Segmentation fault Basically I'm looking for a way of causing gdb to break when a particular memory location is written so I can execute a backtrace and figure out the culprit. I'd be quite happy to hardcode an address to force a break in gdb somewhere within the qemu source as workaround if someone could point me in the right direction? Many thanks, Mark. -- Mark Cave-Ayland - Senior Technical Architect PostgreSQL - PostGIS Sirius Corporation plc - control through freedom http://www.siriusit.co.uk t: +44 870 608 0063 Sirius Labs: http://www.siriusit.co.uk/labs