From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22676 invoked by alias); 19 Oct 2006 20:25:18 -0000 Received: (qmail 22657 invoked by uid 22791); 19 Oct 2006 20:25:17 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Thu, 19 Oct 2006 20:25:14 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GaeRy-00007C-ES; Thu, 19 Oct 2006 16:25:10 -0400 Date: Thu, 19 Oct 2006 20:25:00 -0000 From: Daniel Jacobowitz To: Erik Leunissen Cc: gdb@sourceware.org Subject: Re: breakpoint for accessing memory location Message-ID: <20061019202510.GA425@nevyn.them.org> Mail-Followup-To: Erik Leunissen , gdb@sourceware.org References: <4537DBC6.1030807@hccnet.nl> <20061019201214.GA32332@nevyn.them.org> <4537DEDC.5000008@hccnet.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4537DEDC.5000008@hccnet.nl> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00146.txt.bz2 On Thu, Oct 19, 2006 at 10:23:56PM +0200, Erik Leunissen wrote: > Daniel Jacobowitz wrote: > > > >Take a look at "watchpoints" in the manual. They should be exactly > >what you need. > > > > Yes, I saw watchpoints also, but didn't recognize them as being useful > in my case. From the manual: > > watch expr > Set a watchpoint for an expression. GDB will break when expr is > written into by the program and its value changes. > > Did you mean that "expr" may stand for a specific memory location? > > (In my case, assuming that the memory location that I want to watch is > 0x08135400, I could simply do > > watch 0x08135400 ?) Almost, but not quite. "0x08135400" is an expression whose value never changes. But "*(int*)0x08135400" is an expression that will change when that memory location is written to. -- Daniel Jacobowitz CodeSourcery