diff options
author | Christopher Ferris <cferris@google.com> | 2018-03-15 14:35:01 -0700 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2018-03-15 15:14:18 -0700 |
commit | 704ec9adbac6f7f265afe0d727e685b92f7726d0 (patch) | |
tree | 66acabd364033fe0b10745a678ca7eadc283063d /libunwindstack/tools/unwind_info.cpp | |
parent | 39273df6516a990f593d89d6259cc89ac6bbecbd (diff) | |
download | system_core-704ec9adbac6f7f265afe0d727e685b92f7726d0.tar.gz system_core-704ec9adbac6f7f265afe0d727e685b92f7726d0.tar.bz2 system_core-704ec9adbac6f7f265afe0d727e685b92f7726d0.zip |
Handle ARM thumb function symbols.
ARM thumb functions will have the zero bit set to one, which can cause
function name lookups to fail.
Add an ARM special GetFunctionName that handles this condition.
Fix a couple of the function offsets in unit tests.
Bug: 74844137
Test: Ran unit tests.
Test: Ran debuggerd -b on processes on a bullhead device.
Change-Id: Ibd407db34eaaa641f91fdb4f589c44a0dcc0216a
Diffstat (limited to 'libunwindstack/tools/unwind_info.cpp')
-rw-r--r-- | libunwindstack/tools/unwind_info.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libunwindstack/tools/unwind_info.cpp b/libunwindstack/tools/unwind_info.cpp index a0abccae2..5a8edfdf3 100644 --- a/libunwindstack/tools/unwind_info.cpp +++ b/libunwindstack/tools/unwind_info.cpp @@ -53,8 +53,7 @@ void DumpArm(ElfInterfaceArm* interface) { printf(" PC 0x%" PRIx64, addr + load_bias); uint64_t func_offset; uint64_t pc = addr + load_bias; - // This might be a thumb function, so set the low bit. - if (interface->GetFunctionName(pc | 1, load_bias, &name, &func_offset) && !name.empty()) { + if (interface->GetFunctionName(pc, load_bias, &name, &func_offset) && !name.empty()) { printf(" <%s>", name.c_str()); } printf("\n"); |