Skip to content

Commit

Permalink
fixed issues on x86
Browse files Browse the repository at this point in the history
  • Loading branch information
rdbo committed Mar 9, 2024
1 parent 40571c3 commit 131643e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/linux/ptrace/x64/x64.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ ptrace_alloc(pid_t pid, size_t bits, size_t size, int prot)
ptrace_syscall_t ptsys;

if (bits == 32) {
ptsys.syscall_num = 192; /* mmap2 syscall number */
ptsys.syscall_num = 90; /* x86_32 mmap syscall number */
} else {
ptsys.syscall_num = SYS_mmap;
}
Expand Down
2 changes: 1 addition & 1 deletion src/linux/ptrace/x86/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ ptrace_alloc(pid_t pid, size_t bits, size_t size, int prot)
long alloc;
ptrace_syscall_t ptsys;

ptsys.syscall_num = SYS_mmap2;
ptsys.syscall_num = SYS_mmap;

/* Setup mmap arguments */
ptsys.args[0] = 0; /* `void *addr` */
Expand Down

0 comments on commit 131643e

Please sign in to comment.