From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16515 invoked by alias); 13 Dec 2008 15:06:04 -0000 Received: (qmail 16506 invoked by uid 22791); 13 Dec 2008 15:06:04 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 13 Dec 2008 15:05:29 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 56D562A963A; Sat, 13 Dec 2008 10:05:27 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id K7NHf10IIsW1; Sat, 13 Dec 2008 10:05:27 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 30A5E2A962A; Sat, 13 Dec 2008 10:05:26 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 6EF8DE7ACD; Sat, 13 Dec 2008 16:05:17 +0100 (CET) Date: Sat, 13 Dec 2008 15:06:00 -0000 From: Joel Brobecker To: Emi SUZUKI Cc: gdb-patches@sourceware.org Subject: Re: Watchpoint on an unloaded shared library(1) Message-ID: <20081213150517.GE6866@adacore.com> References: <20081120.210657.01365938.emi-suzuki@tjsys.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081120.210657.01365938.emi-suzuki@tjsys.co.jp> User-Agent: Mutt/1.4.2.2i 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: 2008-12/txt/msg00244.txt.bz2 Emi, Thanks for sending this patch. > 2008-11-20 Emi Suzuki > > * breakpoint.c (do_enable_breakpoint): Inform the user and > return from the function if the expression of a watchpoint is > invalid and cannot be updated. How about replace all the code that's inside if (bpt->type == bp_watchpoint || bpt->type == bp_hardware_watchpoint || bpt->type == bp_read_watchpoint || bpt->type == bp_access_watchpoint) { [re-create a lot of stuff for our watchpoint...] by a call to update_watchpoint (bpt, 1)? Would that work in your case? When I looked at what update_watchpoint does and what do_enable_breakpoint does for watchpoints, it seemed to me that do_enable_breakpoint was trying to do the same, except that it was missing a few pieces. Does anybody see a reason for the code almost-duplication here? -- Joel