[Lldb-commits] [lldb] Fix a bug with cancelling "attach -w" after you have run a process previously (PR #65822)

2023-09-09 Thread Greg Clayton via lldb-commits

https://github.com/clayborg commented:

A different way to approach this fix is to just fix ExecutionContext so that 
this can never be out of date by removing the "m_process_sp" member variable. 
Is is not great that we can an execution context that has an older process, and 
would we ever want an ExecutionContext to be able to have a mismatched process? 
If we remove m_process_sp, we can always get the process from the m_target_sp 
and then we can never get it wrong that way and we might avoid some of the 
changes in this patch? Lemme know what you think as It would be good to make 
sure our ExecutionContext variables can't get the wrong info.

https://github.com/llvm/llvm-project/pull/65822
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb-vscode] Make descriptive summaries and raw child for synthetics configurable (PR #65687)

2023-09-09 Thread Greg Clayton via lldb-commits

https://github.com/clayborg approved this pull request.

Looks good! 

https://github.com/llvm/llvm-project/pull/65687
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] 86f21e9 - [lldb] Reinstate default constructor for SBCommandInterpreter

2023-09-09 Thread Jonas Devlieghere via lldb-commits

Author: Jonas Devlieghere
Date: 2023-09-09T20:20:04-07:00
New Revision: 86f21e92ab6e422edda2c7a1da11670433ad26cb

URL: 
https://github.com/llvm/llvm-project/commit/86f21e92ab6e422edda2c7a1da11670433ad26cb
DIFF: 
https://github.com/llvm/llvm-project/commit/86f21e92ab6e422edda2c7a1da11670433ad26cb.diff

LOG: [lldb] Reinstate default constructor for SBCommandInterpreter

The default constructor for SBCommandInterpreter was (unintentionally)
made protected in 27b6a4e63afe. The goal of the patch was to make the
constructor taking an lldb_private type protected, but due to the
presence of a default argument, this ctor also served as the default
constructor. The latter should remain public.

This commit reinstates the original behavior by removing the default
argument and having an explicit, public default constructor.

Added: 


Modified: 
lldb/include/lldb/API/SBCommandInterpreter.h
lldb/source/API/SBCommandInterpreter.cpp

Removed: 




diff  --git a/lldb/include/lldb/API/SBCommandInterpreter.h 
b/lldb/include/lldb/API/SBCommandInterpreter.h
index 3330a6f20034ca0..b7f5b3bf3396e43 100644
--- a/lldb/include/lldb/API/SBCommandInterpreter.h
+++ b/lldb/include/lldb/API/SBCommandInterpreter.h
@@ -30,6 +30,7 @@ class SBCommandInterpreter {
 eBroadcastBitAsynchronousErrorData = (1 << 4)
   };
 
+  SBCommandInterpreter();
   SBCommandInterpreter(const lldb::SBCommandInterpreter &rhs);
 
   ~SBCommandInterpreter();
@@ -317,9 +318,8 @@ class SBCommandInterpreter {
 protected:
   friend class lldb_private::CommandPluginInterfaceImplementation;
 
-  SBCommandInterpreter(
-  lldb_private::CommandInterpreter *interpreter_ptr =
-  nullptr); // Access using SBDebugger::GetCommandInterpreter();
+  /// Access using SBDebugger::GetCommandInterpreter();
+  SBCommandInterpreter(lldb_private::CommandInterpreter *interpreter_ptr);
   lldb_private::CommandInterpreter &ref();
 
   lldb_private::CommandInterpreter *get();

diff  --git a/lldb/source/API/SBCommandInterpreter.cpp 
b/lldb/source/API/SBCommandInterpreter.cpp
index 396c0eef0603d3c..d275da933919e53 100644
--- a/lldb/source/API/SBCommandInterpreter.cpp
+++ b/lldb/source/API/SBCommandInterpreter.cpp
@@ -83,6 +83,10 @@ class CommandPluginInterfaceImplementation : public 
CommandObjectParsed {
 };
 } // namespace lldb_private
 
+SBCommandInterpreter::SBCommandInterpreter() : m_opaque_ptr() {
+  LLDB_INSTRUMENT_VA(this);
+}
+
 SBCommandInterpreter::SBCommandInterpreter(CommandInterpreter *interpreter)
 : m_opaque_ptr(interpreter) {
   LLDB_INSTRUMENT_VA(this, interpreter);



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits