Fix backtraces by defining ksym_start & ksym_end if DDB is
defined. The kernel linker doesn't deal with symbols of type NOTYPE and typically gives the wrong symbol ($a) for local symbols. Obtained from: Juniper Networks, Inc.
This commit is contained in:
parent
7d5f64a903
commit
4cdbe2b967
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=217708
@ -118,6 +118,10 @@ extern unsigned char _edata[];
|
||||
extern unsigned char __bss_start[];
|
||||
extern unsigned char _end[];
|
||||
|
||||
#ifdef DDB
|
||||
extern vm_offset_t ksym_start, ksym_end;
|
||||
#endif
|
||||
|
||||
extern u_int data_abort_handler_address;
|
||||
extern u_int prefetch_abort_handler_address;
|
||||
extern u_int undefined_handler_address;
|
||||
@ -330,6 +334,10 @@ initarm(void *mdp, void *unused __unused)
|
||||
dtbp = MD_FETCH(kmdp, MODINFOMD_DTBP, vm_offset_t);
|
||||
lastaddr = MD_FETCH(kmdp, MODINFOMD_KERNEND,
|
||||
vm_offset_t);
|
||||
#ifdef DDB
|
||||
ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, uintptr_t);
|
||||
ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t);
|
||||
#endif
|
||||
}
|
||||
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user