clayborg added a comment.

The main thing is, we don't want to be like other debuggers that have all this 
code in many many places that check address bits by checking the Architecture 
and litter the code with bit strips and adding bits where needed. We want to 
support addresses correctly by knowing that a Address has a special address 
class. So we use:

  addr_t
  Address::GetCallableLoadAddress (Target *target, bool is_indirect) const

and

  lldb::addr_t
  Target::GetOpcodeLoadAddress (lldb::addr_t load_addr, AddressClass 
addr_class) const

Target also has a counterpart that does the actual check since the target has 
the ArchSpec that tells us the architecture. Also if you ever need make a 
special address that needs to have bit zero set, there is:

  lldb::addr_t
  Target::GetCallableLoadAddress (lldb::addr_t load_addr, AddressClass 
addr_class) const


Repository:
  rL LLVM

http://reviews.llvm.org/D12079



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to