From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27222 invoked by alias); 17 Feb 2008 09:56:09 -0000 Received: (qmail 27212 invoked by uid 22791); 17 Feb 2008 09:56:08 -0000 X-Spam-Check-By: sourceware.org Received: from zigzag.lvk.cs.msu.su (HELO zigzag.lvk.cs.msu.su) (158.250.17.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 17 Feb 2008 09:55:42 +0000 Received: from Debian-exim by zigzag.lvk.cs.msu.su with spam-scanned (Exim 4.50) id 1JQgFE-0002WI-DD for gdb-patches@sourceware.org; Sun, 17 Feb 2008 12:55:39 +0300 Received: from localhost ([127.0.0.1] helo=ip6-localhost) by zigzag.lvk.cs.msu.su with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1JQgEf-0002Vl-WD; Sun, 17 Feb 2008 12:55:02 +0300 From: Vladimir Prus To: Nick Roberts Subject: Re: (gdb-6.8) Discard breakpoint address if shared library is unloaded Date: Sun, 17 Feb 2008 09:56:00 -0000 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) Cc: Joel Brobecker , gdb-patches@sourceware.org References: <20080204214226.GF20922@adacore.com> <20080214214246.GC3713@adacore.com> <18357.3708.628053.809241@kahikatea.snap.net.nz> In-Reply-To: <18357.3708.628053.809241@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200802171255.02801.ghost@cs.msu.su> 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-02/txt/msg00275.txt.bz2 On Friday 15 February 2008 07:01:00 Nick Roberts wrote: > =A0> Can you please resend a new complete patch, with a ChangeLog, and I = will > =A0> review it. It's much easier that way for me to make sure that what I > =A0> think you are proposing is indeed what you are proposing to commit. >=20 > --=20 > Nick =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 http://www.inet.net.nz/~nickrob >=20 >=20 > 2008-02-15 =A0Nick Roberts =A0 >=20 > =A0=A0=A0=A0=A0=A0=A0=A0* breakpoint.c (print_one_breakpoint_location): R= evert Enb field > =A0=A0=A0=A0=A0=A0=A0=A0to old format. =A0Discard breakpoint address if s= hared library is > =A0=A0=A0=A0=A0=A0=A0=A0unloaded. > =A0=A0=A0=A0=A0=A0=A0=A0(breakpoint_1): Adjust formatting of table header= accordingly. >=20 >=20 >=20 > *** breakpoint.c=A0=A0=A0=A0=A0=A0=A0=A015 Feb 2008 16:52:37 +1300=A0=A0= =A0=A0=A0=A01.302 > --- breakpoint.c=A0=A0=A0=A0=A0=A0=A0=A015 Feb 2008 16:55:43 +1300=A0=A0= =A0=A0=A0=A0 > *************** print_one_breakpoint_location (struct br > *** 3426,3448 **** > =A0 =A0 /* 4 */ > =A0 =A0 annotate_field (3); > =A0 =A0 if (part_of_multiple) > ! =A0 =A0 ui_out_field_string (uiout, "enabled",=20 > ! =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 loc-= >shlib_disabled=20 > ! =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ? (l= oc->enabled ? "y(p)" : "n(p)") > ! =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 : (l= oc->enabled ? "y" : "n")); > =A0 =A0 else > ! =A0 =A0 { > ! =A0 =A0 =A0 int pending =3D (b->loc =3D=3D NULL || b->loc->shlib_disabl= ed); > ! =A0 =A0 =A0 /* For header of multiple, there's no point showing pending > ! =A0=A0=A0=A0=A0=A0 state -- it will be apparent from the locations. =A0= */ > ! =A0 =A0 =A0 if (header_of_multiple) > ! =A0=A0=A0=A0=A0=A0pending =3D 0; > ! =A0 =A0 =A0 ui_out_field_fmt (uiout, "enabled", "%c%s",=20 > ! =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0bpena= bles[(int) b->enable_state], > ! =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0pendi= ng ? "(p)" : ""); > ! =A0 =A0 =A0 if (!pending) > ! =A0=A0=A0=A0=A0=A0ui_out_spaces (uiout, 3); > ! =A0 =A0 } > =A0=20 > =A0 =A0=20 > =A0 =A0 /* 5 and 6 */ > --- 3426,3436 ---- > =A0 =A0 /* 4 */ > =A0 =A0 annotate_field (3); > =A0 =A0 if (part_of_multiple) > ! =A0 =A0 ui_out_field_string (uiout, "enabled", loc->enabled ? "y" : "n"= ); > =A0 =A0 else > ! =A0 =A0 =A0 ui_out_field_fmt (uiout, "enabled", "%c",=20 > ! =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0bpena= bles[(int) b->enable_state]); > ! =A0 ui_out_spaces (uiout, 2); > =A0=20 > =A0 =A0=20 > =A0 =A0 /* 5 and 6 */ > *************** print_one_breakpoint_location (struct br > *** 3553,3562 **** > =A0 =A0=A0=A0=A0=A0=A0if (addressprint) > =A0 =A0=A0=A0=A0=A0=A0 =A0{ > =A0 =A0=A0=A0=A0=A0=A0 =A0 =A0annotate_field (4); > ! =A0=A0=A0=A0=A0=A0 =A0 =A0if (b->loc =3D=3D NULL) > ! =A0=A0=A0=A0=A0=A0 =A0 =A0 =A0ui_out_field_string (uiout, "addr", ""); > ! =A0=A0=A0=A0=A0=A0 =A0 =A0else if (header_of_multiple) > =A0 =A0=A0=A0=A0=A0=A0 =A0 =A0 =A0ui_out_field_string (uiout, "addr", ""); > =A0 =A0=A0=A0=A0=A0=A0 =A0 =A0else > =A0 =A0=A0=A0=A0=A0=A0 =A0 =A0 =A0ui_out_field_core_addr (uiout, "addr", = loc->address); > =A0 =A0=A0=A0=A0=A0=A0 =A0} > --- 3541,3550 ---- > =A0 =A0=A0=A0=A0=A0=A0if (addressprint) > =A0 =A0=A0=A0=A0=A0=A0 =A0{ > =A0 =A0=A0=A0=A0=A0=A0 =A0 =A0annotate_field (4); > ! =A0=A0=A0=A0=A0=A0 =A0 =A0if (header_of_multiple) > =A0 =A0=A0=A0=A0=A0=A0 =A0 =A0 =A0ui_out_field_string (uiout, "addr", ""); > + =A0=A0=A0=A0=A0=A0 =A0 =A0if (b->loc =3D=3D NULL || loc->shlib_disabled) > + =A0=A0=A0=A0=A0=A0 =A0 =A0 =A0ui_out_field_string (uiout, "addr", ""); > =A0 =A0=A0=A0=A0=A0=A0 =A0 =A0else > =A0 =A0=A0=A0=A0=A0=A0 =A0 =A0 =A0ui_out_field_core_addr (uiout, "addr", = loc->address); > =A0 =A0=A0=A0=A0=A0=A0 =A0} > *************** breakpoint_1 (int bnum, int allflag) > *** 3781,3787 **** > =A0 =A0 ui_out_table_header (uiout, 4, ui_left, "disp", "Disp");=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0/* 3 */ > =A0 =A0 if (nr_printable_breakpoints > 0) > =A0 =A0 =A0 annotate_field (3); > ! =A0 ui_out_table_header (uiout, 4, ui_left, "enabled", "Enb");=A0=A0/* = 4 */ > =A0 =A0 if (addressprint) > =A0 =A0=A0=A0=A0=A0=A0{ > =A0 =A0=A0=A0=A0=A0=A0 =A0if (nr_printable_breakpoints > 0) > --- 3769,3775 ---- > =A0 =A0 ui_out_table_header (uiout, 4, ui_left, "disp", "Disp");=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0/* 3 */ > =A0 =A0 if (nr_printable_breakpoints > 0) > =A0 =A0 =A0 annotate_field (3); > ! =A0 ui_out_table_header (uiout, 3, ui_left, "enabled", "Enb");=A0=A0/* = 4 */ > =A0 =A0 if (addressprint) > =A0 =A0=A0=A0=A0=A0=A0{ > =A0 =A0=A0=A0=A0=A0=A0 =A0if (nr_printable_breakpoints > 0) Did you run the testsuite with this patch? I'm getting the following test f= ailures if the patch is applied: FAIL: gdb.cp/ovldbreak.exp: breakpoint info (after setting one-by-one) FAIL: gdb.cp/ovldbreak.exp: breakpoint info (after cancel) FAIL: gdb.cp/ovldbreak.exp: breakpoint info (after setting on all) I did not run the entire testsuite, only gdb.cp directory, so there maybe be more. While looking on the patch I've noticed a pre-existing problem -- say we create a pending breakpoint of a function called foo. Then 'info break' will say the breakpoint is on 'foo'. After the breakpoint is resolved, info break will mention both the function name and the source line. If the library is unloaded, then info break will only mention source line -= -- even though breakpoint's address_string actually refers to function. I don't think we should bother to fix this right now, as the code in question seems rather old. Other than that, I did not noticed any issues, so I presume the patch can go in as soon as the test failures are handled. - Volodya