Add procstat support for AT_ flags added in r359988.

This includes argc, argv, envc, envv, and ps_strings.

Reviewed by:	kib
Obtained from:	CheriBSD
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D24407
This commit is contained in:
Brooks Davis 2020-04-15 20:25:38 +00:00
parent 9df1c38bbc
commit 3780fcd950

View File

@ -202,6 +202,36 @@ procstat_auxv(struct procstat *procstat, struct kinfo_proc *kipp)
xo_emit("{dw:/%s}{Lw:/%-16s/%s}{:AT_BSDFLAGS/%#lx}\n",
prefix, "AT_BSDFLAGS", (u_long)auxv[i].a_un.a_val);
break;
#endif
#ifdef AT_ARGC
case AT_ARGC:
xo_emit("{dw:/%s}{Lw:/%-16s/%s}{:AT_ARGC/%ld}\n",
prefix, "AT_ARGC", (long)auxv[i].a_un.a_val);
break;
#endif
#ifdef AT_ARGV
case AT_ARGV:
xo_emit("{dw:/%s}{Lw:/%-16s/%s}{:AT_ARGV/%p}\n",
prefix, "AT_ARGV", auxv[i].a_un.a_ptr);
break;
#endif
#ifdef AT_ENVC
case AT_ENVC:
xo_emit("{dw:/%s}{Lw:/%-16s/%s}{:AT_ENVC/%ld}\n",
prefix, "AT_ENVC", (long)auxv[i].a_un.a_val);
break;
#endif
#ifdef AT_ENVV
case AT_ENVV:
xo_emit("{dw:/%s}{Lw:/%-16s/%s}{:AT_ENVV/%p}\n",
prefix, "AT_ENVV", auxv[i].a_un.a_ptr);
break;
#endif
#ifdef AT_PS_STRINGS
case AT_PS_STRINGS:
xo_emit("{dw:/%s}{Lw:/%-16s/%s}{:AT_PS_STRINGS/%p}\n",
prefix, "AT_PS_STRINGS", auxv[i].a_un.a_ptr);
break;
#endif
default:
xo_emit("{dw:/%s}{Lw:/%16ld/%ld}{:UNKNOWN/%#lx}\n",