summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-mi/MICmdArgValString.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [LLDB] Remove lldb-miJonas Devlieghere2019-07-181-380/+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
* [NFC] Remove ASCII lines from commentsJonas Devlieghere2019-04-101-14/+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
* 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
* Simplify Boolean expressionsJonas Devlieghere2018-12-151-5/+2
| | | | | | | | | | | This patch simplifies boolean expressions acorss LLDB. It was generated using clang-tidy with the following command: run-clang-tidy.py -checks='-*,readability-simplify-boolean-expr' -format -fix $PWD Differential revision: https://reviews.llvm.org/D55584 llvm-svn: 349215
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-240/+255
| | | | | | | | | | | | | | | | | | | | | | | *** 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
* Fix -break-insert not working when using absolute paths (MI)Ilia K2016-07-291-0/+24
| | | | | | | | | | | | | | Summary: When trying to parse the -break-insert arguments as a named location, the string parsing was not configured to allow directory paths. This patch adds a constructor to allow the parsing of string as directory path along with the other parameters. This fixes https://llvm.org/bugs/show_bug.cgi?id=28709 Patch from malaperle@gmail.com Reviewers: clayborg, ki.stfu Subscribers: lldb-commits, ki.stfu Differential Revision: https://reviews.llvm.org/D22902 llvm-svn: 277117
* Simplify find_first_of & find_last_of on single char.Bruce Mitchener2015-09-011-2/+2
| | | | | | | | | | | | | | | Summary: When calling find_first_of and find_last_of on a single character, we can instead just call find / rfind and make our intent more clear. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12518 llvm-svn: 246609
* [lldb-mi] Use empty arg lists instead of (void).Bruce Mitchener2015-08-041-2/+2
| | | | | | | | | | | | 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
* Use string::find(char) for single character strings.Bruce Mitchener2015-07-041-2/+2
| | | | | | | | | | | | Summary: Use string::find(char) for single character strings. Reviewers: abidh, ki.stfu, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10943 llvm-svn: 241390
* [lldb-mi] Use size_t where appropriate.Bruce Mitchener2015-07-031-14/+14
| | | | | | | | | | | | | | | 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
* [lldb-mi] Typo fixesBruce Mitchener2015-07-031-3/+3
| | | | | | | | | | | | Summary: Some more typo fixes in LLDB-MI. Reviewers: ki.stfu, abidh Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10925 llvm-svn: 241351
* Remove typedefs for MIchar, MIschar, MIuchar.Bruce Mitchener2015-07-031-6/+6
| | | | | | | | | | | | | | | | 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-2/+2
| | | | | | No functional change. llvm-svn: 239995
* [LLDB-MI] Properly detect missing mandatory arguments to MI commandsBruce Mitchener2015-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously if an MI command had **X** mandatory and **Y** optional arguments you could provide **X** or more optional arguments without providing any of the mandatory arguments, and the argument validation code wouldn't complain. For example this would pass argument validation even though the mandatory **address** and **count** arguments are missing: -data-read-memory-bytes --thread 1 --frame 0 Part of the problem was that an empty string was considered a valid value for a mandatory argument, which didn't make much sense. Patch by Vadim Macagon. Thanks! Test Plan: ./dotest.py -A x86_64 -C clang --executable $BUILDDIR/bin/lldb tools/lldb-mi/ No unexpected failures on my Ubuntu 14.10 64bit Virtualbox VM. Reviewers: domipheus, ki.stfu, abidh Reviewed By: ki.stfu, abidh Subscribers: brucem, lldb-commits Differential Revision: http://reviews.llvm.org/D10299 llvm-svn: 239297
* 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
* Fix handling of double quotes (MI)Ilia K2015-02-261-160/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: * Clean CMICmdArgValString::Validate: now it's based on CMIUtilString::SplitConsiderQuotes method: A bit of introduction: # Command line is wrapped into CMICmdArgContext. # CMICmdArgSet is a set of arguments to be parsed. This class contains CMICmdArgContext as a private member. # MI command is class which is inhereted from CMICmdBase. It contains CMICmdArgSet as a private member. When command is executed CMICmdBase::ParseArgs() is called. This method adds args for parsing using CMICmdArgSet::Add(). Then CMICmdBase::ParseValidateCmdOptions() is called, which calls CMICmdArgSet::Validate(). Then it gets a number of arguments (using SplitConsiderQuotes().array_length) and for each arguments registered in ParseArgs() tries to validate it using CMICmdArgValBase::Validate(). Every user commands parses this string again (first time it was made in SplitConsiderQuotes) and in case of CMICmdArgValString it was made incorrectly. It searches the first and last quotes (but it should be first and next after first). Besides, it was splitted into 4 cases. I'm just using SplitConsiderQuotes directly, and I don't split them by hand again. Actually, I think we should do so in every CMICmdArgVal_XXX::Validate() method. * Enable MiInterpreterExecTestCase.test_lldbmi_target_create test * Fix MiExecTestCase.test_lldbmi_exec_arguments_set test All tests pass on OS X. Reviewers: abidh, emaste, zturner, clayborg Reviewed By: clayborg Subscribers: lldb-commits, zturner, emaste, clayborg, abidh Differential Revision: http://reviews.llvm.org/D7860 llvm-svn: 230654
* Reformat lldb-mi using clang-format.Zachary Turner2014-11-171-407/+420
| | | | | | Courtesy of dawn@burble.org. llvm-svn: 222150
* Fix command "gdb-set" to handle long option --threadgroup and accept ↵Deepak Panickal2014-08-141-0/+22
| | | | | | | | --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
* Restore some reverted fixes for spelling, newlines and __linux__ macro.Deepak Panickal2014-08-081-1/+1
| | | | llvm-svn: 215234
* Add new MI commands, features and fixes to the lldb-mi driver.Deepak Panickal2014-08-081-17/+210
| | | | | | | | | | - 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
* Fix a few typos.Bruce Mitchener2014-06-271-1/+1
| | | | llvm-svn: 211851
* Added support for new MI commands and bug fixes. More details in MIReadme.txt.Deepak Panickal2014-06-241-25/+93
| | | | llvm-svn: 211607
* Initial commit of LLDB Machine Interface Frontend.Deepak Panickal2014-05-161-0/+219
- 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