Changeset View
Changeset View
Standalone View
Standalone View
devel/gdb/files/kgdb/fbsd-kthr.c
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | |||||
CORE_ADDR | CORE_ADDR | ||||
kgdb_lookup(const char *sym) | kgdb_lookup(const char *sym) | ||||
{ | { | ||||
struct bound_minimal_symbol msym; | struct bound_minimal_symbol msym; | ||||
msym = lookup_minimal_symbol(sym, NULL, NULL); | msym = lookup_minimal_symbol(sym, NULL, NULL); | ||||
if (msym.minsym == NULL) | if (msym.minsym == NULL) | ||||
return (0); | return (0); | ||||
return (BMSYMBOL_VALUE_ADDRESS(msym)); | return (msym.value_address ()); | ||||
} | } | ||||
/* | /* | ||||
* Perform the equivalent of CPU_ISSET() to see if 'cpu' is set in the | * Perform the equivalent of CPU_ISSET() to see if 'cpu' is set in the | ||||
* kernel's stopped_cpus set. The set contains an array of longs. | * kernel's stopped_cpus set. The set contains an array of longs. | ||||
* This function determines the specific long to read and tests the | * This function determines the specific long to read and tests the | ||||
* necessary bit in the long. | * necessary bit in the long. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | kgdb_thr_add_procs_hash(CORE_ADDR pidhashtbl, CORE_ADDR (*cpu_pcb_addr) (u_int)) | ||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); | enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); | ||||
CORE_ADDR paddr, pnext; | CORE_ADDR paddr, pnext; | ||||
ULONGEST i, pidhash; | ULONGEST i, pidhash; | ||||
pidhash = parse_and_eval_long("pidhash"); | pidhash = parse_and_eval_long("pidhash"); | ||||
for (i = 0; i < pidhash; i++) { | for (i = 0; i < pidhash; i++) { | ||||
try { | try { | ||||
paddr = read_memory_typed_address (pidhashtbl + | paddr = read_memory_typed_address (pidhashtbl + | ||||
i * TYPE_LENGTH(ptr_type), ptr_type); | i * ptr_type->length (), ptr_type); | ||||
} catch (const gdb_exception_error &e) { | } catch (const gdb_exception_error &e) { | ||||
continue; | continue; | ||||
} | } | ||||
while (paddr != 0) { | while (paddr != 0) { | ||||
try { | try { | ||||
pnext = read_memory_typed_address (paddr + | pnext = read_memory_typed_address (paddr + | ||||
proc_off_p_hash, ptr_type); | proc_off_p_hash, ptr_type); | ||||
} catch (const gdb_exception_error &e) { | } catch (const gdb_exception_error &e) { | ||||
▲ Show 20 Lines • Show All 265 Lines • Show Last 20 Lines |