[PATCH v5 00/10] arm64: stack backtraces
Tom Rini
trini at konsulko.com
Mon Aug 11 22:52:51 CEST 2025
On Tue, Jul 29, 2025 at 06:07:21PM +0200, Casey Connolly wrote:
> Implement support for printing stack backtraces on ARM64, make
> framepointer support configurable by the build system with
> CONFIG_FRAMEPOINTER and teach U-Boot to walk the framepointers and
> unwind the stack when an exception occurs. Also show all 64 bits of the
> exception syndrom register (ESR).
>
> Additionally, a new global unwind_stack() function is added, this can
> be called from anywhere to print a backtrace which can be useful when
> debugging certain problems. It is now used during panic() when available
> to provide more useful information for debugging.
>
> A new printf format specifier is added: %pS will print a symbol name
> from an address, this is particularly useful for function pointers
This fails on sandbox because the prototype for unwind_stack is #if
guarded but usage is now if (IS_ENABLED(...)) guarded. The next problem
however is that the vsprintf.c changes aren't safe for non-ARM64:
lib/vsprintf.c: In function 'pointer':
lib/vsprintf.c:527:43: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
527 | return ptr_symbol((phys_addr_t)ptr, buf, end,
|
Handling for %S will need to be #if guarded I believe. Please push the
next iteration through CI, thanks.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250811/befde09c/attachment.sig>
More information about the U-Boot
mailing list