From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30076 invoked by alias); 21 Aug 2007 18:06:36 -0000 Received: (qmail 30066 invoked by uid 22791); 21 Aug 2007 18:06:36 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 21 Aug 2007 18:06:33 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id E6E41980C1; Tue, 21 Aug 2007 18:06:32 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id CF3DA980C0; Tue, 21 Aug 2007 18:06:32 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1INY7a-0002Ai-Ej; Tue, 21 Aug 2007 14:06:30 -0400 Date: Tue, 21 Aug 2007 18:06:00 -0000 From: Daniel Jacobowitz To: Jim Blandy Cc: gdb-patches@sourceware.org Subject: Re: [rfc] Allow watchpoints on inaccessible memory Message-ID: <20070821180630.GA8332@caradoc.them.org> Mail-Followup-To: Jim Blandy , gdb-patches@sourceware.org References: <20070821142500.GA28295@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-08/txt/msg00420.txt.bz2 On Tue, Aug 21, 2007 at 09:33:28AM -0700, Jim Blandy wrote: > One thing I don't understand: why are the "always watch the outermost > value even if it is lazy" changes needed? The code that evaluates the > watchpoint condition should always simply unlazy the expression's > final value to begin with, so it'll never be lazy by the time the > other code sees it. But that might fail. That's why I switched from value_fetch_lazy to gdb_value_fetch_lazy, which catches exceptiosn. Consider "watch *0"; evaluating the expression works fine, but fetching the result of evaluate_expression will call memory_error. We still want to set the watchpoint. -- Daniel Jacobowitz CodeSourcery