print_stack_frame (get_selected_frame (), -1, 0);
print_stack_frame (get_selected_frame (), 0, LOCATION);
info_threads_command (char *arg, int from_tty){  struct thread_info *tp;  ptid_t current_ptid;  struct frame_info *cur_frame;  int saved_frame_level = frame_relative_level (get_selected_frame ());  int counter;  char *extra_info;  /* Check that there really is a frame.  This happens when a simulator     is connected but not loaded or running, for instance.  */  if (legacy_frame_p (current_gdbarch) && saved_frame_level < 0)    error ("No frame.");  prune_threads ();  target_find_new_threads ();  current_ptid = inferior_ptid;  for (tp = thread_list; tp; tp = tp->next)    {      if (ptid_equal (tp->ptid, current_ptid))	printf_filtered ("* ");      else	printf_filtered ("  ");#ifdef HPUXHPPA      printf_filtered ("%d %s", tp->num, target_tid_to_str (tp->ptid));#else      printf_filtered ("%d %s", tp->num, target_pid_to_str (tp->ptid));#endif      extra_info = target_extra_thread_info (tp);      if (extra_info)	printf_filtered (" (%s)", extra_info);      puts_filtered ("  ");      switch_to_thread (tp->ptid);      print_stack_frame (get_selected_frame (), -1, 0);    }  switch_to_thread (current_ptid);  /* Code below copied from "up_silently_base" in "stack.c".   * It restores the frame set by the user before the "info threads"   * command.  We have finished the info-threads display by switching   * back to the current thread.  That switch has put us at the top   * of the stack (leaf frame).   */  counter = saved_frame_level;  cur_frame = find_relative_frame (get_selected_frame (), &counter);  if (counter != 0)    {      /* Ooops, can't restore, tell user where we are. */      warning ("Couldn't restore frame in current thread, at frame 0");      print_stack_frame (get_selected_frame (), -1, 0);    }  else    {      select_frame (cur_frame);    }  /* re-show current frame. */  show_stack_frame (cur_frame);}