public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Tom Tromey <tom@tromey.com>,
	Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Replace deprecated_target_wait_hook by observers
Date: Mon, 25 Oct 2021 15:02:24 -0400	[thread overview]
Message-ID: <d1ba4eb7-4bf7-8c22-63ce-79cf07dc6288@polymtl.ca> (raw)
In-Reply-To: <87o88j3vfh.fsf@tromey.com>



On 2021-09-23 16:10, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
> Simon> The only dangerous things about this is if an observer throws an
> Simon> exception, an exception will exit the destructor, and that aborts the
> Simon> process.
> 
> I think observers generally aren't supposed to throw.
> 
> If we want gdb to robust against this, I think the thing to do would be
> add a try/catch in observable::notify.
> 
> Tom
> 

I started experimenting with this, asserting if an observer throws:

https://review.lttng.org/c/binutils-gdb/+/6527

But I am seeing some failures.  As long as we are not enforcing this, i
would favor the safer approach.

Simon

  reply	other threads:[~2021-10-25 19:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26 14:40 Patrick Monnerat
2021-09-04 11:58 ` [PING] " Patrick Monnerat
2021-09-07 15:08 ` [PATCH] " Simon Marchi
2021-09-23 20:10   ` Tom Tromey
2021-10-25 19:02     ` Simon Marchi [this message]
2021-10-27 18:39       ` Tom Tromey
2022-03-12 12:41 patrick
2022-03-14 13:53 ` Tom Tromey
2022-03-14 14:16   ` Patrick Monnerat

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=d1ba4eb7-4bf7-8c22-63ce-79cf07dc6288@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).