Commit Graph

15 Commits

Author SHA1 Message Date
Kate Stone b9c1b51e45 *** This commit represents a complete reformatting of the LLDB source code
*** 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
2016-09-06 20:57:50 +00:00
Bruce Mitchener e8433cc179 Simplify find_first_of & find_last_of on single char.
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
2015-09-01 23:57:17 +00:00
Bruce Mitchener ee188ba20e [lldb-mi] Use find, not find_first_of, for "--".
Summary:
find_first_of will look for any of the characters, not the full
string passed in. When looking for "--" then, we must use find
and not find_first_of.

Reviewers: ki.stfu, abidh

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D12517

llvm-svn: 246529
2015-09-01 04:36:54 +00:00
Bruce Mitchener e2453afff6 [lldb-mi] Use empty arg lists instead of (void).
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
2015-08-04 10:24:20 +00:00
Bruce Mitchener e86c6fa3dc [lldb-mi] Use size_t where appropriate.
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
2015-07-03 15:40:44 +00:00
Bruce Mitchener 201dec7dc2 [lldb-mi] Remove unnecessary const_cast.
Summary: Remove unnecessary const_cast.

Reviewers: abidh, ki.stfu

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D10928

llvm-svn: 241359
2015-07-03 15:31:32 +00:00
Bruce Mitchener 3b25b479bf Remove typedefs for MIchar, MIschar, MIuchar.
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
2015-07-03 13:45:34 +00:00
Bruce Mitchener 1425b47773 [LLDB-MI] Properly detect missing mandatory arguments to MI commands
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
2015-06-08 11:15:09 +00:00
Hafiz Abid Qadeer a40780e36c Remove redundant comments from lldb-mi source files.
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
2015-03-16 18:18:18 +00:00
Ilia K 4dc4ed0a2a Add extra acceptable characters to CMICmdArgValFile (MI)
Summary:
Improve CMICmdArgValFile::IsValidChars to accept extra characters that can be in file name:
```
.'\"`@#$%^&*()_+-={}[]| 
```

Enable MiSyntaxTestCase.test_lldbmi_specialchars test.

All test 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/D7859

llvm-svn: 230468
2015-02-25 06:34:05 +00:00
Zachary Turner 1d6af02e2d Reformat lldb-mi using clang-format.
Courtesy of dawn@burble.org.

llvm-svn: 222150
2014-11-17 18:06:21 +00:00
Deepak Panickal 7f6edd52c9 Restore some reverted fixes for spelling, newlines and __linux__ macro.
llvm-svn: 215234
2014-08-08 17:39:47 +00:00
Deepak Panickal d249928b84 Add new MI commands, features and fixes to the lldb-mi driver.
- 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
2014-08-08 16:47:42 +00:00
Bruce Mitchener 6a7f33387d Fix a few typos.
llvm-svn: 211851
2014-06-27 02:42:12 +00:00
Deepak Panickal 6f9c468102 Initial commit of LLDB Machine Interface Frontend.
- 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
2014-05-16 10:51:01 +00:00