diff options
author | Edward Pilatowicz <Edward.Pilatowicz@Sun.COM> | 2008-10-23 14:14:11 -0700 |
---|---|---|
committer | Edward Pilatowicz <Edward.Pilatowicz@Sun.COM> | 2008-10-23 14:14:11 -0700 |
commit | e33bf782de3aa013215ea6ce56199961899db150 (patch) | |
tree | a526eecdb6e52fbd5dc3ea85de216c26887855cf /usr/src/lib/libc_db | |
parent | 4e4a6245c688cc98ea6f7d5a8bcd39536a389b9a (diff) | |
download | illumos-joyent-e33bf782de3aa013215ea6ce56199961899db150.tar.gz |
6756054 td_read_bootstrap_data() confused by non-primary link maps
Diffstat (limited to 'usr/src/lib/libc_db')
-rw-r--r-- | usr/src/lib/libc_db/common/thread_db.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/usr/src/lib/libc_db/common/thread_db.c b/usr/src/lib/libc_db/common/thread_db.c index b99f0f3047..78989e1152 100644 --- a/usr/src/lib/libc_db/common/thread_db.c +++ b/usr/src/lib/libc_db/common/thread_db.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <stdio.h> #include <stdlib.h> #include <stddef.h> @@ -300,6 +298,11 @@ td_read_bootstrap_data(td_thragent_t *ta_p) else if (ps_pdread(ph_p, psaddr, &psaddr, sizeof (psaddr)) != PS_OK) return (TD_DBERR); + if (psaddr == NULL) { + /* primary linkmap in the tgt is not initialized */ + ta_p->bootstrap_addr = NULL; + psaddr = uberdata_addr; + } ta_p->uberdata_addr = psaddr; } else { #if defined(_LP64) && defined(_SYSCALL32) @@ -312,6 +315,11 @@ td_read_bootstrap_data(td_thragent_t *ta_p) else if (ps_pdread(ph_p, (psaddr_t)psaddr, &psaddr, sizeof (psaddr)) != PS_OK) return (TD_DBERR); + if (psaddr == NULL) { + /* primary linkmap in the tgt is not initialized */ + ta_p->bootstrap_addr = NULL; + psaddr = (caddr32_t)uberdata_addr; + } ta_p->uberdata_addr = (psaddr_t)psaddr; #else return (TD_DBERR); |