Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Pedro Alves <palves@redhat.com>
Cc: Xavier Roirand <roirand@adacore.com>,
	Eli Zaretskii <eliz@gnu.org>,
	gdb-patches@sourceware.org
Subject: Re: [RFA] (Ada) New command to stop at start of exception handler.
Date: Thu, 14 Dec 2017 15:16:00 -0000	[thread overview]
Message-ID: <20171214151646.nsza3mwxzd7r6fl5@adacore.com> (raw)
In-Reply-To: <1247dee1-2dd6-5cc6-576c-d555557644c8@redhat.com>

> 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


  reply	other threads:[~2017-12-14 15:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-12 15:57 Xavier Roirand
2017-12-14 14:30 ` Joel Brobecker
2017-12-14 15:09   ` Pedro Alves
2017-12-14 15:16     ` Joel Brobecker [this message]
2017-12-14 17:39   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171214151646.nsza3mwxzd7r6fl5@adacore.com \
    --to=brobecker@adacore.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=roirand@adacore.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox