On ARM, unlike some other architectures, saved $pc values from in-kernel

traps do appear in the regular call stack, rather than only in a special
trap frame, so we don't need to inject the trap-frame $pc into a returned
stack trace in DTrace.

MFC after:	3 days
Sponsored by:	DARPA, AFRL
This commit is contained in:
Robert Watson 2015-03-15 15:17:34 +00:00
parent 066a8f1411
commit 2a1d3dee4f

View File

@ -73,7 +73,6 @@ dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, int aframes,
register_t sp;
int scp_offset;
int depth = 0;
pc_t caller = (pc_t) solaris_cpu[curcpu].cpu_dtrace_caller;
if (intrpc != 0)
pcstack[depth++] = (pc_t) intrpc;
@ -92,13 +91,14 @@ dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, int aframes,
done = unwind_stack_one(&state, 1);
/*
* NB: Unlike some other architectures, we don't need to
* explicitly insert cpu_dtrace_caller as it appears in the
* normal kernel stack trace rather than a special trap frame.
*/
if (aframes > 0) {
aframes--;
if ((aframes == 0) && (caller != 0)) {
pcstack[depth++] = caller;
}
}
else {
} else {
pcstack[depth++] = state.registers[PC];
}