kdump(1): Fix add hoc translation for setpriority.
authorStathis Kamperis <beket@dragonflybsd.org>
Fri, 5 Jun 2009 20:25:07 +0000 (23:25 +0300)
committerStathis Kamperis <beket@dragonflybsd.org>
Fri, 5 Jun 2009 20:31:06 +0000 (23:31 +0300)
kdump was translating the wrong argument (third instead of first).

Before patch:  CALL  setpriority(0,0x2bc3,<invalid=10>)
After  patch:  CALL  setpriority(PRIO_PROCESS,0x2bc3,0xa)

usr.bin/kdump/kdump.c

index 89e578d..b3777ef 100644 (file)
@@ -413,12 +413,13 @@ ktrsyscall(struct ktr_syscall *ktr)
                                ip++;
                                narg--;
                        } else if (ktr->ktr_code == SYS_setpriority) {
-                               print_number(ip,narg,c);
-                               print_number(ip,narg,c);
-                               (void)putchar(',');
+                               (void)putchar('(');
                                prioname((int)*ip);
                                ip++;
                                narg--;
+                               c = ',';
+                               print_number(ip,narg,c);
+                               print_number(ip,narg,c);
                        } else if (ktr->ktr_code == SYS_fcntl) {
                                int cmd;
                                int arg;