+Fri Oct 24 16:48:21 1997 David Taylor <taylor@texas.cygnus.com>
+
+ * sol-thread.c (sol_find_new_threads_callback,
+ sol_find_new_threads): New functions.
+ * config/sparc/nm-sun4sol2.h (FIND_NEW_THREADS): New macro, invoke
+ sol_find_new_threads.
+ * thread.c (info_threads_command): invoke FIND_NEW_THREADS if it
+ is defined.
+
Thu Oct 23 16:16:04 1997 Jeff Law (law@fast.cs.utah.edu)
* dbxread.c (process_one_symbol): Put back initialization
}
\f
+/* Worker bee for find_new_threads
+ Callback function that gets called once per USER thread (i.e., not
+ kernel) thread. */
+
+static int
+sol_find_new_threads_callback(th, ignored)
+ const td_thrhandle_t *th;
+ void *ignored;
+{
+ td_err_e retval;
+ td_thrinfo_t ti;
+ int pid;
+
+ if ((retval = p_td_thr_get_info(th, &ti)) != TD_OK)
+ {
+ return -1;
+ }
+ pid = BUILD_THREAD(ti.ti_tid, PIDGET(inferior_pid));
+ if (!in_thread_list(pid))
+ add_thread(pid);
+
+ return 0;
+}
+
+void
+sol_find_new_threads()
+{
+ if (inferior_pid == -1)
+ {
+ printf_filtered("No process.\n");
+ return;
+ }
+ p_td_ta_thr_iter (main_ta, sol_find_new_threads_callback, (void *)0,
+ TD_THR_ANY_STATE, TD_THR_LOWEST_PRIORITY,
+ TD_SIGNO_MASK, TD_THR_ANY_USER_FLAGS);
+}
+
#ifdef MAINTENANCE_CMDS
/* Worker bee for info sol-thread command. This is a callback function that
gets called once for each Solaris thread (ie. not kernel thread) in the
if (!target_has_stack) error ("No stack.");
prune_threads ();
+#if defined(FIND_NEW_THREADS)
+ FIND_NEW_THREADS ();
+#endif
+
for (tp = thread_list; tp; tp = tp->next)
{
if (tp->pid == current_pid)