From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3055 invoked by alias); 12 Jan 2009 15:15:24 -0000 Received: (qmail 3047 invoked by uid 22791); 12 Jan 2009 15:15:24 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL,BAYES_00,KAM_MX,RCVD_IN_DNSWL_HI,SARE_SPEC_REPL_OBFU1,WEIRD_PORT X-Spam-Check-By: sourceware.org Received: from cantor.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 12 Jan 2009 15:14:46 +0000 Received: from Relay2.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 63B6C45748; Mon, 12 Jan 2009 16:14:43 +0100 (CET) From: Andreas Schwab To: Yves Jaradin Cc: gdb@sourceware.org Subject: Re: Watching memory adress given by an expression References: <496B3DF1.2060303@uclouvain.be> X-Yow: BARRY.. That was the most HEART-WARMING rendition of ``I DID IT MY WAY'' I've ever heard!! Date: Mon, 12 Jan 2009 15:15:00 -0000 In-Reply-To: <496B3DF1.2060303@uclouvain.be> (Yves Jaradin's message of "Mon, 12 Jan 2009 13:56:17 +0100") Message-ID: User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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: 2009-01/txt/msg00057.txt.bz2 Yves Jaradin writes: > break emulate.cc:316 > ignore $bpnum 9 > commands > print entry > x &(entry.pc) > set $targetpc=$_ > watch *($targetpc) > continue > end > continue > > > Which is ugly because: > I works only for a single triggering of the breakpoint. > It prints an extra value. > The $_ business I'm doing is really a hack. What do you need it for? You can set $targetpc directly to &entry.pc. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."