mstorsjo added a comment. In D70840#1767049 <https://reviews.llvm.org/D70840#1767049>, @labath wrote:
> In D70840#1767028 <https://reviews.llvm.org/D70840#1767028>, @mstorsjo wrote: > > > 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. > > > Well... that's the tricky part (which I've tried to allude to in > D70840#1763639 <https://reviews.llvm.org/D70840#1763639>. Currently the only > thing holding an architecture object is the target class, but since one of > the goals of the SymbolFile stuff is to be independent of any particular > target, you cannot easily get hold of that. That is why I tried to steer this > towards having this in the ArchSpec class. If we don't want that, we'll > probably have to create one new Architecture instance local to each Module > object... Ah, sorry for overlooking those parts of your comment. @clayborg - what do you think of @labath's suggestions here? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70840/new/ https://reviews.llvm.org/D70840 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits