From: Tom Tromey <tromey@redhat.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Don't preserve `uiout' across TRY_CATCH.
Date: Wed, 03 Aug 2011 19:27:00 -0000 [thread overview]
Message-ID: <m3ipqe1ek1.fsf@fleche.redhat.com> (raw)
In-Reply-To: <201108031910.42133.pedro@codesourcery.com> (Pedro Alves's message of "Wed, 3 Aug 2011 19:10:41 +0100")
>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
Pedro> I think that's wrong for TRY_CATCH to do - TRY_CATCH should be a
Pedro> low level exceptions framework, and it should be catch_errors and
Pedro> whatever other callers that want to preserve uiout that should
Pedro> guarantee uiout is preserved.
I completely agree. Thanks for doing this.
Want to see something (sort of) related and gross? From
throw_exception:
/* Perhaps it would be cleaner to do this via the cleanup chain (not sure
I can think of a reason why that is vital, though). */
if (tp != NULL)
{
/* Clear queued breakpoint commands. */
bpstat_clear_actions (tp->control.stop_bpstat);
}
disable_current_display ();
Pedro> `uiout' is not a great name for grepping for uses. I'll post a
Pedro> followup that renames it to `current_uiout'.
Thanks, that sounds great. One step closer to -Wshadow :-)
Pedro> Tested on x86_64-linux. Anyone see a problem with this?
It is hard to know whether it will uncover a problem somewhere, but TBH
I would rather put it in and find out. I did spot-check assignments to
uiout (there aren't many according to my quick grep) and didn't see
anything.
Tom
next prev parent reply other threads:[~2011-08-03 19:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-03 18:11 Pedro Alves
2011-08-03 19:27 ` Tom Tromey [this message]
2011-08-04 18:26 ` Pedro Alves
2011-08-04 18:46 ` Pedro Alves
2011-08-04 20:09 ` Tom Tromey
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=m3ipqe1ek1.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.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