mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2025-12-26 17:25:04 +01:00
Create StackFrame::FRAME_TRUST_PREWALKED trust type.
This creates a new frame trust type for prewalked stack frames, as suggested in the review of https://breakpad.appspot.com/620002/. R=ted.mielczarek@gmail.com, mark@chromium.org Review URL: https://breakpad.appspot.com/621002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1208 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
1e57990cee
commit
16a880e135
3 changed files with 17 additions and 8 deletions
|
|
@ -85,7 +85,7 @@ StackFrame* StackwalkerAddressList::GetCallerFrame(const CallStack* stack,
|
|||
// explicitly provided.
|
||||
StackFrame* frame = new StackFrame();
|
||||
frame->instruction = frames_[frame_index];
|
||||
frame->trust = StackFrame::FRAME_TRUST_CONTEXT;
|
||||
frame->trust = StackFrame::FRAME_TRUST_PREWALKED;
|
||||
return frame;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -106,8 +106,14 @@ class StackwalkerAddressListTest : public testing::Test {
|
|||
void CheckCallStack(const CallStack& call_stack) {
|
||||
const std::vector<StackFrame*>* frames = call_stack.frames();
|
||||
ASSERT_EQ(arraysize(kDummyFrames), frames->size());
|
||||
for (size_t i = 0; i < arraysize(kDummyFrames); ++i)
|
||||
for (size_t i = 0; i < arraysize(kDummyFrames); ++i) {
|
||||
ASSERT_EQ(kDummyFrames[i], frames->at(i)->instruction);
|
||||
if (i == 0) {
|
||||
ASSERT_EQ(StackFrame::FRAME_TRUST_CONTEXT, frames->at(i)->trust);
|
||||
} else {
|
||||
ASSERT_EQ(StackFrame::FRAME_TRUST_PREWALKED, frames->at(i)->trust);
|
||||
}
|
||||
}
|
||||
ASSERT_EQ(static_cast<const CodeModule*>(&module2), frames->at(0)->module);
|
||||
ASSERT_EQ(static_cast<const CodeModule*>(&module2), frames->at(1)->module);
|
||||
ASSERT_EQ(static_cast<const CodeModule*>(&module2), frames->at(2)->module);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue