[Lldb-commits] [lldb] 906316e - [lldb] More descriptive name for register flags logging functions

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 21 03:06:34 PDT 2024


Author: David Spickett
Date: 2024-06-21T10:05:48Z
New Revision: 906316eababcbcfd71e357aa3b66bdfc9237b3b9

URL: https://github.com/llvm/llvm-project/commit/906316eababcbcfd71e357aa3b66bdfc9237b3b9
DIFF: https://github.com/llvm/llvm-project/commit/906316eababcbcfd71e357aa3b66bdfc9237b3b9.diff

LOG: [lldb] More descriptive name for register flags logging functions

This was requested on a review for enum code that added new log
functions.

Added: 
    

Modified: 
    lldb/include/lldb/Target/RegisterFlags.h
    lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
    lldb/source/Target/RegisterFlags.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Target/RegisterFlags.h b/lldb/include/lldb/Target/RegisterFlags.h
index 1c6bf5dcf4a7f..1112972cf72e1 100644
--- a/lldb/include/lldb/Target/RegisterFlags.h
+++ b/lldb/include/lldb/Target/RegisterFlags.h
@@ -89,7 +89,7 @@ class RegisterFlags {
     unsigned GetEnd() const { return m_end; }
     const FieldEnum *GetEnum() const { return m_enum_type; }
     bool Overlaps(const Field &other) const;
-    void log(Log *log) const;
+    void DumpToLog(Log *log) const;
 
     /// Return the number of bits between this field and the other, that are not
     /// covered by either field.
@@ -158,7 +158,7 @@ class RegisterFlags {
   const std::vector<Field> &GetFields() const { return m_fields; }
   const std::string &GetID() const { return m_id; }
   unsigned GetSize() const { return m_size; }
-  void log(Log *log) const;
+  void DumpToLog(Log *log) const;
 
   /// Produce a text table showing the layout of all the fields. Unnamed/padding
   /// fields will be included, with only their positions shown.

diff  --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index a5a731981299f..43c61fc9df6e4 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -4383,7 +4383,7 @@ bool ParseRegisters(
 
   ParseFlags(feature_node, registers_flags_types);
   for (const auto &flags : registers_flags_types)
-    flags.second->log(log);
+    flags.second->DumpToLog(log);
 
   feature_node.ForEachChildElementWithName(
       "reg",

diff  --git a/lldb/source/Target/RegisterFlags.cpp b/lldb/source/Target/RegisterFlags.cpp
index d8a87090a7a41..d2fc5392f1a76 100644
--- a/lldb/source/Target/RegisterFlags.cpp
+++ b/lldb/source/Target/RegisterFlags.cpp
@@ -47,7 +47,7 @@ RegisterFlags::Field::Field(std::string name, unsigned start, unsigned end,
   }
 }
 
-void RegisterFlags::Field::log(Log *log) const {
+void RegisterFlags::Field::DumpToLog(Log *log) const {
   LLDB_LOG(log, "  Name: \"{0}\" Start: {1} End: {2}", m_name.c_str(), m_start,
            m_end);
 }
@@ -156,10 +156,10 @@ RegisterFlags::RegisterFlags(std::string id, unsigned size,
   SetFields(fields);
 }
 
-void RegisterFlags::log(Log *log) const {
+void RegisterFlags::DumpToLog(Log *log) const {
   LLDB_LOG(log, "ID: \"{0}\" Size: {1}", m_id.c_str(), m_size);
   for (const Field &field : m_fields)
-    field.log(log);
+    field.DumpToLog(log);
 }
 
 static StreamString FormatCell(const StreamString &content,


        


More information about the lldb-commits mailing list