Use thread_info and inferior pointers more throughout
[deliverable/binutils-gdb.git] / gdb / varobj.c
index a0df485ae916daf4d163b1614df50398d8d8b643..02441410e80c3d2d56f689b98407e5a40975e309 100644 (file)
@@ -356,7 +356,7 @@ varobj_create (const char *objname,
            error (_("Failed to find the specified frame"));
 
          var->root->frame = get_frame_id (fi);
-         var->root->thread_id = ptid_to_global_thread_id (inferior_ptid);
+         var->root->thread_id = inferior_thread ()->global_num;
          old_id = get_frame_id (get_selected_frame (NULL));
          select_frame (fi);     
        }
@@ -2122,11 +2122,11 @@ value_of_root_1 (struct varobj **var_handle)
     }
   else
     {
-      ptid_t ptid = global_thread_id_to_ptid (var->root->thread_id);
+      thread_info *thread = find_thread_global_id (var->root->thread_id);
 
-      if (!ptid_equal (minus_one_ptid, ptid))
+      if (thread != NULL)
        {
-         switch_to_thread (ptid);
+         switch_to_thread (thread);
          within_scope = check_scope (var);
        }
     }
This page took 0.026597 seconds and 4 git commands to generate.