Adjust debug API to address some x86-64 concerns.
- The argument buffer contained in the debug_{pre,post}_syscall message structures wasn't large enough to accomodate all
arguments for some syscalls on x86-64, which could potentially have led to kernel memory corruption when using syscall
tracing via the debug API. As such, enlarge it to accomodate 64-bit platforms as well.
- Adjust TeamDebugger/SyscallInfo to discriminate the target architecture and read the arguments when trapping console
output. Gets the latter working on x86-64.
This commit is contained in:
@@ -487,7 +487,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
debug_origin origin;
|
||||
uint32 syscall; // the syscall number
|
||||
uint32 args[16]; // syscall arguments
|
||||
uint8 args[128]; // syscall arguments
|
||||
} debug_pre_syscall;
|
||||
|
||||
// B_DEBUGGER_MESSAGE_POST_SYSCALL
|
||||
@@ -498,7 +498,7 @@ typedef struct {
|
||||
bigtime_t end_time; // time of syscall completion
|
||||
uint64 return_value; // the syscall's return value
|
||||
uint32 syscall; // the syscall number
|
||||
uint32 args[16]; // syscall arguments
|
||||
uint8 args[128]; // syscall arguments
|
||||
} debug_post_syscall;
|
||||
|
||||
// B_DEBUGGER_MESSAGE_SIGNAL_RECEIVED
|
||||
|
||||
Reference in New Issue
Block a user