Home | History | Annotate | Download | only in gdb

Lines Matching refs:ptid

43    them is to have one thread per CPU, where the thread's ptid has
58 is running, switching to its corresponding ptid, and then performing
59 the operation on that ptid using the target beneath us. */
113 bool thread_alive (ptid_t ptid) override;
115 int core_of_thread (ptid_t ptid) override;
129 ptid_t underlying = get_base_thread_from_ravenscar_task (tp->ptid);
146 /* PTID of the last thread that received an event.
152 bool task_is_currently_active (ptid_t ptid);
154 int get_thread_base_cpu (ptid_t ptid);
155 ptid_t get_base_thread_from_ravenscar_task (ptid_t ptid);
158 /* Like switch_to_thread, but uses the base ptid for the thread. */
159 void set_base_thread_from_ravenscar_task (ptid_t ptid)
163 ptid_t underlying = get_base_thread_from_ravenscar_task (ptid);
200 /* Return true iff PTID corresponds to a ravenscar task. */
203 is_ravenscar_task (ptid_t ptid)
212 return ptid.lwp () == 0 && ptid.tid () != 0;
215 /* Given PTID, which can be either a ravenscar task or a CPU thread,
216 return which CPU that ptid is running on.
218 This assume that PTID is a valid ptid_t. Otherwise, a gdb_assert
222 ravenscar_thread_target::get_thread_base_cpu (ptid_t ptid)
226 if (is_ravenscar_task (ptid))
230 auto iter = m_cpu_map.find (ptid.tid ());
236 struct ada_task_info *task_info = ada_get_task_info_from_ptid (ptid);
244 /* We assume that the LWP of the PTID is equal to the CPU number. */
245 base_cpu = ptid.lwp ();
251 /* Given a ravenscar task (identified by its ptid_t PTID), return true
262 ravenscar_thread_target::task_is_currently_active (ptid_t ptid)
264 ptid_t active_task_ptid = active_task (get_thread_base_cpu (ptid));
266 return ptid == active_task_ptid;
276 ravenscar_thread_target::get_base_thread_from_ravenscar_task (ptid_t ptid)
280 if (!is_ravenscar_task (ptid))
281 return ptid;
283 base_cpu = get_thread_base_cpu (ptid);
284 return ptid_t (ptid.pid (), base_cpu);
400 ravenscar_thread_target::resume (ptid_t ptid, int step,
404 arrange to resume the base ptid. */
406 if (ptid.is_pid ())
409 ptid = minus_one_ptid;
411 else if (ptid != minus_one_ptid)
412 ptid = m_base_ptid;
413 beneath ()->resume (ptid, step, siggnal);
417 ravenscar_thread_target::wait (ptid_t ptid,
425 if (ptid != minus_one_ptid)
426 ptid = m_base_ptid;
427 event_ptid = beneath->wait (ptid, status, 0);
443 return thr->ptid;
454 if (current_inferior ()->find_thread (task->ptid) == NULL)
456 ::add_thread (current_inferior ()->process_target (), task->ptid);
457 m_cpu_map[task->ptid.tid ()] = task->base_cpu;
493 ravenscar_thread_target::thread_alive (ptid_t ptid)
500 ravenscar_thread_target::pid_to_str (ptid_t ptid)
502 if (!is_ravenscar_task (ptid))
503 ptid);
506 phex_nz (ptid.tid (), sizeof (ULONGEST)));
548 = (CORE_ADDR) regcache->ptid ().tid ();
594 = (CORE_ADDR) regcache->ptid ().tid ();
605 /* Temporarily set the ptid of a regcache to some other value. When
606 this object is destroyed, the regcache's original ptid is
615 m_save_ptid (regcache->ptid ())
629 /* The saved ptid. */
656 int cpu = get_thread_base_cpu (regcache->ptid ());
666 = (CORE_ADDR) regcache->ptid ().tid ();
681 ptid_t ptid = regcache->ptid ();
683 if (runtime_initialized () && is_ravenscar_task (ptid))
686 bool is_active = task_is_currently_active (ptid);
693 ptid_t base = get_base_thread_from_ravenscar_task (ptid);
727 ptid_t ptid = regcache->ptid ();
729 if (runtime_initialized () && is_ravenscar_task (ptid))
732 bool is_active = task_is_currently_active (ptid);
739 ptid_t base = get_base_thread_from_ravenscar_task (ptid);
772 ptid_t ptid = regcache->ptid ();
774 if (runtime_initialized () && is_ravenscar_task (ptid))
776 if (task_is_currently_active (ptid))
778 ptid_t base = get_base_thread_from_ravenscar_task (ptid);
843 ravenscar_thread_target::core_of_thread (ptid_t ptid)