diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2023-09-11 14:56:17 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-09-12 11:36:24 +0200 |
commit | 065040aa226eb7f6bd1e2bb408356fab133b512c (patch) | |
tree | 850f09a205a6f9ae0a5e8ab1a5fac11347d4ebe8 /arch/arm/lib64/stacktrace.c | |
parent | 58b50ee3925e0b3161749311c17b95e7e441c1ff (diff) | |
download | barebox-065040aa226eb7f6bd1e2bb408356fab133b512c.tar.gz barebox-065040aa226eb7f6bd1e2bb408356fab133b512c.tar.xz |
ARM64: backtrace: print stacktrace to stderr
Rule of thumb is to print interactive output to stdout and status
messages to stderr. A stack dump falls into the latter category and part
of the stack trace is already printed to stderr, because of use of the
logging functions, which always prints there.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230911125619.2782229-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/lib64/stacktrace.c')
-rw-r--r-- | arch/arm/lib64/stacktrace.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/lib64/stacktrace.c b/arch/arm/lib64/stacktrace.c index db5691a609..76aec734e1 100644 --- a/arch/arm/lib64/stacktrace.c +++ b/arch/arm/lib64/stacktrace.c @@ -40,9 +40,9 @@ int unwind_frame(struct stackframe *frame) static void dump_backtrace_entry(unsigned long where, unsigned long from) { #ifdef CONFIG_KALLSYMS - printf("[<%08lx>] (%pS) from [<%08lx>] (%pS)\n", where, (void *)where, from, (void *)from); + eprintf("[<%08lx>] (%pS) from [<%08lx>] (%pS)\n", where, (void *)where, from, (void *)from); #else - printf("Function entered at [<%08lx>] from [<%08lx>]\n", where, from); + eprintf("Function entered at [<%08lx>] from [<%08lx>]\n", where, from); #endif } @@ -60,7 +60,7 @@ void unwind_backtrace(struct pt_regs *regs) frame.pc = (unsigned long)unwind_backtrace; } - printf("Call trace:\n"); + eprintf("Call trace:\n"); while (1) { unsigned long where = frame.pc; int ret; |