From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E8AF93858407; Fri, 5 Nov 2021 10:59:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E8AF93858407 From: "tarek.bouchkati at gmail dot 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 10:59:15 +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: tarek.bouchkati at gmail dot com 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 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 10:59:16 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28549 --- Comment #2 from Tarek BOCHKATI --- according to ARM: ref https://developer.arm.com/documentation/ka001181/late= st quote: > During LOCKUP, the PC will be forced to 0xFFFFFFFx and will keep fetching from that address applying this minor change to test the theory seem to work perfectly: diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 5b60831bbe9..930eba7155e 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -543,6 +543,7 @@ arm_m_addr_is_magic (CORE_ADDR addr) { switch (addr) { + case 0xfffffffe: /* Values from ARMv8-M Architecture Technical Reference. */ case 0xffffffb0: case 0xffffffb8: now gdb reports: (gdb) tar ext :3333 Remote debugging using :3333 warning: No executable has been specified and target does not support determining executable automatically. Try using the "file" command. (gdb) c Continuing. stm32h7x.cpu0 -- clearing lockup after double fault Program received signal SIGINT, Interrupt. (gdb) --=20 You are receiving this mail because: You are on the CC list for the bug.=