Better identification of context frames.

Since the introduction of inlined frames, it is not sufficient to check
the stack trace length (== 1) in order to identify context frames.
Updating all location that were depending on this assumption to check
for frame trust level instead.

Change-Id: I98f966889367c2270c268b8e78b67418c89c50f1
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3499020
Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Ivan Penkov 2022-03-01 21:01:34 +00:00
parent 42d2475617
commit c685fe1153
8 changed files with 42 additions and 33 deletions

View file

@ -276,7 +276,8 @@ StackFrame* StackwalkerMIPS::GetCallerFrame(const CallStack* stack,
if (TerminateWalk(new_frame->context.epc,
new_frame->context.iregs[MD_CONTEXT_MIPS_REG_SP],
last_frame->context.iregs[MD_CONTEXT_MIPS_REG_SP],
frames.size() == 1)) {
/*first_unwind=*/last_frame->trust ==
StackFrame::FRAME_TRUST_CONTEXT)) {
return NULL;
}