From 3d3a5fc6df7f0bf62d602a53cc7eaec2fda66320 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Sat, 12 Jul 2008 22:16:34 +0000 Subject: * spu-linux-nat.c: Include "gdbthread.h". (spu_child_post_startup_inferior): Register main thread. (spu_child_post_attach): Likewise. * Makefile.in (spu-linux-nat.o): Update dependencies. --- gdb/ChangeLog | 7 +++++++ gdb/Makefile.in | 2 +- gdb/spu-linux-nat.c | 5 +++++ 3 files changed, 13 insertions(+), 1 deletion(-) (limited to 'gdb') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0815ca3327b..a1b64f83f32 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2008-07-12 Ulrich Weigand + + * spu-linux-nat.c: Include "gdbthread.h". + (spu_child_post_startup_inferior): Register main thread. + (spu_child_post_attach): Likewise. + * Makefile.in (spu-linux-nat.o): Update dependencies. + 2008-07-12 Pedro Alves Rewrite continuations internals on top of cleanups and plug diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 7ae842093f0..446d9673c1d 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -2863,7 +2863,7 @@ sparc-tdep.o: sparc-tdep.c $(defs_h) $(arch_utils_h) $(dis_asm_h) \ $(value_h) $(gdb_assert_h) $(gdb_string_h) $(sparc_tdep_h) spu-linux-nat.o: spu-linux-nat.c $(defs_h) $(gdbcore_h) $(gdb_string_h) \ $(target_h) $(inferior_h) $(inf_ptrace_h) $(regcache_h) $(symfile_h) \ - $(gdb_wait_h) $(spu_tdep_h) + $(gdb_wait_h) $(gdbthread_h) $(spu_tdep_h) spu-tdep.o: spu-tdep.c $(defs_h) $(arch_utils_h) $(gdbtypes_h) $(gdbcmd_h) \ $(gdbcore_h) $(gdb_string_h) $(gdb_assert_h) $(frame_h) \ $(frame_unwind_h) $(frame_base_h) $(trad_frame_h) $(symtab_h) \ diff --git a/gdb/spu-linux-nat.c b/gdb/spu-linux-nat.c index 552f66f5595..e19b718c3aa 100644 --- a/gdb/spu-linux-nat.c +++ b/gdb/spu-linux-nat.c @@ -27,6 +27,7 @@ #include "regcache.h" #include "symfile.h" #include "gdb_wait.h" +#include "gdbthread.h" #include #include @@ -375,6 +376,8 @@ spu_child_post_startup_inferior (ptid_t ptid) ptrace (PT_SYSCALL, tid, (PTRACE_TYPE_ARG3) 0, 0); waitpid (tid, NULL, __WALL | __WNOTHREAD); } + + add_thread_silent (ptid); } /* Override the post_attach routine to try load the SPE executable @@ -394,6 +397,8 @@ spu_child_post_attach (int pid) waitpid (pid, NULL, __WALL | __WNOTHREAD); } + add_thread_silent (inferior_ptid); + /* If the user has not provided an executable file, try to extract the image from inside the target process. */ if (!get_exec_file (0)) -- cgit v1.2.1