Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(710)

Unified Diff: src/processor/microdump_processor_unittest.cc

Issue 1731923002: Support processing microdump for mips architecture (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Reduced size of .sym files + rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/processor/microdump.cc ('k') | src/processor/testdata/microdump-mips32.dmp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/processor/microdump_processor_unittest.cc
diff --git a/src/processor/microdump_processor_unittest.cc b/src/processor/microdump_processor_unittest.cc
index a507b627f2a61acda9d858ce3cc2fed97d59ad18..898b65b2977054cb61a2c35317d27051bc006783 100644
--- a/src/processor/microdump_processor_unittest.cc
+++ b/src/processor/microdump_processor_unittest.cc
@@ -223,6 +223,48 @@ TEST_F(MicrodumpProcessorTest, TestProcessMultiple) {
ASSERT_EQ(2U, state.threads()->at(0)->frames()->size());
}
+TEST_F(MicrodumpProcessorTest, TestProcessMips) {
+ ProcessState state;
+ AnalyzeDump("microdump-mips32.dmp", false /* omit_symbols */,
+ 2 /* expected_cpu_count */, &state);
+
+ ASSERT_EQ(7U, state.modules()->module_count());
+ ASSERT_EQ("mips", state.system_info()->cpu);
+ ASSERT_EQ("3.0.8-g893bf16 #7 SMP PREEMPT Fri Jul 10 15:20:59 PDT 2015",
+ state.system_info()->os_version);
+ ASSERT_EQ(4U, state.threads()->at(0)->frames()->size());
+
+ ASSERT_EQ("blaTest",
+ state.threads()->at(0)->frames()->at(0)->function_name);
+ ASSERT_EQ("Crash",
+ state.threads()->at(0)->frames()->at(1)->function_name);
+ ASSERT_EQ("main",
+ state.threads()->at(0)->frames()->at(2)->function_name);
+ ASSERT_EQ("crash_example",
+ state.threads()->at(0)->frames()->at(0)->module->debug_file());
+}
+
+TEST_F(MicrodumpProcessorTest, TestProcessMips64) {
+ ProcessState state;
+ AnalyzeDump("microdump-mips64.dmp", false /* omit_symbols */,
+ 1 /* expected_cpu_count */, &state);
+
+ ASSERT_EQ(7U, state.modules()->module_count());
+ ASSERT_EQ("mips64", state.system_info()->cpu);
+ ASSERT_EQ("3.10.0-gf185e20 #112 PREEMPT Mon Oct 5 11:12:49 PDT 2015",
+ state.system_info()->os_version);
+ ASSERT_EQ(4U, state.threads()->at(0)->frames()->size());
+
+ ASSERT_EQ("blaTest",
+ state.threads()->at(0)->frames()->at(0)->function_name);
+ ASSERT_EQ("Crash",
+ state.threads()->at(0)->frames()->at(1)->function_name);
+ ASSERT_EQ("main",
+ state.threads()->at(0)->frames()->at(2)->function_name);
+ ASSERT_EQ("crash_example",
+ state.threads()->at(0)->frames()->at(0)->module->debug_file());
+}
+
} // namespace
int main(int argc, char* argv[]) {
« no previous file with comments | « src/processor/microdump.cc ('k') | src/processor/testdata/microdump-mips32.dmp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698