From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ECA703858D28; Fri, 5 Nov 2021 15:43:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ECA703858D28 From: "fredrik.hederstierna@securitas-direct.com" To: gdb-prs@sourceware.org Subject: [Bug gdb/28549] ARM/Cortex-M: improper stack unwinding when the target is in lockup state Date: Fri, 05 Nov 2021 15:43:20 +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: 9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fredrik.hederstierna@securitas-direct.com X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: luis.machado at linaro 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 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Nov 2021 15:43:21 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28549 --- Comment #4 from Fredrik Hederstierna --- I agree it might be some mixups between LR and PC, though I think in practi= ce it might not cause any problems in these cases. To cover also Cortex-M33 ARMv8M maybe also check for LR=3D0xFFFFFFFE and PC=3D0xEFFFFFFE. The 'easy' fix is to add these values I guess: diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 857a52a9a51..33b03ead5a4 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -556,6 +556,13 @@ arm_m_addr_is_magic (CORE_ADDR addr) case 0xfffffff1: case 0xfffffff9: case 0xfffffffd: + /* Values for Lockup state. + For more details see "B1.5.15 Unrecoverable exception cases" in + both ARMv6-M and ARMv7-M Architecture Reference Manuals, or + see "B4.32 Lockup" in ARMv8-M Architecture Reference Manual. */ + case 0xeffffffe: + case 0xfffffffe: + case 0xffffffff: /* Address is magic. */ return 1; Though maybe we would like to add some more info that actually detects more explicit the LOCKUP state and make some printouts about that? --=20 You are receiving this mail because: You are on the CC list for the bug.=