public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH 0/2] [gdb] Fix rethrow exception slicing
Date: Mon, 24 Oct 2022 12:20:24 +0100	[thread overview]
Message-ID: <878rl5a2o7.fsf@redhat.com> (raw)
In-Reply-To: <20221024084913.19429-1-tdevries@suse.de>

Tom de Vries via Gdb-patches <gdb-patches@sourceware.org> writes:

> While investigating PR29712, I used my ignore-errors patch (
> https://sourceware.org/pipermail/gdb-patches/2021-May/178990.html ) and
> found that the thrown error was not caught by ignore-errors due to object
> slicing of the exception by a rethrow.
>
> In other words, a gdb_exception_error is thrown, caught and rethrown, but the
> rethrow throws a gdb_exception instead, which will not be caught by an
> encapsulating catch gdb_exception_error.
>
> Fix this and one more occurrence of rethrow exception slicing that I found
> using grepping.

Both of these look good for me.

Thanks,
Andrew


>
> Tom de Vries (2):
>   [gdb] Fix rethrow exception slicing in pretty_print_insn
>   [gdb] Fix rethrow exception slicing in insert_bp_location
>
>  gdb/breakpoint.c | 28 +++++++++++++++++++++-------
>  gdb/disasm.c     |  4 ++--
>  2 files changed, 23 insertions(+), 9 deletions(-)
>
>
> base-commit: b347f578952a29ff9b02090b0dafec563520c80b
> -- 
> 2.35.3


      parent reply	other threads:[~2022-10-24 11:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24  8:49 Tom de Vries
2022-10-24  8:49 ` [PATCH 1/2] [gdb] Fix rethrow exception slicing in pretty_print_insn Tom de Vries
2022-10-24  8:49 ` [PATCH 2/2] [gdb] Fix rethrow exception slicing in insert_bp_location Tom de Vries
2022-10-24 16:36   ` Pedro Alves
2022-10-24 16:43     ` Tom de Vries
2022-10-24 16:48       ` Simon Marchi
2022-10-25  7:08         ` Tom de Vries
2022-10-24 16:51       ` Pedro Alves
2022-10-25  7:14         ` Tom de Vries
2022-10-25  9:26           ` Pedro Alves
2022-10-24 11:20 ` Andrew Burgess [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=878rl5a2o7.fsf@redhat.com \
    --to=aburgess@redhat.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).