diff options
author | jhb <jhb@FreeBSD.org> | 2015-08-20 14:51:11 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2015-08-20 14:51:11 +0000 |
commit | f335dbe91a1629a81fea4b13ca8833035511c4d0 (patch) | |
tree | 896e831b4318d4d968b07de02aaeb1b08498d600 /usr.bin/truss/amd64-fbsd.c | |
parent | edef59ae5270c40a1bc788aecacfae56ae788cd2 (diff) | |
download | FreeBSD-src-f335dbe91a1629a81fea4b13ca8833035511c4d0.zip FreeBSD-src-f335dbe91a1629a81fea4b13ca8833035511c4d0.tar.gz |
Handle the conditional decoding of execve() argument and environment
arrays generically rather than duplicating a hack in all of the backends.
- Add two new system call argument types and use them instead of StringArray
for the argument and environment arguments execve and linux_execve.
- Honor the -a/-e flags in the handling of these new types.
- Instead of printing "<missing argument>" when the decoding is disabled,
print the raw pointer value.
Diffstat (limited to 'usr.bin/truss/amd64-fbsd.c')
-rw-r--r-- | usr.bin/truss/amd64-fbsd.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/usr.bin/truss/amd64-fbsd.c b/usr.bin/truss/amd64-fbsd.c index 4a70a83..eeea8db 100644 --- a/usr.bin/truss/amd64-fbsd.c +++ b/usr.bin/truss/amd64-fbsd.c @@ -233,28 +233,6 @@ amd64_syscall_entry(struct trussinfo *trussinfo, int nargs) fprintf(trussinfo->outfile, "\n"); #endif - if (fsc->name != NULL && (strcmp(fsc->name, "execve") == 0 || - strcmp(fsc->name, "exit") == 0)) { - /* - * XXX - * This could be done in a more general - * manner but it still wouldn't be very pretty. - */ - if (strcmp(fsc->name, "execve") == 0) { - if ((trussinfo->flags & EXECVEARGS) == 0) { - if (fsc->s_args[1]) { - free(fsc->s_args[1]); - fsc->s_args[1] = NULL; - } - } - if ((trussinfo->flags & EXECVEENVS) == 0) { - if (fsc->s_args[2]) { - free(fsc->s_args[2]); - fsc->s_args[2] = NULL; - } - } - } - } trussinfo->curthread->fsc = fsc; } |