[Lldb-commits] [PATCH] D79726: Add terminateCommands to lldb-vscode protocol
Greg Clayton via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu May 14 23:22:37 PDT 2020
clayborg added inline comments.
================
Comment at: lldb/test/API/tools/lldb-vscode/launch/TestVSCode_launch.py:447
+ ]
+ terminateCommands = ['expr 4+2']
+ self.launch(program=program,
----------------
The expression parser can be quite involved even for simple things like this. Might be better to do something simpler?
================
Comment at: lldb/tools/lldb-vscode/README.md:88
|**stopCommands** |[string]| | LLDB commands executed just after each stop. Commands and command output will be sent to the debugger console when they are executed.
|**exitCommands** |[string]| | LLDB commands executed when the program exits. Commands and command output will be sent to the debugger console when they are executed.
+|**terminateCommands** |[string]| | LLDB commands executed when the debugging session ends. Commands and command output will be sent to the debugger console when they are executed.
----------------
Might be good to clarify something like:
```
These commands will only be executed if the process exists or is killed. These commands will not run if you disconnect from the process.
```
================
Comment at: lldb/tools/lldb-vscode/README.md:89
|**exitCommands** |[string]| | LLDB commands executed when the program exits. Commands and command output will be sent to the debugger console when they are executed.
+|**terminateCommands** |[string]| | LLDB commands executed when the debugging session ends. Commands and command output will be sent to the debugger console when they are executed.
|**sourceMap** |[string[2]]| | Specify an array of path re-mappings. Each element in the array must be a two element array containing a source and destination pathname.
----------------
might be good to clarify something like:
```
These commands will be executed after receiving the 'terminate' VS Code DAP packet but before sending the 'terminate' response.
```
================
Comment at: lldb/tools/lldb-vscode/README.md:115
|**stopCommands** |[string]| | LLDB commands executed just after each stop. Commands and command output will be sent to the debugger console when they are executed.
|**exitCommands** |[string]| | LLDB commands executed when the program exits. Commands and command output will be sent to the debugger console when they are executed.
+|**terminateCommands** |[string]| | LLDB commands executed when the debugging session ends. Commands and command output will be sent to the debugger console when they are executed.
----------------
Ditto on "exitCommands" clarification from above.
================
Comment at: lldb/tools/lldb-vscode/README.md:116
|**exitCommands** |[string]| | LLDB commands executed when the program exits. Commands and command output will be sent to the debugger console when they are executed.
+|**terminateCommands** |[string]| | LLDB commands executed when the debugging session ends. Commands and command output will be sent to the debugger console when they are executed.
|**attachCommands** |[string]| | LLDB commands that will be executed after **preRunCommands** which take place of the code that normally does the attach. The commands can create a new target and attach or launch it however desired. This allows custom launch and attach configurations. Core files can use `target create --core /path/to/core` to attach to core files.
----------------
Ditto on "terminateCommands" clarification from above.
================
Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:2875
lldb::SBDebugger::Terminate();
return 0;
}
----------------
You can't do this here the VS code connection will already be closed. We need the 'terminateCommands' output to be sent back to vs code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79726/new/
https://reviews.llvm.org/D79726
More information about the lldb-commits
mailing list