From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14541 invoked by alias); 3 Apr 2008 11:01:22 -0000 Received: (qmail 14532 invoked by uid 22791); 3 Apr 2008 11:01:22 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.25) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 03 Apr 2008 11:00:56 +0000 Received: from kahikatea.snap.net.nz (2.60.255.123.dynamic.snap.net.nz [123.255.60.2]) by viper.snap.net.nz (Postfix) with ESMTP id EE5883DA0B7; Fri, 4 Apr 2008 00:00:48 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 2BE908FC6D; Thu, 3 Apr 2008 23:00:36 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18420.47315.225382.512236@kahikatea.snap.net.nz> Date: Thu, 03 Apr 2008 11:18:00 -0000 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: Pending breakpoints In-Reply-To: <20080321144600.GB25307@caradoc.them.org> References: <18372.29471.522929.827100@kahikatea.snap.net.nz> <20080321144600.GB25307@caradoc.them.org> X-Mailer: VM 7.19 under Emacs 22.2.50.1 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: 2008-04/txt/msg00060.txt.bz2 Daniel Jacobowitz writes: > On Wed, Feb 27, 2008 at 09:14:23AM +1300, Nick Roberts wrote: > > (gdb) nosharedlibrary > > (gdb) info break > > Num Type Disp Enb Address What > > 1 breakpoint keep y > > > > and the last "info break" no longer says what the breakpoint is for. I don't > > really know when you would unload the shared library, in practice, but I think > > this line should look like the first output from "info break", i.e., include > > sqrt. > > I agree that this is wrong. > > > The patch below does that. It's a bit of a guess, though, and I've not run > > the testuite. > > Seems good to me. We do the same in print_one_breakpoint_location. > The patch is OK with a changelog and a full test run. Actually I better leave this alone because I don't know what I'm doing and I can see problems: This GDB was configured as "i686-pc-linux-gnu"... (gdb) start Breakpoint 1 at 0x804862c: file myprog.c, line 135. Starting program: /home/nickrob/myprog main (argc=1, argv=0xbfc4cf14) at myprog.c:135 135 main (int argc, char **argv) { (gdb) kill Kill the program being debugged? (y or n) y (gdb) maint inf bre Num Type Disp Enb Address What -3 shlib events keep y 0xb7f02c10 <_dl_debug_state> breakpoint already hit 2 times -6 longjmp keep n 0xb7da7be0 -7 longjmp keep n 0xb7da7be0 -8 longjmp keep n 0xb7da7be0 -9 longjmp resume keep n 0x00000000 (gdb) inf sha warning: Temporarily disabling breakpoints for unloaded shared library "/lib/tls/i686/cmov/libc.so.6" From To Syms Read Shared Object Library 0xb7ef57f0 0xb7f09cff Yes /lib/ld-linux.so.2 (gdb) maint inf bre Num Type Disp Enb Address What -3 shlib events keep y 0xb7f02c10 <_dl_debug_state> breakpoint already hit 2 times -6 longjmp keep n longjmp -7 longjmp keep n _longjmp -8 longjmp keep n siglongjmp -9 longjmp resume keep n 0x00000000 (gdb) And breakpoints -6,-7 and -8 are associated with three different functions even though they have the same address. > Even better would be to discard locations when we shlib_disable a > breakpoint, and get rid of the shlib_disable flag. But doing that may > require that we get rid of shared libraries when we're supposed to. Would that `solve' this problem? -- Nick http://www.inet.net.nz/~nickrob