This repository has been archived by the owner on Nov 15, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'strace/master' into HEAD
Change-Id: I71324955ac973323aa790485c240e553272ff266
- Loading branch information
Showing
273 changed files
with
2,886 additions
and
4,999 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
struct arm_pt_regs { | ||
int uregs[18]; | ||
}; | ||
#define ARM_cpsr uregs[16] | ||
#define ARM_pc uregs[15] | ||
#define ARM_lr uregs[14] | ||
#define ARM_sp uregs[13] | ||
#define ARM_ip uregs[12] | ||
#define ARM_fp uregs[11] | ||
#define ARM_r10 uregs[10] | ||
#define ARM_r9 uregs[9] | ||
#define ARM_r8 uregs[8] | ||
#define ARM_r7 uregs[7] | ||
#define ARM_r6 uregs[6] | ||
#define ARM_r5 uregs[5] | ||
#define ARM_r4 uregs[4] | ||
#define ARM_r3 uregs[3] | ||
#define ARM_r2 uregs[2] | ||
#define ARM_r1 uregs[1] | ||
#define ARM_r0 uregs[0] | ||
#define ARM_ORIG_r0 uregs[17] | ||
|
||
static union { | ||
struct user_pt_regs aarch64_r; | ||
struct arm_pt_regs arm_r; | ||
} arm_regs_union; | ||
#define aarch64_regs arm_regs_union.aarch64_r | ||
#define arm_regs arm_regs_union.arm_r | ||
|
||
uint64_t *const aarch64_sp_ptr = (uint64_t *) &aarch64_regs.sp; | ||
uint32_t *const arm_sp_ptr = (uint32_t *) &arm_regs.ARM_sp; | ||
static struct iovec aarch64_io = { | ||
.iov_base = &arm_regs_union | ||
}; | ||
|
||
#define ARCH_REGS_FOR_GETREGSET arm_regs_union | ||
#define ARCH_IOVEC_FOR_GETREGSET aarch64_io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "arm/arch_sigreturn.c" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
if (tcp->currpers == 1) { | ||
if (check_errno && is_negated_errno(aarch64_regs.regs[0])) { | ||
tcp->u_rval = -1; | ||
tcp->u_error = -aarch64_regs.regs[0]; | ||
} else { | ||
tcp->u_rval = aarch64_regs.regs[0]; | ||
} | ||
} else { | ||
#include "arm/get_error.c" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
switch (aarch64_io.iov_len) { | ||
case sizeof(aarch64_regs): | ||
/* We are in 64-bit mode */ | ||
scno = aarch64_regs.regs[8]; | ||
update_personality(tcp, 1); | ||
break; | ||
case sizeof(arm_regs): | ||
/* We are in 32-bit mode */ | ||
/* Note: we don't support OABI, unlike 32-bit ARM build */ | ||
scno = arm_regs.ARM_r7; | ||
scno = shuffle_scno(scno); | ||
update_personality(tcp, 0); | ||
break; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
if (tcp->currpers == 1) { | ||
tcp->u_arg[0] = aarch64_regs.regs[0]; | ||
tcp->u_arg[1] = aarch64_regs.regs[1]; | ||
tcp->u_arg[2] = aarch64_regs.regs[2]; | ||
tcp->u_arg[3] = aarch64_regs.regs[3]; | ||
tcp->u_arg[4] = aarch64_regs.regs[4]; | ||
tcp->u_arg[5] = aarch64_regs.regs[5]; | ||
} else { | ||
#include "arm/get_syscall_args.c" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
if (aarch64_io.iov_len == sizeof(arm_regs)) | ||
tprintf(fmt, (unsigned long) arm_regs.ARM_pc); | ||
else | ||
tprintf(fmt, (unsigned long) aarch64_regs.pc); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
long | ||
getrval2(struct tcb *tcp) | ||
{ | ||
long r20; | ||
if (upeek(tcp->pid, 20, &r20) < 0) | ||
return -1; | ||
return r20; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
static long alpha_r0; | ||
static long alpha_a3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
long addr; | ||
|
||
if (upeek(tcp->pid, REG_FP, &addr) < 0) | ||
return 0; | ||
addr += offsetof(struct sigcontext, sc_mask); | ||
|
||
tprints("{mask="); | ||
print_sigset_addr_len(tcp, addr, NSIG / 8); | ||
tprints("}"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
if (check_errno && alpha_a3) { | ||
tcp->u_rval = -1; | ||
tcp->u_error = alpha_r0; | ||
} else { | ||
tcp->u_rval = alpha_r0; | ||
} |
Oops, something went wrong.