svn commit: r254291 - head/usr.bin/kdump
Jilles Tjoelker
jilles at FreeBSD.org
Tue Aug 13 19:57:36 UTC 2013
Author: jilles
Date: Tue Aug 13 19:57:35 2013
New Revision: 254291
URL: http://svnweb.freebsd.org/changeset/base/254291
Log:
kdump: Improve decoding of various *at calls:
* Write AT_FDCWD where appropriate.
* Decode the remaining arguments of openat() etc like open() etc.
Modified:
head/usr.bin/kdump/kdump.c
head/usr.bin/kdump/mksubr
Modified: head/usr.bin/kdump/kdump.c
==============================================================================
--- head/usr.bin/kdump/kdump.c Tue Aug 13 19:55:12 2013 (r254290)
+++ head/usr.bin/kdump/kdump.c Tue Aug 13 19:57:35 2013 (r254291)
@@ -606,6 +606,27 @@ ktrsyscall(struct ktr_syscall *ktr, u_in
if (fancy &&
(flags == 0 || (flags & SV_ABI_MASK) == SV_ABI_FREEBSD)) {
switch (ktr->ktr_code) {
+ case SYS_faccessat:
+ case SYS_fchmodat:
+ case SYS_fchownat:
+ case SYS_fstatat:
+ case SYS_futimesat:
+ case SYS_linkat:
+ case SYS_mkdirat:
+ case SYS_mkfifoat:
+ case SYS_mknodat:
+ case SYS_openat:
+ case SYS_readlinkat:
+ case SYS_renameat:
+ case SYS_unlinkat:
+ putchar('(');
+ atfdname(*ip, decimal);
+ c = ',';
+ ip++;
+ narg--;
+ break;
+ }
+ switch (ktr->ktr_code) {
case SYS_ioctl: {
print_number(ip, narg, c);
putchar(c);
@@ -624,6 +645,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in
break;
case SYS_access:
case SYS_eaccess:
+ case SYS_faccessat:
print_number(ip, narg, c);
putchar(',');
accessmodename(*ip);
@@ -631,6 +653,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in
narg--;
break;
case SYS_open:
+ case SYS_openat:
print_number(ip, narg, c);
putchar(',');
flagsandmodename(ip[0], ip[1], decimal);
@@ -655,6 +678,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in
narg--;
break;
case SYS_mknod:
+ case SYS_mknodat:
print_number(ip, narg, c);
putchar(',');
modename(*ip);
@@ -860,7 +884,9 @@ ktrsyscall(struct ktr_syscall *ktr, u_in
narg--;
break;
case SYS_mkfifo:
+ case SYS_mkfifoat:
case SYS_mkdir:
+ case SYS_mkdirat:
print_number(ip, narg, c);
putchar(',');
modename(*ip);
@@ -1083,6 +1109,15 @@ ktrsyscall(struct ktr_syscall *ktr, u_in
ip++;
narg--;
break;
+ case SYS_linkat:
+ case SYS_renameat:
+ case SYS_symlinkat:
+ print_number(ip, narg, c);
+ putchar(',');
+ atfdname(*ip, decimal);
+ ip++;
+ narg--;
+ break;
case SYS_cap_new:
case SYS_cap_rights_limit:
print_number(ip, narg, c);
Modified: head/usr.bin/kdump/mksubr
==============================================================================
--- head/usr.bin/kdump/mksubr Tue Aug 13 19:55:12 2013 (r254290)
+++ head/usr.bin/kdump/mksubr Tue Aug 13 19:57:35 2013 (r254291)
@@ -209,6 +209,18 @@ cat <<_EOF_
while (0)
/* MANUAL */
+void
+atfdname(int fd, int decimal)
+{
+ if (fd == AT_FDCWD)
+ printf("AT_FDCWD");
+ else if (decimal)
+ printf("%d", fd);
+ else
+ printf("%#x", fd);
+}
+
+/* MANUAL */
extern char *signames[]; /* from kdump.c */
void
signame(int sig)
More information about the svn-src-head
mailing list