Changeset View
Changeset View
Standalone View
Standalone View
devel/gdb/files/kgdb/i386fbsd-kern.c
Show First 20 Lines • Show All 180 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
static CORE_ADDR | static CORE_ADDR | ||||
i386fbsd_fetch_tss(void) | i386fbsd_fetch_tss(void) | ||||
{ | { | ||||
struct kthr *kt; | struct kthr *kt; | ||||
struct segment_descriptor sd; | struct segment_descriptor sd; | ||||
CORE_ADDR addr, cpu0prvpage, tss; | CORE_ADDR addr, cpu0prvpage, tss; | ||||
kt = kgdb_thr_lookup_tid(ptid_get_tid(inferior_ptid)); | kt = kgdb_thr_lookup_tid(inferior_ptid.tid()); | ||||
if (kt == NULL || kt->cpu == NOCPU || kt->cpu < 0) | if (kt == NULL || kt->cpu == NOCPU || kt->cpu < 0) | ||||
return (0); | return (0); | ||||
addr = kgdb_lookup("gdt"); | addr = kgdb_lookup("gdt"); | ||||
if (addr == 0) | if (addr == 0) | ||||
return (0); | return (0); | ||||
addr += (kt->cpu * NGDT + GPROC0_SEL) * sizeof(sd); | addr += (kt->cpu * NGDT + GPROC0_SEL) * sizeof(sd); | ||||
if (target_read_memory(addr, (gdb_byte *)&sd, sizeof(sd)) != 0) | if (target_read_memory(addr, (gdb_byte *)&sd, sizeof(sd)) != 0) | ||||
▲ Show 20 Lines • Show All 383 Lines • Show Last 20 Lines |