Allow StackwalkerARM to scan much farther to find the caller of the context frame

R=jimb at https://breakpad.appspot.com/501002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1086 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
ted.mielczarek@gmail.com 2012-12-04 19:30:31 +00:00
parent ac9324da7a
commit 0a636257d4
4 changed files with 70 additions and 3 deletions

View file

@ -166,7 +166,14 @@ StackFrameARM* StackwalkerARM::GetCallerByStackScan(
u_int32_t last_sp = last_frame->context.iregs[MD_CONTEXT_ARM_REG_SP];
u_int32_t caller_sp, caller_pc;
if (!ScanForReturnAddress(last_sp, &caller_sp, &caller_pc)) {
// When searching for the caller of the context frame,
// allow the scanner to look farther down the stack.
const int kRASearchWords = frames.size() == 1 ?
Stackwalker::kRASearchWords * 4 :
Stackwalker::kRASearchWords;
if (!ScanForReturnAddress(last_sp, &caller_sp, &caller_pc,
kRASearchWords)) {
// No plausible return address was found.
return NULL;
}