From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EE8EB3858409; Mon, 13 Dec 2021 09:55:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EE8EB3858409 From: "tomas.vanek at fbl dot cz" To: gdb-prs@sourceware.org Subject: [Bug gdb/28549] ARM/Cortex-M: improper stack unwinding when the target is in lockup state Date: Mon, 13 Dec 2021 09:55:25 +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: tomas.vanek at fbl dot cz 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: Mon, 13 Dec 2021 09:55:26 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28549 --- Comment #16 from tomas.vanek at fbl dot cz --- Luis, TBH I didn't care about elegance ;) The prevention of bogus unwinding is much more important. Look at test results. Just before real lockup: Breakpoint 1, DoubleFaultGenerator () at C:/dvl/stm32l5trustzone/GPIO_IOToggle_TrustZone/Secure/Src/stm32l5xx_it.c: 72 72 double_fault_dest=3D *double_fault_unreadable_src; (gdb) backtrace #0 DoubleFaultGenerator () at C:/dvl/stm32l5trustzone/GPIO_IOToggle_TrustZone/Secure/Src/stm32l5xx_it.c:72 #1 0x0c000a50 in HardFault_Handler () at C:/dvl/stm32l5trustzone/GPIO_IOToggle_TrustZone/Secure/Src/stm32l5xx_it.c:99 #2 #3 0x0c000876 in HardFaultGenerator () at C:/dvl/stm32l5trustzone/GPIO_IOToggle_TrustZone/Secure/Src/main.c:406 #4 0x0c0008c0 in HAL_SYSTICK_Callback () at C:/dvl/stm32l5trustzone/GPIO_IOToggle_TrustZone/Secure/Src/main.c:427 #5 0x0c000b1e in SysTick_Handler () at C:/dvl/stm32l5trustzone/GPIO_IOToggle_TrustZone/Secure/Src/stm32l5xx_it.c:2= 34 #6 #7 HAL_GPIO_ReadPin (GPIOx=3D0x0, GPIO_Pin=3D0) at C:/dvl/stm32l5trustzone/GPIO_IOToggle_TrustZone/Drivers/STM32L5xx_HAL_Drive= r/Src/stm32l5xx_hal_gpio.c:371 #8 0x0c0004ec in main () at C:/dvl/stm32l5trustzone/GPIO_IOToggle_TrustZone/Secure/Src/main.c:165 Locked-up, gdb with Fredrik's alternative patch: (gdb) c Continuing. stm32l5x.cpu -- clearing lockup after double fault Program received signal SIGINT, Interrupt. (gdb) backtrace #0 #1 0x4fff0000 in ?? () #2 0x30000048 in pSecureErrorCallback () Backtrace stopped: previous frame identical to this frame (corrupt stack?) As expected, backtrace got completely lost. --=20 You are receiving this mail because: You are on the CC list for the bug.=