This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]