[Lldb-commits] [PATCH] D70840: [LLDB] [DWARF] Strip out the thumb bit from addresses on ARM

Martin Storsjö via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 3 06:40:29 PST 2019


mstorsjo added a comment.

In D70840#1765373 <https://reviews.llvm.org/D70840#1765373>, @clayborg wrote:

> So some background on how address masks are handled in LLDB:
>
> Typically the way we have tried to take care of the extra Thumb bit for ARM using:
>
>   lldb::addr_t Address::GetCallableLoadAddress(Target *target, bool is_indirect = false) const;
>   lldb::addr_t GetOpcodeLoadAddress(Target *target, AddressClass addr_class = AddressClass::eInvalid) const;
>   
>
> The first will add the extra bit to an address if needed. The latter will strip the bit if needed. This does require a target though and the target uses the "Architecture" class for ARM to do the work of using the mask. Not sure if we want to try to get an architecture class and use that here for stripping the bit instead of using an address mask?


So, where do I get hold of an Architecture* object instance from within the relevant contexts (within SymbolFileDWARF, where we have a reference to the object file)? Also within source/Symbol/DWARFCallFrameInfo.cpp where we have existing code that does the same.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70840/new/

https://reviews.llvm.org/D70840





More information about the lldb-commits mailing list