Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess <aburgess@redhat.com>
Cc: Stephan Rohr <stephan.rohr@intel.com>,  gdb-patches@sourceware.org
Subject: Re: [PATCH] gdbsupport: assert upon an unhandled exception in scope_exit
Date: Wed, 14 Oct 2026 07:11:21 -0600	[thread overview]
Message-ID: <87zewg4ebq.fsf@tromey.com> (raw)
In-Reply-To: <87pkxjtb9i.fsf@redhat.com> (Andrew Burgess's message of "Fri, 09 Oct 2026 11:32:25 +0100")

>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:

Andrew> I was originally going to write ex.message cannot be nullptr as we never
Andrew> guard calls to ex.what anywhere else in GDB.  But after checking, it is
Andrew> possible to create a gdb_exception with a nullptr message.  I guess in
Andrew> practice though this never happens as any exception thrown vie
Andrew> error(...) will always have been give a message, you'd have to work hard
Andrew> to throw an exception without a message.

Andrew> I wonder if we should make the what() function handle this case?

Yeah, I think we should not allow making a message-less gdb exception.
IIUC.

Tom

      reply	other threads:[~2026-10-14 13:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07 12:27 Stephan Rohr
2026-10-09 10:32 ` Andrew Burgess
2026-10-14 13:11   ` Tom Tromey [this message]

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=87zewg4ebq.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=stephan.rohr@intel.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