diff options
author | Bryan Cantrill <bryan@joyent.com> | 2013-02-28 07:21:34 +0000 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2013-08-01 10:18:30 -0700 |
commit | 8f68126c6dc4f2178929233f0c7ccce877e973ca (patch) | |
tree | 4a645f31e0c4341544ac342d7ae4386876a9963f /usr/src/cmd/ptools | |
parent | a5b577712a34346841d970e0827b4920ace408af (diff) | |
download | illumos-joyent-8f68126c6dc4f2178929233f0c7ccce877e973ca.tar.gz |
3918 "pargs -l" dies on incomplete core dumps
3919 mdb/pmap should show unresolved map names on core dumps
3920 executable mapping in core dump misreported when file isn't found
3921 Pfindexec() finds wrong binary, wreaking havoc
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Eric Schrock <eric.schrock@delphix.com>
Approved by: Dan McDonald <danmcd@nexenta.com>
Diffstat (limited to 'usr/src/cmd/ptools')
-rw-r--r-- | usr/src/cmd/ptools/pargs/pargs.c | 4 | ||||
-rw-r--r-- | usr/src/cmd/ptools/pmap/pmap_common.c | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/usr/src/cmd/ptools/pargs/pargs.c b/usr/src/cmd/ptools/pargs/pargs.c index 30c60ca3c3..8c3cbba962 100644 --- a/usr/src/cmd/ptools/pargs/pargs.c +++ b/usr/src/cmd/ptools/pargs/pargs.c @@ -23,7 +23,7 @@ * Use is subject to license terms. */ /* - * Copyright (c) 2012, Joyent, Inc. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ /* @@ -1201,7 +1201,7 @@ print_cmdline(pargs_data_t *datap) * an error message and bail. */ for (i = 0; i < datap->pd_argc; i++) { - if (datap->pd_argv[i] == NULL || + if (datap->pd_argv == NULL || datap->pd_argv[i] == NULL || datap->pd_argv_strs[i] == NULL) { (void) fprintf(stderr, "%s: target has corrupted " "argument list\n", command); diff --git a/usr/src/cmd/ptools/pmap/pmap_common.c b/usr/src/cmd/ptools/pmap/pmap_common.c index 7594fd30e3..fff55ffdbc 100644 --- a/usr/src/cmd/ptools/pmap/pmap_common.c +++ b/usr/src/cmd/ptools/pmap/pmap_common.c @@ -23,6 +23,9 @@ * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* + * Copyright (c) 2013, Joyent, Inc. All rights reserved. + */ #include <fcntl.h> #include <libproc.h> @@ -68,7 +71,7 @@ make_name(struct ps_prochandle *Pr, int lflag, uintptr_t addr, char path[PATH_MAX]; int len; - if (lflag) { + if (lflag || Pstate(Pr) == PS_DEAD) { if (Pobjname(Pr, addr, buf, bufsz) != NULL) return (buf); } else { |