From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5005 invoked by alias); 1 Jun 2008 05:15:04 -0000 Received: (qmail 4930 invoked by uid 22791); 1 Jun 2008 05:14:59 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 01 Jun 2008 05:14:40 +0000 Received: (qmail 3202 invoked from network); 1 Jun 2008 05:14:38 -0000 Received: from unknown (HELO localhost) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 1 Jun 2008 05:14:38 -0000 From: Vladimir Prus To: Nick Roberts Subject: Re: [patch/MI] Implementation for break-catch command Date: Sun, 01 Jun 2008 05:15:00 -0000 User-Agent: KMail/1.9.9 Cc: Aleksandar Ristovski , gdb-patches@sources.redhat.com, Eli Zaretskii References: <200805312006.11811.vladimir@codesourcery.com> <18497.57814.496794.333674@kahikatea.snap.net.nz> In-Reply-To: <18497.57814.496794.333674@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: <200806010914.22980.vladimir@codesourcery.com> 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-06/txt/msg00003.txt.bz2 On Sunday 01 June 2008 03:40:06 Nick Roberts wrote: > > > =A0static void enable_delete_breakpoint (struct breakpoint *); > > > @@ -6549,13 +6547,16 @@ print_mention_exception_catchpoint (stru > > > =A0 =A0int bp_temp; > > > =A0 =A0int bp_throw; > > > =A0 > > > - =A0bp_temp =3D b->loc->owner->disposition =3D=3D disp_del; > > > - =A0bp_throw =3D strstr (b->addr_string, "throw") !=3D NULL; > > > - =A0ui_out_text (uiout, bp_temp ? _("Temporary catchpoint ") > > > -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 =A0 =A0 =A0: _("Catchpoint ")); > > > - =A0ui_out_field_int (uiout, "bkptno", b->number); > > > - =A0ui_out_text (uiout, bp_throw ? _(" (throw)") > > > -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 =A0 =A0 =A0 : _(" (catch)")); > > > + =A0if (!ui_out_is_mi_like_p (uiout)) > > > + =A0 =A0{ > > > + =A0 =A0 =A0bp_temp =3D b->loc->owner->disposition =3D=3D disp_del; > > > + =A0 =A0 =A0bp_throw =3D strstr (b->addr_string, "throw") !=3D NULL; > > > + =A0 =A0 =A0ui_out_text (uiout, bp_temp ? _("Temporary catchpoint ") > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0: _("Catchpoint ")); > > > + =A0 =A0 =A0ui_out_field_int (uiout, "bkptno", b->number); > > > + =A0 =A0 =A0ui_out_text (uiout, bp_throw ? _(" (throw)") > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0 : _(" (catch)")); > > > + =A0 =A0} > >=20 > > Uh, seems like there's some messiness in MI here. For ordinary breakpo= ints, > > MI installs the 'breakpoint_notify' hook that prints all the informati= on, > > and 'mention' specifically avoids printing anything for MI. For watchp= oints, > > however, no hooks are installed, and 'mention' does print something -- > > basically just id and expression. > >=20 > > For -break-catch, you choose to install hooks, and disable printing an= ything > > in 'mention' -- seems fine to me. >=20 > I think all these "breakpoints" should be changed to use observers. This > seems to just add to the ugliness. They definitely should. - Volodya=20