9 * Deliver Thread object which was active at entry of kernel debugger.
10 * If we came from the kernel itself, return Thread with id 0.0
12 static Thread *get_thread(Cpu_number cpu);
15 //---------------------------------------------------------------------------
18 #include "jdb_prompt_ext.h"
22 class Jdb_tid_ext : public Jdb_prompt_ext
33 if (Jdb::get_current_active())
34 printf("(%p) ", Jdb::get_current_active());
41 Jdb::get_current(Jdb::current_cpu);
44 //static Jdb_tid_ext jdb_tid_ext INIT_PRIORITY(JDB_MODULE_INIT_PRIO);
46 //---------------------------------------------------------------------------
47 IMPLEMENTATION [arm || ux || ppc32 || sparc]:
49 #include "mem_layout.h"
53 Jdb::get_thread(Cpu_number cpu)
55 Jdb_entry_frame *c = get_entry_frame(cpu);
57 return static_cast<Thread*>(context_of(c));
60 //---------------------------------------------------------------------------
68 Jdb::get_current(Cpu_number cpu)
70 current_active = get_thread(cpu);
73 PUBLIC static inline NEEDS["thread.h"]
75 Jdb::get_current_space()
77 return current_active ? current_active->space() : 0;