summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-mi/MIDriverMain.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [lldb-mi] Use empty arg lists instead of (void).Bruce Mitchener2015-08-041-1/+1
| | | | | | | | | | | | Summary: This brings the code more in line with the usual LLDB style. NFC. Reviewers: abidh, ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11746 llvm-svn: 243967
* [lldb-mi] Fix typosBruce Mitchener2015-07-071-2/+2
| | | | llvm-svn: 241585
* Remove redundant code from lldb-mi.Hafiz Abid Qadeer2015-03-241-1/+0
| | | | | | | After removing the ability of using lldb-mi as 'lldb', a lot of code has become redundant. This commit removes some of that code. Note: Some files are being removed. The cmake file has been updated. Please update xcode project accordingly. llvm-svn: 233083
* Fix memory allocating inside signal handler (MI)Ilia K2015-03-191-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch fixes a memory allocating inside signal handler. This bug was found by @vharron: > Hi all, > > I noticed these thread sanitizer warnings while running lldb-mi tests on > Linux. > > WARNING: ThreadSanitizer: signal-unsafe call inside of a signal (pid=39721) > > #0 operator new(unsigned long) <null>:0 (lldb-mi-3.7.0+0x000000092b9d) > > #1 std::string::_Rep::_S_create(unsigned long, unsigned long, > std::allocator<char> const&) <null>:0 (libstdc++.so.6+0x0000000ba3b8) > > #2 CMICmnResources::GetStringFromResource(unsigned int, CMIUtilString&) > const > /usr/local/google/home/vharron/ll/tot/llvm/tools/lldb/tools/lldb-mi/MICmnResources.cpp:434 > (lldb-mi-3.7.0+0x00000014ddd8) > > #3 CMICmnResources::GetString(unsigned int) const > /usr/local/google/home/vharron/ll/tot/llvm/tools/lldb/tools/lldb-mi/MICmnResources.cpp:371 > (lldb-mi-3.7.0+0x00000014db81) > > #4 sigwinch_handler(int) > /usr/local/google/home/vharron/ll/tot/llvm/tools/lldb/tools/lldb-mi/MIDriverMain.cpp:99 > (lldb-mi-3.7.0+0x0000001589ff) > > #5 __tsan::CallUserSignalHandler(__tsan::ThreadState*, bool, bool, int, > my_siginfo_t*, void*) tsan_interceptors.o:0 (lldb-mi-3.7.0+0x00000009f25f) > > #6 void std::this_thread::sleep_for<long, std::ratio<1l, 1000l> > >(std::chrono::duration<long, std::ratio<1l, 1000l> > const&) > /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/thread:279 > (lldb-mi-3.7.0+0x00000013243e) > > #7 CMIDriver::ReadStdinLineQueue() > /usr/local/google/home/vharron/ll/tot/llvm/tools/lldb/tools/lldb-mi/MIDriver.cpp:710 > (lldb-mi-3.7.0+0x000000155e62) > > #8 CMIDriver::DoMainLoop() > /usr/local/google/home/vharron/ll/tot/llvm/tools/lldb/tools/lldb-mi/MIDriver.cpp:631 > (lldb-mi-3.7.0+0x000000155d37) > > #9 non-virtual thunk to CMIDriver::DoMainLoop() > /usr/local/google/home/vharron/ll/tot/llvm/tools/lldb/tools/lldb-mi/MIDriver.cpp:648 > (lldb-mi-3.7.0+0x000000155fbd) > > #10 CMIDriverMgr::DriverMainLoop() > /usr/local/google/home/vharron/ll/tot/llvm/tools/lldb/tools/lldb-mi/MIDriverMgr.cpp:340 > (lldb-mi-3.7.0+0x000000159ee6) > > #11 main > /usr/local/google/home/vharron/ll/tot/llvm/tools/lldb/tools/lldb-mi/MIDriverMain.cpp:364 > (lldb-mi-3.7.0+0x000000158f60) Reviewers: vharron, abidh Reviewed By: abidh Subscribers: lldb-commits, abidh, vharron Differential Revision: http://reviews.llvm.org/D8256 llvm-svn: 232735
* Make lldb-mi handle only MI commandsHafiz Abid Qadeer2015-03-181-203/+0
| | | | | | | | | | | | | | | | | | | | | Summary: Previously lldb-mi can also act as a driver like normal lldb. It needed a lot of redundant code in the lldb-mi for that. I think that if a user wants command line lldb driver then he/she should use the lldb for it. This change will cleanup the code a lot. When this change goes in, it will allow us to remove some more redundant code too. All tests pass on Linux. Did some sanity testing on command line and with eclipse. Reviewers: ki.stfu Reviewed By: ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8381 llvm-svn: 232621
* Remove redundant comments from lldb-mi source files.Hafiz Abid Qadeer2015-03-161-22/+1
| | | | | | | Most of lldb-mi files have comments about environement, copyright etc which were neither needed nor uptodate. This commit removes those comments. llvm-svn: 232396
* Reduce number of threads in lldb-mi.Hafiz Abid Qadeer2015-02-201-7/+6
| | | | | | | | | | | | | | | | | | | | | LLDB-mi have 3 threads. 1. Wait for input. 2. Process commands. 3. Process events. This revision merges 1 & 2. Same thread waits on input and then process the command. This way, no synchronization is needed between first and 2nd. Also it is easy to check when to exit. A lot of code will redundant and will be cleaned up gradually. All lldb-mi tests pass with gcc and clang as test compiler. Also did minimal testing on command line and works ok. The "quit" and "-gdb-exit" command close the application without needing any further return. Reviewed in http://reviews.llvm.org/D7746. llvm-svn: 230003
* 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
* Added an Xcode target so we build the "lldb-mi" executable as part of the ↵Greg Clayton2015-01-201-1/+1
| | | | | | | | | | "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
* Reformat lldb-mi using clang-format.Zachary Turner2014-11-171-267/+273
| | | | | | Courtesy of dawn@burble.org. llvm-svn: 222150
* Add new MI commands, features and fixes to the lldb-mi driver.Deepak Panickal2014-08-081-1/+6
| | | | | | | | | | - 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
* Added support for new MI commands and bug fixes. More details in MIReadme.txt.Deepak Panickal2014-06-241-3/+7
| | | | llvm-svn: 211607
* Initial commit of LLDB Machine Interface Frontend.Deepak Panickal2014-05-161-0/+384
- 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