From bf29eaabb63888b7f236e50147fa25deb3266b60 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Fri, 20 Nov 2020 18:04:16 +0900 Subject: [PATCH] arch/arm/src/common/arm_vfork.c: Fix syslog formats --- arch/arm/src/common/arm_vfork.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/arch/arm/src/common/arm_vfork.c b/arch/arm/src/common/arm_vfork.c index 78015695a7..35bd20ac98 100644 --- a/arch/arm/src/common/arm_vfork.c +++ b/arch/arm/src/common/arm_vfork.c @@ -24,6 +24,7 @@ #include +#include #include #include #include @@ -108,11 +109,12 @@ pid_t up_vfork(const struct vfork_s *context) int ret; sinfo("vfork context [%p]:\n", context); - sinfo(" r4:%08x r5:%08x r6:%08x r7:%08x\n", + sinfo(" r4:%08" PRIx32 " r5:%08" PRIx32 + " r6:%08" PRIx32 " r7:%08" PRIx32 "\n", context->r4, context->r5, context->r6, context->r7); - sinfo(" r8:%08x r9:%08x r10:%08x\n", + sinfo(" r8:%08" PRIx32 " r9:%08" PRIx32 " r10:%08" PRIx32 "\n", context->r8, context->r9, context->r10); - sinfo(" fp:%08x sp:%08x lr:%08x\n", + sinfo(" fp:%08" PRIx32 " sp:%08" PRIx32 " lr:%08" PRIx32 "\n", context->fp, context->sp, context->lr); /* Allocate and initialize a TCB for the child task. */ @@ -155,7 +157,8 @@ pid_t up_vfork(const struct vfork_s *context) DEBUGASSERT((uint32_t)parent->adj_stack_ptr > context->sp); stackutil = (uint32_t)parent->adj_stack_ptr - context->sp; - sinfo("Parent: stacksize:%d stackutil:%d\n", stacksize, stackutil); + sinfo("Parent: stacksize:%zu stackutil:%" PRId32 "\n", + stacksize, stackutil); /* Make some feeble effort to preserve the stack contents. This is * feeble because the stack surely contains invalid pointers and other @@ -180,9 +183,9 @@ pid_t up_vfork(const struct vfork_s *context) newfp = context->fp; } - sinfo("Parent: stack base:%08x SP:%08x FP:%08x\n", + sinfo("Parent: stack base:%p SP:%08" PRIx32 " FP:%08" PRIx32 "\n", parent->adj_stack_ptr, context->sp, context->fp); - sinfo("Child: stack base:%08x SP:%08x FP:%08x\n", + sinfo("Child: stack base:%p SP:%08" PRIx32 " FP:%08" PRIx32 "\n", child->cmn.adj_stack_ptr, newsp, newfp); /* Update the stack pointer, frame pointer, and volatile registers. When