[Lldb-commits] [PATCH] Ignore mapping symbols on aarch64
Tamas Berghammer
tberghammer at google.com
Thu Apr 2 10:37:26 PDT 2015
================
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;
----------------
clayborg wrote:
> 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;
> ```
Upper bounds returns an iterator to the first element greater then the key so they will never be equal.
http://reviews.llvm.org/D8776
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the lldb-commits
mailing list