diff options
author | Jeremy Jones <jeremy@delphix.com> | 2013-08-21 15:45:46 -0800 |
---|---|---|
committer | Christopher Siden <chris.siden@delphix.com> | 2013-08-21 16:45:46 -0700 |
commit | 2a12f85ad140e332791b4bad1208a734c3f26bf3 (patch) | |
tree | f4360a28249f0409ce5037f493a18f60e6219ea2 /usr/src/lib/libproc/common/Plwpregs.c | |
parent | 840b2722e5294ae44aa3af6189002f521d7c50e0 (diff) | |
download | illumos-joyent-2a12f85ad140e332791b4bad1208a734c3f26bf3.tar.gz |
3946 ::gcore
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src/lib/libproc/common/Plwpregs.c')
-rw-r--r-- | usr/src/lib/libproc/common/Plwpregs.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr/src/lib/libproc/common/Plwpregs.c b/usr/src/lib/libproc/common/Plwpregs.c index 7549bc142d..c2b150000f 100644 --- a/usr/src/lib/libproc/common/Plwpregs.c +++ b/usr/src/lib/libproc/common/Plwpregs.c @@ -25,6 +25,7 @@ /* * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #include <sys/types.h> @@ -50,10 +51,11 @@ static lwp_info_t * getlwpcore(struct ps_prochandle *P, lwpid_t lwpid) { - lwp_info_t *lwp = list_next(&P->core->core_lwp_head); + core_info_t *core = P->data; + lwp_info_t *lwp = list_next(&core->core_lwp_head); uint_t i; - for (i = 0; i < P->core->core_nlwp; i++, lwp = list_next(lwp)) { + for (i = 0; i < core->core_nlwp; i++, lwp = list_next(lwp)) { if (lwp->lwp_id == lwpid) return (lwp); } @@ -118,7 +120,7 @@ getlwpstatus(struct ps_prochandle *P, lwpid_t lwpid, lwpstatus_t *lps) * If this is a core file, we need to iterate through our list of * cached lwp information and then copy out the status. */ - if (P->core != NULL && (lwp = getlwpcore(P, lwpid)) != NULL) { + if (P->data != NULL && (lwp = getlwpcore(P, lwpid)) != NULL) { (void) memcpy(lps, &lwp->lwp_status, sizeof (lwpstatus_t)); return (0); } |