aboutsummaryrefslogtreecommitdiffstats
path: root/print.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2020-06-02 14:52:24 +0200
committerMattias Andrée <maandree@kth.se>2020-06-02 14:52:24 +0200
commit110356616fc9e6560ce0912c1315eb23f3b67357 (patch)
tree666d917bc48516a2b5691eb869aa3560f6d672d0 /print.c
parentDo not use \t in traces, does not look good with PID prefixes in the output (diff)
downloadsctrace-110356616fc9e6560ce0912c1315eb23f3b67357.tar.gz
sctrace-110356616fc9e6560ce0912c1315eb23f3b67357.tar.bz2
sctrace-110356616fc9e6560ce0912c1315eb23f3b67357.tar.xz
Fix regressen: print pointers in hexadecimal
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--print.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/print.c b/print.c
index 206758d..9ca03c8 100644
--- a/print.c
+++ b/print.c
@@ -459,7 +459,7 @@ printf_systemcall(struct process *proc, const char *scall, const char *fmt, ...)
tprintf(proc, "&");
}
if (arg)
- tprintf(proc, "%#llu", arg);
+ tprintf(proc, "%#llx", arg);
else
tprintf(proc, "NULL");
} else if (*fmt >= '1' && *fmt <= '6') {
@@ -947,9 +947,9 @@ print_systemcall_exit(struct process *proc)
else if (proc->ret_type == XLLong)
tprintf(proc, "= %#llx", (unsigned long long int)proc->ret);
else if (proc->ret_type == Ptr && (long long int)proc->ret >= 0 && proc->ptr_is_int)
- tprintf(proc, "= %#u", (unsigned int)proc->ret);
+ tprintf(proc, "= %#x", (unsigned int)proc->ret);
else if (proc->ret_type == Ptr && (long long int)proc->ret >= 0)
- tprintf(proc, "= %#llu", proc->ret);
+ tprintf(proc, "= %#llx", proc->ret);
else
tprintf(proc, "= %lli", (long long int)proc->ret);
@@ -970,14 +970,14 @@ print_systemcall_exit(struct process *proc)
if (get_struct(proc->pid, proc->args[i], buf, sizeof(int), &err))
tprintf(proc, "%s\n", err);
else if (*(unsigned int *)buf)
- tprintf(proc, "%#u\n", *(unsigned int *)buf);
+ tprintf(proc, "%#x\n", *(unsigned int *)buf);
else
tprintf(proc, "NULL\n");
} else {
if (get_struct(proc->pid, proc->args[i], buf, sizeof(long int), &err))
tprintf(proc, "%s\n", err);
else if (*(unsigned long int *)buf)
- tprintf(proc, "%#lu\n", *(unsigned long int *)buf);
+ tprintf(proc, "%#lx\n", *(unsigned long int *)buf);
else
tprintf(proc, "NULL\n");
}