summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-vscode/lldb-vscode.cpp
Commit message (Collapse)AuthorAgeFilesLines
* The field ‘totalFrames’ which is total number of frames available, is ↵Serhiy Redko2019-12-091-0/+2
| | | | | | | | | | | | mandatory in StackTraces response for VSCode extension that implements DAP and declares capability 'supportsDelayedStackTraceLoading': "The debug adapter supports the delayed loading of parts of the stack, which requires that both the 'startFrame' and 'levels' arguments and the 'totalFrames' result of the 'StackTrace' request are supported." Lack of this field makes VSCode incorrectly display stack traces information D71034
* [lldb-vscode] support the completion requestWalter Erquinigo2019-11-151-1/+148
| | | | | | | | | | | | | | | | Summary: The DAP has a completion request that has been unimplemented. It allows showing autocompletion tokens inside the Debug Console. I implemented it in a very simple fashion mimicking what the user would see when autocompleting an expression inside the CLI. There are two cases: normal variables and commands. The latter occurs when a text is prepepended with ` in the Debug Console. These two cases work well and have tests. Reviewers: clayborg, aadsm Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69873
* [lldb-vscode] correctly handle multiple sourceMap entriesAlex Langford2019-09-261-2/+2
| | | | | | | | | | | | | | Summary: `lldb-vscode` concatenates a string of sourceMap entries specified in the config, but fails to put a space between each entry, which causes the settings command to fail. This patch adds a space between each mapping. Patch by Richard Howell Differential Revision: https://reviews.llvm.org/D67569 llvm-svn: 373016
* [LLDB] Cast -1 (as invalid socket) to the socket type before comparingMartin Storsjo2019-09-211-2/+3
| | | | | | | | | | This silences warnings about comparison of integers between unsigned long long (which is what the Windows SOCKET type is) and signed int when building in MinGW mode. Differential Revision: https://reviews.llvm.org/D67863 llvm-svn: 372486
* [lldb-vscode] add `launchCommands` to handle launch specific commandsAlex Langford2019-08-191-5/+14
| | | | | | | | | | | | | | Summary: This can help `lldb-vscode` handle launch commands associate with remote platform attach request have field `attachCommands` to handle attach specific commands add a corresponding one for launch request if no launch command is provided, create a new target and launch; otherwise, execute the launch command Differential Revision: https://reviews.llvm.org/D65363 Patch by Wanyi Ye <kusmour@gmail.com> llvm-svn: 369296
* Various build fixes for lldb on MinGWHaibo Huang2019-08-061-0/+2
| | | | | | | | | | Subscribers: mstorsjo, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65691 llvm-svn: 368069
* [NFC] Remove ASCII lines from commentsJonas Devlieghere2019-04-101-54/+0
| | | | | | | | | | | | | | | | | | | | | | | A lot of comments in LLDB are surrounded by an ASCII line to delimit the begging and end of the comment. Its use is not really consistent across the code base, sometimes the lines are longer, sometimes they are shorter and sometimes they are omitted. Furthermore, it looks kind of weird with the 80 column limit, where the comment actually extends past the line, but not by much. Furthermore, when /// is used for Doxygen comments, it looks particularly odd. And when // is used, it incorrectly gives the impression that it's actually a Doxygen comment. I assume these lines were added to improve distinguishing between comments and code. However, given that todays editors and IDEs do a great job at highlighting comments, I think it's worth to drop this for the sake of consistency. The alternative is fixing all the inconsistencies, which would create a lot more churn. Differential revision: https://reviews.llvm.org/D60508 llvm-svn: 358135
* [lldb] Add missing EINTR handlingMichal Gorny2019-03-211-2/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D59606 llvm-svn: 356703
* [lldb-vscode] Fix dangling pointer in request_evaluate.Jorge Gorbe Moya2019-03-151-1/+4
| | | | | | | | | | SBError::GetCString() returns a pointer to a string owned by the SBError object. The code here was calling GetCString on a temporary and using the returned pointer after the temporary was destroyed. Differential Revision: https://reviews.llvm.org/D59400 llvm-svn: 356227
* [lldb-vscode] Don't try to launch an invalid program.Jorge Gorbe Moya2019-03-131-0/+1
| | | | | | | | | | | | | | | If an invalid program is specified, lldb-vscode will send back a response with "success" = false, but then will continue executing the rest of request_launch(), try to launch the program anyway and try to send another response (possibly using the `response` object after it was moved). This change adds a return statement so we stop executing the handler after producing the first failing response. Differential Revision: https://reviews.llvm.org/D59340 llvm-svn: 356110
* [lldb-vscode] Report an error if an invalid program is specified.Zachary Turner2019-03-081-5/+8
| | | | | | | | | | | | | | | Previously if an invalid program was specified, there was a bug which, when we attempted to launch the program, would report that the operation succeeded, causing LLDB to then hang while waiting indefinitely to receive some events from the process. After this patch, when an invalid program is specified, we immediately return to vs code with an error message that indicates that the program can not be found. Differential Revision: https://reviews.llvm.org/D59114 llvm-svn: 355656
* [lldb-vscode] Support running in server mode on Windows.Zachary Turner2019-03-071-15/+11
| | | | | | | | | | | | | | | | Windows can't use standard i/o system calls such as read and write to work with sockets, it instead needs to use the specific send and recv calls. This complicates matters for the debug adapter, since it needs to be able to work in both server mode where it communicates over a socket, as well as non-server mode where it communicates via stdin and stdout. To abstract this out, I've introduced a class IOStream which hides all these details and exposes a read/write interface that does the right on each platform. Differential Revision: https://reviews.llvm.org/D59104 llvm-svn: 355637
* [lldb-vscode] Correctly propagate errors back to VS Code.Zachary Turner2019-03-061-12/+12
| | | | llvm-svn: 355557
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Add a check whether or not a str is utf8 prior to emplacingNathan Lanza2018-11-151-17/+17
| | | | | | | | | | | | | | | | | | | Summary: Highlighing junk data on VSCode can send a query for evaluate which fails. In particular cases on Windows, this the error message can end up as a c-string of [-35,-35,-35,-35,...]. Attempting to emplace this as the error message causes an assert failure. Prior to emplacing the error message, confirm that it is valid UTF8 to eliminate errors such as mentione above. Reviewers: xiaobai, clayborg Reviewed By: clayborg Differential Revision: https://reviews.llvm.org/D53008 llvm-svn: 346988
* Fix typos.Bruce Mitchener2018-10-041-7/+7
| | | | | | | | | | Reviewers: lldb-commits Subscribers: srhines, ki.stfu Differential Revision: https://reviews.llvm.org/D52884 llvm-svn: 343825
* Fix lldb-vscode build on WindowsReid Kleckner2018-08-161-7/+7
| | | | | | | | Include PosixAPI.h to get a PATH_MAX definition and replace CreateEvent with CreateEventObject to avoid conflicts with the windows.h definition of CreateEvent to CreateEventW. llvm-svn: 339920
* Add a new tool named "lldb-vscode" that implements the Visual Studio Code ↵Greg Clayton2018-08-161-0/+2706
Debug Adaptor Protocol This patch adds a new lldb-vscode tool that speaks the Microsoft Visual Studio Code debug adaptor protocol. It has full unit tests that test all packets. This tool can be easily packaged up into a native extension and used with Visual Studio Code, and it can also be used by Nuclide Differential Revision: https://reviews.llvm.org/D50365 llvm-svn: 339911
OpenPOWER on IntegriCloud