From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1068 invoked by alias); 2 Jun 2011 17:48:12 -0000 Received: (qmail 1058 invoked by uid 22791); 2 Jun 2011 17:48:12 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 02 Jun 2011 17:47:57 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LM600000AYUFF00@a-mtaout20.012.net.il> for gdb@sourceware.org; Thu, 02 Jun 2011 20:47:27 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.229.223.140]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LM6000OMC32F030@a-mtaout20.012.net.il>; Thu, 02 Jun 2011 20:47:27 +0300 (IDT) Date: Thu, 02 Jun 2011 17:48:00 -0000 From: Eli Zaretskii Subject: Re: watchpoint on variable in function scope In-reply-to: To: Tom Tromey Cc: niko.sams@gmail.com, gdb@sourceware.org Reply-to: Eli Zaretskii Message-id: <838vtkf7lx.fsf@gnu.org> References: X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-06/txt/msg00015.txt.bz2 > From: Tom Tromey > Cc: gdb > Date: Thu, 02 Jun 2011 11:22:03 -0600 > > >>>>> "Niko" == Niko Sams writes: > > Niko> please have a look at the example code below. > Niko> How can i set a watchpoint on i before starting the appliaction? > Niko> it used to work with > Niko> "watch foo::i" > > When did this work? > I tried 6.8 and 7.1 and neither worked. I also think that it never worked. You need to have the variable in scope to be able to watch it.