mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-19 10:53:58 +00:00
kdump: Improve decoding of various *at calls:
* Write AT_FDCWD where appropriate. * Decode the remaining arguments of openat() etc like open() etc.
This commit is contained in:
parent
89521d4108
commit
8447b7cddc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=254291
@ -605,6 +605,27 @@ ktrsyscall(struct ktr_syscall *ktr, u_int flags)
|
||||
char c = '(';
|
||||
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);
|
||||
@ -624,6 +645,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_int flags)
|
||||
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_int flags)
|
||||
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_int flags)
|
||||
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_int flags)
|
||||
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_int flags)
|
||||
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);
|
||||
|
@ -208,6 +208,18 @@ cat <<_EOF_
|
||||
print_or(#flag,orflag); } \\
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user