mstorsjo added a comment.

In 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.


lldb-commits mailing list

Reply via email to