[Lldb-commits] [lldb] r238433 - Fix THUMB function detection when function name is not prefixed.
Aidan Dodds
aidan at codeplay.com
Thu May 28 08:37:01 PDT 2015
Author: aidandodds
Date: Thu May 28 10:37:01 2015
New Revision: 238433
URL: http://llvm.org/viewvc/llvm-project?rev=238433&view=rev
Log:
Fix THUMB function detection when function name is not prefixed.
Differential Revision: http://reviews.llvm.org/D10062
Modified:
lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=238433&r1=238432&r2=238433&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Thu May 28 10:37:01 2015
@@ -1915,18 +1915,25 @@ ObjectFileELF::ParseSymbols (Symtab *sym
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;
+ }
}
}
}
More information about the lldb-commits
mailing list