/* for struct iovec */
#include <sys/uio.h>
+#include "regs.h"
#include "ptrace.h"
#if defined(SPARC64)
# define PTRACE_SETREGS PTRACE_SETREGS64
#endif
-#include "regs.h"
-
#if defined SPARC64
# include <asm/psrcompat.h>
#elif defined SPARC
return;
}
tprintf(fmt, pc);
+#elif defined(AARCH64)
+ if (aarch64_io.iov_len == sizeof(arm_regs))
+ tprintf(fmt, (unsigned long) arm_regs.ARM_pc);
+ else
+ tprintf(fmt, (unsigned long) aarch64_regs.pc);
#elif defined(ARM)
tprintf(fmt, arm_regs.ARM_pc);
#elif defined(AVR32)
scno = mips_REG_V0;
if (!SCNO_IN_RANGE(scno)) {
- if (mips_REG_A3 == 0 || mips_REG_A3 == -1) {
+ if (mips_REG_A3 == 0 || mips_REG_A3 == (uint64_t) -1) {
if (debug_flag)
fprintf(stderr, "stray syscall exit: v0 = %ld\n", scno);
return 0;
else {
switch (sys_res & RVAL_MASK) {
case RVAL_HEX:
- tprintf("= %#lx", tcp->u_rval);
+#if SUPPORTED_PERSONALITIES > 1
+ if (current_wordsize < sizeof(long))
+ tprintf("= %#x",
+ (unsigned int) tcp->u_rval);
+ else
+#endif
+ tprintf("= %#lx", tcp->u_rval);
break;
case RVAL_OCTAL:
tprintf("= %#lo", tcp->u_rval);