Index: configure.ac =================================================================== --- configure.ac (revision 34930) +++ configure.ac (working copy) @@ -1221,6 +1221,11 @@ if test ${build} = ${host} -a ${host} = [Define if on solaris uses int instead of size_t, and assorted other type changes.]) fi + if test "${gdb_host_cpu}" = "i386" ; then + AC_DEFINE(HAVE_X86_SOLARIS_USER_THREADS, 1, + [Define if the thread layer uses the user-thread debug library + on an x86-solaris system]) + fi else AC_MSG_RESULT(no) fi Index: configure =================================================================== --- configure (revision 34930) +++ configure (working copy) @@ -22865,6 +22865,13 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi + if test "${gdb_host_cpu}" = "i386" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_X86_SOLARIS_USER_THREADS 1 +_ACEOF + + fi else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 Index: config.in =================================================================== --- config.in (revision 34930) +++ config.in (working copy) @@ -482,6 +482,10 @@ /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK +/* Define if the thread layer uses the user-thread debug library on an + x86-solaris system */ +#undef HAVE_X86_SOLARIS_USER_THREADS + /* Define to 1 if you have the `XML_StopParser' function. */ #undef HAVE_XML_STOPPARSER Index: sol-thread.c =================================================================== --- sol-thread.c (revision 34930) +++ sol-thread.c (working copy) @@ -1298,7 +1298,7 @@ ps_pdmodel (gdb_ps_prochandle_t ph, int } #endif /* PR_MODEL_LP64 */ -#ifdef TM_I386SOL2_H +#ifdef HAVE_X86_SOLARIS_USER_THREADS /* Reads the local descriptor table of a LWP. */ @@ -1326,7 +1326,7 @@ ps_lgetLDT (gdb_ps_prochandle_t ph, lwpi /* LDT not found. */ return PS_ERR; } -#endif /* TM_I386SOL2_H */ +#endif /* HAVE_X86_SOLARIS_USER_THREADS */ /* Convert PTID to printable form. */ Index: procfs.c =================================================================== --- procfs.c (revision 34930) +++ procfs.c (working copy) @@ -3028,7 +3028,7 @@ proc_set_watchpoint (procinfo *pi, CORE_ #endif } -#ifdef TM_I386SOL2_H /* Is it hokey to use this? */ +#ifdef HAVE_X86_SOLARIS_USER_THREADS #include @@ -3120,7 +3120,7 @@ proc_get_LDT_entry (procinfo *pi, int ke #endif } -#endif /* TM_I386SOL2_H */ +#endif /* HAVE_X86_SOLARIS_USER_THREADS */ /* =============== END, non-thread part of /proc "MODULE" =============== */ @@ -5549,7 +5549,7 @@ procfs_stopped_by_watchpoint (ptid_t pti return 0; } -#ifdef TM_I386SOL2_H +#ifdef HAVE_X86_SOLARIS_USER_THREADS /* * Function: procfs_find_LDT_entry * @@ -5587,7 +5587,7 @@ procfs_find_LDT_entry (ptid_t ptid) /* Find the matching entry and return it. */ return proc_get_LDT_entry (pi, key); } -#endif /* TM_I386SOL2_H */ +#endif /* HAVE_X86_SOLARIS_USER_THREADS */ /* * Memory Mappings Functions: