From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5458 invoked by alias); 21 Oct 2006 21:26:11 -0000 Received: (qmail 5448 invoked by uid 22791); 21 Oct 2006 21:26:11 -0000 X-Spam-Check-By: sourceware.org Received: from nitzan.inter.net.il (HELO nitzan.inter.net.il) (192.114.186.20) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 21 Oct 2006 21:26:08 +0000 Received: from HOME-C4E4A596F7 (IGLD-84-228-244-62.inter.net.il [84.228.244.62]) by nitzan.inter.net.il (MOS 3.7.3a-GA) with ESMTP id EYZ72405 (AUTH halo1); Sat, 21 Oct 2006 23:26:04 +0200 (IST) Date: Sat, 21 Oct 2006 21:26:00 -0000 Message-Id: From: Eli Zaretskii To: Daniel Jacobowitz CC: rodney.bates@wichita.edu, gdb@sourceware.org In-reply-to: <20061021155125.GA9177@nevyn.them.org> (message from Daniel Jacobowitz on Sat, 21 Oct 2006 11:51:25 -0400) Subject: Re: breakpoint for accessing memory location Reply-to: Eli Zaretskii References: <4537DBC6.1030807@hccnet.nl> <20061019201214.GA32332@nevyn.them.org> <4537DEDC.5000008@hccnet.nl> <453A3758.5090602@wichita.edu> <20061021155125.GA9177@nevyn.them.org> 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/msg00180.txt.bz2 > Date: Sat, 21 Oct 2006 11:51:25 -0400 > From: Daniel Jacobowitz > Cc: "Rodney M. Bates" , gdb@sourceware.org > > > > I print the address of p->f and then watch the contents of that address. > > > > Does "watch *(f> *)&p->f" work as well? > > I'm pretty sure it won't. Because "p" is still in the expression, we > consider the expression dependent on the value of p, so it goes out of > scope when p does. So you are saying that "watch p - p" will also cause an error message when p goes out of scope?