[Lldb-commits] [PATCH] D77347: Have lldb-vscode update the currently selecte thread and frame when it receives a "scopes" request.
Greg Clayton via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Apr 2 16:50:19 PDT 2020
clayborg created this revision.
clayborg added reviewers: labath, aadsm, wallace, JDevlieghere.
Herald added a project: LLDB.
wallace accepted this revision.
wallace added a comment.
This revision is now accepted and ready to land.
I agree with the implementation.
I also find no way notify the IDE that the user has switched to a different thread or frame in the console, and I actually think it's better this way.
================
Comment at: lldb/test/API/tools/lldb-vscode/console/TestVSCode_console.py:20
+ def check_lldb_command(self, lldb_command, contains_string, assert_msg):
+ response = self.vscode.request_evaluate('`%s' % (lldb_command))
+ output = response['body']['result']
----------------
just use lldb_command instead of using a formatted string
================
Comment at: lldb/test/API/tools/lldb-vscode/console/TestVSCode_console.py:56
+ self.vscode.get_local_variables(frameIndex=0)
+ # Verify frame #1 is selected in the command interpreter by running
+ # the "frame seelct" command with no frame index which will print the
----------------
frame #0
================
Comment at: lldb/test/API/tools/lldb-vscode/console/TestVSCode_console.py:57
+ # Verify frame #1 is selected in the command interpreter by running
+ # the "frame seelct" command with no frame index which will print the
+ # currently selected frame.
----------------
select
The IDE has no packets that are sent to lldb-vscode that say which thread and frame are selected. The only way we know is we get a request for variables for a stack frame via a "scopes" request. When we receive this packet we make that thread and frame the selected thread and frame in lldb. This way when people execute lldb commands in the debug console by prefixing the expression with the backtick character, we will have the right thread and frame selected. Previously this was not updated as new stack frames were selected.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D77347
Files:
lldb/test/API/tools/lldb-vscode/console/Makefile
lldb/test/API/tools/lldb-vscode/console/TestVSCode_console.py
lldb/test/API/tools/lldb-vscode/console/main.cpp
lldb/tools/lldb-vscode/lldb-vscode.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77347.254643.patch
Type: text/x-patch
Size: 6650 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200402/ce7dd824/attachment-0001.bin>
More information about the lldb-commits
mailing list