From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 347C63858002; Thu, 29 Feb 2024 19:39:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 347C63858002 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1709235572; bh=lAxpsaLDMmips2bTNRpWILl0/LpMHSgcVB6cvePxrR8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Mm6qtIrFaoDDdnmdA1sMWCxzfa9lbB5UfYfOrI2KSp8ohnIVZb0OWb8f/5AmNO1DU mDiDkFG/j3ffOqrrQe2oQbSPYMKWavRz9wGjnxC1RFMirNEmtKlD19F7gGuh04JV5f HVKNT8Gfv4GUsBxXEhYiZoBuEWlqIfco7vTZiAjQ= From: "lukas.graetz@tu-darmstadt.de" To: gdb-prs@sourceware.org Subject: [Bug gdb/31436] with .cfi_undefined Date: Thu, 29 Feb 2024 19:39:31 +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: 15.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: lukas.graetz@tu-darmstadt.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned 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=3D31436 --- Comment #1 from Lukas Gr=C3=A4tz --- (In reply to Lukas Gr=C3=A4tz from comment #0)=20 > The backtrace is still incorrect (also observed in [2]): >=20 > $ gdb bar-artificial-fix-undefined > GNU gdb (GDB) 15.0.50.20240229-git >=20 > (gdb) run > Starting program: bar-artificial-fix-undefined >=20 > Program received signal SIGABRT, Aborted. > 0x00007ffff7dee00b in raise () from /lib/x86_64-linux-gnu/libc.so.6 > (gdb) bt > #0 0x00007ffff7dee00b in raise () from /lib/x86_64-linux-gnu/libc.so.6 > #1 0x00007ffff7dcd859 in abort () from /lib/x86_64-linux-gnu/libc.so.6 > #2 0x00000000004011b0 in bar () at bar-artificial.c:30 > #3 0x00000000004011d1 in baz ( > a=3D,=20 > b=3D, c=3D, d=3D,=20 > e=3D, f=3D, g=3D48, h=3D49) at bar-arti= ficial.c:38 >=20 >=20 > Here, the backtrace did not reach the functions qux() and main(). In this > case, the stack base pointer rbp was clobbered and marked with > .cfi_undefined. But it still should be possible without rbp to reconstruct > the backtrace. Edit: The last sentence was partly incorrect, I re-checked the assembler co= de. In qux(), there is a: movq %rsp, %rbp .cfi_def_cfa_register 6 And then rsp is clobbered in qux(). And rbp is clobbert in bar(). So the re= turn address from qux() is lost and main() cannot be reached by the backtrace. B= ut the backtrace should still have reached qux(). And the parameters a,b,c of baz() are also reconstructable. --=20 You are receiving this mail because: You are on the CC list for the bug.=