[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
Thu Dec 12 22:52:56 PST 2019


mstorsjo added a comment.

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

> So my idea would be:
>  1 - add all virtual functions to from lldb_private::Architecture as normal members of ArchSpec. 
>  2 - have ArchSpec grap the the lldb_private::Architecture using info in the ArchSpec when it is needed for methods added in step 1 and still call through to the lldb_private::Architecture plug-ins


So ArchSpec would have an Architecture* member which is lazy loaded when needed?

A couple details come to mind:

- This would have to be a shared_ptr, to keep ArchSpec easily copyable
- As those methods where this is used are const, should the shared_ptr Architecture be made mutable? Or skip the const on those methods?
- There's a few places (in DWARFDebugInfoEntry) where I fetch a new copy of an ArchSpec (almost) each time I use it. In those cases, we'd end up with a new lazy load of the plugin each time (if the originating object hasn't needed loading the plugin yet). So perhaps it's best to always load it (like in ArchSpec::SetTriple) and similar ones, so that there's always an initialized shared_ptr that can be copied along cheaply?


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

https://reviews.llvm.org/D70840





More information about the lldb-commits mailing list