]> granicus.if.org Git - strace/blobdiff - syscall.c
mips n32: fix preadv/pwritev offset decoding
[strace] / syscall.c
index cfd16e72d0ef85dafa20e0b8c5a9c4cefa74689e..228536b479a7f51ac8dd4cb98fd69939c73e8f5a 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -881,6 +881,11 @@ print_pc(struct tcb *tcp)
                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)
@@ -1402,7 +1407,7 @@ get_scno(struct tcb *tcp)
        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;