public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/2] [gdb] Fix rethrow exception slicing
@ 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
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Tom de Vries @ 2022-10-24  8:49 UTC (permalink / raw)
  To: gdb-patches

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.

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-10-25  9:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-24  8:49 [PATCH 0/2] [gdb] Fix rethrow exception slicing 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 ` [PATCH 0/2] [gdb] Fix rethrow exception slicing Andrew Burgess

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).