* Makefile.in config.in configure configure.in

config/sparc/nm-sun4sol2.h config/sparc/sun4sol2.mh
	config/sparc/tm-sun4sol2.h:  Use autoconf to config Solaris thread
	and pthread support, since pre-2.5 systems don't come with
	libthread_db.so.1.

	* procfs.c (info_proc):  Use int instead of id_t.  Old versions of
	Irix don't see to define this.
This commit is contained in:
Stu Grossman 1996-05-14 07:02:56 +00:00
parent 572977a552
commit 47ef0da56a
8 changed files with 86 additions and 34 deletions

View file

@ -1,3 +1,14 @@
Mon May 13 23:53:30 1996 Stu Grossman (grossman@critters.cygnus.com)
* Makefile.in config.in configure configure.in
config/sparc/nm-sun4sol2.h config/sparc/sun4sol2.mh
config/sparc/tm-sun4sol2.h: Use autoconf to config Solaris thread
and pthread support, since pre-2.5 systems don't come with
libthread_db.so.1.
* procfs.c (info_proc): Use int instead of id_t. Old versions of
Irix don't see to define this.
start-sanitize-gdbtk
Mon May 13 13:43:25 1996 Fred Fish <fnf@cygnus.com>

View file

@ -88,3 +88,6 @@
/* Define if you have the dl library (-ldl). */
#undef HAVE_LIBDL
/* Define if you have the Solaris thread_db library (/usr/lib/libthread_db.so.1). */
#undef HAVE_THREAD_DB_LIB

View file

@ -29,6 +29,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define PRSVADDR_BROKEN
#ifdef HAVE_THREAD_DB_LIB
#ifdef __STDC__
struct objfile;
#endif
@ -36,3 +38,5 @@ struct objfile;
#define target_new_objfile(OBJFILE) sol_thread_new_objfile (OBJFILE)
void sol_thread_new_objfile PARAMS ((struct objfile *objfile));
#endif

View file

@ -5,8 +5,7 @@ XDEPFILES= ser-tcp.o
XM_CLIBS= -lsocket -lnsl
NAT_FILE= nm-sun4sol2.h
NATDEPFILES= corelow.o core-sol2.o solib.o procfs.o fork-child.o sol-thread.o
NAT_CLIBS= /lib/libthread_db.so.1
NATDEPFILES= corelow.o core-sol2.o solib.o procfs.o fork-child.o
# SVR4 comes standard with terminfo, and in some implementations, the
# old termcap descriptions are incomplete. So ensure that we use the

View file

@ -76,5 +76,9 @@ extern char *sunpro_static_transform_name PARAMS ((char *));
#define PIDGET(pid) ((pid) & 0xffff)
#define TIDGET(pid) (((pid) >> 16) & 0xffff)
#ifdef HAVE_THREAD_DB_LIB
extern char *solaris_pid_to_str PARAMS ((int pid));
#define target_pid_to_str(PID) solaris_pid_to_str (PID)
#endif

76
gdb/configure vendored
View file

@ -1761,6 +1761,21 @@ EOF
fi
echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
if test -f /usr/lib/libthread_db.so.1 ; then
echo "$ac_t""yes" 1>&6
LIBS="$LIBS /usr/lib/libthread_db.so.1"
THREAD_DB_OBS=sol-thread.o
cat >> confdefs.h <<\EOF
#define HAVE_THREAD_DB_LIB 1
EOF
else
echo "$ac_t""no" 1>&6
fi
ENABLE_CFLAGS=
ENABLE_CLIBS=
ENABLE_OBS=
@ -1910,12 +1925,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
#line 1914 "configure"
#line 1929 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -1982,7 +1997,7 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1986 "configure"
#line 2001 "configure"
#include "confdefs.h"
int main() { return 0; }
@ -1990,7 +2005,7 @@ int t() {
${x_direct_test_function}()
; return 0; }
EOF
if { (eval echo configure:1994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
if { (eval echo configure:2009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
@ -2111,7 +2126,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lICE $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2115 "configure"
#line 2130 "configure"
#include "confdefs.h"
int main() { return 0; }
@ -2119,7 +2134,7 @@ int t() {
IceConnectionNumber()
; return 0; }
EOF
if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
if { (eval echo configure:2138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -2155,7 +2170,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldnet $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2159 "configure"
#line 2174 "configure"
#include "confdefs.h"
int main() { return 0; }
@ -2163,7 +2178,7 @@ int t() {
dnet_ntoa()
; return 0; }
EOF
if { (eval echo configure:2167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
if { (eval echo configure:2182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -2190,7 +2205,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldnet_stub $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2194 "configure"
#line 2209 "configure"
#include "confdefs.h"
int main() { return 0; }
@ -2198,7 +2213,7 @@ int t() {
dnet_ntoa()
; return 0; }
EOF
if { (eval echo configure:2202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
if { (eval echo configure:2217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -2230,7 +2245,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2234 "configure"
#line 2249 "configure"
#include "confdefs.h"
int main() { return 0; }
@ -2238,7 +2253,7 @@ int t() {
t_accept()
; return 0; }
EOF
if { (eval echo configure:2242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
if { (eval echo configure:2257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -2269,7 +2284,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2273 "configure"
#line 2288 "configure"
#include "confdefs.h"
int main() { return 0; }
@ -2277,7 +2292,7 @@ int t() {
socket()
; return 0; }
EOF
if { (eval echo configure:2281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
if { (eval echo configure:2296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -2374,12 +2389,12 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2378 "configure"
#line 2393 "configure"
#include "confdefs.h"
#include <tclInt.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -2432,7 +2447,7 @@ if test "$cross_compiling" = yes; then
else
cat > conftest.$ac_ext <<EOF
#line 2436 "configure"
#line 2451 "configure"
#include "confdefs.h"
#include <stdio.h>
@ -2447,7 +2462,7 @@ main() {
return 0;
}
EOF
{ (eval echo configure:2451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
{ (eval echo configure:2466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
if test -s conftest && (./conftest; exit) 2>/dev/null; then
tclmajor=`cat tclmajor`
tclminor=`cat tclminor`
@ -2592,13 +2607,13 @@ else
ac_cv_c_tclib="-l$installedtcllibroot"
else
cat > conftest.$ac_ext <<EOF
#line 2596 "configure"
#line 2611 "configure"
#include "confdefs.h"
Tcl_AppInit()
{ exit(0); }
EOF
{ (eval echo configure:2602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
{ (eval echo configure:2617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
if test -s conftest && (./conftest; exit) 2>/dev/null; then
ac_cv_c_tcllib="-l$installedtcllibroot"
else
@ -2708,12 +2723,12 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2712 "configure"
#line 2727 "configure"
#include "confdefs.h"
#include <tk.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -2773,7 +2788,7 @@ if test "$cross_compiling" = yes; then
else
cat > conftest.$ac_ext <<EOF
#line 2777 "configure"
#line 2792 "configure"
#include "confdefs.h"
#include <stdio.h>
@ -2788,7 +2803,7 @@ cat > conftest.$ac_ext <<EOF
return 0;
}
EOF
{ (eval echo configure:2792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
{ (eval echo configure:2807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
if test -s conftest && (./conftest; exit) 2>/dev/null; then
tkmajor=`cat tkmajor`
tkminor=`cat tkminor`
@ -2954,13 +2969,13 @@ else
ac_cv_c_tklib="-l$installedtklibroot"
else
cat > conftest.$ac_ext <<EOF
#line 2958 "configure"
#line 2973 "configure"
#include "confdefs.h"
Tcl_AppInit()
{ exit(0); }
EOF
{ (eval echo configure:2964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
{ (eval echo configure:2979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
if test -s conftest && (./conftest; exit) 2>/dev/null; then
ac_cv_c_tklib="-l$installedtklibroot"
else
@ -3001,7 +3016,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3005 "configure"
#line 3020 "configure"
#include "confdefs.h"
int main() { return 0; }
@ -3009,7 +3024,7 @@ int t() {
main()
; return 0; }
EOF
if { (eval echo configure:3013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
if { (eval echo configure:3028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -3039,7 +3054,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3043 "configure"
#line 3058 "configure"
#include "confdefs.h"
int main() { return 0; }
@ -3047,7 +3062,7 @@ int t() {
main()
; return 0; }
EOF
if { (eval echo configure:3051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
if { (eval echo configure:3066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -3752,6 +3767,7 @@ s%@target_alias@%$target_alias%g
s%@target_cpu@%$target_cpu%g
s%@target_vendor@%$target_vendor%g
s%@target_os@%$target_os%g
s%@THREAD_DB_OBS@%$THREAD_DB_OBS%g
s%@X_CFLAGS@%$X_CFLAGS%g
s%@X_PRE_LIBS@%$X_PRE_LIBS%g
s%@X_LIBS@%$X_LIBS%g

View file

@ -96,6 +96,21 @@ AC_MSG_RESULT($gdb_cv_printf_has_long_double)
AC_FUNC_MMAP
dnl See if thread_db is around for Solaris thread debugging. Note that we must
dnl explicitly test for version 1 of the library because version 0 (present on
dnl Solaris 2.4 or earlier) doesn't have the same API.
AC_MSG_CHECKING(for Solaris thread debugging library)
if test -f /usr/lib/libthread_db.so.1 ; then
AC_MSG_RESULT(yes)
LIBS="$LIBS /usr/lib/libthread_db.so.1"
THREAD_DB_OBS=sol-thread.o
AC_DEFINE(HAVE_THREAD_DB_LIB)
else
AC_MSG_RESULT(no)
fi
AC_SUBST(THREAD_DB_OBS)
dnl Handle optional features that can be enabled.
ENABLE_CFLAGS=
ENABLE_CLIBS=

View file

@ -3633,7 +3633,7 @@ info_proc (args, from_tty)
int status = 0;
int all = 0;
int nlwp;
id_t *lwps;
int *lwps;
old_chain = make_cleanup (null_cleanup, 0);
@ -3745,7 +3745,7 @@ No process. Start debugging a program or specify an explicit process ID.");
}
#else /* PIOCLWPIDS */
nlwp = 1;
lwps = alloca ((2 * nlwp + 2) * sizeof (id_t));
lwps = alloca ((2 * nlwp + 2) * sizeof *lwps);
lwps[0] = 0;
#endif /* PIOCLWPIDS */