diff options
author | Aidan Dodds <aidan@codeplay.com> | 2015-05-28 15:37:01 +0000 |
---|---|---|
committer | Aidan Dodds <aidan@codeplay.com> | 2015-05-28 15:37:01 +0000 |
commit | 5f2d0c3c23d1287522c20bb59337eb3ed9147511 (patch) | |
tree | eb09fa01b8b8237cc03fc18703fc84b4addd0454 /lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp | |
parent | e2b355d651ed8f2cbe61672c4c39b6419e471265 (diff) | |
download | bcm5719-llvm-5f2d0c3c23d1287522c20bb59337eb3ed9147511.tar.gz bcm5719-llvm-5f2d0c3c23d1287522c20bb59337eb3ed9147511.zip |
Fix THUMB function detection when function name is not prefixed.
Differential Revision: http://reviews.llvm.org/D10062
llvm-svn: 238433
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp')
-rw-r--r-- | lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp index c043628b666..d8e35b86a60 100644 --- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -1915,18 +1915,25 @@ ObjectFileELF::ParseSymbols (Symtab *symtab, if (arch.GetMachine() == llvm::Triple::arm) { - // THUMB functions have the lower bit of their address set. Fixup - // the actual address and mark the symbol as THUMB. - if (symbol_type == eSymbolTypeCode && symbol.st_value & 1) + if (symbol_type == eSymbolTypeCode) { - // Substracting 1 from the address effectively unsets - // the low order bit, which results in the address - // actually pointing to the beginning of the symbol. - // This delta will be used below in conjuction with - // symbol.st_value to produce the final symbol_value - // that we store in the symtab. - symbol_value_offset = -1; - additional_flags = ARM_ELF_SYM_IS_THUMB; + if (symbol.st_value & 1) + { + // Subtracting 1 from the address effectively unsets + // the low order bit, which results in the address + // actually pointing to the beginning of the symbol. + // This delta will be used below in conjunction with + // symbol.st_value to produce the final symbol_value + // that we store in the symtab. + symbol_value_offset = -1; + additional_flags = ARM_ELF_SYM_IS_THUMB; + m_address_class_map[symbol.st_value^1] = eAddressClassCodeAlternateISA; + } + else + { + // This address is ARM + m_address_class_map[symbol.st_value] = eAddressClassCode; + } } } } |