This revision was automatically updated to reflect the committed changes. Closed by commit rG7f3fc2eee8ff: [lldb/API] Add a way to check if the CommandInterpreter is interactive (authored by mib).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119499/new/ https://reviews.llvm.org/D119499 Files: lldb/bindings/interface/SBCommandInterpreter.i lldb/include/lldb/API/SBCommandInterpreter.h lldb/include/lldb/Interpreter/CommandInterpreter.h lldb/source/API/SBCommandInterpreter.cpp lldb/source/Interpreter/CommandInterpreter.cpp Index: lldb/source/Interpreter/CommandInterpreter.cpp =================================================================== --- lldb/source/Interpreter/CommandInterpreter.cpp +++ lldb/source/Interpreter/CommandInterpreter.cpp @@ -3162,6 +3162,10 @@ return true; } +bool CommandInterpreter::IsInteractive() { + return (GetIOHandler() ? GetIOHandler()->GetIsInteractive() : false); +} + FileSpec CommandInterpreter::GetCurrentSourceDir() { if (m_command_source_dirs.empty()) return {}; Index: lldb/source/API/SBCommandInterpreter.cpp =================================================================== --- lldb/source/API/SBCommandInterpreter.cpp +++ lldb/source/API/SBCommandInterpreter.cpp @@ -329,6 +329,12 @@ return (IsValid() ? m_opaque_ptr->HasAliasOptions() : false); } +bool SBCommandInterpreter::IsInteractive() { + LLDB_INSTRUMENT_VA(this); + + return (IsValid() ? m_opaque_ptr->IsInteractive() : false); +} + SBProcess SBCommandInterpreter::GetProcess() { LLDB_INSTRUMENT_VA(this); Index: lldb/include/lldb/Interpreter/CommandInterpreter.h =================================================================== --- lldb/include/lldb/Interpreter/CommandInterpreter.h +++ lldb/include/lldb/Interpreter/CommandInterpreter.h @@ -605,6 +605,8 @@ FileSpec GetCurrentSourceDir(); + bool IsInteractive(); + protected: friend class Debugger; Index: lldb/include/lldb/API/SBCommandInterpreter.h =================================================================== --- lldb/include/lldb/API/SBCommandInterpreter.h +++ lldb/include/lldb/API/SBCommandInterpreter.h @@ -59,6 +59,8 @@ bool HasAliasOptions(); + bool IsInteractive(); + lldb::SBProcess GetProcess(); lldb::SBDebugger GetDebugger(); Index: lldb/bindings/interface/SBCommandInterpreter.i =================================================================== --- lldb/bindings/interface/SBCommandInterpreter.i +++ lldb/bindings/interface/SBCommandInterpreter.i @@ -125,6 +125,9 @@ bool HasAliasOptions (); + bool + IsInteractive (); + lldb::SBProcess GetProcess ();
Index: lldb/source/Interpreter/CommandInterpreter.cpp =================================================================== --- lldb/source/Interpreter/CommandInterpreter.cpp +++ lldb/source/Interpreter/CommandInterpreter.cpp @@ -3162,6 +3162,10 @@ return true; } +bool CommandInterpreter::IsInteractive() { + return (GetIOHandler() ? GetIOHandler()->GetIsInteractive() : false); +} + FileSpec CommandInterpreter::GetCurrentSourceDir() { if (m_command_source_dirs.empty()) return {}; Index: lldb/source/API/SBCommandInterpreter.cpp =================================================================== --- lldb/source/API/SBCommandInterpreter.cpp +++ lldb/source/API/SBCommandInterpreter.cpp @@ -329,6 +329,12 @@ return (IsValid() ? m_opaque_ptr->HasAliasOptions() : false); } +bool SBCommandInterpreter::IsInteractive() { + LLDB_INSTRUMENT_VA(this); + + return (IsValid() ? m_opaque_ptr->IsInteractive() : false); +} + SBProcess SBCommandInterpreter::GetProcess() { LLDB_INSTRUMENT_VA(this); Index: lldb/include/lldb/Interpreter/CommandInterpreter.h =================================================================== --- lldb/include/lldb/Interpreter/CommandInterpreter.h +++ lldb/include/lldb/Interpreter/CommandInterpreter.h @@ -605,6 +605,8 @@ FileSpec GetCurrentSourceDir(); + bool IsInteractive(); + protected: friend class Debugger; Index: lldb/include/lldb/API/SBCommandInterpreter.h =================================================================== --- lldb/include/lldb/API/SBCommandInterpreter.h +++ lldb/include/lldb/API/SBCommandInterpreter.h @@ -59,6 +59,8 @@ bool HasAliasOptions(); + bool IsInteractive(); + lldb::SBProcess GetProcess(); lldb::SBDebugger GetDebugger(); Index: lldb/bindings/interface/SBCommandInterpreter.i =================================================================== --- lldb/bindings/interface/SBCommandInterpreter.i +++ lldb/bindings/interface/SBCommandInterpreter.i @@ -125,6 +125,9 @@ bool HasAliasOptions (); + bool + IsInteractive (); + lldb::SBProcess GetProcess ();
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits