Print integer-typed arguments as integers. This makes sure that

on 64-bit platforms the result is more reliable. For example,
-1 was previously printed as 0xffffffff.

Approved by: re (kensmith)
This commit is contained in:
marcel 2007-07-28 23:18:39 +00:00
parent aa233d32b1
commit 8be873747a

View File

@ -496,13 +496,13 @@ print_arg(struct syscall_args *sc, unsigned long *args, long retval, struct trus
int pid = trussinfo->pid;
switch (sc->type & ARG_MASK) {
case Hex:
asprintf(&tmp, "0x%lx", args[sc->offset]);
asprintf(&tmp, "0x%x", (int)args[sc->offset]);
break;
case Octal:
asprintf(&tmp, "0%lo", args[sc->offset]);
asprintf(&tmp, "0%o", (int)args[sc->offset]);
break;
case Int:
asprintf(&tmp, "%ld", args[sc->offset]);
asprintf(&tmp, "%d", (int)args[sc->offset]);
break;
case Name:
{