From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 52D79385843B; Mon, 29 Jan 2024 14:34:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 52D79385843B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1706538849; bh=O+KYbehKK22NcdKjtxc9UCefy0t8Vatez8As8PZllzg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=g1Uqs5h5ooSbs6i8bm4SOnzeClK9u2O189NMyO55aTMbfgob9LAyzLDrNLsq2NKk5 7qfENy5DTtSWdUbWTceqxIOd0HXF53NW0ij44LbTEZjTHUsH8cfMBwtoiUEwsnJ6So Ka15PTW6cqZw99RD8rbbY+Yh0hYZ7GuD5Z9cIG7M= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/29865] The GDB dies during unwind the stack - question Date: Mon, 29 Jan 2024 14:34:08 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: ssbssa at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29865 --- Comment #5 from Sourceware Commits --- The master branch has been updated by Hannes Domani : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D633680620bb8= 5ed6f80b22371ef49610faec8d03 commit 633680620bb85ed6f80b22371ef49610faec8d03 Author: Hannes Domani Date: Mon Jan 29 15:31:44 2024 +0100 Fix backtrace limit stopping on inline frame If you have set up a backtrace limit, and the backtrace stops because of this in an inline frame with arguments, you get an assertion failure: ``` (gdb) bt (gdb) set backtrace limit 2 (gdb) bt C:/src/repos/binutils-gdb.git/gdb/frame.c:3346: internal-error: reinfla= te: Assertion `m_cached_level >=3D -1' failed. ``` And if this one is fixed, there is another one as well: ``` (gdb) bt C:/src/repos/binutils-gdb.git/gdb/dwarf2/loc.c:1160: internal-error: dwarf_expr_reg_to_entry_parameter: Assertion `frame !=3D NULL' failed. ``` The reason for both of them is this kind of loop: ``` while (get_frame_type (frame) =3D=3D INLINE_FRAME) frame =3D get_prev_frame (frame); ``` Since get_prev_frame respects the backtrace limit, it will return NULL, and from there on you can't continue. This changes these loops to use get_prev_frame_always instead, so you always get a non-inline frame in the end. With this backtrace works: ``` (gdb) bt (gdb) ``` Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29865 Approved-By: Andrew Burgess --=20 You are receiving this mail because: You are on the CC list for the bug.=