summaryrefslogtreecommitdiff
path: root/simpleperf/cmd_report_test.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2016-03-17 21:18:53 -0700
committerYabin Cui <yabinc@google.com>2016-03-18 16:35:26 -0700
commit05400539d15c50a52a388daba2e831b86824cc8e (patch)
treeb5de57a51df1b552c8792d9d34a10b8ab3c5d232 /simpleperf/cmd_report_test.cpp
parent96fdd9223bf3d35f0b559fc6582271ffea81cd02 (diff)
downloadextras-05400539d15c50a52a388daba2e831b86824cc8e.tar.gz
Simpleperf: support reading symbols from .gnu_debugdata.
As in https://sourceware.org/gdb/onlinedocs/gdb/MiniDebugInfo.html, elf files can store mini debug information in .gnu_debugdata. Bug: 27744639 Change-Id: If4a53a4a1332824388ee309ac63a008dc5cf8d5c
Diffstat (limited to 'simpleperf/cmd_report_test.cpp')
-rw-r--r--simpleperf/cmd_report_test.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/simpleperf/cmd_report_test.cpp b/simpleperf/cmd_report_test.cpp
index e27f71e6..bf1ff469 100644
--- a/simpleperf/cmd_report_test.cpp
+++ b/simpleperf/cmd_report_test.cpp
@@ -73,6 +73,12 @@ TEST_F(ReportCommandTest, no_option) {
ASSERT_NE(content.find("GlobalFunc"), std::string::npos);
}
+TEST_F(ReportCommandTest, report_symbol_from_elf_file_with_mini_debug_info) {
+ Report(PERF_DATA_WITH_MINI_DEBUG_INFO);
+ ASSERT_TRUE(success);
+ ASSERT_NE(content.find("GlobalFunc"), std::string::npos);
+}
+
TEST_F(ReportCommandTest, sort_option_pid) {
Report(PERF_DATA, {"--sort", "pid"});
ASSERT_TRUE(success);