From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 1r4HItZfPWPd8wUAWB0awg (envelope-from ) for ; Wed, 05 Oct 2022 06:43:34 -0400 Received: by simark.ca (Postfix, from userid 112) id 813651E112; Wed, 5 Oct 2022 06:43:34 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=lHpf4fmU; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id F0B6A1E0D3 for ; Wed, 5 Oct 2022 06:43:33 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 480C73858038 for ; Wed, 5 Oct 2022 10:43:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 480C73858038 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1664966613; bh=nGb8Q0NXqYBGfsuqzCRdTvYATTBZI8rJH0mWDePss0g=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=lHpf4fmUZVTPXZQJXfq/H1k1uh/VPogZU6JOjnH0Ils09XToyqS36ZDfnvH1c3Lue wa8U4F1tK4a4ugnzPGYWBxmP9NycIci4LOhLTS6lLQOmSHGO3xcd77zyhHSuiHggSt B4EkucqnEKh4Ja5MrVVBsuAzRSmDA/p7gBMbxn1g= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 6F3CF3858C54 for ; Wed, 5 Oct 2022 10:43:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6F3CF3858C54 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-607-af0D-6R_PyOgX_8NQU0n5A-1; Wed, 05 Oct 2022 06:43:11 -0400 X-MC-Unique: af0D-6R_PyOgX_8NQU0n5A-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 870B61C05153 for ; Wed, 5 Oct 2022 10:43:11 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.43.2.105]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0C2792166B26; Wed, 5 Oct 2022 10:43:10 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH v4 0/2] Fix reverse nexting over recursions Date: Wed, 5 Oct 2022 12:38:31 +0200 Message-Id: <20221005103832.3163424-1-blarsen@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Bruno Larsen via Gdb-patches Reply-To: Bruno Larsen Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" This patch series fixes gdb record/16678, GDB being unable to reverse-next over a recursive function. However, the simple way to fix it hit a snag when I discovered that the amd64 epilogue unwinder would give a different frame id than the dwarf2 unwinder would in the rest of the function. This patch series first change this discrepancy, then fixes the bug. Changelog for v4: * more style fixes, thanks Pedro. * Reworked part of the test, as it was not detecting failures correctly. Changelog for v3: * fix some comments on the amd64_epilogue_unwinder * fix style for the step-reverse test Changelog for v2: * Implemented Pedro Alves's suggestion to simplify the fix * Added the first patch to fix a regression that the simple fix would introduce. Bruno Larsen (2): Change calculation of frame_id by amd64 epilogue unwinder gdb/reverse: Fix stepping over recursive functions gdb/amd64-tdep.c | 10 +- gdb/infrun.c | 2 +- .../gdb.base/unwind-on-each-insn-foo.c | 22 +++ gdb/testsuite/gdb.base/unwind-on-each-insn.c | 25 +++ .../gdb.base/unwind-on-each-insn.exp | 154 ++++++++++++++++++ gdb/testsuite/gdb.reverse/step-precsave.exp | 6 +- gdb/testsuite/gdb.reverse/step-reverse.c | 19 ++- gdb/testsuite/gdb.reverse/step-reverse.exp | 55 ++++++- 8 files changed, 280 insertions(+), 13 deletions(-) create mode 100644 gdb/testsuite/gdb.base/unwind-on-each-insn-foo.c create mode 100644 gdb/testsuite/gdb.base/unwind-on-each-insn.c create mode 100644 gdb/testsuite/gdb.base/unwind-on-each-insn.exp -- 2.37.3