1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/gdb/6.3/780-debian_gdbserver-rdynamic.patch Sat Jun 16 18:01:59 2007 +0000
1.3 @@ -0,0 +1,675 @@
1.4 +Status: Commited to GDB after 6.3.
1.5 +
1.6 +Index: gdb-6.3/gdb/gdbserver/acinclude.m4
1.7 +===================================================================
1.8 +--- gdb-6.3.orig/gdb/gdbserver/acinclude.m4 2002-06-11 13:32:39.000000000 -0400
1.9 ++++ gdb-6.3/gdb/gdbserver/acinclude.m4 2004-12-07 17:19:31.115089905 -0500
1.10 +@@ -13,6 +13,7 @@ AC_DEFUN([SRV_CHECK_THREAD_DB],
1.11 + void ps_lsetregs() {}
1.12 + void ps_lgetfpregs() {}
1.13 + void ps_lsetfpregs() {}
1.14 ++ void ps_get_thread_area() {}
1.15 + void ps_getpid() {}],
1.16 + [td_ta_new();],
1.17 + [srv_cv_thread_db="-lthread_db"],
1.18 +@@ -32,10 +33,11 @@ AC_DEFUN([SRV_CHECK_THREAD_DB],
1.19 + void ps_lsetregs() {}
1.20 + void ps_lgetfpregs() {}
1.21 + void ps_lsetfpregs() {}
1.22 ++ void ps_get_thread_area() {}
1.23 + void ps_getpid() {}],
1.24 + [td_ta_new();],
1.25 + [srv_cv_thread_db="$thread_db"],
1.26 + [srv_cv_thread_db=no])
1.27 ++ ]])
1.28 + LIBS="$old_LIBS"
1.29 +- ]])
1.30 + )])
1.31 +Index: gdb-6.3/gdb/gdbserver/configure
1.32 +===================================================================
1.33 +--- gdb-6.3.orig/gdb/gdbserver/configure 2004-10-16 12:18:54.000000000 -0400
1.34 ++++ gdb-6.3/gdb/gdbserver/configure 2004-12-07 17:22:17.343129771 -0500
1.35 +@@ -28,6 +28,7 @@ program_suffix=NONE
1.36 + program_transform_name=s,x,x,
1.37 + silent=
1.38 + site=
1.39 ++sitefile=
1.40 + srcdir=
1.41 + target=NONE
1.42 + verbose=
1.43 +@@ -142,6 +143,7 @@ Configuration:
1.44 + --help print this message
1.45 + --no-create do not create output files
1.46 + --quiet, --silent do not print \`checking...' messages
1.47 ++ --site-file=FILE use FILE as the site file
1.48 + --version print the version of autoconf that created configure
1.49 + Directory and file names:
1.50 + --prefix=PREFIX install architecture-independent files in PREFIX
1.51 +@@ -312,6 +314,11 @@ EOF
1.52 + -site=* | --site=* | --sit=*)
1.53 + site="$ac_optarg" ;;
1.54 +
1.55 ++ -site-file | --site-file | --site-fil | --site-fi | --site-f)
1.56 ++ ac_prev=sitefile ;;
1.57 ++ -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
1.58 ++ sitefile="$ac_optarg" ;;
1.59 ++
1.60 + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1.61 + ac_prev=srcdir ;;
1.62 + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1.63 +@@ -477,12 +484,16 @@ fi
1.64 + srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
1.65 +
1.66 + # Prefer explicitly selected file to automatically selected ones.
1.67 +-if test -z "$CONFIG_SITE"; then
1.68 +- if test "x$prefix" != xNONE; then
1.69 +- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1.70 +- else
1.71 +- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1.72 ++if test -z "$sitefile"; then
1.73 ++ if test -z "$CONFIG_SITE"; then
1.74 ++ if test "x$prefix" != xNONE; then
1.75 ++ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1.76 ++ else
1.77 ++ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1.78 ++ fi
1.79 + fi
1.80 ++else
1.81 ++ CONFIG_SITE="$sitefile"
1.82 + fi
1.83 + for ac_site_file in $CONFIG_SITE; do
1.84 + if test -r "$ac_site_file"; then
1.85 +@@ -526,7 +537,7 @@ fi
1.86 + # Extract the first word of "gcc", so it can be a program name with args.
1.87 + set dummy gcc; ac_word=$2
1.88 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1.89 +-echo "configure:530: checking for $ac_word" >&5
1.90 ++echo "configure:541: checking for $ac_word" >&5
1.91 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1.92 + echo $ac_n "(cached) $ac_c" 1>&6
1.93 + else
1.94 +@@ -556,7 +567,7 @@ if test -z "$CC"; then
1.95 + # Extract the first word of "cc", so it can be a program name with args.
1.96 + set dummy cc; ac_word=$2
1.97 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1.98 +-echo "configure:560: checking for $ac_word" >&5
1.99 ++echo "configure:571: checking for $ac_word" >&5
1.100 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1.101 + echo $ac_n "(cached) $ac_c" 1>&6
1.102 + else
1.103 +@@ -607,7 +618,7 @@ fi
1.104 + # Extract the first word of "cl", so it can be a program name with args.
1.105 + set dummy cl; ac_word=$2
1.106 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1.107 +-echo "configure:611: checking for $ac_word" >&5
1.108 ++echo "configure:622: checking for $ac_word" >&5
1.109 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1.110 + echo $ac_n "(cached) $ac_c" 1>&6
1.111 + else
1.112 +@@ -639,7 +650,7 @@ fi
1.113 + fi
1.114 +
1.115 + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1.116 +-echo "configure:643: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1.117 ++echo "configure:654: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1.118 +
1.119 + ac_ext=c
1.120 + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1.121 +@@ -650,12 +661,12 @@ cross_compiling=$ac_cv_prog_cc_cross
1.122 +
1.123 + cat > conftest.$ac_ext << EOF
1.124 +
1.125 +-#line 654 "configure"
1.126 ++#line 665 "configure"
1.127 + #include "confdefs.h"
1.128 +
1.129 + main(){return(0);}
1.130 + EOF
1.131 +-if { (eval echo configure:659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1.132 ++if { (eval echo configure:670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1.133 + ac_cv_prog_cc_works=yes
1.134 + # If we can't run a trivial program, we are probably using a cross compiler.
1.135 + if (./conftest; exit) 2>/dev/null; then
1.136 +@@ -681,12 +692,12 @@ if test $ac_cv_prog_cc_works = no; then
1.137 + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1.138 + fi
1.139 + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1.140 +-echo "configure:685: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1.141 ++echo "configure:696: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1.142 + echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1.143 + cross_compiling=$ac_cv_prog_cc_cross
1.144 +
1.145 + echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1.146 +-echo "configure:690: checking whether we are using GNU C" >&5
1.147 ++echo "configure:701: checking whether we are using GNU C" >&5
1.148 + if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1.149 + echo $ac_n "(cached) $ac_c" 1>&6
1.150 + else
1.151 +@@ -695,7 +706,7 @@ else
1.152 + yes;
1.153 + #endif
1.154 + EOF
1.155 +-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1.156 ++if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1.157 + ac_cv_prog_gcc=yes
1.158 + else
1.159 + ac_cv_prog_gcc=no
1.160 +@@ -714,7 +725,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
1.161 + ac_save_CFLAGS="$CFLAGS"
1.162 + CFLAGS=
1.163 + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1.164 +-echo "configure:718: checking whether ${CC-cc} accepts -g" >&5
1.165 ++echo "configure:729: checking whether ${CC-cc} accepts -g" >&5
1.166 + if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1.167 + echo $ac_n "(cached) $ac_c" 1>&6
1.168 + else
1.169 +@@ -793,7 +804,7 @@ else { echo "configure: error: can not r
1.170 + fi
1.171 +
1.172 + echo $ac_n "checking host system type""... $ac_c" 1>&6
1.173 +-echo "configure:797: checking host system type" >&5
1.174 ++echo "configure:808: checking host system type" >&5
1.175 +
1.176 + host_alias=$host
1.177 + case "$host_alias" in
1.178 +@@ -814,7 +825,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-
1.179 + echo "$ac_t""$host" 1>&6
1.180 +
1.181 + echo $ac_n "checking target system type""... $ac_c" 1>&6
1.182 +-echo "configure:818: checking target system type" >&5
1.183 ++echo "configure:829: checking target system type" >&5
1.184 +
1.185 + target_alias=$target
1.186 + case "$target_alias" in
1.187 +@@ -832,7 +843,7 @@ target_os=`echo $target | sed 's/^\([^-]
1.188 + echo "$ac_t""$target" 1>&6
1.189 +
1.190 + echo $ac_n "checking build system type""... $ac_c" 1>&6
1.191 +-echo "configure:836: checking build system type" >&5
1.192 ++echo "configure:847: checking build system type" >&5
1.193 +
1.194 + build_alias=$build
1.195 + case "$build_alias" in
1.196 +@@ -867,7 +878,7 @@ test "$host_alias" != "$target_alias" &&
1.197 + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1.198 + # ./install, which can be erroneously created by make from ./install.sh.
1.199 + echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1.200 +-echo "configure:871: checking for a BSD compatible install" >&5
1.201 ++echo "configure:882: checking for a BSD compatible install" >&5
1.202 + if test -z "$INSTALL"; then
1.203 + if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1.204 + echo $ac_n "(cached) $ac_c" 1>&6
1.205 +@@ -921,7 +932,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA=
1.206 +
1.207 +
1.208 + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1.209 +-echo "configure:925: checking how to run the C preprocessor" >&5
1.210 ++echo "configure:936: checking how to run the C preprocessor" >&5
1.211 + # On Suns, sometimes $CPP names a directory.
1.212 + if test -n "$CPP" && test -d "$CPP"; then
1.213 + CPP=
1.214 +@@ -936,13 +947,13 @@ else
1.215 + # On the NeXT, cc -E runs the code through the compiler's parser,
1.216 + # not just through cpp.
1.217 + cat > conftest.$ac_ext <<EOF
1.218 +-#line 940 "configure"
1.219 ++#line 951 "configure"
1.220 + #include "confdefs.h"
1.221 + #include <assert.h>
1.222 + Syntax Error
1.223 + EOF
1.224 + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1.225 +-{ (eval echo configure:946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1.226 ++{ (eval echo configure:957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1.227 + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1.228 + if test -z "$ac_err"; then
1.229 + :
1.230 +@@ -953,13 +964,13 @@ else
1.231 + rm -rf conftest*
1.232 + CPP="${CC-cc} -E -traditional-cpp"
1.233 + cat > conftest.$ac_ext <<EOF
1.234 +-#line 957 "configure"
1.235 ++#line 968 "configure"
1.236 + #include "confdefs.h"
1.237 + #include <assert.h>
1.238 + Syntax Error
1.239 + EOF
1.240 + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1.241 +-{ (eval echo configure:963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1.242 ++{ (eval echo configure:974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1.243 + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1.244 + if test -z "$ac_err"; then
1.245 + :
1.246 +@@ -970,13 +981,13 @@ else
1.247 + rm -rf conftest*
1.248 + CPP="${CC-cc} -nologo -E"
1.249 + cat > conftest.$ac_ext <<EOF
1.250 +-#line 974 "configure"
1.251 ++#line 985 "configure"
1.252 + #include "confdefs.h"
1.253 + #include <assert.h>
1.254 + Syntax Error
1.255 + EOF
1.256 + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1.257 +-{ (eval echo configure:980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1.258 ++{ (eval echo configure:991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1.259 + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1.260 + if test -z "$ac_err"; then
1.261 + :
1.262 +@@ -1001,12 +1012,12 @@ fi
1.263 + echo "$ac_t""$CPP" 1>&6
1.264 +
1.265 + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1.266 +-echo "configure:1005: checking for ANSI C header files" >&5
1.267 ++echo "configure:1016: checking for ANSI C header files" >&5
1.268 + if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1.269 + echo $ac_n "(cached) $ac_c" 1>&6
1.270 + else
1.271 + cat > conftest.$ac_ext <<EOF
1.272 +-#line 1010 "configure"
1.273 ++#line 1021 "configure"
1.274 + #include "confdefs.h"
1.275 + #include <stdlib.h>
1.276 + #include <stdarg.h>
1.277 +@@ -1014,7 +1025,7 @@ else
1.278 + #include <float.h>
1.279 + EOF
1.280 + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1.281 +-{ (eval echo configure:1018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1.282 ++{ (eval echo configure:1029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1.283 + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1.284 + if test -z "$ac_err"; then
1.285 + rm -rf conftest*
1.286 +@@ -1031,7 +1042,7 @@ rm -f conftest*
1.287 + if test $ac_cv_header_stdc = yes; then
1.288 + # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1.289 + cat > conftest.$ac_ext <<EOF
1.290 +-#line 1035 "configure"
1.291 ++#line 1046 "configure"
1.292 + #include "confdefs.h"
1.293 + #include <string.h>
1.294 + EOF
1.295 +@@ -1049,7 +1060,7 @@ fi
1.296 + if test $ac_cv_header_stdc = yes; then
1.297 + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1.298 + cat > conftest.$ac_ext <<EOF
1.299 +-#line 1053 "configure"
1.300 ++#line 1064 "configure"
1.301 + #include "confdefs.h"
1.302 + #include <stdlib.h>
1.303 + EOF
1.304 +@@ -1070,7 +1081,7 @@ if test "$cross_compiling" = yes; then
1.305 + :
1.306 + else
1.307 + cat > conftest.$ac_ext <<EOF
1.308 +-#line 1074 "configure"
1.309 ++#line 1085 "configure"
1.310 + #include "confdefs.h"
1.311 + #include <ctype.h>
1.312 + #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1.313 +@@ -1081,7 +1092,7 @@ if (XOR (islower (i), ISLOWER (i)) || to
1.314 + exit (0); }
1.315 +
1.316 + EOF
1.317 +-if { (eval echo configure:1085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1.318 ++if { (eval echo configure:1096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1.319 + then
1.320 + :
1.321 + else
1.322 +@@ -1109,17 +1120,17 @@ for ac_hdr in sgtty.h termio.h termios.h
1.323 + do
1.324 + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1.325 + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1.326 +-echo "configure:1113: checking for $ac_hdr" >&5
1.327 ++echo "configure:1124: checking for $ac_hdr" >&5
1.328 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1.329 + echo $ac_n "(cached) $ac_c" 1>&6
1.330 + else
1.331 + cat > conftest.$ac_ext <<EOF
1.332 +-#line 1118 "configure"
1.333 ++#line 1129 "configure"
1.334 + #include "confdefs.h"
1.335 + #include <$ac_hdr>
1.336 + EOF
1.337 + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1.338 +-{ (eval echo configure:1123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1.339 ++{ (eval echo configure:1134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1.340 + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1.341 + if test -z "$ac_err"; then
1.342 + rm -rf conftest*
1.343 +@@ -1147,12 +1158,12 @@ done
1.344 +
1.345 +
1.346 + echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
1.347 +-echo "configure:1151: checking whether strerror must be declared" >&5
1.348 ++echo "configure:1162: checking whether strerror must be declared" >&5
1.349 + if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
1.350 + echo $ac_n "(cached) $ac_c" 1>&6
1.351 + else
1.352 + cat > conftest.$ac_ext <<EOF
1.353 +-#line 1156 "configure"
1.354 ++#line 1167 "configure"
1.355 + #include "confdefs.h"
1.356 +
1.357 + #include <stdio.h>
1.358 +@@ -1173,7 +1184,7 @@ int main() {
1.359 + char *(*pfn) = (char *(*)) strerror
1.360 + ; return 0; }
1.361 + EOF
1.362 +-if { (eval echo configure:1177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1.363 ++if { (eval echo configure:1188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1.364 + rm -rf conftest*
1.365 + bfd_cv_decl_needed_strerror=no
1.366 + else
1.367 +@@ -1205,19 +1216,19 @@ fi
1.368 +
1.369 + if test "${srv_linux_regsets}" = "yes"; then
1.370 + echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
1.371 +-echo "configure:1209: checking for PTRACE_GETREGS" >&5
1.372 ++echo "configure:1220: checking for PTRACE_GETREGS" >&5
1.373 + if eval "test \"`echo '$''{'gdbsrv_cv_have_ptrace_getregs'+set}'`\" = set"; then
1.374 + echo $ac_n "(cached) $ac_c" 1>&6
1.375 + else
1.376 + cat > conftest.$ac_ext <<EOF
1.377 +-#line 1214 "configure"
1.378 ++#line 1225 "configure"
1.379 + #include "confdefs.h"
1.380 + #include <sys/ptrace.h>
1.381 + int main() {
1.382 + PTRACE_GETREGS;
1.383 + ; return 0; }
1.384 + EOF
1.385 +-if { (eval echo configure:1221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1.386 ++if { (eval echo configure:1232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1.387 + rm -rf conftest*
1.388 + gdbsrv_cv_have_ptrace_getregs=yes
1.389 + else
1.390 +@@ -1238,19 +1249,19 @@ EOF
1.391 + fi
1.392 +
1.393 + echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
1.394 +-echo "configure:1242: checking for PTRACE_GETFPXREGS" >&5
1.395 ++echo "configure:1253: checking for PTRACE_GETFPXREGS" >&5
1.396 + if eval "test \"`echo '$''{'gdbsrv_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
1.397 + echo $ac_n "(cached) $ac_c" 1>&6
1.398 + else
1.399 + cat > conftest.$ac_ext <<EOF
1.400 +-#line 1247 "configure"
1.401 ++#line 1258 "configure"
1.402 + #include "confdefs.h"
1.403 + #include <sys/ptrace.h>
1.404 + int main() {
1.405 + PTRACE_GETFPXREGS;
1.406 + ; return 0; }
1.407 + EOF
1.408 +-if { (eval echo configure:1254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1.409 ++if { (eval echo configure:1265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1.410 + rm -rf conftest*
1.411 + gdbsrv_cv_have_ptrace_getfpxregs=yes
1.412 + else
1.413 +@@ -1273,12 +1284,12 @@ fi
1.414 +
1.415 + if test "$ac_cv_header_sys_procfs_h" = yes; then
1.416 + echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
1.417 +-echo "configure:1277: checking for lwpid_t in sys/procfs.h" >&5
1.418 ++echo "configure:1288: checking for lwpid_t in sys/procfs.h" >&5
1.419 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
1.420 + echo $ac_n "(cached) $ac_c" 1>&6
1.421 + else
1.422 + cat > conftest.$ac_ext <<EOF
1.423 +-#line 1282 "configure"
1.424 ++#line 1293 "configure"
1.425 + #include "confdefs.h"
1.426 +
1.427 + #define _SYSCALL32
1.428 +@@ -1287,7 +1298,7 @@ int main() {
1.429 + lwpid_t avar
1.430 + ; return 0; }
1.431 + EOF
1.432 +-if { (eval echo configure:1291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1.433 ++if { (eval echo configure:1302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1.434 + rm -rf conftest*
1.435 + bfd_cv_have_sys_procfs_type_lwpid_t=yes
1.436 + else
1.437 +@@ -1309,12 +1320,12 @@ EOF
1.438 + echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
1.439 +
1.440 + echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
1.441 +-echo "configure:1313: checking for psaddr_t in sys/procfs.h" >&5
1.442 ++echo "configure:1324: checking for psaddr_t in sys/procfs.h" >&5
1.443 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
1.444 + echo $ac_n "(cached) $ac_c" 1>&6
1.445 + else
1.446 + cat > conftest.$ac_ext <<EOF
1.447 +-#line 1318 "configure"
1.448 ++#line 1329 "configure"
1.449 + #include "confdefs.h"
1.450 +
1.451 + #define _SYSCALL32
1.452 +@@ -1323,7 +1334,7 @@ int main() {
1.453 + psaddr_t avar
1.454 + ; return 0; }
1.455 + EOF
1.456 +-if { (eval echo configure:1327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1.457 ++if { (eval echo configure:1338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1.458 + rm -rf conftest*
1.459 + bfd_cv_have_sys_procfs_type_psaddr_t=yes
1.460 + else
1.461 +@@ -1345,12 +1356,12 @@ EOF
1.462 + echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
1.463 +
1.464 + echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
1.465 +-echo "configure:1349: checking for prgregset_t in sys/procfs.h" >&5
1.466 ++echo "configure:1360: checking for prgregset_t in sys/procfs.h" >&5
1.467 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
1.468 + echo $ac_n "(cached) $ac_c" 1>&6
1.469 + else
1.470 + cat > conftest.$ac_ext <<EOF
1.471 +-#line 1354 "configure"
1.472 ++#line 1365 "configure"
1.473 + #include "confdefs.h"
1.474 +
1.475 + #define _SYSCALL32
1.476 +@@ -1359,7 +1370,7 @@ int main() {
1.477 + prgregset_t avar
1.478 + ; return 0; }
1.479 + EOF
1.480 +-if { (eval echo configure:1363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1.481 ++if { (eval echo configure:1374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1.482 + rm -rf conftest*
1.483 + bfd_cv_have_sys_procfs_type_prgregset_t=yes
1.484 + else
1.485 +@@ -1381,12 +1392,12 @@ EOF
1.486 + echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
1.487 +
1.488 + echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
1.489 +-echo "configure:1385: checking for prfpregset_t in sys/procfs.h" >&5
1.490 ++echo "configure:1396: checking for prfpregset_t in sys/procfs.h" >&5
1.491 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
1.492 + echo $ac_n "(cached) $ac_c" 1>&6
1.493 + else
1.494 + cat > conftest.$ac_ext <<EOF
1.495 +-#line 1390 "configure"
1.496 ++#line 1401 "configure"
1.497 + #include "confdefs.h"
1.498 +
1.499 + #define _SYSCALL32
1.500 +@@ -1395,7 +1406,7 @@ int main() {
1.501 + prfpregset_t avar
1.502 + ; return 0; }
1.503 + EOF
1.504 +-if { (eval echo configure:1399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1.505 ++if { (eval echo configure:1410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1.506 + rm -rf conftest*
1.507 + bfd_cv_have_sys_procfs_type_prfpregset_t=yes
1.508 + else
1.509 +@@ -1421,7 +1432,7 @@ EOF
1.510 +
1.511 + if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
1.512 + echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
1.513 +-echo "configure:1425: checking whether prfpregset_t type is broken" >&5
1.514 ++echo "configure:1436: checking whether prfpregset_t type is broken" >&5
1.515 + if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
1.516 + echo $ac_n "(cached) $ac_c" 1>&6
1.517 + else
1.518 +@@ -1429,7 +1440,7 @@ else
1.519 + gdb_cv_prfpregset_t_broken=yes
1.520 + else
1.521 + cat > conftest.$ac_ext <<EOF
1.522 +-#line 1433 "configure"
1.523 ++#line 1444 "configure"
1.524 + #include "confdefs.h"
1.525 + #include <sys/procfs.h>
1.526 + int main ()
1.527 +@@ -1439,7 +1450,7 @@ else
1.528 + return 0;
1.529 + }
1.530 + EOF
1.531 +-if { (eval echo configure:1443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1.532 ++if { (eval echo configure:1454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1.533 + then
1.534 + gdb_cv_prfpregset_t_broken=no
1.535 + else
1.536 +@@ -1463,12 +1474,12 @@ EOF
1.537 + fi
1.538 +
1.539 + echo $ac_n "checking for elf_fpregset_t in sys/procfs.h""... $ac_c" 1>&6
1.540 +-echo "configure:1467: checking for elf_fpregset_t in sys/procfs.h" >&5
1.541 ++echo "configure:1478: checking for elf_fpregset_t in sys/procfs.h" >&5
1.542 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_elf_fpregset_t'+set}'`\" = set"; then
1.543 + echo $ac_n "(cached) $ac_c" 1>&6
1.544 + else
1.545 + cat > conftest.$ac_ext <<EOF
1.546 +-#line 1472 "configure"
1.547 ++#line 1483 "configure"
1.548 + #include "confdefs.h"
1.549 +
1.550 + #define _SYSCALL32
1.551 +@@ -1477,7 +1488,7 @@ int main() {
1.552 + elf_fpregset_t avar
1.553 + ; return 0; }
1.554 + EOF
1.555 +-if { (eval echo configure:1481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1.556 ++if { (eval echo configure:1492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1.557 + rm -rf conftest*
1.558 + bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
1.559 + else
1.560 +@@ -1506,14 +1517,14 @@ USE_THREAD_DB=
1.561 +
1.562 + if test "$srv_linux_thread_db" = "yes"; then
1.563 + echo $ac_n "checking for libthread_db""... $ac_c" 1>&6
1.564 +-echo "configure:1510: checking for libthread_db" >&5
1.565 ++echo "configure:1521: checking for libthread_db" >&5
1.566 + if eval "test \"`echo '$''{'srv_cv_thread_db'+set}'`\" = set"; then
1.567 + echo $ac_n "(cached) $ac_c" 1>&6
1.568 + else
1.569 + old_LIBS="$LIBS"
1.570 + LIBS="$LIBS -lthread_db"
1.571 + cat > conftest.$ac_ext <<EOF
1.572 +-#line 1517 "configure"
1.573 ++#line 1528 "configure"
1.574 + #include "confdefs.h"
1.575 + void ps_pglobal_lookup() {}
1.576 + void ps_pdread() {}
1.577 +@@ -1522,12 +1533,13 @@ void ps_pglobal_lookup() {}
1.578 + void ps_lsetregs() {}
1.579 + void ps_lgetfpregs() {}
1.580 + void ps_lsetfpregs() {}
1.581 ++ void ps_get_thread_area() {}
1.582 + void ps_getpid() {}
1.583 + int main() {
1.584 + td_ta_new();
1.585 + ; return 0; }
1.586 + EOF
1.587 +-if { (eval echo configure:1531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1.588 ++if { (eval echo configure:1543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1.589 + rm -rf conftest*
1.590 + srv_cv_thread_db="-lthread_db"
1.591 + else
1.592 +@@ -1543,7 +1555,7 @@ else
1.593 + fi
1.594 + LIBS="$old_LIBS `eval echo "$thread_db"`"
1.595 + cat > conftest.$ac_ext <<EOF
1.596 +-#line 1547 "configure"
1.597 ++#line 1559 "configure"
1.598 + #include "confdefs.h"
1.599 + void ps_pglobal_lookup() {}
1.600 + void ps_pdread() {}
1.601 +@@ -1552,12 +1564,13 @@ void ps_pglobal_lookup() {}
1.602 + void ps_lsetregs() {}
1.603 + void ps_lgetfpregs() {}
1.604 + void ps_lsetfpregs() {}
1.605 ++ void ps_get_thread_area() {}
1.606 + void ps_getpid() {}
1.607 + int main() {
1.608 + td_ta_new();
1.609 + ; return 0; }
1.610 + EOF
1.611 +-if { (eval echo configure:1561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1.612 ++if { (eval echo configure:1574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1.613 + rm -rf conftest*
1.614 + srv_cv_thread_db="$thread_db"
1.615 + else
1.616 +@@ -1567,11 +1580,11 @@ else
1.617 + srv_cv_thread_db=no
1.618 + fi
1.619 + rm -f conftest*
1.620 +- LIBS="$old_LIBS"
1.621 +-
1.622 ++
1.623 + fi
1.624 +
1.625 + echo "$ac_t""$srv_cv_thread_db" 1>&6
1.626 ++ LIBS="$old_LIBS"
1.627 +
1.628 + fi
1.629 + rm -f conftest*
1.630 +@@ -1585,14 +1598,14 @@ rm -f conftest*
1.631 + old_LDFLAGS="$LDFLAGS"
1.632 + LDFLAGS="$LDFLAGS -rdynamic"
1.633 + cat > conftest.$ac_ext <<EOF
1.634 +-#line 1589 "configure"
1.635 ++#line 1602 "configure"
1.636 + #include "confdefs.h"
1.637 +
1.638 + int main() {
1.639 +
1.640 + ; return 0; }
1.641 + EOF
1.642 +-if { (eval echo configure:1596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1.643 ++if { (eval echo configure:1609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1.644 + rm -rf conftest*
1.645 + RDYNAMIC=-rdynamic
1.646 + else
1.647 +Index: gdb-6.3/gdb/gdbserver/aclocal.m4
1.648 +===================================================================
1.649 +--- gdb-6.3.orig/gdb/gdbserver/aclocal.m4 2002-06-11 13:32:39.000000000 -0400
1.650 ++++ gdb-6.3/gdb/gdbserver/aclocal.m4 2004-12-07 17:22:00.382495519 -0500
1.651 +@@ -1,4 +1,4 @@
1.652 +-dnl aclocal.m4 generated automatically by aclocal 1.4-p4
1.653 ++dnl aclocal.m4 generated automatically by aclocal 1.4
1.654 +
1.655 + dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
1.656 + dnl This file is free software; the Free Software Foundation
1.657 +@@ -25,6 +25,7 @@ AC_DEFUN([SRV_CHECK_THREAD_DB],
1.658 + void ps_lsetregs() {}
1.659 + void ps_lgetfpregs() {}
1.660 + void ps_lsetfpregs() {}
1.661 ++ void ps_get_thread_area() {}
1.662 + void ps_getpid() {}],
1.663 + [td_ta_new();],
1.664 + [srv_cv_thread_db="-lthread_db"],
1.665 +@@ -44,11 +45,12 @@ AC_DEFUN([SRV_CHECK_THREAD_DB],
1.666 + void ps_lsetregs() {}
1.667 + void ps_lgetfpregs() {}
1.668 + void ps_lsetfpregs() {}
1.669 ++ void ps_get_thread_area() {}
1.670 + void ps_getpid() {}],
1.671 + [td_ta_new();],
1.672 + [srv_cv_thread_db="$thread_db"],
1.673 + [srv_cv_thread_db=no])
1.674 ++ ]])
1.675 + LIBS="$old_LIBS"
1.676 +- ]])
1.677 + )])
1.678 +