kdump.c (b76961e3a21a820f15ebff9d115ff67feb910cec) kdump.c (65a4daeaf3247b7a2c16cf59cdea2ce05987a7cc)
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 1988, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 103 unchanged lines hidden (view full) ---

112void ktrfault(struct ktr_fault *);
113void ktrfaultend(struct ktr_faultend *);
114void ktrkevent(struct kevent *);
115void ktrpollfd(struct pollfd *);
116void ktrstructarray(struct ktr_struct_array *, size_t);
117void ktrbitset(char *, struct bitset *, size_t);
118void ktrsyscall_freebsd(struct ktr_syscall *ktr, register_t **resip,
119 int *resnarg, char *resc, u_int sv_flags);
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 1988, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 103 unchanged lines hidden (view full) ---

112void ktrfault(struct ktr_fault *);
113void ktrfaultend(struct ktr_faultend *);
114void ktrkevent(struct kevent *);
115void ktrpollfd(struct pollfd *);
116void ktrstructarray(struct ktr_struct_array *, size_t);
117void ktrbitset(char *, struct bitset *, size_t);
118void ktrsyscall_freebsd(struct ktr_syscall *ktr, register_t **resip,
119 int *resnarg, char *resc, u_int sv_flags);
120void ktrexecve(char *, int);
120void usage(void);
121
122#define TIMESTAMP_NONE 0x0
123#define TIMESTAMP_ABSOLUTE 0x1
124#define TIMESTAMP_ELAPSED 0x2
125#define TIMESTAMP_RELATIVE 0x4
126
127bool decimal, fancy = true, resolv;

--- 382 unchanged lines hidden (view full) ---

510 ktrfault((struct ktr_fault *)m);
511 break;
512 case KTR_FAULTEND:
513 ktrfaultend((struct ktr_faultend *)m);
514 break;
515 case KTR_STRUCT_ARRAY:
516 ktrstructarray((struct ktr_struct_array *)m, ktrlen);
517 break;
121void usage(void);
122
123#define TIMESTAMP_NONE 0x0
124#define TIMESTAMP_ABSOLUTE 0x1
125#define TIMESTAMP_ELAPSED 0x2
126#define TIMESTAMP_RELATIVE 0x4
127
128bool decimal, fancy = true, resolv;

--- 382 unchanged lines hidden (view full) ---

511 ktrfault((struct ktr_fault *)m);
512 break;
513 case KTR_FAULTEND:
514 ktrfaultend((struct ktr_faultend *)m);
515 break;
516 case KTR_STRUCT_ARRAY:
517 ktrstructarray((struct ktr_struct_array *)m, ktrlen);
518 break;
519 case KTR_ARGS:
520 case KTR_ENVS:
521 ktrexecve(m, ktrlen);
522 break;
518 default:
519 printf("\n");
520 break;
521 }
522 if (tail)
523 fflush(stdout);
524 }
525 return 0;

--- 168 unchanged lines hidden (view full) ---

694 type = "CAP ";
695 break;
696 case KTR_FAULT:
697 type = "PFLT";
698 break;
699 case KTR_FAULTEND:
700 type = "PRET";
701 break;
523 default:
524 printf("\n");
525 break;
526 }
527 if (tail)
528 fflush(stdout);
529 }
530 return 0;

--- 168 unchanged lines hidden (view full) ---

699 type = "CAP ";
700 break;
701 case KTR_FAULT:
702 type = "PFLT";
703 break;
704 case KTR_FAULTEND:
705 type = "PRET";
706 break;
707 case KTR_ARGS:
708 type = "ARGS";
709 break;
710 case KTR_ENVS:
711 type = "ENVS";
712 break;
702 default:
703 sprintf(unknown, "UNKNOWN(%d)", kth->ktr_type);
704 type = unknown;
705 }
706
707 /*
708 * The ktr_tid field was previously the ktr_buffer field, which held
709 * the kernel pointer value for the buffer associated with data

--- 932 unchanged lines hidden (view full) ---

1642
1643void
1644ktrnamei(char *cp, int len)
1645{
1646 printf("\"%.*s\"\n", len, cp);
1647}
1648
1649void
713 default:
714 sprintf(unknown, "UNKNOWN(%d)", kth->ktr_type);
715 type = unknown;
716 }
717
718 /*
719 * The ktr_tid field was previously the ktr_buffer field, which held
720 * the kernel pointer value for the buffer associated with data

--- 932 unchanged lines hidden (view full) ---

1653
1654void
1655ktrnamei(char *cp, int len)
1656{
1657 printf("\"%.*s\"\n", len, cp);
1658}
1659
1660void
1661ktrexecve(char *m, int len)
1662{
1663 int i = 0;
1664
1665 while (i < len) {
1666 printf("\"%s\"", m + i);
1667 i += strlen(m + i) + 1;
1668 if (i != len) {
1669 printf(", ");
1670 }
1671 }
1672 printf("\n");
1673}
1674
1675void
1650hexdump(char *p, int len, int screenwidth)
1651{
1652 int n, i;
1653 int width;
1654
1655 width = 0;
1656 do {
1657 width += 2;

--- 736 unchanged lines hidden ---
1676hexdump(char *p, int len, int screenwidth)
1677{
1678 int n, i;
1679 int width;
1680
1681 width = 0;
1682 do {
1683 width += 2;

--- 736 unchanged lines hidden ---