mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:21:26 +08:00
syscall/names: export the syscall name in STUB module
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
d398ffb930
commit
ea42981cc6
@@ -58,7 +58,18 @@ static void dump_syscall(const char *tag, uint32_t cmd, const uint32_t *regs)
|
|||||||
* and R1..R7 = variable number of arguments depending on the system call.
|
* and R1..R7 = variable number of arguments depending on the system call.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef CONFIG_LIB_SYSCALL
|
||||||
|
if (cmd >= CONFIG_SYS_RESERVED)
|
||||||
|
{
|
||||||
|
svcinfo("SYSCALL %s: regs: %p cmd: %" PRId32 " name: %s\n", tag,
|
||||||
|
regs, cmd, g_funcnames[cmd - CONFIG_SYS_RESERVED]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
svcinfo("SYSCALL %s: regs: %p cmd: %" PRId32 "\n", tag, regs, cmd);
|
svcinfo("SYSCALL %s: regs: %p cmd: %" PRId32 "\n", tag, regs, cmd);
|
||||||
|
}
|
||||||
|
|
||||||
svcinfo(" R0: %08" PRIx32 " %08" PRIx32 " %08" PRIx32 " %08" PRIx32
|
svcinfo(" R0: %08" PRIx32 " %08" PRIx32 " %08" PRIx32 " %08" PRIx32
|
||||||
" %08" PRIx32 " %08" PRIx32 " %08" PRIx32 " %08" PRIx32 "\n",
|
" %08" PRIx32 " %08" PRIx32 " %08" PRIx32 " %08" PRIx32 "\n",
|
||||||
regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3],
|
regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3],
|
||||||
|
|||||||
@@ -55,7 +55,18 @@ static void dump_syscall(const char *tag, uint32_t cmd, const uint32_t *regs)
|
|||||||
* and R1..R7 = variable number of arguments depending on the system call.
|
* and R1..R7 = variable number of arguments depending on the system call.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef CONFIG_LIB_SYSCALL
|
||||||
|
if (cmd >= CONFIG_SYS_RESERVED)
|
||||||
|
{
|
||||||
|
svcinfo("SYSCALL %s: regs: %p cmd: %" PRId32 " name: %s\n", tag,
|
||||||
|
regs, cmd, g_funcnames[cmd - CONFIG_SYS_RESERVED]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
svcinfo("SYSCALL %s: regs: %p cmd: %" PRId32 "\n", tag, regs, cmd);
|
svcinfo("SYSCALL %s: regs: %p cmd: %" PRId32 "\n", tag, regs, cmd);
|
||||||
|
}
|
||||||
|
|
||||||
svcinfo(" R0: %08" PRIx32 " %08" PRIx32 " %08" PRIx32 " %08" PRIx32
|
svcinfo(" R0: %08" PRIx32 " %08" PRIx32 " %08" PRIx32 " %08" PRIx32
|
||||||
" %08" PRIx32 " %08" PRIx32 " %08" PRIx32 " %08" PRIx32 "\n",
|
" %08" PRIx32 " %08" PRIx32 " %08" PRIx32 " %08" PRIx32 "\n",
|
||||||
regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3],
|
regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3],
|
||||||
|
|||||||
@@ -89,16 +89,12 @@ EXTERN const uintptr_t g_stublookup[SYS_nsyscalls];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SCHED_INSTRUMENTATION_SYSCALL
|
|
||||||
|
|
||||||
/* Given the system call number, the corresponding entry in this table
|
/* Given the system call number, the corresponding entry in this table
|
||||||
* provides the name of the function.
|
* provides the name of the function.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
EXTERN const char *g_funcnames[SYS_nsyscalls];
|
EXTERN const char *g_funcnames[SYS_nsyscalls];
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Function Prototypes
|
* Public Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ include wraps/Make.defs
|
|||||||
MKSYSCALL = "$(TOPDIR)$(DELIM)tools$(DELIM)mksyscall$(HOSTEXEEXT)"
|
MKSYSCALL = "$(TOPDIR)$(DELIM)tools$(DELIM)mksyscall$(HOSTEXEEXT)"
|
||||||
CSVFILE = "$(TOPDIR)$(DELIM)syscall$(DELIM)syscall.csv"
|
CSVFILE = "$(TOPDIR)$(DELIM)syscall$(DELIM)syscall.csv"
|
||||||
|
|
||||||
|
STUB_SRCS += syscall_names.c
|
||||||
|
|
||||||
ifeq ($(CONFIG_SCHED_INSTRUMENTATION_SYSCALL),y)
|
ifeq ($(CONFIG_SCHED_INSTRUMENTATION_SYSCALL),y)
|
||||||
ifeq ($(CONFIG_LIB_SYSCALL),y)
|
ifeq ($(CONFIG_LIB_SYSCALL),y)
|
||||||
PROXY_SRCS += syscall_names.c
|
PROXY_SRCS += syscall_names.c
|
||||||
|
|||||||
Reference in New Issue
Block a user