#include <i386/mp_desc.h>
#include <i386/misc_protos.h>
+
+static uint64_t
+chudxnu_vm_unslide( uint64_t ptr, int kaddr )
+{
+ if( !kaddr )
+ return ptr;
+
+ return VM_KERNEL_UNSLIDE(ptr);
+}
+
#if 0
#pragma mark **** thread state ****
#endif
if(ct >= max_idx)
return KERN_RESOURCE_SHORTAGE; // no frames traced
- frames[ct++] = currPC;
+ frames[ct++] = chudxnu_vm_unslide(currPC, supervisor);
// build a backtrace of this 32 bit state.
while(VALID_STACK_ADDRESS(supervisor, currFP, kernStackMin, kernStackMax)) {
prevFP = (uint64_t) tmpWord; // promote 32 bit address
if(prevFP) {
- frames[ct++] = currPC;
+ frames[ct++] = chudxnu_vm_unslide(currPC, supervisor);
prevPC = currPC;
}
if(prevFP < currFP) {
if(*start_idx >= max_idx)
return KERN_RESOURCE_SHORTAGE; // no frames traced
- frames[ct++] = currPC;
+ frames[ct++] = chudxnu_vm_unslide(currPC, supervisor);
// build a backtrace of this 32 bit state.
while(VALID_STACK_ADDRESS64(supervisor, currFP, kernStackMin, kernStackMax)) {
}
if(VALID_STACK_ADDRESS64(supervisor, prevFP, kernStackMin, kernStackMax)) {
- frames[ct++] = currPC;
+ frames[ct++] = chudxnu_vm_unslide(currPC, supervisor);
prevPC = currPC;
}
if(prevFP < currFP) {
return KERN_FAILURE;
}
- frames[ct++] = (uint64_t)currPC;
+ frames[ct++] = chudxnu_vm_unslide((uint64_t)currPC, 1);
// build a backtrace of this kernel state
#if __LP64__
#else
if(VALID_STACK_ADDRESS(TRUE, prevFP, kernStackMin, kernStackMax)) {
#endif
- frames[ct++] = (uint64_t)currPC;
+ frames[ct++] = chudxnu_vm_unslide((uint64_t)currPC, 1);
prevPC = currPC;
}
if(prevFP <= currFP) {