* mdebugread.c (parse_symbol): Use new variable
[deliverable/binutils-gdb.git] / gdb / thread.c
index db0bbbf2a72b13b40029add3ed6479d4ec5e1a96..0f6e67cb68cc8030f956af96d9e867b44c7679f5 100644 (file)
@@ -170,9 +170,17 @@ info_threads_command (arg, from_tty)
   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 */
This page took 0.024101 seconds and 4 git commands to generate.