struct thread_info *tp;
int current_pid = inferior_pid;
+ /* Avoid coredumps which would happen if we tried to access a NULL
+ selected_frame. */
+ if (!target_has_stack) error ("No stack.");
+
for (tp = thread_list; tp; tp = tp->next)
{
- if (target_has_execution
+ /* FIXME: need to figure out a way to do this for remote too,
+ or else the print_stack_frame below will fail with a bogus
+ thread ID. */
+ if (!STREQ (current_target.to_shortname, "remote")
+ && target_has_execution
&& kill (tp->pid, 0) == -1)
{
tp->pid = -1; /* Mark it as dead */