From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22516 invoked by alias); 29 Nov 2007 04:24:54 -0000 Received: (qmail 22508 invoked by uid 22791); 29 Nov 2007 04:24:53 -0000 X-Spam-Check-By: sourceware.org Received: from heller.inter.net.il (HELO heller.inter.net.il) (213.8.233.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 29 Nov 2007 04:24:47 +0000 Received: from HOME-C4E4A596F7 (IGLD-83-130-218-71.inter.net.il [83.130.218.71]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id EGA20569 (AUTH halo1); Thu, 29 Nov 2007 06:24:29 +0200 (IST) Date: Thu, 29 Nov 2007 04:24:00 -0000 Message-Id: From: Eli Zaretskii To: Jim Blandy CC: vladimir@codesourcery.com, gdb-patches@sources.redhat.com In-reply-to: (message from Jim Blandy on Wed, 28 Nov 2007 14:18:06 -0800) Subject: Re: [RFA] Don't reset watchpoint block on solib load. Reply-to: Eli Zaretskii References: <200711202013.47537.vladimir@codesourcery.com> <200711281858.51145.vladimir@codesourcery.com> 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-11/txt/msg00535.txt.bz2 > Cc: gdb-patches@sources.redhat.com > From: Jim Blandy > Date: Wed, 28 Nov 2007 14:18:06 -0800 > > Now, if I later unload libx.so, the watchpoint should delete itself > with an appropriate message, just as a watchpoint on a stack variable > does when its frame is popped --- when a shared library is unloaded, > that ends the lifetimes of the variables it defines, just as exiting a > block ends the lifetimes of the variables defined in the block. Actually, a more useful behavior would be to disable the watchpoint in this case, and reenable it (and, possibly, re-parse the expression) if the library gets loaded again. Similarly when a watchpoint on a static variable, or an automatic variable in the `main' function, goes out of scope, because the program exits: it would be useful, at least as an option, to have the watchpoint re-enabled when the program is restarted.