summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-mi
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a race condition in lldb-mi.Hafiz Abid Qadeer2015-02-043-2/+18
| | | | | | | | | | | | | | | | | | | | | | lldb-mi has 3 threads. 1. One that waits for user intput. 2. Another waits for 1st thread to get input command. 3. Waits for events from lldb. 2 & 3 needs to be synchronized so that they don't end up doing things at same time. For example, while "break insert" is processing, we can get a breakpoint event. Depending on where we are in "break-insert", it can have different behavior. In some cases, it can cause breakpoint to be deleted too. I have added a mutex so that command processing and event processing are done exclusively and they are not running at the same time. In longer term, I think thread 2 & 3 should be merged to be only one thread which can wait on command or events. Reviewed in http://reviews.llvm.org/D7371. llvm-svn: 228128
* Restore the signal handler for Windows as it is not presistent there.Hafiz Abid Qadeer2015-02-031-0/+12
| | | | | | | | | | | | On windows, signal handler is reset to default once a signal is received. This causes doing ctrl-c twice on console (or pressing suspend button twice in eclipse ide which uses SIGINT to stop the debuggee) to crash lldb-mi on windows. Although there is very tiny window (after signal handler is called and before we restore the handler) where default handler will be in place. But this is hardly a problem in practice as IDEs generally disable their suspend button once it has been presses. llvm-svn: 227964
* Fix CLI commands in lldb-mi.Hafiz Abid Qadeer2015-02-0317-138/+176
| | | | | | | | | | | | | | This patch fixes execution of CLI commands in MI mode. The CLI commands are executed using "-interpreter-exec" command. The bug was in the CMICmnLLDBDebugSessionInfo class which contained the following members: SBProcess, SBTarget, SBDebugger and SBListener, but CLI commands don't affect them and they aren't updated. Therefore some members can contain incorrect (or obsolete) reference and it can cause an error. My patch removes these members and uses getters that provides the updated instance every time it is used. Patch from Ilia K ki.stfu@gmail.com. Approved by Greg. llvm-svn: 227958
* Fix log file generation in lldb-mi.Hafiz Abid Qadeer2015-02-024-14/+9
| | | | | | | | | | | | | | | | | | When it runs, lldb-mi creates a log file. There is an option --noLog to disable the creation but it does not work and you end up with log file. This happens as log is enabled in a few places in the code although it has been disabled by this option. This commit tried to fix the problem in the following way. Log file generation is disabled by default. You can enable it by giving --log option. It is the only way to enable it. Rest of the call have been removed. So the code basically remove the calls that enable the log unconditionally and changes the option --noLog to --log. llvm-svn: 227810
* Make --thread argument optional for various commands.Hafiz Abid Qadeer2015-02-024-19/+19
| | | | | | | | Currently it was marked as mandatory for many commands. Although it is recommended that fronends generate this argument, it is not mandatory. GDB seems to treat it as optional too. llvm-svn: 227798
* Fix handling of data-disassemble command arguments.Deepak Panickal2015-01-231-19/+10
| | | | llvm-svn: 226909
* Add missing case statement to quiet a compiler warning.Greg Clayton2015-01-201-0/+3
| | | | llvm-svn: 226617
* Added an Xcode target so we build the "lldb-mi" executable as part of the ↵Greg Clayton2015-01-2032-74/+74
| | | | | | | | | | "desktop" and "desktop no xpc" targets. Include paths were switched to be user include paths, if this breaks the linux build we will need to fix the Makefiles/cmake stuff. <rdar://problem/19198581> llvm-svn: 226530
* Don't try to link libpthread on Windows.Zachary Turner2015-01-141-1/+5
| | | | llvm-svn: 226053
* Fixes compilation/run error with BUILD_SHARED_LIBS=TRUEVince Harron2015-01-141-1/+1
| | | | | | | | | | | | BUILD_SHARED_LIBS=TRUE currently isn't working for Linux x86_64 This patch fixes the link errors and also some runtime errors Test Plan: CC=clang CXX=clang++ cmake -GNinja -DBUILD_SHARED_LIBS=TRUE -DCMAKE_LINKER=ld.gold -DCMAKE_BUILD_TYPE=Debug ../../llvm ninja ninja check-lldb llvm-svn: 226039
* Replace ioctl with select to reduce processor usage by lldb-mi on OSX.Hafiz Abid Qadeer2014-12-155-13/+47
| | | | | | | | | | | | | | | | This saga started with a hang on OSX. 2 solutions were proposed. 1) 'select' based solution works ok on OSX but slows down test completion time on Linux many times. 2) 'ioctl' base solution also works but it causes heavy processor usage on OSX as reported by Ilia K. But as the original hang did not occur on Linux so this commit re-introduces the 'select' in conditional code so that it only runs for OSX. There is no need for this 'fix' to run on Linux. Initial patch by Ilia K <ki.stfu@gmail.com>. A few changes were made by me. llvm-svn: 224258
* Fix a bug where global variable can be reported as local.Hafiz Abid Qadeer2014-12-084-30/+34
| | | | | | | | | | There was an error in ORing mask which is used for getting a list of variables. Previously, these constants were unnamed, and possible it become the reason of this bug. Also added test case for -stack-list-local and -stack-list_arguments. Patch from Ilia K <ki.stfu@gmail.com>. llvm-svn: 223674
* Cleanup of the fix done recently for a lldb-mi hang on OSX.Hafiz Abid Qadeer2014-12-041-14/+5
| | | | | | | | | It was observed that we dont need to set stdin to unbuffered and setting console to non-canonical mode. Patch originally came from "Ilia K <ki.stfu@gmail.com>" llvm-svn: 223353
* Remove unnecessary changes committed in r223222.Hafiz Abid Qadeer2014-12-035-29/+0
| | | | | | | | | There were 2 different patches in discussion. One using ioctl and other using select. We decided to use the ioctl but committed code also have some changes which were only needed for 'select'. This patch removes them. llvm-svn: 223227
* Fix a hang on OSX while executing -exec-run.Hafiz Abid Qadeer2014-12-035-23/+55
| | | | | | | | | | Now we wait for input to become available before blocking in fgets. More details on problem can be found in http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20141201/014290.html Patch from dawn@burble.org. llvm-svn: 223222
* Reformat lldb-mi using clang-format.Zachary Turner2014-11-17159-25407/+26209
| | | | | | Courtesy of dawn@burble.org. llvm-svn: 222150
* Fix lldb-mi warnings so that it builds when --enable-werror is set.Deepak Panickal2014-11-067-18/+21
| | | | llvm-svn: 221452
* Fix lldb-mi driver for running on OSX.Deepak Panickal2014-09-121-10/+4
| | | | llvm-svn: 217668
* Remove unused class variable and its initialization.Eric Christopher2014-09-092-2/+0
| | | | llvm-svn: 217425
* Remove a pair of default values from fully covered switches.Eric Christopher2014-09-091-2/+0
| | | | llvm-svn: 217424
* Add a newline to the end of the file.Eric Christopher2014-09-091-1/+1
| | | | llvm-svn: 217423
* Compare against the right size integer.Eric Christopher2014-09-091-1/+1
| | | | llvm-svn: 217422
* Remove two default cases out of fully covered switches.Eric Christopher2014-09-091-25/+0
| | | | llvm-svn: 217421
* Remove two unused class variables.Eric Christopher2014-09-092-5/+1
| | | | llvm-svn: 217420
* Fix 'pid' and 'executable' fields in the list-thread-group.Hafiz Abid Qadeer2014-08-141-19/+28
| | | | | | | | | | The documentation says that these fields should be generated when we have proper process or target file. Current implementation did not check for this. Eclipse seem to use list-thread-group command even before setting the executable in which case current implementation can return garbage data. llvm-svn: 215658
* Implementation of exec-run using lldb API.Hafiz Abid Qadeer2014-08-141-10/+35
| | | | | | | | Previously it was using run command which did not set the process pointer in the sessionInfo. This commit also sends the proper out-of-band data. llvm-svn: 215656
* Fix command "gdb-set" to handle long option --threadgroup and accept ↵Deepak Panickal2014-08-147-6/+43
| | | | | | | | --longOption type words as just words for string types. For example, MI command "17-gdb-set --thread-group i1 args --interpreter" is now acceptable, "--interpreter" was previous not valid. llvm-svn: 215655
* Fix some typos:Sylvestre Ledru2014-08-112-3/+3
| | | | | | | | * transfered => transferred * unkown => unknown * sucessfully => successfully llvm-svn: 215367
* Restore some reverted fixes for spelling, newlines and __linux__ macro.Deepak Panickal2014-08-0820-29/+37
| | | | llvm-svn: 215234
* Add new MI commands, features and fixes to the lldb-mi driver.Deepak Panickal2014-08-0890-864/+2751
| | | | | | | | | | - Can now load an executable directly as an argument. - Fixes towards supporting local debugging. - Fixes for stack-list-arguments, data-evaluate-expression, environment-cd, stack-list-locals, interpreter-exec. - Fix breakpoint event handling. - Support dynamic loading of libraries using the search paths provided by Eclipse. llvm-svn: 215223
* Use __linux__ macro throughout, instead of ocasional __linux.Sylvestre Ledru2014-07-303-5/+5
| | | | | | | | | | | | __linux is not universally defined across all standards versions, compilers and architectures. Specifically at C99 and up, it's not defined in GCC on powerpc platform. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28314 Bugzilla: http://llvm.org/bugs/show_bug.cgi?id=20380 Patch by Dimitri John Ledkov <dimitri.ledkov@canonical.com> llvm-svn: 214291
* Fix typos.Bruce Mitchener2014-07-011-3/+3
| | | | llvm-svn: 212132
* Fix a few typos.Bruce Mitchener2014-06-2712-24/+24
| | | | llvm-svn: 211851
* Restore r211547: Add newline on last line of a few files.Ed Maste2014-06-243-3/+3
| | | | llvm-svn: 211621
* Restore fixes reverted by r211607:Ed Maste2014-06-245-5/+6
| | | | | | | | | | | | | | | | | | | r209631: Use MIUtilSystemLinux on FreeBSD as well We should later rename this file (probably MIUtilSystemPOSIX), but more clean-up is still needed here, and we can wait until we better understand how this code may be shared between FreeBSD, Linux, and OS X. r209632: Add stdlib.h for malloc and friends r209633: Remove include of obsolete stropts.h header The header is for POSIX streams functionality, and does not exist on FreeBSD, OS X, or contemporary Linux distributions. Issue reported by John Wolfe. llvm-svn: 211620
* Remove unused files, causing CMake build error.Deepak Panickal2014-06-242-181/+0
| | | | llvm-svn: 211618
* Added support for new MI commands and bug fixes. More details in MIReadme.txt.Deepak Panickal2014-06-24113-1485/+7722
| | | | llvm-svn: 211607
* Add newline on last line of a few files.Jason Molenda2014-06-234-4/+4
| | | | llvm-svn: 211547
* Remove useless declarationSylvestre Ledru2014-06-221-1/+0
| | | | llvm-svn: 211468
* Simplify the code (variable bValid is not really interesting)Sylvestre Ledru2014-06-211-7/+4
| | | | llvm-svn: 211452
* Remove useless declarationSylvestre Ledru2014-06-211-3/+0
| | | | llvm-svn: 211451
* Add stdlib.h for malloc and friendsEd Maste2014-05-261-0/+2
| | | | llvm-svn: 209633
* Remove include of obsolete stropts.h headerEd Maste2014-05-261-1/+0
| | | | | | | The header is for POSIX streams functionality, and does not exist on FreeBSD, OS X, or contemporary Linux distributions. llvm-svn: 209632
* Use MIUtilSystemLinux on FreeBSD as wellEd Maste2014-05-263-3/+3
| | | | | | | | We should later rename this file (probably MIUtilSystemPOSIX), but more clean-up is still needed here, and we can wait until we better understand how this code may be shared between FreeBSD, Linux, and OS X. llvm-svn: 209631
* Add missing headerEd Maste2014-05-261-0/+1
| | | | | | Presumably included by header leakage on other platforms. llvm-svn: 209630
* Do not require the triple to be hard-codedDeepak Panickal2014-05-163-8/+10
| | | | llvm-svn: 208982
* Initial commit of LLDB Machine Interface Frontend.Deepak Panickal2014-05-16147-0/+29082
- Tested with Eclipse, likely to work with other GDB/MI compatible GUIs. - Some but not all MI commands have been implemented. See MIReadme.txt for more info. - Written from scratch, no GPL code, based on LLDB Public API. - Built for Linux, Windows and OSX. Tested on Linux and Windows. - GDB/MI Command Reference, https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI.html llvm-svn: 208972
OpenPOWER on IntegriCloud