summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-mi/MIDriverMgr.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [LLDB] Remove lldb-miJonas Devlieghere2019-07-181-727/+0
| | | | | | | | | | | | | | As discussed on the mailing list [1], this patch removes the lldb-mi tool and its tests from the LLDB repository. We moved lldb-mi into a separate repository on GitHub [2] for downstream users or maintainers to build and package. [1] http://lists.llvm.org/pipermail/lldb-dev/2019-July/015103.html [2] https://github.com/lldb-tools/lldb-mi Differential revision: https://reviews.llvm.org/D64255 llvm-svn: 366465
* [lldb] NFC modernize codebase with modernize-use-nullptrKonrad Kleine2019-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: NFC = [[ https://llvm.org/docs/Lexicon.html#nfc | Non functional change ]] This commit is the result of modernizing the LLDB codebase by using `nullptr` instread of `0` or `NULL`. See https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html for more information. This is the command I ran and I to fix and format the code base: ``` run-clang-tidy.py \ -header-filter='.*' \ -checks='-*,modernize-use-nullptr' \ -fix ~/dev/llvm-project/lldb/.* \ -format \ -style LLVM \ -p ~/llvm-builds/debug-ninja-gcc ``` NOTE: There were also changes to `llvm/utils/unittest` but I did not include them because I felt that maybe this library shall be updated in isolation somehow. NOTE: I know this is a rather large commit but it is a nobrainer in most parts. Reviewers: martong, espindola, shafik, #lldb, JDevlieghere Reviewed By: JDevlieghere Subscribers: arsenm, jvesely, nhaehnle, hiraditya, JDevlieghere, teemperor, rnkovacs, emaste, kubamracek, nemanjai, ki.stfu, javed.absar, arichardson, kbarton, jrtc27, MaskRay, atanasyan, dexonsmith, arphaman, jfb, jsji, jdoerfert, lldb-commits, llvm-commits Tags: #lldb, #llvm Differential Revision: https://reviews.llvm.org/D61847 llvm-svn: 361484
* [NFC] Remove ASCII lines from commentsJonas Devlieghere2019-04-101-22/+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-mi] Check raw pointers before passing them to std::string ctor/assignmentTatyana Krasnukha2019-02-251-1/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D55653 llvm-svn: 354798
* 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
* [NFC] Replace `compare` with (in)equality operator where applicable.Jonas Devlieghere2018-12-211-11/+9
| | | | | | | | Using compare is verbose, bug prone and potentially inefficient (because of early termination). Replace relevant call sites with the (in)equality operator. llvm-svn: 349972
* Add a --synchronous option to lldb-mi to facilitate reliable testing.Adrian Prantl2018-05-231-0/+1
| | | | | | | | Patch by Alexander Polyakov! Differential Revision: https://reviews.llvm.org/D47110 llvm-svn: 333140
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-500/+508
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* [lldb-mi] No need to call Format with no varargs.Bruce Mitchener2015-09-111-5/+5
| | | | | | | | | | | | | | Summary: There's no need to call CMIUtilString::Format with a string and no args. Reviewers: abidh, ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12796 llvm-svn: 247403
* [lldb-mi] Use empty arg lists instead of (void).Bruce Mitchener2015-08-041-14/+14
| | | | | | | | | | | | 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] Use size_t where appropriate.Bruce Mitchener2015-07-031-1/+1
| | | | | | | | | | | | | | | Summary: Many places should have been using size_t rather than MIuint or MIint. This is particularly true for code that uses std::string::find(), std::string::rfind(), std::string::size(), and related methods. Reviewers: abidh, ki.stfu, domipheus Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10931 llvm-svn: 241360
* Remove typedefs for MIchar, MIschar, MIuchar.Bruce Mitchener2015-07-031-1/+1
| | | | | | | | | | | | | | | | Summary: This is a start on bringing lldb-mi more in line with the typical LLDB coding style. This just removes the usage of the typedefs and doesn't yet clean up any logic or other issues. (This is to keep the review simple.) Reviewers: abidh, ki.stfu, domipheus Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10917 llvm-svn: 241349
* Fix a variety of typos.Bruce Mitchener2015-06-181-5/+5
| | | | | | No functional change. llvm-svn: 239995
* Add help for lldb-mi --source/-s option (MI)Dawn Perchik2015-06-171-0/+1
| | | | | | | | Test Plan: lldb-mi --interpreter --help Reviewed By: clayborg, abidh Differential Revision: http://reviews.llvm.org/D10489 llvm-svn: 239975
* MI fix allowing multiple logging instances of lldb-mi to run simultaneously.Ilia K2015-04-231-1/+16
| | | | | | | | | | | | | | | | | | | | Summary: Currently if two instances of lldb-mi are running with logging enabled using '--log' the log file conflicts. This produces the following error MI: Error: File Handler. Error Permission denied opening 'C:\Users\Ewan\LLVM\build\Debug\bin\lldb-mi-log.txt' Fixed in this patch by renaming lldb-mi-log.txt based on the date, e.g. lldb-mi-log.txt-20150316163631.log, and moving the file into the temp directory by using the --log-dir option. Regrading previous review comments the P_tmpdir macro is defined in Windows but always points to "\", which doesn't help much. Also when using the Windows API for GetTempPath() dynamic memory seems much more messy. Patch from ewan@codeplay.com Reviewers: abidh, EwanCrawford Subscribers: zturner, lldb-commits, deepak2427 Differential Revision: http://reviews.llvm.org/D9054 llvm-svn: 235589
* Remove redundant code from lldb-mi.Hafiz Abid Qadeer2015-03-241-27/+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
* Remove IDE_MI_APP_EXIT_OK msg on exit (MI)Ilia K2015-03-191-27/+0
| | | | | | | | | | | | | | Summary: Remove IDE_MI_APP_EXIT_OK msg on exit (MI) Reviewers: abidh Reviewed By: abidh Subscribers: lldb-commits, abidh Differential Revision: http://reviews.llvm.org/D8446 llvm-svn: 232738
* Make lldb-mi handle only MI commandsHafiz Abid Qadeer2015-03-181-4/+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-12/+0
| | | | | | | 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-0/+16
| | | | | | | | | | | | | | | | | | | | | 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
* Fix log file generation in lldb-mi.Hafiz Abid Qadeer2015-02-021-11/+7
| | | | | | | | | | | | | | | | | | 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
* 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-616/+638
| | | | | | Courtesy of dawn@burble.org. llvm-svn: 222150
* Add new MI commands, features and fixes to the lldb-mi driver.Deepak Panickal2014-08-081-7/+58
| | | | | | | | | | - 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-8/+33
| | | | llvm-svn: 211607
* Initial commit of LLDB Machine Interface Frontend.Deepak Panickal2014-05-161-0/+686
- 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