From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Zpg4OTVRD2OsajAAWB0awg (envelope-from ) for ; Wed, 31 Aug 2022 08:16:53 -0400 Received: by simark.ca (Postfix, from userid 112) id DE0F61E4A7; Wed, 31 Aug 2022 08:16:53 -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=KbqDRBXA; 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=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.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 5C6331E13B for ; Wed, 31 Aug 2022 08:16:52 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DF2903839DFF for ; Wed, 31 Aug 2022 12:16:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF2903839DFF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1661948211; bh=yXkqZyBBljy4p6W/k8iQr6wDRjbtdsK/YkdZSL/s/0o=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=KbqDRBXAJcHf3oM36NYeH+gmNu+pCFtJUlLP6BonUmrgH/IRu00L2kL6rZSCdvtL0 pb7UPbpumfQ58+CLcAvVaFY/0rNqKMUFq7QeOvWJ0s7nXjTm5CLyzA8Cp/PB7FD4PE QRHRXvpFiQ6ixtysUp7gXcVckfy+O+AuFKjfQDMQ= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 3A8FB383E050 for ; Wed, 31 Aug 2022 12:16:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3A8FB383E050 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-328-Qyj2tsqvMdetFaTIeW8-Yw-1; Wed, 31 Aug 2022 08:16:27 -0400 X-MC-Unique: Qyj2tsqvMdetFaTIeW8-Yw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4BD031C0754B; Wed, 31 Aug 2022 12:16:27 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.43.2.105]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 87C674C819; Wed, 31 Aug 2022 12:16:26 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH v3 0/2] Fix reverse nexting over recursions Date: Wed, 31 Aug 2022 14:07:26 +0200 Message-Id: <20220831120727.2742360-1-blarsen@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 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 Cc: pedro@palves.net 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 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 | 18 +- gdb/testsuite/gdb.reverse/step-reverse.exp | 58 ++++++- 8 files changed, 282 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.2