Message ID | 20230119104618.15503-1-tdevries@suse.de |
---|---|
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A9D76385841E for <patchwork@sourceware.org>; Thu, 19 Jan 2023 10:47:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A9D76385841E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674125229; bh=GjTR0Vw1dsRXbf4nPWuXkpvN00W7NGcjRD7SRP6XfUo=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=sBea7Ozud6sCAwZzJeRgNNyCjFj+jhNTlqfUNN3+qPamyBUUnEtLdSORmPjiQ3t9L YemaYf1tGNyJ0CTESlTrx5Oaw/fpGFV0Jw+YEekGrIO7961Kh0uIFjRcGsC3fCmNlw dE8LHtMDgbDKiSCxCIVXf8yFcO6flB2VrZlyepjE= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id CAC3D3858C52 for <gdb-patches@sourceware.org>; Thu, 19 Jan 2023 10:46:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CAC3D3858C52 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-out2.suse.de (Postfix) with ESMTPS id 11AA75CC60; Thu, 19 Jan 2023 10:46:19 +0000 (UTC) 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 E467D139ED; Thu, 19 Jan 2023 10:46:18 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id djaaNnofyWOMJwAAMHmgww (envelope-from <tdevries@suse.de>); Thu, 19 Jan 2023 10:46:18 +0000 To: gdb-patches@sourceware.org Cc: Bruno Larsen <blarsen@redhat.com>, Andrew Burgess <aburgess@redhat.com>, Luis Machado <luis.machado@arm.com> Subject: [PATCH 0/4] [gdb] Test-case gdb.base/unwind-on-each-insn.exp improvements Date: Thu, 19 Jan 2023 11:46:14 +0100 Message-Id: <20230119104618.15503-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.5 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> From: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org> Reply-To: Tom de Vries <tdevries@suse.de> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
Test-case gdb.base/unwind-on-each-insn.exp improvements
|
|
Message
Tom de Vries
Jan. 19, 2023, 10:46 a.m. UTC
While analyzing PR record/29721 "[gdb, record, aarch64] FAIL: gdb.reverse/solib-precsave.exp: reverse-next third shr1", I came to realize that I was a looking at the aarch64 variant of x86_64 PR record/16678 (as indeed suggested by Bruno in the PR). The test-case gdb.base/unwind-on-each-insn.exp was added in the commit to fix PR record/16678, to detect similar problems on other architectures, but it passes on aarch64 and doesn't detect record/29721, because the function that is checked is too simple on aarch64: ... 00000000004005fc <foo>: 4005fc: d503201f nop 400600: d65f03c0 ret ... This series first simplifies, and then improves test-case gdb.base/unwind-on-each-insn.exp to detect PR record/16678, or more precisely, the two spinoff PRs I filed that have reproducers that do not involve reverse execution: - PR30010 - [gdb/tdep, aarch64] Incorrect frame address for last insn (non-leaf case) - PR30011 - [gdb/tdep, aarch64] Incorrect frame address for last insn (leaf case) In short, we have following patches: - [gdb/testsuite] Simplify gdb.base/unwind-on-each-insn.exp Remove unnecessary and fragile complication of analyzing disassembly. - [gdb/testsuite] Improve gdb.base/unwind-on-each-insn.exp Detect PR30011. - [gdb/tdep, aarch64] Fix frame address of last insn in leaf function Fix for PR30011. - [gdb/testsuite] Analyze non-leaf fn in gdb.base/unwind-on-each-insn.exp Detect PR30010. Improving the test-case also detected a problem on powerpc64le, filed as PR tdep/30021 - "[gdb/tdep, powerpc64le] previous frame inner to this frame (corrupt stack?)". Due to unavailability I haven't tested the last patch on powerpc64le-linux. While doing this investigation I also ran into PR tdep/30019 - "[gdb/tdep, i386] frame address at first insn in main is zero", but the test-case doesn't trigger this. I've not tried adding this. Finally, I'm considering moving the test-case to gdb.arch, but I haven't included a patch for this. Tom de Vries (4): [gdb/testsuite] Simplify gdb.base/unwind-on-each-insn.exp [gdb/testsuite] Improve gdb.base/unwind-on-each-insn.exp [gdb/tdep, aarch64] Fix frame address of last insn in leaf function [gdb/testsuite] Analyze non-leaf fn in gdb.base/unwind-on-each-insn.exp gdb/aarch64-tdep.c | 6 +- .../gdb.base/unwind-on-each-insn-foo.c | 8 +- gdb/testsuite/gdb.base/unwind-on-each-insn.c | 6 +- .../gdb.base/unwind-on-each-insn.exp | 167 ++++++++---------- 4 files changed, 89 insertions(+), 98 deletions(-) base-commit: b8d21eb0cd10d6127e77cc437d82e949adb0c454
Comments
On 1/19/23 11:46, Tom de Vries via Gdb-patches wrote: > Improving the test-case also detected a problem on powerpc64le, filed as PR > tdep/30021 - "[gdb/tdep, powerpc64le] previous frame inner to this frame > (corrupt stack?)". > > Due to unavailability I haven't tested the last patch on powerpc64le-linux. I've done that now, and ran into yet another problem on powerpc64le-linux: PR tdep/30049. I've mentioned it in the commit log. I've pushed the remaining two patches. Thanks, - Tom