This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch/MI] Implementation for break-catch command
> > static void enable_delete_breakpoint (struct breakpoint *);
> > @@ -6549,13 +6547,16 @@ print_mention_exception_catchpoint (stru
> > int bp_temp;
> > int bp_throw;
> >
> > - bp_temp = b->loc->owner->disposition == disp_del;
> > - bp_throw = strstr (b->addr_string, "throw") != NULL;
> > - ui_out_text (uiout, bp_temp ? _("Temporary catchpoint ")
> > - : _("Catchpoint "));
> > - ui_out_field_int (uiout, "bkptno", b->number);
> > - ui_out_text (uiout, bp_throw ? _(" (throw)")
> > - : _(" (catch)"));
> > + if (!ui_out_is_mi_like_p (uiout))
> > + {
> > + bp_temp = b->loc->owner->disposition == disp_del;
> > + bp_throw = strstr (b->addr_string, "throw") != NULL;
> > + ui_out_text (uiout, bp_temp ? _("Temporary catchpoint ")
> > + : _("Catchpoint "));
> > + ui_out_field_int (uiout, "bkptno", b->number);
> > + ui_out_text (uiout, bp_throw ? _(" (throw)")
> > + : _(" (catch)"));
> > + }
>
> Uh, seems like there's some messiness in MI here. For ordinary breakpoints,
> MI installs the 'breakpoint_notify' hook that prints all the information,
> and 'mention' specifically avoids printing anything for MI. For watchpoints,
> however, no hooks are installed, and 'mention' does print something --
> basically just id and expression.
>
> For -break-catch, you choose to install hooks, and disable printing anything
> in 'mention' -- seems fine to me.
I think all these "breakpoints" should be changed to use observers. This
seems to just add to the ugliness.
--
Nick http://www.inet.net.nz/~nickrob