You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/12/06 13:41:57 UTC
[incubator-nuttx] 07/27: arch/arm/src/armv7-a/arm_syscall.c: Fix
syslog formats
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 83b24f03821a606a5c983f52e0cecc1703ba9c77
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Dec 5 22:26:18 2020 +0900
arch/arm/src/armv7-a/arm_syscall.c: Fix syslog formats
---
arch/arm/src/armv7-a/arm_syscall.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/arch/arm/src/armv7-a/arm_syscall.c b/arch/arm/src/armv7-a/arm_syscall.c
index 9888888..23921a4 100644
--- a/arch/arm/src/armv7-a/arm_syscall.c
+++ b/arch/arm/src/armv7-a/arm_syscall.c
@@ -24,6 +24,7 @@
#include <nuttx/config.h>
+#include <inttypes.h>
#include <stdint.h>
#include <string.h>
#include <syscall.h>
@@ -142,14 +143,16 @@ uint32_t *arm_syscall(uint32_t *regs)
* and R1..R7 = variable number of arguments depending on the system call.
*/
- svcinfo("SYSCALL Entry: regs: %p cmd: %d\n", regs, cmd);
- svcinfo(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n",
+ svcinfo("SYSCALL Entry: regs: %p cmd: %" PRId32 "\n", regs, cmd);
+ svcinfo(" R0: %08" PRIx32 " %08" PRIx32 " %08" PRIx32 " %08" PRIx32
+ " %08" PRIx32 " %08" PRIx32 " %08" PRIx32 " %08" PRIx32 "\n",
regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3],
regs[REG_R4], regs[REG_R5], regs[REG_R6], regs[REG_R7]);
- svcinfo(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n",
+ svcinfo(" R8: %08" PRIx32 " %08" PRIx32 " %08" PRIx32 " %08" PRIx32
+ " %08" PRIx32 " %08" PRIx32 " %08" PRIx32 " %08" PRIx32 "\n",
regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11],
regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]);
- svcinfo("CPSR: %08x\n", regs[REG_CPSR]);
+ svcinfo("CPSR: %08" PRIx32 "\n", regs[REG_CPSR]);
/* Handle the SVCall according to the command in R0 */
@@ -479,13 +482,15 @@ uint32_t *arm_syscall(uint32_t *regs)
/* Report what happened */
svcinfo("SYSCALL Exit: regs: %p\n", regs);
- svcinfo(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n",
+ svcinfo(" R0: %" PRIx32 " %" PRIx32 " %" PRIx32 " %" PRIx32
+ " %" PRIx32 " %" PRIx32 " %" PRIx32 " %" PRIx32 "\n",
regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3],
regs[REG_R4], regs[REG_R5], regs[REG_R6], regs[REG_R7]);
- svcinfo(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n",
+ svcinfo(" R8: %" PRIx32 " %" PRIx32 " %" PRIx32 " %" PRIx32
+ " %" PRIx32 " %" PRIx32 " %" PRIx32 " %" PRIx32 "\n",
regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11],
- regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]);
- svcinfo("CPSR: %08x\n", regs[REG_CPSR]);
+ regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]);
+ svcinfo("CPSR: %08" PRIx32 "\n", regs[REG_CPSR]);
/* Return the last value of curent_regs. This supports context switches
* on return from the exception. That capability is only used with the