Index: gdb/corelow.c =================================================================== RCS file: /cvs/src/src/gdb/corelow.c,v retrieving revision 1.86 diff -u -p -r1.86 corelow.c --- gdb/corelow.c 5 Jun 2009 18:08:53 -0000 1.86 +++ gdb/corelow.c 5 Jun 2009 18:51:03 -0000 @@ -395,12 +395,6 @@ core_open (char *filename, int from_tty) previous session, and the frame cache being stale. */ registers_changed (); - /* Build up thread list from BFD sections, and possibly set the - current thread to the .reg/NN section matching the .reg - section. */ - bfd_map_over_sections (core_bfd, add_to_thread_list, - bfd_get_section_by_name (core_bfd, ".reg")); - post_create_inferior (&core_ops, from_tty); /* Now go through the target stack looking for threads since there @@ -748,6 +742,13 @@ core_pid_to_str (struct target_ops *ops, return buf; } +static void +core_find_new_threads (struct target_ops *ops) +{ + if (core_bfd) + bfd_map_over_sections (core_bfd, add_to_thread_list, NULL); +} + /* Fill in core_ops with its defined operations and properties. */ static void @@ -775,6 +776,7 @@ init_core_ops (void) core_ops.to_has_stack = 1; core_ops.to_has_registers = 1; core_ops.to_magic = OPS_MAGIC; + core_ops.to_find_new_threads = core_find_new_threads; } void