Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(100)

Unified Diff: src/processor/stackwalker_arm_unittest.cc

Issue 413002: Allow processing dumps with missing stack memory for some threads (Closed)
Patch Set: Updated patch Created 12 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/processor/stackwalker_arm.cc ('k') | src/processor/stackwalker_ppc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/processor/stackwalker_arm_unittest.cc
===================================================================
--- a/src/processor/stackwalker_arm_unittest.cc
+++ b/src/processor/stackwalker_arm_unittest.cc
@@ -161,16 +161,31 @@ TEST_F(GetContextFrame, Simple) {
frames = call_stack.frames();
ASSERT_EQ(1U, frames->size());
StackFrameARM *frame = static_cast<StackFrameARM *>(frames->at(0));
// Check that the values from the original raw context made it
// through to the context in the stack frame.
EXPECT_EQ(0, memcmp(&raw_context, &frame->context, sizeof(raw_context)));
}
+// The stackwalker should be able to produce the context frame even
+// without stack memory present.
+TEST_F(GetContextFrame, NoStackMemory) {
+ StackFrameSymbolizer frame_symbolizer(&supplier, &resolver);
+ StackwalkerARM walker(&system_info, &raw_context, -1, NULL, &modules,
+ &frame_symbolizer);
+ ASSERT_TRUE(walker.Walk(&call_stack));
+ frames = call_stack.frames();
+ ASSERT_EQ(1U, frames->size());
+ StackFrameARM *frame = static_cast<StackFrameARM *>(frames->at(0));
+ // Check that the values from the original raw context made it
+ // through to the context in the stack frame.
+ EXPECT_EQ(0, memcmp(&raw_context, &frame->context, sizeof(raw_context)));
+}
+
class GetCallerFrame: public StackwalkerARMFixture, public Test { };
TEST_F(GetCallerFrame, ScanWithoutSymbols) {
// When the stack walker resorts to scanning the stack,
// only addresses located within loaded modules are
// considered valid return addresses.
// Force scanning through three frames to ensure that the
// stack pointer is set properly in scan-recovered frames.
« no previous file with comments | « src/processor/stackwalker_arm.cc ('k') | src/processor/stackwalker_ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1004:630ec63f810e-tainted