From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 0A6BF3858412 for ; Mon, 24 Oct 2022 08:49:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0A6BF3858412 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 225E821ECB for ; Mon, 24 Oct 2022 08:49:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1666601354; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=co3Ne2daiTfW0Wz8QsxPU3iSahd+ZgtomF5euYWi73U=; b=l1qwPgEPLKsrmAVV9ZDGh4yBUeUXh/xietLYD01rPNb9GaBZaSQzy2IJQqGmjoaPXdQWnI vMdzYbd6jxFIkd4nJfQ83wxOGIaLL6Ws1o+7MqxXJlLCQB6XRqJMDay1XNdMWerHoZiEz1 jDghlrXm5tCjoLpdFrX0bHuPdKZG2JU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1666601354; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=co3Ne2daiTfW0Wz8QsxPU3iSahd+ZgtomF5euYWi73U=; b=ja/qLkLs31pSi2ClM3Ez+Kp5uGA2cKirTaLsslieyOquOLklUEiPBBjTOeP/5uJiCuFRNM qrYetYzTzF2rEXCQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0F6AA13357 for ; Mon, 24 Oct 2022 08:49:14 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Dk+OAopRVmMsWgAAMHmgww (envelope-from ) for ; Mon, 24 Oct 2022 08:49:14 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH 0/2] [gdb] Fix rethrow exception slicing Date: Mon, 24 Oct 2022 10:49:11 +0200 Message-Id: <20221024084913.19429-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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