From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DA9CB3875453; Wed, 8 May 2024 12:12:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DA9CB3875453 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1715170358; bh=HLWmOVwdl6dIMLiUv7+xIDK1mcjiYMZU4QW96ENfh88=; h=From:To:Subject:Date:In-Reply-To:References:From; b=A8ItKI4nClewj4tBRP5T7fAb0Y3I0xn7Z6UMTeUhLdo4Crs+Is9P1Abxn8N+nVEiF SXK3LBNeA5nXSbQjEs0m2LrEYwAMZ9YYeLpcIxCHQXxpkefk3UyTCngeszodAmuYdM 5zkmT/XU/XUeyF3yzv2bQttX/3FBrMdSIN6bDTGI= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug python/31437] [gdb/python] Unavailable register breaks python unwinding Date: Wed, 08 May 2024 12:12:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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: cvs-commit 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: 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=3D31437 --- Comment #6 from Sourceware Commits --- The master branch has been updated by Tom de Vries : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D2236c5e384de= 20b0dd6b2fbc964a7269027cb2d9 commit 2236c5e384de20b0dd6b2fbc964a7269027cb2d9 Author: Tom de Vries Date: Wed May 8 14:13:11 2024 +0200 [gdb/python] Make gdb.UnwindInfo.add_saved_register more robust On arm-linux, until commit bbb12eb9c84 ("gdb/arm: Remove tpidruro regis= ter from non-FreeBSD target descriptions") I ran into: ... FAIL: gdb.base/inline-frame-cycle-unwind.exp: cycle at level 5: \ backtrace when the unwind is broken at frame 5 ... What happens is the following: - the TestUnwinder from inline-frame-cycle-unwind.py calls gdb.UnwindInfo.add_saved_register with reg =3D=3D tpidruro and value "", - pyuw_sniffer calls value->contents ().data () to access the value of = the register, which throws an UNAVAILABLE_ERROR, - this causes the TestUnwinder unwinder to fail, after which another unwinder succeeds and returns the correct frame, and - the test-case fails because it's counting on the TestUnwinder to succ= eed and return an incorrect frame. Fix this by checking for !value::entirely_available as well as valued::optimized_out in unwind_infopy_add_saved_register. Tested on x86_64-linux and arm-linux. Approved-By: Andrew Burgess PR python/31437 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31437 --=20 You are receiving this mail because: You are on the CC list for the bug.=