summaryrefslogtreecommitdiff
path: root/gdb/sol-thread.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2008-03-12 20:00:21 +0000
committerJoel Brobecker <brobecker@gnat.com>2008-03-12 20:00:21 +0000
commit86d0db3d8bed209c3be8dd13caa52dae57229234 (patch)
treec764cfb6ad3b3ad8d23b8c54d28a871c96bfb404 /gdb/sol-thread.c
parent8da5a53dcaf1316a1d984f3daeaa74619c964798 (diff)
downloadgdb-86d0db3d8bed209c3be8dd13caa52dae57229234.tar.gz
* sol-thread.c: Replace use of TM_I386SOL2_H by an expression
that is true only on x86-solaris and x86_64-solaris. * procfs.c: Likewise. Move procfs_find_LDT_entry up together with proc_get_LDT_entry.
Diffstat (limited to 'gdb/sol-thread.c')
-rw-r--r--gdb/sol-thread.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index 796065d382a..bf31fa0194c 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -1283,9 +1283,12 @@ ps_pdmodel (gdb_ps_prochandle_t ph, int *data_model)
}
#endif /* PR_MODEL_LP64 */
-#ifdef TM_I386SOL2_H
+#if (defined(__i386__) || defined(__x86_64__)) && defined (sun)
-/* Reads the local descriptor table of a LWP. */
+/* Reads the local descriptor table of a LWP.
+
+ This function is necessary on x86-solaris only. Without it, the loading
+ of libthread_db would fail because of ps_lgetLDT being undefined. */
ps_err_e
ps_lgetLDT (gdb_ps_prochandle_t ph, lwpid_t lwpid,
@@ -1311,7 +1314,7 @@ ps_lgetLDT (gdb_ps_prochandle_t ph, lwpid_t lwpid,
/* LDT not found. */
return PS_ERR;
}
-#endif /* TM_I386SOL2_H */
+#endif
/* Convert PTID to printable form. */