Open xiaotailang opened 1 year ago
Can't you just add the symbol table for the user space to GDB using the add-symbol-file command?
Is there any document about adding new system calls under the protection of mpu? I add a new system call in the following file, but when debugging, I found that the address of the new system call in the g_stublookup array is 0.
path/syscall/syscall_lookup.h:SYSCALL_LOOKUP(mycall, 0, STUB_mycall)
path/syscall/syscall_stublookup.c:uintptr_t STUB_mycall(int nbr);
path/syscall/syscall.csv:"mycall","nuttx/mycall.h","","int"
cat path/include/nuttx/mycall.h
extern "C" {
int mycall(void);
}
path/include/sys/syscall.h
cat path/sched/mycall/mycall.c
int mycall(void) { int num=0; num=num+2; return num; }
I use version is nuttx-8.2
@superxyxiao nuttx-8.2 is a very old release(2019/11), why not use the last dev branch?
Under mpu protected mode, I added a new system call, But appeared a panic , and I tried to debug, but when using gdb tracing, only the code in kernel mode can be traced, and the code in application mode cannot be traced. So I want to know in mpu protected mode, how does gdb track the code of application state and kernel state at the same time.