From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 655023857C77; Fri, 5 Nov 2021 23:25:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 655023857C77 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 23:25:26 +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 23:25:26 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28549 --- Comment #7 from Fredrik Hederstierna --- This might started with patch from 2016-09-27: @@ -472,7 +528,7 @@ arm_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR val) /* On M-profile devices, do not strip the low bit from EXC_RETURN (the magic exception return address). */ if (gdbarch_tdep (gdbarch)->is_m - && (val & 0xfffffff0) =3D=3D 0xfffffff0) + && arm_m_addr_is_magic (val)) return val; if (arm_apcs_32) Though still PC=3D0xEFFFFFFE is a Lockup state for ARMv8M to my understandi= ng, so just revert that wont do the full trick. Also I think it is good to have the explicit EXC_RETURN values defined to possibly make way to future special handling of the actual meaning of these values, like using different stack pointers etc. --=20 You are receiving this mail because: You are on the CC list for the bug.=