aprantl created this revision. aprantl added reviewers: JDevlieghere, jasonmolenda. Herald added a project: All. aprantl requested review of this revision.
See https://github.com/apple/llvm-project/pull/4110 for motivation and context. https://reviews.llvm.org/D122347 Files: lldb/include/lldb/Target/Process.h lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h Index: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h =================================================================== --- lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h +++ lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h @@ -72,6 +72,8 @@ ArchSpec GetSystemArchitecture() override; + llvm::Optional<uint32_t> GetAddressingBits() override; + // Check if a given Process bool CanDebug(lldb::TargetSP target_sp, bool plugin_specified_by_name) override; Index: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp =================================================================== --- lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -212,6 +212,10 @@ return m_gdb_comm.GetHostArchitecture(); } +llvm::Optional<uint32_t> ProcessGDBRemote::GetAddressingBits() { + return m_gdb_comm.GetAddressingBits(); +} + bool ProcessGDBRemote::CanDebug(lldb::TargetSP target_sp, bool plugin_specified_by_name) { if (plugin_specified_by_name) Index: lldb/include/lldb/Target/Process.h =================================================================== --- lldb/include/lldb/Target/Process.h +++ lldb/include/lldb/Target/Process.h @@ -699,6 +699,9 @@ /// Get the system architecture for this process. virtual ArchSpec GetSystemArchitecture() { return {}; } + /// Return the number of bits in a vmaddr that are used by valid addresses. + virtual llvm::Optional<uint32_t> GetAddressingBits() { return {}; } + /// Get the system runtime plug-in for this process. /// /// \return
Index: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h =================================================================== --- lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h +++ lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h @@ -72,6 +72,8 @@ ArchSpec GetSystemArchitecture() override; + llvm::Optional<uint32_t> GetAddressingBits() override; + // Check if a given Process bool CanDebug(lldb::TargetSP target_sp, bool plugin_specified_by_name) override; Index: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp =================================================================== --- lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -212,6 +212,10 @@ return m_gdb_comm.GetHostArchitecture(); } +llvm::Optional<uint32_t> ProcessGDBRemote::GetAddressingBits() { + return m_gdb_comm.GetAddressingBits(); +} + bool ProcessGDBRemote::CanDebug(lldb::TargetSP target_sp, bool plugin_specified_by_name) { if (plugin_specified_by_name) Index: lldb/include/lldb/Target/Process.h =================================================================== --- lldb/include/lldb/Target/Process.h +++ lldb/include/lldb/Target/Process.h @@ -699,6 +699,9 @@ /// Get the system architecture for this process. virtual ArchSpec GetSystemArchitecture() { return {}; } + /// Return the number of bits in a vmaddr that are used by valid addresses. + virtual llvm::Optional<uint32_t> GetAddressingBits() { return {}; } + /// Get the system runtime plug-in for this process. /// /// \return
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits