[Lldb-commits] [PATCH] D122347: Expose GetAddressingBits() in the Process API
Adrian Prantl via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 23 13:21:42 PDT 2022
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122347.417727.patch
Type: text/x-patch
Size: 1673 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220323/32b61cdf/attachment-0001.bin>
More information about the lldb-commits
mailing list