[BACK]Return to kdump.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / kdump

Diff for /src/usr.bin/kdump/kdump.c between version 1.26 and 1.27

version 1.26, 2004/07/09 23:51:40 version 1.27, 2005/06/02 17:32:02
Line 359 
Line 359 
         else          else
                 (void)printf("%s", current->sysnames[ktr->ktr_code]);                  (void)printf("%s", current->sysnames[ktr->ktr_code]);
         ap = (register_t *)((char *)ktr + sizeof(struct ktr_syscall));          ap = (register_t *)((char *)ktr + sizeof(struct ktr_syscall));
           (void)putchar('(');
         if (argsize) {          if (argsize) {
                 char c = '(';                  char c = '\0';
                 if (fancy) {                  if (fancy) {
                         if (ktr->ktr_code == SYS_ioctl) {                          if (ktr->ktr_code == SYS_ioctl) {
                                 const char *cp;                                  const char *cp;
   
                                 if (decimal)                                  if (decimal)
                                         (void)printf("(%ld", (long)*ap);                                          (void)printf("%ld", (long)*ap);
                                 else                                  else
                                         (void)printf("(%#lx", (long)*ap);                                          (void)printf("%#lx", (long)*ap);
                                 ap++;                                  ap++;
                                 argsize -= sizeof(register_t);                                  argsize -= sizeof(register_t);
                                 if ((cp = ioctlname(*ap)) != NULL)                                  if ((cp = ioctlname(*ap)) != NULL)
Line 378 
Line 379 
                                 c = ',';                                  c = ',';
                                 ap++;                                  ap++;
                                 argsize -= sizeof(register_t);                                  argsize -= sizeof(register_t);
                           } else if (ktr->ktr_code == SYS___sysctl) {
                                   int *np, n;
   
                                   n = ap[1];
                                   np = (int *)(ap + 6);
                                   for (; n--; np++) {
                                           if (c)
                                                   putchar(c);
                                           printf("%d", *np);
                                           c = '.';
                                   }
   
                                   c = ',';
                                   ap += 2;
                                   argsize -= 2 * sizeof(register_t);
                         } else if (ktr->ktr_code == SYS_ptrace) {                          } else if (ktr->ktr_code == SYS_ptrace) {
                                 if (*ap >= 0 && *ap <                                  if (*ap >= 0 && *ap <
                                     sizeof(ptrace_ops) / sizeof(ptrace_ops[0]))                                      sizeof(ptrace_ops) / sizeof(ptrace_ops[0]))
                                         (void)printf("(%s", ptrace_ops[*ap]);                                          (void)printf("%s", ptrace_ops[*ap]);
                                 else switch(*ap) {                                  else switch(*ap) {
 #ifdef PT_GETFPREGS  #ifdef PT_GETFPREGS
                                 case PT_GETFPREGS:                                  case PT_GETFPREGS:
                                         (void)printf("(PT_GETFPREGS");                                          (void)printf("PT_GETFPREGS");
                                         break;                                          break;
 #endif  #endif
                                 case PT_GETREGS:                                  case PT_GETREGS:
                                         (void)printf("(PT_GETREGS");                                          (void)printf("PT_GETREGS");
                                         break;                                          break;
 #ifdef PT_SETFPREGS  #ifdef PT_SETFPREGS
                                 case PT_SETFPREGS:                                  case PT_SETFPREGS:
                                         (void)printf("(PT_SETFPREGS");                                          (void)printf("PT_SETFPREGS");
                                         break;                                          break;
 #endif  #endif
                                 case PT_SETREGS:                                  case PT_SETREGS:
                                         (void)printf("(PT_SETREGS");                                          (void)printf("PT_SETREGS");
                                         break;                                          break;
 #ifdef PT_STEP  #ifdef PT_STEP
                                 case PT_STEP:                                  case PT_STEP:
                                         (void)printf("(PT_STEP");                                          (void)printf("PT_STEP");
                                         break;                                          break;
 #endif  #endif
 #ifdef PT_WCOOKIE  #ifdef PT_WCOOKIE
                                 case PT_WCOOKIE:                                  case PT_WCOOKIE:
                                         (void)printf("(PT_WCOOKIE");                                          (void)printf("PT_WCOOKIE");
                                         break;                                          break;
 #endif  #endif
                                 default:                                  default:
                                         (void)printf("(%ld", (long)*ap);                                          (void)printf("%ld", (long)*ap);
                                         break;                                          break;
                                 }                                  }
                                 c = ',';                                  c = ',';
Line 419 
Line 435 
                         }                          }
                 }                  }
                 while (argsize) {                  while (argsize) {
                           if (c)
                                   putchar(c);
                         if (decimal)                          if (decimal)
                                 (void)printf("%c%ld", c, (long)*ap);                                  (void)printf("%ld", (long)*ap);
                         else                          else
                                 (void)printf("%c%#lx", c, (long)*ap);                                  (void)printf("%#lx", (long)*ap);
                         c = ',';                          c = ',';
                         ap++;                          ap++;
                         argsize -= sizeof(register_t);                          argsize -= sizeof(register_t);
                 }                  }
                 (void)putchar(')');  
         }          }
         (void)putchar('\n');          (void)printf(")\n");
 }  }
   
 static void  static void

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27