Skip to content

Commit b981228

Browse files
committed
[lldb-vscode] Use expression command for completion
Change lldb-vscode to use the `expression` command for generating completions, instead of the `p` alias. Aliases are user overrideable, and even deletable, but the `expression` command is unchangeable. See D141539 where a similar replacement was done to tests. Differential Revision: https://reviews.llvm.org/D145437 (cherry picked from commit e221dab)
1 parent 9f55dcf commit b981228

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lldb/tools/lldb-vscode/lldb-vscode.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,8 +1062,9 @@ void request_completions(const llvm::json::Object &request) {
10621062
text = text.substr(1);
10631063
actual_column--;
10641064
} else {
1065-
text = "p " + text;
1066-
actual_column += 2;
1065+
char command[] = "expression -- ";
1066+
text = command + text;
1067+
actual_column += strlen(command);
10671068
}
10681069
lldb::SBStringList matches;
10691070
lldb::SBStringList descriptions;

0 commit comments

Comments
 (0)