[Lldb-commits] [PATCH] Ignore mapping symbols on aarch64
Greg Clayton
clayborg at gmail.com
Thu Apr 2 10:33:30 PDT 2015
Very nice. Just fix the bad std::map code as mentioned in the inline comment and we are good to go.
================
Comment at: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:899-907
@@ -910,6 +898,11 @@
+ auto ub = m_address_class_map.upper_bound(file_addr);
+ if (ub == m_address_class_map.begin())
+ {
+ // No entry in the address class map before the address. Return
+ // default address class for an address in a code section.
+ return eAddressClassCode;
+ }
- // Thumb symbols have the lower bit set in the flags field so we just check
- // for that.
- if (symbol->GetFlags() & ARM_ELF_SYM_IS_THUMB)
- res = eAddressClassCodeAlternateISA;
+ // Move iterator to the address class entry preceding address
+ --ub;
----------------
You need to check if "file_addr" is equal to pos->first before you decrement. This code should be:
```
if (ub->first == file_addr)
return ub->second;
if (ub == m_address_class_map.begin())
{
// No entry in the address class map before the address. Return
// default address class for an address in a code section.
return eAddressClassCode;
}
--ub;
```
http://reviews.llvm.org/D8776
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the lldb-commits
mailing list