public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] [gdb/python] Make gdb.UnwindInfo.add_saved_register more robust
Date: Wed, 08 May 2024 09:52:12 -0600	[thread overview]
Message-ID: <87y18k47yr.fsf@tromey.com> (raw)
In-Reply-To: <20240302123653.16923-1-tdevries@suse.de> (Tom de Vries's message of "Sat, 2 Mar 2024 13:36:53 +0100")

>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> @@ -362,6 +362,18 @@ unwind_infopy_add_saved_register (PyObject *self, PyObject *args, PyObject *kw)
Tom>        return nullptr;
Tom>      }
 
Tom> +  if (value->optimized_out () || !value->entirely_available ())
Tom> +    {

Both of these seem to have cases where they can throw an exception.
In the Python layer, gdb code that can throw normally has to be wrapped
in a try/catch, as throwing across the Python boundary will cause crashes.

I don't know whether exceptions can actually be provoked here or not.

Tom

  parent reply	other threads:[~2024-05-08 15:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-02 12:36 Tom de Vries
2024-03-19  9:34 ` [PING][PATCH] " Tom de Vries
2024-05-08  8:54   ` [PING^2][PATCH] " Tom de Vries
2024-05-08 12:02 ` [PATCH] " Andrew Burgess
2024-05-08 15:52 ` Tom Tromey [this message]
2024-05-09 10:03   ` Tom de Vries

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=87y18k47yr.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /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).