1010#define LLDB_TOOLS_LLDB_DAP_LLDBUTILS_H
1111
1212#include " DAPForward.h"
13+ #include " lldb/API/SBDebugger.h"
1314#include " lldb/API/SBEnvironment.h"
1415#include " llvm/ADT/ArrayRef.h"
1516#include " llvm/ADT/StringRef.h"
@@ -30,6 +31,9 @@ namespace lldb_dap {
3031// / emitted regardless, and \b false is returned without executing the
3132// / remaining commands.
3233// /
34+ // / \param[in] debugger
35+ // / The debugger that will execute the lldb commands.
36+ // /
3337// / \param[in] prefix
3438// / A string that will be printed into \a strm prior to emitting
3539// / the prompt + command and command output. Can be NULL.
@@ -48,7 +52,7 @@ namespace lldb_dap {
4852// / \return
4953// / \b true, unless a command prefixed with \b ! fails and parsing of
5054// / command directives is enabled.
51- bool RunLLDBCommands (llvm::StringRef prefix,
55+ bool RunLLDBCommands (lldb::SBDebugger &debugger, llvm::StringRef prefix,
5256 const llvm::ArrayRef<std::string> &commands,
5357 llvm::raw_ostream &strm, bool parse_command_directives);
5458
@@ -57,6 +61,9 @@ bool RunLLDBCommands(llvm::StringRef prefix,
5761// / All output from every command, including the prompt + the command
5862// / is returned in the std::string return value.
5963// /
64+ // / \param[in] debugger
65+ // / The debugger that will execute the lldb commands.
66+ // /
6067// / \param[in] prefix
6168// / A string that will be printed into \a strm prior to emitting
6269// / the prompt + command and command output. Can be NULL.
@@ -75,14 +82,14 @@ bool RunLLDBCommands(llvm::StringRef prefix,
7582// / \return
7683// / A std::string that contains the prefix and all commands and
7784// / command output.
78- std::string RunLLDBCommands (llvm::StringRef prefix,
85+ std::string RunLLDBCommands (lldb::SBDebugger &debugger, llvm::StringRef prefix,
7986 const llvm::ArrayRef<std::string> &commands,
8087 bool &required_command_failed,
8188 bool parse_command_directives = true );
8289
8390// / Similar to the method above, but without parsing command directives.
8491std::string
85- RunLLDBCommandsVerbatim (llvm::StringRef prefix,
92+ RunLLDBCommandsVerbatim (lldb::SBDebugger &debugger, llvm::StringRef prefix,
8693 const llvm::ArrayRef<std::string> &commands);
8794
8895// / Check if a thread has a stop reason.
0 commit comments