[RFA] (Ada) New command to stop at start of exception handler.

Joel Brobecker brobecker@adacore.com
Thu Dec 14 15:16:00 GMT 2017


> You can do:
> 
>    std::string info = string_printf (_("`%s' Ada exception hanlder"),
>                                      c->excep_string);
> 
>    ....
>    
>    uiout->text (info.c_str ());
> 
> and then you no longer have to worry about explicitly
> calling xfree, or, leaking if uiout->text() throws
> (which it can, if it paginates and the user aborts, for
> example).
> 
> But there's also uiout->field_fmt(), which may be
> better here if the field is supposed to be an MI attribute:
> 
>    uiout->field_fmt ("somename", 
>                      _("`%s' Ada exception hanlder"), 
>                      c->excep_string);
> 
> Also, typo "hanlder" in format string.  :-)

Thanks for the additional pair of eyes and suggestions, Pedro.

> I haven't really read the description of the command / use case,
> but this sounds very much like the existing "catch catch"?

Yes, that's the equivalent, but for Ada exceptions.

-- 
Joel



More information about the Gdb-patches mailing list