From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13609 invoked by alias); 18 Dec 2007 07:22:42 -0000 Received: (qmail 13595 invoked by uid 22791); 18 Dec 2007 07:22:42 -0000 X-Spam-Check-By: sourceware.org Received: from nf-out-0910.google.com (HELO nf-out-0910.google.com) (64.233.182.190) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 18 Dec 2007 07:22:37 +0000 Received: by nf-out-0910.google.com with SMTP id b11so1417345nfh.48 for ; Mon, 17 Dec 2007 23:22:35 -0800 (PST) Received: by 10.78.132.2 with SMTP id f2mr9604498hud.44.1197962554691; Mon, 17 Dec 2007 23:22:34 -0800 (PST) Received: by 10.78.132.4 with HTTP; Mon, 17 Dec 2007 23:22:34 -0800 (PST) Message-ID: Date: Tue, 18 Dec 2007 07:22:00 -0000 From: "Siva Velusamy" To: "Eli Zaretskii" Subject: Re: rwatchpoint configuration Cc: gdb@sourceware.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20071218004823.GA30270@caradoc.them.org> 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: 2007-12/txt/msg00133.txt.bz2 > > For now, you could try a workaround: put two watchpoints on the same > expression: one an rwatch (the one you wanted), the other a write > watchpoint whose `commands' say just "continue". This should cause GDB > to note the changed value when it is written into the variable(s), so > when the rwatch triggers it will see the known value and stop. > > Please see if this works for you. If it doesn't, please tell more > details. > This will probably sound like an ugly hack, but I ended up just commenting out the logic that checks to see if the value has changed in the case of a read breakpoint. So I bypass this issue at compile time. Setting an rwatch and a watch will work, but it wastes an additional watchpoint resource (which is scarce on MicroBlaze). Plus gdb is being used via Eclipse in this particular environment which would necessitate changes in a bunch of other places to seamlessly do this. My interaction with gdb code has been limited to minor target specific bugfixes, so I probably do not understand all the ramifications to propose a good solution. However, it seems to me that it should be possible to make this check conditional at runtime based on some field in current_target..say current_target->target_supports_true_read_watchpoints. -Siva