Changeset View
Changeset View
Standalone View
Standalone View
devel/gdb/files/kgdb/fbsd-kthr.c
Show First 20 Lines • Show All 149 Lines • ▼ Show 20 Lines | kgdb_thr_add_procs(CORE_ADDR paddr, CORE_ADDR (*cpu_pcb_addr) (u_int)) | ||||
} | } | ||||
} | } | ||||
struct kthr * | struct kthr * | ||||
kgdb_thr_init(CORE_ADDR (*cpu_pcb_addr) (u_int)) | kgdb_thr_init(CORE_ADDR (*cpu_pcb_addr) (u_int)) | ||||
{ | { | ||||
struct gdbarch *gdbarch = target_gdbarch (); | struct gdbarch *gdbarch = target_gdbarch (); | ||||
struct type *ptr_type = builtin_type (gdbarch)->builtin_data_ptr; | struct type *ptr_type = builtin_type (gdbarch)->builtin_data_ptr; | ||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); | |||||
struct kthr *kt; | struct kthr *kt; | ||||
CORE_ADDR addr, paddr; | CORE_ADDR addr, paddr; | ||||
while (first != NULL) { | while (first != NULL) { | ||||
kt = first; | kt = first; | ||||
first = kt->next; | first = kt->next; | ||||
free(kt); | free(kt); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | TRY { | ||||
thread_off_td_oncpu = parse_and_eval_address( | thread_off_td_oncpu = parse_and_eval_address( | ||||
"&((struct thread *)0)->td_oncpu"); | "&((struct thread *)0)->td_oncpu"); | ||||
thread_off_td_pcb = parse_and_eval_address( | thread_off_td_pcb = parse_and_eval_address( | ||||
"&((struct thread *)0)->td_pcb"); | "&((struct thread *)0)->td_pcb"); | ||||
thread_off_td_plist = parse_and_eval_address( | thread_off_td_plist = parse_and_eval_address( | ||||
"&((struct thread *)0)->td_plist"); | "&((struct thread *)0)->td_plist"); | ||||
thread_oncpu_size = parse_and_eval_long( | thread_oncpu_size = parse_and_eval_long( | ||||
"sizeof(((struct thread *)0)->td_oncpu)"); | "sizeof(((struct thread *)0)->td_oncpu)"); | ||||
} CATCH(e, RETURN_MASK_ERROR) { | } CATCH(e2, RETURN_MASK_ERROR) { | ||||
proc_off_p_pid = offsetof(struct proc, p_pid); | proc_off_p_pid = offsetof(struct proc, p_pid); | ||||
proc_off_p_comm = offsetof(struct proc, p_comm); | proc_off_p_comm = offsetof(struct proc, p_comm); | ||||
proc_off_p_list = offsetof(struct proc, p_list); | proc_off_p_list = offsetof(struct proc, p_list); | ||||
proc_off_p_threads = offsetof(struct proc, p_threads); | proc_off_p_threads = offsetof(struct proc, p_threads); | ||||
thread_off_td_tid = offsetof(struct thread, td_tid); | thread_off_td_tid = offsetof(struct thread, td_tid); | ||||
thread_off_td_name = offsetof(struct thread, td_name); | thread_off_td_name = offsetof(struct thread, td_name); | ||||
thread_off_td_oncpu = offsetof(struct thread, td_oncpu); | thread_off_td_oncpu = offsetof(struct thread, td_oncpu); | ||||
thread_off_td_pcb = offsetof(struct thread, td_pcb); | thread_off_td_pcb = offsetof(struct thread, td_pcb); | ||||
▲ Show 20 Lines • Show All 98 Lines • Show Last 20 Lines |