td_err_e err;
struct thread_info *inferior;
struct lwp_info *lwp;
- struct process_info_private *proc = current_process()->private;
+ struct process_info_private *proc;
int lwpid = ptid_get_lwp (ptid);
inferior = (struct thread_info *) find_inferior_id (&all_threads, ptid);
return 1;
/* Get information about this thread. */
+ proc = get_thread_process (inferior)->private;
err = td_ta_map_lwp2thr (proc->thread_agent, lwpid, &th);
if (err != TD_OK)
error ("Cannot get thread handle for LWP %d: %s",
struct lwp_info *lwp;
struct thread_info *saved_inferior;
+ /* If the thread layer is not (yet) initialized, fail. */
+ if (!get_thread_process (thread)->all_symbols_looked_up)
+ return TD_ERR;
+
lwp = get_thread_lwp (thread);
if (!lwp->thread_known)
find_one_thread (lwp->head.id);