From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F25A53858D34; Fri, 1 Mar 2024 12:24:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F25A53858D34 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1709295883; bh=BgF9kIshKXpxxLSR/kEWX2SsrMP0fX6X4EkBMfrXCCI=; h=From:To:Subject:Date:From; b=CBqB4+BF3VTKY4aL9zHptsr52eFCOdzOIRvjGccFFjXRpWkRQV1XI+3a6U6FvBuF2 NxWxfhDC08Dof4WHOCS57hpAQmKu7gG0TmSWuOqn2YOl2C1zAAAMH3x453fvGVB372 h5EQip3pbzYRdVSmY8i3iSFFq/HWINhlydVPPw1g= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug python/31437] New: [gdb/python] Unavailable register breaks python unwinding Date: Fri, 01 Mar 2024 12:24:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: python X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D31437 Bug ID: 31437 Summary: [gdb/python] Unavailable register breaks python unwinding Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: python Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- On arm-linux, until this commit: ... commit bbb12eb9c84aa2b32480b7c022c494c2469ef717 Author: Thiago Jung Bauermann Date: Mon Feb 26 19:11:45 2024 -0300 gdb/arm: Remove tpidruro register from non-FreeBSD target descriptions ... I ran into: ... FAIL: gdb.base/inline-frame-cycle-unwind.exp: cycle at level 5: backtrace w= hen the unwind is broken at frame 5 ... Because this was the only reported progression, I decided to investigate a = bit further. I found that the python unwinder fails because this piece of code in pyuw_sniffer ignores the fact that value can be !entirely_available: ... /* Populate registers array. */ for (int i =3D 0; i < unwind_info->saved_regs->size (); ++i) { ... memcpy (cached->data.get (), value->contents ().data (), data_size); } } ... which throws an unavailable error, which is then caught by frame_unwind_try_unwinder: ... if (ex.error =3D=3D NOT_AVAILABLE_ERROR) { /* This usually means that not even the PC is available,=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 thus most unwinders aren't able to determine if they're=20=20= =20=20=20=20=20=20=20=20=20=20 the best fit. Keep trying. Fallback prologue unwinders=20=20= =20=20=20=20=20=20=20=20=20 should always accept the frame. */ return 0; } ... --=20 You are receiving this mail because: You are on the CC list for the bug.=