Skip to content

Commit cb9f8ab

Browse files
committed
[lldb][lldb-dap] Remove function that is only used in one place
1 parent 7a467d5 commit cb9f8ab

File tree

3 files changed

+6
-18
lines changed

3 files changed

+6
-18
lines changed

lldb/tools/lldb-dap/Handler/EvaluateRequestHandler.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,12 @@ void EvaluateRequestHandler::operator()(
163163
if (frame.IsValid()) {
164164
dap.focus_tid = frame.GetThread().GetThreadID();
165165
}
166-
auto result = RunLLDBCommandsVerbatim(dap.debugger, llvm::StringRef(),
167-
{std::string(expression)},
168-
/*echo_commands=*/false);
166+
167+
bool required_command_failed = false;
168+
std::string result = RunLLDBCommands(
169+
dap.debugger, llvm::StringRef(), {expression}, required_command_failed,
170+
/*parse_command_directives=*/false, /*echo_commands=*/false);
171+
169172
EmplaceSafeString(body, "result", result);
170173
body.try_emplace("variablesReference", (int64_t)0);
171174
} else {

lldb/tools/lldb-dap/LLDBUtils.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,6 @@ std::string RunLLDBCommands(lldb::SBDebugger &debugger, llvm::StringRef prefix,
111111
return s;
112112
}
113113

114-
std::string RunLLDBCommandsVerbatim(lldb::SBDebugger &debugger,
115-
llvm::StringRef prefix,
116-
const llvm::ArrayRef<std::string> &commands,
117-
bool echo_commands) {
118-
bool required_command_failed = false;
119-
return RunLLDBCommands(debugger, prefix, commands, required_command_failed,
120-
/*parse_command_directives=*/false, echo_commands);
121-
}
122-
123114
bool ThreadHasStopReason(lldb::SBThread &thread) {
124115
switch (thread.GetStopReason()) {
125116
case lldb::eStopReasonTrace:

lldb/tools/lldb-dap/LLDBUtils.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,6 @@ std::string RunLLDBCommands(lldb::SBDebugger &debugger, llvm::StringRef prefix,
9797
bool parse_command_directives = true,
9898
bool echo_commands = false);
9999

100-
/// Similar to the method above, but without parsing command directives.
101-
std::string RunLLDBCommandsVerbatim(lldb::SBDebugger &debugger,
102-
llvm::StringRef prefix,
103-
const llvm::ArrayRef<std::string> &commands,
104-
bool echo_commands);
105-
106100
/// Check if a thread has a stop reason.
107101
///
108102
/// \param[in] thread

0 commit comments

Comments
 (0)