From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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) From: Bruno Larsen To: gdb-patches@sourceware.org Cc: pedro@palves.net, aburgess@redhat.com, Bruno Larsen 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-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2022 12:16:32 -0000 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