summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChih-Hung Hsieh2018-05-11 18:01:21 -0500
committerChih-Hung Hsieh2018-05-14 13:07:54 -0500
commit3249b3a8dd37ed16b4819e941989d945f6571673 (patch)
tree6895bad384afd6cb583c70728a4b08b93edb488b /debuggerd
parentc8dd6b74e66ee02132e9d2094675974f5285666a (diff)
downloadplatform-system-core-3249b3a8dd37ed16b4819e941989d945f6571673.tar.gz
platform-system-core-3249b3a8dd37ed16b4819e941989d945f6571673.tar.xz
platform-system-core-3249b3a8dd37ed16b4819e941989d945f6571673.zip
Expect optional (offset ...) in frame dump.
* New lld could create files that map to non-zero offset at run time. Test: debuggerd_test Bug: 79590156 Change-Id: I12db0ebef489ba8a1e648a29d214f8d3c3703996
Diffstat (limited to 'debuggerd')
-rw-r--r--debuggerd/debuggerd_test.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/debuggerd/debuggerd_test.cpp b/debuggerd/debuggerd_test.cpp
index 9b64be70f..dfb7a6a7c 100644
--- a/debuggerd/debuggerd_test.cpp
+++ b/debuggerd/debuggerd_test.cpp
@@ -80,8 +80,13 @@ constexpr char kWaitForGdbKey[] = "debug.debuggerd.wait_for_gdb";
80 return value; \ 80 return value; \
81 }() 81 }()
82 82
83// Backtrace frame dump could contain:
84// #01 pc 0001cded /data/tmp/debuggerd_test32 (raise_debugger_signal+80)
85// or
86// #01 pc 00022a09 /data/tmp/debuggerd_test32 (offset 0x12000) (raise_debugger_signal+80)
83#define ASSERT_BACKTRACE_FRAME(result, frame_name) \ 87#define ASSERT_BACKTRACE_FRAME(result, frame_name) \
84 ASSERT_MATCH(result, R"(#\d\d pc [0-9a-f]+\s+ \S+ \()" frame_name R"(\+)"); 88 ASSERT_MATCH(result, \
89 R"(#\d\d pc [0-9a-f]+\s+ \S+ (\(offset 0x[0-9a-f]+\) )?\()" frame_name R"(\+)");
85 90
86static void tombstoned_intercept(pid_t target_pid, unique_fd* intercept_fd, unique_fd* output_fd, 91static void tombstoned_intercept(pid_t target_pid, unique_fd* intercept_fd, unique_fd* output_fd,
87 InterceptStatus* status, DebuggerdDumpType intercept_type) { 92 InterceptStatus* status, DebuggerdDumpType intercept_type) {