[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 14:22:49 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG7504dd5e00f5: Expose GetAddressingBits() in the Process API. (authored by aprantl).
Herald added a project: LLDB.

Repository:
  rG LLVM Github Monorepo

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

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.417745.patch
Type: text/x-patch
Size: 1673 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220323/55276175/attachment-0001.bin>


More information about the lldb-commits mailing list