[PATCH] D50365: Add a new tool named "lldb-vscode" that implements the Visual Studio Code Debug Adaptor Protocol
Greg Clayton via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 21 09:56:33 PDT 2018
> On Sep 20, 2018, at 3:05 PM, Leonard Mosescu <mosescu at google.com> wrote:
>
> Hi Greg, looking at request_evaluate() I noticed that it will evaluate the string as a lldb command if prefixed by ` .
>
> This is a great feature (it allows building REPL consoles on top of DAP), but I'm curious how you picked up this convention? For example I believe that the gdb DAP uses -exec 'command' instead.
` is an illegal expression character so it won't stop you from evaluating any possible expression. The gdb prefix "-exec" stops you from being able to negate a local variable named "exec". Not a huge deal. So I just picked a good prefix character that wouldn't stop anyone from evaluating any valid expression (at least in C/C++/ObjC/Swift).
The solution I would love to see is to have the initialize packet return something via the DAP that says "I have a command line interpreter, please send a packet with a file handle (slave path to slave side of pseudo terminal maybe)". VS Code and Nuclide both emulated tty already, so we could have a true command line that exposes the "(gdb)" prompt for GDB and "(lldb)" for lldb and all the power that comes with it.
I needed something that could run LLDB commands when things go wrong to do trouble shooting (enable logging, run commands to dump vital information) so I hacked it in with `
Greg
>
> On Thu, Aug 16, 2018 at 11:01 AM, Phabricator via Phabricator <reviews at reviews.llvm.org <mailto:reviews at reviews.llvm.org>> wrote:
> This revision was automatically updated to reflect the committed changes.
> Closed by commit rL339911: Add a new tool named "lldb-vscode" that implements the Visual Studio Code Debug… (authored by gclayton, committed by ).
> Herald added a subscriber: llvm-commits.
>
> Changed prior to commit:
> https://reviews.llvm.org/D50365?vs=161058&id=161067#toc <https://reviews.llvm.org/D50365?vs=161058&id=161067#toc>
>
> Repository:
> rL LLVM
>
> https://reviews.llvm.org/D50365 <https://reviews.llvm.org/D50365>
>
> Files:
> lldb/trunk/lldb.xcodeproj/project.pbxproj
> lldb/trunk/packages/Python/lldbsuite/test/dotest.py
> lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
> lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/.categories
> lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/Makefile
> lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/TestVSCode_attach.py
> lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/main.c
> lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/Makefile
> lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py
> lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setExceptionBreakpoints.py
> lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setFunctionBreakpoints.py
> lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/main.cpp
> lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/Makefile
> lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py
> lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/main.c
> lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py
> lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/Makefile
> lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/TestVSCode_stackTrace.py
> lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/main.c
> lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/step/Makefile
> lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/step/TestVSCode_step.py
> lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/step/main.cpp
> lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/Makefile
> lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/TestVSCode_variables.py
> lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/main.cpp
> lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py
> lldb/trunk/tools/CMakeLists.txt
> lldb/trunk/tools/lldb-vscode/BreakpointBase.cpp
> lldb/trunk/tools/lldb-vscode/BreakpointBase.h
> lldb/trunk/tools/lldb-vscode/CMakeLists.txt
> lldb/trunk/tools/lldb-vscode/ExceptionBreakpoint.cpp
> lldb/trunk/tools/lldb-vscode/ExceptionBreakpoint.h
> lldb/trunk/tools/lldb-vscode/FunctionBreakpoint.cpp
> lldb/trunk/tools/lldb-vscode/FunctionBreakpoint.h
> lldb/trunk/tools/lldb-vscode/JSONUtils.cpp
> lldb/trunk/tools/lldb-vscode/JSONUtils.h
> lldb/trunk/tools/lldb-vscode/LLDBUtils.cpp
> lldb/trunk/tools/lldb-vscode/LLDBUtils.h
> lldb/trunk/tools/lldb-vscode/README.md
> lldb/trunk/tools/lldb-vscode/SourceBreakpoint.cpp
> lldb/trunk/tools/lldb-vscode/SourceBreakpoint.h
> lldb/trunk/tools/lldb-vscode/SourceReference.h
> lldb/trunk/tools/lldb-vscode/VSCode.cpp
> lldb/trunk/tools/lldb-vscode/VSCode.h
> lldb/trunk/tools/lldb-vscode/VSCodeForward.h
> lldb/trunk/tools/lldb-vscode/lldb-vscode-Info.plist
> lldb/trunk/tools/lldb-vscode/lldb-vscode.cpp
> lldb/trunk/tools/lldb-vscode/package.json
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180921/0e546cb6/attachment.html>
More information about the llvm-commits
mailing list