From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14224 invoked by alias); 21 Oct 2006 21:53:35 -0000 Received: (qmail 14214 invoked by uid 22791); 21 Oct 2006 21:53:35 -0000 X-Spam-Check-By: sourceware.org Received: from heller.inter.net.il (HELO heller.inter.net.il) (192.114.186.73) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 21 Oct 2006 21:53:33 +0000 Received: from HOME-C4E4A596F7 (IGLD-84-228-244-62.inter.net.il [84.228.244.62]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id ATW04273 (AUTH halo1); Sat, 21 Oct 2006 22:53:15 +0200 (IST) Date: Sat, 21 Oct 2006 21:53:00 -0000 Message-Id: From: Eli Zaretskii To: "Rodney M. Bates" CC: gdb@sourceware.org In-reply-to: <453A6D1D.1080009@wichita.edu> (rodney.bates@wichita.edu) 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> <453A6D1D.1080009@wichita.edu> 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/msg00182.txt.bz2 > Date: Sat, 21 Oct 2006 13:55:25 -0500 > From: "Rodney M. Bates" > CC: gdb@sourceware.org > > What if I put a watch on p->f where there is a visible p, then execution > goes somewhere where p is not visible, but p still exists? For example, > suppose p is local to function foo, and foo calls non-nested function bar. This doesn't qualify as going out of scope, because p is still on the stack. Only when the function where p is declared returns, will p go out of scope and the watchpoint be deleted. > Or, I haven't placed the watch yet and first stop execution in bar. Can > I now place this watch after moving up the stack to foo's frame? Yes, because p is in scope in any function called from foo.