[Lldb-commits] [PATCH] D98001: [lldb/API] Add CommandInterpreter::{Get, Set}PrintErrors to SBAPI (NFC)

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 4 19:28:43 PST 2021


mib created this revision.
mib added reviewers: JDevlieghere, teemperor, jingham.
mib added a project: LLDB.
mib requested review of this revision.
Herald added a subscriber: lldb-commits.

This patch exposes the getter and setter methods for the command
interpreter `print_errors` run option.

rdar://74816984

Signed-off-by: Med Ismail Bennani <medismail.bennani at gmail.com>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98001

Files:
  lldb/bindings/interface/SBCommandInterpreterRunOptions.i
  lldb/include/lldb/API/SBCommandInterpreterRunOptions.h
  lldb/source/API/SBCommandInterpreterRunOptions.cpp


Index: lldb/source/API/SBCommandInterpreterRunOptions.cpp
===================================================================
--- lldb/source/API/SBCommandInterpreterRunOptions.cpp
+++ lldb/source/API/SBCommandInterpreterRunOptions.cpp
@@ -131,6 +131,20 @@
   m_opaque_up->SetPrintResults(print_results);
 }
 
+bool SBCommandInterpreterRunOptions::GetPrintErrors() const {
+  LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommandInterpreterRunOptions,
+                                   GetPrintErrors);
+
+  return m_opaque_up->GetPrintErrors();
+}
+
+void SBCommandInterpreterRunOptions::SetPrintErrors(bool print_errors) {
+  LLDB_RECORD_METHOD(void, SBCommandInterpreterRunOptions, SetPrintErrors,
+                     (bool), print_errors);
+
+  m_opaque_up->SetPrintErrors(print_errors);
+}
+
 bool SBCommandInterpreterRunOptions::GetAddToHistory() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommandInterpreterRunOptions,
                                    GetAddToHistory);
@@ -269,6 +283,10 @@
                              GetPrintResults, ());
   LLDB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions, SetPrintResults,
                        (bool));
+  LLDB_REGISTER_METHOD_CONST(bool, SBCommandInterpreterRunOptions,
+                             GetPrintErrors, ());
+  LLDB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions, SetPrintErrors,
+                       (bool));
   LLDB_REGISTER_METHOD_CONST(bool, SBCommandInterpreterRunOptions,
                              GetAddToHistory, ());
   LLDB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions, SetAddToHistory,
Index: lldb/include/lldb/API/SBCommandInterpreterRunOptions.h
===================================================================
--- lldb/include/lldb/API/SBCommandInterpreterRunOptions.h
+++ lldb/include/lldb/API/SBCommandInterpreterRunOptions.h
@@ -56,6 +56,10 @@
 
   void SetPrintResults(bool);
 
+  bool GetPrintErrors() const;
+
+  void SetPrintErrors(bool);
+
   bool GetAddToHistory() const;
 
   void SetAddToHistory(bool);
Index: lldb/bindings/interface/SBCommandInterpreterRunOptions.i
===================================================================
--- lldb/bindings/interface/SBCommandInterpreterRunOptions.i
+++ lldb/bindings/interface/SBCommandInterpreterRunOptions.i
@@ -58,6 +58,12 @@
     void
     SetPrintResults (bool);
 
+    bool
+    GetPrintErrors () const;
+
+    void
+    SetPrintErrors (bool);
+
     bool
     GetAddToHistory () const;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98001.328361.patch
Type: text/x-patch
Size: 2475 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210305/9bf2d835/attachment.bin>


More information about the lldb-commits mailing list