From a0019992e1f54daad419abd88b1e7553f2196c27 Mon Sep 17 00:00:00 2001 From: Sugar Zhang Date: Wed, 9 Mar 2022 15:18:02 +0800 Subject: [PATCH] fiq_debugger_arm: Replace %pF with %pS to print Symbols or Function %pS and %ps are now the preferred conversion specifiers to print function names. The functionality is equivalent; remove the old, deprecated %pF and %pf support. [1] 9af7706492f9 ("lib/vsprintf: Remove support for %pF and %pf in favour of %pS and %ps") Before: debug> bt pid: 0 comm: swapper/0 r0 00000000 r1 00014590 r2 eef00418 r3 b01191c0 r4 ffffe000 r5 b0e04f14 r6 b0e04f50 r7 00000001 r8 b0e04ec8 r9 00000000 r10 b0d54af0 r11 00000000 mode SVC ip b0e05018 sp b0e01f58 lr b010777c pc b0107780 cpsr 600d0013 pc: b0107780 (ad65a2fd), lr b010777c (f187b55b), sp b0e01f58, fp 00000000 pc: b0918f30 (0c9cfd0c), lr b0918f30 (0c9cfd0c), sp b0e01f60, fp 00000000 pc: b01518b0 (71d36883), lr b01518b0 (71d36883), sp b0e01f68, fp 00000000 pc: b0151c30 (cd1f0787), lr b0151c30 (cd1f0787), sp b0e01fa8, fp b0d36254 pc: b0d00e40 (c723bc9c), lr b0d00e40 (c723bc9c), sp b0e01fb0, fp b0d36254 After this patch: debug> bt pid: 0 comm: swapper/0 r0 00000000 r1 0000f7d4 r2 eef00418 r3 b01191c0 r4 ffffe000 r5 b0e04f14 r6 b0e04f50 r7 00000001 r8 b0e04ec8 r9 00000000 r10 b0d54af0 r11 00000000 mode SVC ip 3e1aa000 sp b0e01f58 lr b010777c pc b0107780 cpsr 600d0013 pc: b0107780 (arch_cpu_idle+0x38/0x3c), lr b010777c (arch_cpu_idle+0x34/0x3c), sp b0e01f58, fp 00000000 pc: b0918f30 (default_idle_call+0x2c/0x3c), lr b0918f30 (default_idle_call+0x2c/0x3c), sp b0e01f60, fp 00000000 pc: b01518b0 (do_idle+0x1f8/0x284), lr b01518b0 (do_idle+0x1f8/0x284), sp b0e01f68, fp 00000000 pc: b0151c30 (cpu_startup_entry+0x18/0x20), lr b0151c30 (cpu_startup_entry+0x18/0x20), sp b0e01fa8, fp b0d36254 pc: b0d00e40 (start_kernel+0x4f4/0x520), lr b0d00e40 (start_kernel+0x4f4/0x520), sp b0e01fb0, fp b0d36254 Signed-off-by: Sugar Zhang Change-Id: I5e6e66cba5f094bad98a275b5fabd196997406e8 --- drivers/staging/android/fiq_debugger/fiq_debugger_arm.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/staging/android/fiq_debugger/fiq_debugger_arm.c b/drivers/staging/android/fiq_debugger/fiq_debugger_arm.c index e91238332d6b..d44287eba4bd 100644 --- a/drivers/staging/android/fiq_debugger/fiq_debugger_arm.c +++ b/drivers/staging/android/fiq_debugger/fiq_debugger_arm.c @@ -189,7 +189,7 @@ static int report_trace(struct stackframe *frame, void *d) if (sts->depth) { sts->output->printf(sts->output, - " pc: %px (%pF), lr %px (%pF), sp %px, fp %px\n", + " pc: %px (%pS), lr %px (%pS), sp %px, fp %px\n", frame->pc, frame->pc, frame->lr, frame->lr, frame->sp, frame->fp); sts->depth--; @@ -258,10 +258,7 @@ void fiq_debugger_dump_stacktrace(struct fiq_debugger_output *output, frame.sp = regs->ARM_sp; frame.lr = regs->ARM_lr; frame.pc = regs->ARM_pc; - output->printf(output, - " pc: %px (%pF), lr %px (%pF), sp %px, fp %px\n", - regs->ARM_pc, regs->ARM_pc, regs->ARM_lr, regs->ARM_lr, - regs->ARM_sp, regs->ARM_fp); + output->printf(output, "\n"); walk_stackframe(&frame, report_trace, &sts); return; }