Debug facilities:
- add a framework to easily add new ones - add gdb as a first debug facility - add patches for gdb After the kernel checked its installed headers, clean up the mess of .checked.* files. Reorder scripts/crosstool.sh: - dump the configuration early - renice early - get info about build system early, when setting up the environment - when in cross or native, the host tools are those of the build system, and only in this case - elapsed time calculations moved to scripts/functions Remove handling of the color: it's gone once and for all. Update tools/addToolVersion.sh: - handle debug facilities - commonalise some code - remove dead tools (cygwin, tcc) Point to my address for bug reports.1.1
parent
721da92158
commit
8d3f0a8781
@ -0,0 +1,7 @@
|
||||
# Debug facilities menu
|
||||
|
||||
menu "Debug facilities"
|
||||
|
||||
source config/debug/gdb.in
|
||||
|
||||
endmenu
|
@ -0,0 +1,75 @@
|
||||
# GDB menu
|
||||
|
||||
menuconfig GDB
|
||||
bool
|
||||
prompt "gdb"
|
||||
default n
|
||||
depends on EXPERIMENTAL
|
||||
help
|
||||
Enable gdb for the target
|
||||
|
||||
if GDB
|
||||
|
||||
config GDB_CROSS
|
||||
bool
|
||||
prompt "Cross-gdb"
|
||||
default y
|
||||
help
|
||||
Build and install a cross-gdb for the target, and to run on host.
|
||||
|
||||
config GDB_NATIVE
|
||||
bool
|
||||
prompt "Native gdb"
|
||||
default n
|
||||
help
|
||||
Build and install a native gdb for the target, to run on the target.
|
||||
|
||||
choice
|
||||
bool
|
||||
prompt "gdb version"
|
||||
|
||||
config GDB_V_snapshot
|
||||
bool
|
||||
prompt "snapshot"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
config GDB_V_6_2_1
|
||||
bool
|
||||
prompt "6.2.1"
|
||||
depends on OBSOLETE
|
||||
|
||||
config GDB_V_6_3
|
||||
bool
|
||||
prompt "6.3"
|
||||
depends on OBSOLETE
|
||||
|
||||
config GDB_V_6_4
|
||||
bool
|
||||
prompt "6.4"
|
||||
depends on OBSOLETE
|
||||
|
||||
config GDB_V_6_5
|
||||
bool
|
||||
prompt "6.5"
|
||||
|
||||
config GDB_V_6_6
|
||||
bool
|
||||
prompt "6.6"
|
||||
|
||||
# CT_INSERT_VERSION_ABOVE
|
||||
# Don't remove above line!
|
||||
endchoice
|
||||
|
||||
config GDB_VERSION
|
||||
string
|
||||
default "snapshot" if GDB_V_snapshot
|
||||
default "6.2.1" if GDB_V_6_2_1
|
||||
default "6.3" if GDB_V_6_3
|
||||
default "6.4" if GDB_V_6_4
|
||||
default "6.5" if GDB_V_6_5
|
||||
default "6.6" if GDB_V_6_6
|
||||
# CT_INSERT_VERSION_STRING_ABOVE
|
||||
# Don't remove above line!
|
||||
|
||||
endif
|
||||
|
@ -0,0 +1,290 @@
|
||||
diff -urN gdb-6.2-dist/bfd/config.bfd gdb-6.2/bfd/config.bfd
|
||||
--- gdb-6.2-dist/bfd/config.bfd 2004-07-09 07:32:35.000000000 -0500
|
||||
+++ gdb-6.2/bfd/config.bfd 2004-08-08 04:23:19.000000000 -0500
|
||||
@@ -129,7 +129,7 @@
|
||||
targ_defvec=ecoffalpha_little_vec
|
||||
targ_selvecs=bfd_elf64_alpha_vec
|
||||
;;
|
||||
- alpha*-*-linux-gnu* | alpha*-*-elf*)
|
||||
+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc* | alpha*-*-elf*)
|
||||
targ_defvec=bfd_elf64_alpha_vec
|
||||
targ_selvecs=ecoffalpha_little_vec
|
||||
;;
|
||||
@@ -139,7 +139,7 @@
|
||||
alpha*-*-*)
|
||||
targ_defvec=ecoffalpha_little_vec
|
||||
;;
|
||||
- ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
|
||||
+ ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu | ia64*-*-linux-uclibc*)
|
||||
targ_defvec=bfd_elf64_ia64_little_vec
|
||||
targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
|
||||
;;
|
||||
@@ -216,7 +216,7 @@
|
||||
targ_defvec=bfd_elf32_littlearm_vec
|
||||
targ_selvecs=bfd_elf32_bigarm_vec
|
||||
;;
|
||||
- armeb-*-elf | arm*b-*-linux-gnu*)
|
||||
+ armeb-*-elf | arm*b-*-linux-gnu* | arm*b-*-linux-uclibc*)
|
||||
targ_defvec=bfd_elf32_bigarm_vec
|
||||
targ_selvecs=bfd_elf32_littlearm_vec
|
||||
;;
|
||||
@@ -224,7 +224,7 @@
|
||||
targ_defvec=bfd_elf32_littlearm_vec
|
||||
targ_selvecs=bfd_elf32_bigarm_vec
|
||||
;;
|
||||
- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \
|
||||
+ arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-linux-uclibc* | arm*-*-conix* | \
|
||||
arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks)
|
||||
targ_defvec=bfd_elf32_littlearm_vec
|
||||
targ_selvecs=bfd_elf32_bigarm_vec
|
||||
@@ -373,7 +373,7 @@
|
||||
;;
|
||||
|
||||
#ifdef BFD64
|
||||
- hppa*64*-*-linux-gnu*)
|
||||
+ hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*)
|
||||
targ_defvec=bfd_elf64_hppa_linux_vec
|
||||
targ_selvecs=bfd_elf64_hppa_vec
|
||||
;;
|
||||
@@ -384,7 +384,7 @@
|
||||
;;
|
||||
#endif
|
||||
|
||||
- hppa*-*-linux-gnu* | hppa*-*-netbsd*)
|
||||
+ hppa*-*-linux-gnu* | hppa*-*-netbsd* | hppa*-*-linux-uclibc*)
|
||||
targ_defvec=bfd_elf32_hppa_linux_vec
|
||||
targ_selvecs=bfd_elf32_hppa_vec
|
||||
;;
|
||||
@@ -507,7 +507,7 @@
|
||||
targ_selvecs=bfd_elf32_i386_vec
|
||||
targ_underscore=yes
|
||||
;;
|
||||
- i[3-7]86-*-linux-gnu*)
|
||||
+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
|
||||
targ_defvec=bfd_elf32_i386_vec
|
||||
targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
|
||||
targ64_selvecs=bfd_elf64_x86_64_vec
|
||||
@@ -521,7 +521,7 @@
|
||||
targ_defvec=bfd_elf64_x86_64_vec
|
||||
targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec"
|
||||
;;
|
||||
- x86_64-*-linux-gnu*)
|
||||
+ x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*)
|
||||
targ_defvec=bfd_elf64_x86_64_vec
|
||||
targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
|
||||
;;
|
||||
@@ -691,7 +691,7 @@
|
||||
targ_defvec=hp300hpux_vec
|
||||
targ_underscore=yes
|
||||
;;
|
||||
- m68*-*-linux*aout*)
|
||||
+ m68*-*-linux*aout* | m68*-*-linux-uclibc*)
|
||||
targ_defvec=m68klinux_vec
|
||||
targ_selvecs=bfd_elf32_m68k_vec
|
||||
targ_underscore=yes
|
||||
@@ -972,8 +972,8 @@
|
||||
;;
|
||||
#endif
|
||||
powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
|
||||
- powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
|
||||
- powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*)
|
||||
+ powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-linux-uclibc* | powerpc-*-rtems* | \
|
||||
+ powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss* )
|
||||
targ_defvec=bfd_elf32_powerpc_vec
|
||||
targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
|
||||
targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
|
||||
@@ -1009,8 +1009,8 @@
|
||||
targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
|
||||
;;
|
||||
powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
|
||||
- powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\
|
||||
- powerpcle-*-rtems*)
|
||||
+ powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-linux-uclibc* | \
|
||||
+ powerpcle-*-vxworks* | powerpcle-*-rtems*)
|
||||
targ_defvec=bfd_elf32_powerpcle_vec
|
||||
targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
|
||||
targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
|
||||
@@ -1177,7 +1177,7 @@
|
||||
targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
|
||||
targ_underscore=yes
|
||||
;;
|
||||
- sparc-*-linux-gnu*)
|
||||
+ sparc-*-linux-gnu* | sparc-*-linux-uclibc*)
|
||||
targ_defvec=bfd_elf32_sparc_vec
|
||||
targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec"
|
||||
;;
|
||||
@@ -1224,7 +1224,7 @@
|
||||
targ_defvec=sunos_big_vec
|
||||
targ_underscore=yes
|
||||
;;
|
||||
- sparc64-*-linux-gnu*)
|
||||
+ sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*)
|
||||
targ_defvec=bfd_elf64_sparc_vec
|
||||
targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
|
||||
;;
|
||||
@@ -1293,7 +1293,7 @@
|
||||
targ_underscore=yes
|
||||
;;
|
||||
|
||||
- vax-*-linux-gnu*)
|
||||
+ vax-*-linux-gnu* | vax-*-linux-uclibc*)
|
||||
targ_defvec=bfd_elf32_vax_vec
|
||||
;;
|
||||
|
||||
diff -urN gdb-6.2-dist/bfd/configure gdb-6.2/bfd/configure
|
||||
--- gdb-6.2-dist/bfd/configure 2004-07-07 12:28:45.000000000 -0500
|
||||
+++ gdb-6.2/bfd/configure 2004-08-08 04:27:01.000000000 -0500
|
||||
@@ -1698,6 +1698,11 @@
|
||||
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
@@ -5264,7 +5269,7 @@
|
||||
alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
|
||||
COREFILE=''
|
||||
;;
|
||||
- alpha*-*-linux-gnu*)
|
||||
+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/alphalinux.h"'
|
||||
;;
|
||||
@@ -5328,7 +5333,7 @@
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/i386mach3.h"'
|
||||
;;
|
||||
- i[3-7]86-*-linux-gnu*)
|
||||
+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/i386linux.h"'
|
||||
;;
|
||||
@@ -5366,7 +5371,7 @@
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/hp300bsd.h"'
|
||||
;;
|
||||
- m68*-*-linux-gnu*)
|
||||
+ m68*-*-linux-gnu* | m68*-*-linux-uclibc)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/m68klinux.h"'
|
||||
;;
|
||||
@@ -5470,7 +5475,7 @@
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/vaxult2.h"'
|
||||
;;
|
||||
- vax-*-linux-gnu*)
|
||||
+ vax-*-linux-gnu* | vax-*-linux-uclibc*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/vaxlinux.h"'
|
||||
;;
|
||||
diff -urN gdb-6.2-dist/bfd/configure.in gdb-6.2/bfd/configure.in
|
||||
--- gdb-6.2-dist/bfd/configure.in 2004-07-07 12:28:45.000000000 -0500
|
||||
+++ gdb-6.2/bfd/configure.in 2004-08-08 04:28:07.000000000 -0500
|
||||
@@ -164,7 +164,7 @@
|
||||
alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
|
||||
COREFILE=''
|
||||
;;
|
||||
- alpha*-*-linux-gnu*)
|
||||
+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/alphalinux.h"'
|
||||
;;
|
||||
@@ -249,7 +249,7 @@
|
||||
TRAD_HEADER='"hosts/i386mach3.h"'
|
||||
;;
|
||||
changequote(,)dnl
|
||||
- i[3-7]86-*-linux-gnu*)
|
||||
+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
|
||||
changequote([,])dnl
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/i386linux.h"'
|
||||
@@ -290,7 +290,7 @@
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/hp300bsd.h"'
|
||||
;;
|
||||
- m68*-*-linux-gnu*)
|
||||
+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/m68klinux.h"'
|
||||
;;
|
||||
@@ -378,7 +378,7 @@
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/vaxult2.h"'
|
||||
;;
|
||||
- vax-*-linux-gnu*)
|
||||
+ vax-*-linux-gnu* | vax-*-linux-uclibc*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/vaxlinux.h"'
|
||||
;;
|
||||
diff -urN gdb-6.2-dist/libtool.m4 gdb-6.2/libtool.m4
|
||||
--- gdb-6.2-dist/libtool.m4 2003-04-10 22:58:39.000000000 -0500
|
||||
+++ gdb-6.2/libtool.m4 2004-08-08 03:48:33.000000000 -0500
|
||||
@@ -645,6 +645,11 @@
|
||||
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
[lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
|
||||
diff -urN gdb-6.2-dist/ltconfig gdb-6.2/ltconfig
|
||||
--- gdb-6.2-dist/ltconfig 2003-10-03 23:54:47.000000000 -0500
|
||||
+++ gdb-6.2/ltconfig 2004-08-08 03:48:33.000000000 -0500
|
||||
@@ -602,7 +602,7 @@
|
||||
|
||||
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
|
||||
case $host_os in
|
||||
-linux-gnu*) ;;
|
||||
+linux-gnu*|linux-uclibc*) ;;
|
||||
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
|
||||
esac
|
||||
|
||||
@@ -1259,6 +1259,24 @@
|
||||
dynamic_linker='GNU/Linux ld.so'
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ version_type=linux
|
||||
+ need_lib_prefix=no
|
||||
+ need_version=no
|
||||
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
|
||||
+ soname_spec='${libname}${release}.so$major'
|
||||
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||
+ shlibpath_var=LD_LIBRARY_PATH
|
||||
+ shlibpath_overrides_runpath=no
|
||||
+ # This implies no fast_install, which is unacceptable.
|
||||
+ # Some rework will be needed to allow for fast_install
|
||||
+ # before this can be enabled.
|
||||
+ # Note: copied from linux-gnu, and may not be appropriate.
|
||||
+ hardcode_into_libs=yes
|
||||
+ # Assume using the uClibc dynamic linker.
|
||||
+ dynamic_linker="uClibc ld.so"
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
diff -urN gdb-6.2-dist/opcodes/configure gdb-6.2/opcodes/configure
|
||||
--- gdb-6.2-dist/opcodes/configure 2004-07-07 12:28:53.000000000 -0500
|
||||
+++ gdb-6.2/opcodes/configure 2004-08-08 04:53:55.000000000 -0500
|
||||
@@ -1701,6 +1701,11 @@
|
||||
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
@ -0,0 +1,15 @@
|
||||
--- gdb-6.1.1-dist/readline/configure 2003-05-27 18:29:47.000000000 -0500
|
||||
+++ gdb-6.1.1/readline/configure 2004-08-09 14:20:23.000000000 -0500
|
||||
@@ -6249,7 +6249,12 @@
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking for mbstate_t" >&5
|
||||
+echo $ECHO_N "bash_cv_have_mbstate_t=$bash_cv_have_mbstate_t" >&6
|
||||
echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
|
||||
+if test "${bash_cv_have_mbstate_t+set}" != set; then
|
||||
+ bash_cv_have_mbstate_t=yes
|
||||
+ echo $ECHO_N "WARNING!! forcing to yes!!! $ECHO_C" >&6
|
||||
+fi
|
||||
if test "${bash_cv_have_mbstate_t+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
@ -0,0 +1,28 @@
|
||||
Sometime around 2.4.22-23, the mips pt_regs.h fields were reordered, breaking
|
||||
coredump handling by gdb for current kernels. Update the hardcoded constants
|
||||
to reflect the change.
|
||||
--- gdb-6.2.1/gdb/mips-linux-tdep.c-orig 2004-10-29 14:23:55.000000000 -0500
|
||||
+++ gdb-6.2.1/gdb/mips-linux-tdep.c 2004-10-29 14:26:44.000000000 -0500
|
||||
@@ -53,12 +53,22 @@
|
||||
|
||||
#define EF_REG0 6
|
||||
#define EF_REG31 37
|
||||
+
|
||||
+#if 0
|
||||
#define EF_LO 38
|
||||
#define EF_HI 39
|
||||
#define EF_CP0_EPC 40
|
||||
#define EF_CP0_BADVADDR 41
|
||||
#define EF_CP0_STATUS 42
|
||||
#define EF_CP0_CAUSE 43
|
||||
+#else
|
||||
+#define EF_CP0_STATUS 38
|
||||
+#define EF_LO 39
|
||||
+#define EF_HI 40
|
||||
+#define EF_CP0_BADVADDR 41
|
||||
+#define EF_CP0_CAUSE 42
|
||||
+#define EF_CP0_EPC 43
|
||||
+#endif
|
||||
|
||||
#define EF_SIZE 180
|
||||
|
@ -0,0 +1,34 @@
|
||||
--- gdb-6.3.org/gdb/gdbserver/thread-db.c 2004-10-17 02:42:00.000000000 +0900
|
||||
+++ gdb-6.3/gdb/gdbserver/thread-db.c 2005-01-27 12:19:29.000000000 +0900
|
||||
@@ -21,6 +21,7 @@
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
+#include <unistd.h>
|
||||
#include "server.h"
|
||||
|
||||
#include "linux-low.h"
|
||||
@@ -142,6 +143,7 @@
|
||||
td_event_msg_t msg;
|
||||
td_err_e err;
|
||||
struct inferior_linux_data *tdata;
|
||||
+ int timeout;
|
||||
|
||||
if (debug_threads)
|
||||
fprintf (stderr, "Thread creation event.\n");
|
||||
@@ -152,7 +154,13 @@
|
||||
In the LinuxThreads implementation, this is safe,
|
||||
because all events come from the manager thread
|
||||
(except for its own creation, of course). */
|
||||
- err = td_ta_event_getmsg (thread_agent, &msg);
|
||||
+ for (timeout = 0; timeout < 50000; timeout++)
|
||||
+ {
|
||||
+ err = td_ta_event_getmsg (thread_agent, &msg);
|
||||
+ if (err != TD_NOMSG)
|
||||
+ break;
|
||||
+ usleep(1000);
|
||||
+ }
|
||||
if (err != TD_OK)
|
||||
fprintf (stderr, "thread getmsg err: %s\n",
|
||||
thread_db_err_str (err));
|
||||
|
@ -0,0 +1,280 @@
|
||||
--- gdb-6.3/bfd/config.bfd.orig Fri Oct 15 07:47:11 2004
|
||||
+++ gdb-6.3/bfd/config.bfd Mon Feb 28 00:04:43 2005
|
||||
@@ -129,7 +129,7 @@
|
||||
targ_defvec=ecoffalpha_little_vec
|
||||
targ_selvecs=bfd_elf64_alpha_vec
|
||||
;;
|
||||
- alpha*-*-linux-gnu* | alpha*-*-elf*)
|
||||
+ alpha*-*-linux-* | alpha*-*-elf*)
|
||||
targ_defvec=bfd_elf64_alpha_vec
|
||||
targ_selvecs=ecoffalpha_little_vec
|
||||
;;
|
||||
@@ -139,7 +139,7 @@
|
||||
alpha*-*-*)
|
||||
targ_defvec=ecoffalpha_little_vec
|
||||
;;
|
||||
- ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
|
||||
+ ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
|
||||
targ_defvec=bfd_elf64_ia64_little_vec
|
||||
targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
|
||||
;;
|
||||
@@ -216,7 +216,7 @@
|
||||
targ_defvec=bfd_elf32_littlearm_vec
|
||||
targ_selvecs=bfd_elf32_bigarm_vec
|
||||
;;
|
||||
- armeb-*-elf | arm*b-*-linux-gnu*)
|
||||
+ armeb-*-elf | arm*b-*-linux-*)
|
||||
targ_defvec=bfd_elf32_bigarm_vec
|
||||
targ_selvecs=bfd_elf32_littlearm_vec
|
||||
;;
|
||||
@@ -224,7 +224,7 @@
|
||||
targ_defvec=bfd_elf32_littlearm_vec
|
||||
targ_selvecs=bfd_elf32_bigarm_vec
|
||||
;;
|
||||
- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \
|
||||
+ arm-*-elf | arm-*-freebsd* | arm*-*-linux-* | arm*-*-conix* | \
|
||||
arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks | \
|
||||
arm*-*-eabi* )
|
||||
targ_defvec=bfd_elf32_littlearm_vec
|
||||
@@ -378,7 +378,7 @@
|
||||
;;
|
||||
|
||||
#ifdef BFD64
|
||||
- hppa*64*-*-linux-gnu*)
|
||||
+ hppa*64*-*-linux-*)
|
||||
targ_defvec=bfd_elf64_hppa_linux_vec
|
||||
targ_selvecs=bfd_elf64_hppa_vec
|
||||
;;
|
||||
@@ -389,7 +389,7 @@
|
||||
;;
|
||||
#endif
|
||||
|
||||
- hppa*-*-linux-gnu*)
|
||||
+ hppa*-*-linux-*)
|
||||
targ_defvec=bfd_elf32_hppa_linux_vec
|
||||
targ_selvecs=bfd_elf32_hppa_vec
|
||||
;;
|
||||
@@ -522,7 +522,7 @@
|
||||
targ_selvecs=bfd_elf32_i386_vec
|
||||
targ_underscore=yes
|
||||
;;
|
||||
- i[3-7]86-*-linux-gnu*)
|
||||
+ i[3-7]86-*-linux-*)
|
||||
targ_defvec=bfd_elf32_i386_vec
|
||||
targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
|
||||
targ64_selvecs=bfd_elf64_x86_64_vec
|
||||
@@ -536,7 +536,7 @@
|
||||
targ_defvec=bfd_elf64_x86_64_vec
|
||||
targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec"
|
||||
;;
|
||||
- x86_64-*-linux-gnu*)
|
||||
+ x86_64-*-linux-*)
|
||||
targ_defvec=bfd_elf64_x86_64_vec
|
||||
targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
|
||||
;;
|
||||
@@ -706,7 +706,7 @@
|
||||
targ_defvec=hp300hpux_vec
|
||||
targ_underscore=yes
|
||||
;;
|
||||
- m68*-*-linux*aout*)
|
||||
+ m68*-*-linux*aout* | m68*-*-linux-uclibc*)
|
||||
targ_defvec=m68klinux_vec
|
||||
targ_selvecs=bfd_elf32_m68k_vec
|
||||
targ_underscore=yes
|
||||
@@ -987,7 +987,7 @@
|
||||
;;
|
||||
#endif
|
||||
powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
|
||||
- powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
|
||||
+ powerpc-*-solaris2* | powerpc-*-linux-* | powerpc-*-rtems* | \
|
||||
powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*)
|
||||
targ_defvec=bfd_elf32_powerpc_vec
|
||||
targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
|
||||
@@ -1024,7 +1024,7 @@
|
||||
targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
|
||||
;;
|
||||
powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
|
||||
- powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\
|
||||
+ powerpcle-*-solaris2* | powerpcle-*-linux-* | powerpcle-*-vxworks* |\
|
||||
powerpcle-*-rtems*)
|
||||
targ_defvec=bfd_elf32_powerpcle_vec
|
||||
targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
|
||||
@@ -1192,7 +1192,7 @@
|
||||
targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
|
||||
targ_underscore=yes
|
||||
;;
|
||||
- sparc-*-linux-gnu*)
|
||||
+ sparc-*-linux-*)
|
||||
targ_defvec=bfd_elf32_sparc_vec
|
||||
targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec"
|
||||
;;
|
||||
@@ -1239,7 +1239,7 @@
|
||||
targ_defvec=sunos_big_vec
|
||||
targ_underscore=yes
|
||||
;;
|
||||
- sparc64-*-linux-gnu*)
|
||||
+ sparc64-*-linux-*)
|
||||
targ_defvec=bfd_elf64_sparc_vec
|
||||
targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
|
||||
;;
|
||||
@@ -1308,7 +1308,7 @@
|
||||
targ_underscore=yes
|
||||
;;
|
||||
|
||||
- vax-*-linux-gnu*)
|
||||
+ vax-*-linux-*)
|
||||
targ_defvec=bfd_elf32_vax_vec
|
||||
;;
|
||||
|
||||
--- gdb-6.3/bfd/configure.orig Fri Oct 8 16:53:56 2004
|
||||
+++ gdb-6.3/bfd/configure Sun Feb 27 18:32:58 2005
|
||||
@@ -3583,6 +3583,11 @@
|
||||
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
@@ -9914,7 +9919,7 @@
|
||||
alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
|
||||
COREFILE=''
|
||||
;;
|
||||
- alpha*-*-linux-gnu*)
|
||||
+ alpha*-*-linux-*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/alphalinux.h"'
|
||||
;;
|
||||
@@ -9978,7 +9983,7 @@
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/i386mach3.h"'
|
||||
;;
|
||||
- i[3-7]86-*-linux-gnu*)
|
||||
+ i[3-7]86-*-linux-*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/i386linux.h"'
|
||||
;;
|
||||
@@ -10016,7 +10021,7 @@
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/hp300bsd.h"'
|
||||
;;
|
||||
- m68*-*-linux-gnu*)
|
||||
+ m68*-*-linux-*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/m68klinux.h"'
|
||||
;;
|
||||
@@ -10150,7 +10155,7 @@
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/vaxult2.h"'
|
||||
;;
|
||||
- vax-*-linux-gnu*)
|
||||
+ vax-*-linux-*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/vaxlinux.h"'
|
||||
;;
|
||||
--- gdb-6.3/bfd/configure.in.orig Fri Oct 8 16:53:59 2004
|
||||
+++ gdb-6.3/bfd/configure.in Sun Feb 27 18:14:41 2005
|
||||
@@ -163,7 +163,7 @@
|
||||
alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
|
||||
COREFILE=''
|
||||
;;
|
||||
- alpha*-*-linux-gnu*)
|
||||
+ alpha*-*-linux-*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/alphalinux.h"'
|
||||
;;
|
||||
@@ -248,7 +248,7 @@
|
||||
TRAD_HEADER='"hosts/i386mach3.h"'
|
||||
;;
|
||||
changequote(,)dnl
|
||||
- i[3-7]86-*-linux-gnu*)
|
||||
+ i[3-7]86-*-linux-*)
|
||||
changequote([,])dnl
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/i386linux.h"'
|
||||
@@ -289,7 +289,7 @@
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/hp300bsd.h"'
|
||||
;;
|
||||
- m68*-*-linux-gnu*)
|
||||
+ m68*-*-linux-*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/m68klinux.h"'
|
||||
;;
|
||||
@@ -375,7 +375,7 @@
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/vaxult2.h"'
|
||||
;;
|
||||
- vax-*-linux-gnu*)
|
||||
+ vax-*-linux-*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/vaxlinux.h"'
|
||||
;;
|
||||
--- gdb-6.3/libtool.m4.orig Wed Jul 21 21:21:41 2004
|
||||
+++ gdb-6.3/libtool.m4 Mon Feb 28 00:08:11 2005
|
||||
@@ -653,6 +653,11 @@
|
||||
fi
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
newsos6)
|
||||
[lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
|
||||
lt_cv_file_magic_cmd=/usr/bin/file
|
||||
--- gdb-6.3/ltconfig.orig Tue Oct 5 15:34:42 2004
|
||||
+++ gdb-6.3/ltconfig Sun Feb 27 18:14:41 2005
|
||||
@@ -602,7 +602,7 @@
|
||||
|
||||
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
|
||||
case $host_os in
|
||||
-linux-gnu*) ;;
|
||||
+linux-gnu*|linux-uclibc*) ;;
|
||||
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
|
||||
esac
|
||||
|
||||
@@ -1270,6 +1270,24 @@
|
||||
dynamic_linker='GNU/Linux ld.so'
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ version_type=linux
|
||||
+ need_lib_prefix=no
|
||||
+ need_version=no
|
||||
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
|
||||
+ soname_spec='${libname}${release}.so$major'
|
||||
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||
+ shlibpath_var=LD_LIBRARY_PATH
|
||||
+ shlibpath_overrides_runpath=no
|
||||
+ # This implies no fast_install, which is unacceptable.
|
||||
+ # Some rework will be needed to allow for fast_install
|
||||
+ # before this can be enabled.
|
||||
+ # Note: copied from linux-gnu, and may not be appropriate.
|
||||
+ hardcode_into_libs=yes
|
||||
+ # Assume using the uClibc dynamic linker.
|
||||
+ dynamic_linker="uClibc ld.so"
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
--- gdb-6.3/opcodes/configure.orig Fri Sep 17 08:13:38 2004
|
||||
+++ gdb-6.3/opcodes/configure Mon Feb 28 00:09:42 2005
|
||||
@@ -3595,6 +3595,11 @@
|
||||
fi
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
newsos6)
|
||||
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
|
||||
lt_cv_file_magic_cmd=/usr/bin/file
|
@ -0,0 +1,15 @@
|
||||
--- gdb-6.1.1-dist/readline/configure 2003-05-27 18:29:47.000000000 -0500
|
||||
+++ gdb-6.1.1/readline/configure 2004-08-09 14:20:23.000000000 -0500
|
||||
@@ -6249,7 +6249,12 @@
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking for mbstate_t" >&5
|
||||
+echo $ECHO_N "bash_cv_have_mbstate_t=$bash_cv_have_mbstate_t" >&6
|
||||
echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
|
||||
+if test "${bash_cv_have_mbstate_t+set}" != set; then
|
||||
+ bash_cv_have_mbstate_t=yes
|
||||
+ echo $ECHO_N "WARNING!! forcing to yes!!! $ECHO_C" >&6
|
||||
+fi
|
||||
if test "${bash_cv_have_mbstate_t+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
@ -0,0 +1,28 @@
|
||||
Sometime around 2.4.22-23, the mips pt_regs.h fields were reordered, breaking
|
||||
coredump handling by gdb for current kernels. Update the hardcoded constants
|
||||
to reflect the change.
|
||||
--- gdb-6.2.1/gdb/mips-linux-tdep.c-orig 2004-10-29 14:23:55.000000000 -0500
|
||||
+++ gdb-6.2.1/gdb/mips-linux-tdep.c 2004-10-29 14:26:44.000000000 -0500
|
||||
@@ -53,12 +53,22 @@
|
||||
|
||||
#define EF_REG0 6
|
||||
#define EF_REG31 37
|
||||
+
|
||||
+#if 0
|
||||
#define EF_LO 38
|
||||
#define EF_HI 39
|
||||
#define EF_CP0_EPC 40
|
||||
#define EF_CP0_BADVADDR 41
|
||||
#define EF_CP0_STATUS 42
|
||||
#define EF_CP0_CAUSE 43
|
||||
+#else
|
||||
+#define EF_CP0_STATUS 38
|
||||
+#define EF_LO 39
|
||||
+#define EF_HI 40
|
||||
+#define EF_CP0_BADVADDR 41
|
||||
+#define EF_CP0_CAUSE 42
|
||||
+#define EF_CP0_EPC 43
|
||||
+#endif
|
||||
|
||||
#define EF_SIZE 180
|
||||
|
@ -0,0 +1,34 @@
|
||||
--- gdb-6.3.org/gdb/gdbserver/thread-db.c 2004-10-17 02:42:00.000000000 +0900
|
||||
+++ gdb-6.3/gdb/gdbserver/thread-db.c 2005-01-27 12:19:29.000000000 +0900
|
||||
@@ -21,6 +21,7 @@
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
+#include <unistd.h>
|
||||
#include "server.h"
|
||||
|
||||
#include "linux-low.h"
|
||||
@@ -142,6 +143,7 @@
|
||||
td_event_msg_t msg;
|
||||
td_err_e err;
|
||||
struct inferior_linux_data *tdata;
|
||||
+ int timeout;
|
||||
|
||||
if (debug_threads)
|
||||
fprintf (stderr, "Thread creation event.\n");
|
||||
@@ -152,7 +154,13 @@
|
||||
In the LinuxThreads implementation, this is safe,
|
||||
because all events come from the manager thread
|
||||
(except for its own creation, of course). */
|
||||
- err = td_ta_event_getmsg (thread_agent, &msg);
|
||||
+ for (timeout = 0; timeout < 50000; timeout++)
|
||||
+ {
|
||||
+ err = td_ta_event_getmsg (thread_agent, &msg);
|
||||
+ if (err != TD_NOMSG)
|
||||
+ break;
|
||||
+ usleep(1000);
|
||||
+ }
|
||||
if (err != TD_OK)
|
||||
fprintf (stderr, "thread getmsg err: %s\n",
|
||||
thread_db_err_str (err));
|
||||
|
@ -0,0 +1,156 @@
|
||||
Status: submitted similar patch 2004-12-08
|
||||
|
||||
This patch cleans up the initialization of thread_db. It works for static
|
||||
binaries now. The vsyscall patches hide this problem, since new static
|
||||
binaries will load the vsyscall DSO and then trigger thread_db; but
|
||||
this is still a good cleanup.
|
||||
|
||||
Index: gdb-6.3/gdb/thread-db.c
|
||||
===================================================================
|
||||
--- gdb-6.3.orig/gdb/thread-db.c 2004-10-08 16:29:56.000000000 -0400
|
||||
+++ gdb-6.3/gdb/thread-db.c 2004-11-10 00:19:30.626530413 -0500
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "target.h"
|
||||
#include "regcache.h"
|
||||
#include "solib-svr4.h"
|
||||
+#include "observer.h"
|
||||
|
||||
#ifdef HAVE_GNU_LIBC_VERSION_H
|
||||
#include <gnu/libc-version.h>
|
||||
@@ -627,59 +628,49 @@ check_thread_signals (void)
|
||||
#endif
|
||||
}
|
||||
|
||||
+/* Check whether thread_db is usable. This function is called when
|
||||
+ an inferior is created (or otherwise acquired, e.g. attached to)
|
||||
+ and when new shared libraries are loaded into a running process. */
|
||||
+
|
||||
static void
|
||||
-thread_db_new_objfile (struct objfile *objfile)
|
||||
+check_for_thread_db (void)
|
||||
{
|
||||
td_err_e err;
|
||||
+ static int already_loaded;
|
||||
|
||||
/* First time through, report that libthread_db was successfuly
|
||||
loaded. Can't print this in in thread_db_load as, at that stage,
|
||||
- the interpreter and it's console haven't started. The real
|
||||
- problem here is that libthread_db is loaded too early - it should
|
||||
- only be loaded when there is a program to debug. */
|
||||
- {
|
||||
- static int dejavu;
|
||||
- if (!dejavu)
|
||||
- {
|
||||
- Dl_info info;
|
||||
- const char *library = NULL;
|
||||
- /* Try dladdr. */
|
||||
- if (dladdr ((*td_ta_new_p), &info) != 0)
|
||||
- library = info.dli_fname;
|
||||
- /* Try dlinfo? */
|
||||
- if (library == NULL)
|
||||
- /* Paranoid - don't let a NULL path slip through. */
|
||||
- library = LIBTHREAD_DB_SO;
|
||||
- printf_unfiltered ("Using host libthread_db library \"%s\".\n",
|
||||
- library);
|
||||
- dejavu = 1;
|
||||
- }
|
||||
- }
|
||||
+ the interpreter and it's console haven't started. */
|
||||
|
||||
- /* Don't attempt to use thread_db on targets which can not run
|
||||
- (core files). */
|
||||
- if (objfile == NULL || !target_has_execution)
|
||||
+ if (!already_loaded)
|
||||
{
|
||||
- /* All symbols have been discarded. If the thread_db target is
|
||||
- active, deactivate it now. */
|
||||
- if (using_thread_db)
|
||||
- {
|
||||
- gdb_assert (proc_handle.pid == 0);
|
||||
- unpush_target (&thread_db_ops);
|
||||
- using_thread_db = 0;
|
||||
- }
|
||||
+ Dl_info info;
|
||||
+ const char *library = NULL;
|
||||
+ if (dladdr ((*td_ta_new_p), &info) != 0)
|
||||
+ library = info.dli_fname;
|
||||
+
|
||||
+ /* Try dlinfo? */
|
||||
|
||||
- goto quit;
|
||||
+ if (library == NULL)
|
||||
+ /* Paranoid - don't let a NULL path slip through. */
|
||||
+ library = LIBTHREAD_DB_SO;
|
||||
+
|
||||
+ printf_unfiltered ("Using host libthread_db library \"%s\".\n",
|
||||
+ library);
|
||||
+ already_loaded = 1;
|
||||
}
|
||||
|
||||
if (using_thread_db)
|
||||
/* Nothing to do. The thread library was already detected and the
|
||||
target vector was already activated. */
|
||||
- goto quit;
|
||||
+ return;
|
||||
+
|
||||
+ /* Don't attempt to use thread_db on targets which can not run
|
||||
+ (executables not running yet, core files) for now. */
|
||||
+ if (!target_has_execution)
|
||||
+ return;
|
||||
|
||||
- /* Initialize the structure that identifies the child process. Note
|
||||
- that at this point there is no guarantee that we actually have a
|
||||
- child process. */
|
||||
+ /* Initialize the structure that identifies the child process. */
|
||||
proc_handle.pid = GET_PID (inferior_ptid);
|
||||
|
||||
/* Now attempt to open a connection to the thread library. */
|
||||
@@ -706,12 +697,24 @@ thread_db_new_objfile (struct objfile *o
|
||||
thread_db_err_str (err));
|
||||
break;
|
||||
}
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+thread_db_new_objfile (struct objfile *objfile)
|
||||
+{
|
||||
+ if (objfile != NULL)
|
||||
+ check_for_thread_db ();
|
||||
|
||||
-quit:
|
||||
if (target_new_objfile_chain)
|
||||
target_new_objfile_chain (objfile);
|
||||
}
|
||||
|
||||
+static void
|
||||
+check_for_thread_db_observer (struct target_ops *target, int from_tty)
|
||||
+{
|
||||
+ check_for_thread_db ();
|
||||
+}
|
||||
+
|
||||
/* Attach to a new thread. This function is called when we receive a
|
||||
TD_CREATE event or when we iterate over all threads and find one
|
||||
that wasn't already in our list. */
|
||||
@@ -1366,5 +1369,8 @@ _initialize_thread_db (void)
|
||||
/* Add ourselves to objfile event chain. */
|
||||
target_new_objfile_chain = deprecated_target_new_objfile_hook;
|
||||
deprecated_target_new_objfile_hook = thread_db_new_objfile;
|
||||
+
|
||||
+ /* Register ourselves for the new inferior observer. */
|
||||
+ observer_attach_inferior_created (check_for_thread_db_observer);
|
||||
}
|
||||
}
|
||||
Index: gdb-6.3/gdb/Makefile.in
|
||||
===================================================================
|
||||
--- gdb-6.3.orig/gdb/Makefile.in 2004-11-09 23:04:57.000000000 -0500
|
||||
+++ gdb-6.3/gdb/Makefile.in 2004-11-10 00:19:26.440347022 -0500
|
||||
@@ -2626,7 +2626,8 @@ thread.o: thread.c $(defs_h) $(symtab_h)
|
||||
$(gdbcmd_h) $(regcache_h) $(gdb_h) $(gdb_string_h) $(ui_out_h)
|
||||
thread-db.o: thread-db.c $(defs_h) $(gdb_assert_h) $(gdb_proc_service_h) \
|
||||
$(gdb_thread_db_h) $(bfd_h) $(gdbthread_h) $(inferior_h) \
|
||||
- $(symfile_h) $(objfiles_h) $(target_h) $(regcache_h) $(solib_svr4_h)
|
||||
+ $(symfile_h) $(objfiles_h) $(target_h) $(regcache_h) $(solib_svr4_h) \
|
||||
+ $(observer_h)
|
||||
top.o: top.c $(defs_h) $(gdbcmd_h) $(call_cmds_h) $(cli_cmds_h) \
|
||||
$(cli_script_h) $(cli_setshow_h) $(cli_decode_h) $(symtab_h) \
|
||||
$(inferior_h) $(target_h) $(breakpoint_h) $(gdbtypes_h) \
|
@ -0,0 +1,15 @@
|
||||
Trivial. Still need to submit this.
|
||||
|
||||
Index: gdb-6.1/gdb/tracepoint.c
|
||||
===================================================================
|
||||
--- gdb-6.1.orig/gdb/tracepoint.c 2004-04-05 13:26:43.000000000 -0400
|
||||
+++ gdb-6.1/gdb/tracepoint.c 2004-04-05 13:26:45.000000000 -0400
|
||||
@@ -853,6 +853,8 @@ read_actions (struct tracepoint *t)
|
||||
else
|
||||
line = gdb_readline (0);
|
||||
|
||||
+ if (line == NULL || *line == EOF)
|
||||
+ break;
|
||||
linetype = validate_actionline (&line, t);
|
||||
if (linetype == BADLINE)
|
||||
continue; /* already warned -- collect another line */
|