Revision tags: llvmorg-7.0.0, llvmorg-7.0.0-rc3 |
|
#
c11a780e |
| 30-Aug-2018 |
Raphael Isemann <teemperor@gmail.com> |
Use a CompletionRequest in the expression command completion [NFC]
The patch was originally written before we had a CompletionRequest, so it still used a StringList to pass back the completions to t
Use a CompletionRequest in the expression command completion [NFC]
The patch was originally written before we had a CompletionRequest, so it still used a StringList to pass back the completions to the request.
llvm-svn: 341124
show more ...
|
#
74829734 |
| 30-Aug-2018 |
Raphael Isemann <teemperor@gmail.com> |
Added initial code completion support for the `expr` command
Summary: This patch adds initial code completion support for the `expr` command.
We now have a completion handler in the expression Comm
Added initial code completion support for the `expr` command
Summary: This patch adds initial code completion support for the `expr` command.
We now have a completion handler in the expression CommandObject that essentially just attempts to parse the given user expression with Clang with an attached code completion consumer. We filter and prepare the code completions provided by Clang and send them back to the completion API.
The current completion is limited to variables that are in the current scope. This includes local variables and all types used by local variables. We however don't do any completion of symbols that are not used in the local scope (or in some other way already in the ASTContext).
This is partly because there is not yet any code that manually searches for additiona information in the debug information. Another cause is that for some reason the existing code for loading these additional symbols when requested by Clang doesn't seem to work. This will be fixed in a future patch.
Reviewers: jingham, teemperor
Reviewed By: teemperor
Subscribers: labath, aprantl, JDevlieghere, friss, lldb-commits
Differential Revision: https://reviews.llvm.org/D48465
llvm-svn: 341086
show more ...
|
Revision tags: llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1 |
|
#
4d51a902 |
| 12-Jul-2018 |
Raphael Isemann <teemperor@gmail.com> |
Get rid of the C-string parameter in DoExecute
Summary: This patch gets rid of the C-string parameter in the RawCommandObject::DoExecute function, making the code simpler and less memory unsafe.
Th
Get rid of the C-string parameter in DoExecute
Summary: This patch gets rid of the C-string parameter in the RawCommandObject::DoExecute function, making the code simpler and less memory unsafe.
There seems to be a assumption in some command objects that this parameter could be a nullptr, but from what I can see the rest of the API doesn't actually allow this (and other command objects and related code pieces dereference this parameter without any checks).
Especially CommandObjectRegexCommand has error handling code for a nullptr that is now gone.
Reviewers: davide, jingham, teemperor
Reviewed By: teemperor
Subscribers: jingham, lldb-commits
Differential Revision: https://reviews.llvm.org/D49207
llvm-svn: 336955
show more ...
|
#
3a0e1270 |
| 10-Jul-2018 |
Raphael Isemann <teemperor@gmail.com> |
Refactor parsing of option lists with a raw string suffix.
Summary: A subset of the LLDB commands follows this command line interface style: <command name> [arguments] -- <string suffix> The pars
Refactor parsing of option lists with a raw string suffix.
Summary: A subset of the LLDB commands follows this command line interface style: <command name> [arguments] -- <string suffix> The parsing code for this interface has been so far been duplicated into the different command objects which makes it hard to maintain and reuse elsewhere.
This patches improves the situation by adding a OptionsWithRaw class that centralizes the parsing logic and allows easier testing. The different commands now just call this class to extract the arguments and the raw suffix from the provided user input.
Reviewers: jingham
Reviewed By: jingham
Subscribers: mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D49106
llvm-svn: 336723
show more ...
|
Revision tags: llvmorg-6.0.1, llvmorg-6.0.1-rc3, llvmorg-6.0.1-rc2 |
|
#
05097246 |
| 30-Apr-2018 |
Adrian Prantl <aprantl@apple.com> |
Reflow paragraphs in comments.
This is intended as a clean up after the big clang-format commit (r280751), which unfortunately resulted in many of the comment paragraphs in LLDB being very hard to r
Reflow paragraphs in comments.
This is intended as a clean up after the big clang-format commit (r280751), which unfortunately resulted in many of the comment paragraphs in LLDB being very hard to read.
FYI, the script I used was:
import textwrap import commands import os import sys import re tmp = "%s.tmp"%sys.argv[1] out = open(tmp, "w+") with open(sys.argv[1], "r") as f: header = "" text = "" comment = re.compile(r'^( *//) ([^ ].*)$') special = re.compile(r'^((([A-Z]+[: ])|([0-9]+ )).*)|(.*;)$') for line in f: match = comment.match(line) if match and not special.match(match.group(2)): # skip intentionally short comments. if not text and len(match.group(2)) < 40: out.write(line) continue
if text: text += " " + match.group(2) else: header = match.group(1) text = match.group(2)
continue
if text: filled = textwrap.wrap(text, width=(78-len(header)), break_long_words=False) for l in filled: out.write(header+" "+l+'\n') text = ""
out.write(line)
os.rename(tmp, sys.argv[1])
Differential Revision: https://reviews.llvm.org/D46144
llvm-svn: 331197
show more ...
|
Revision tags: llvmorg-6.0.1-rc1 |
|
#
0df817aa |
| 13-Apr-2018 |
Davide Italiano <davide@freebsd.org> |
[Command] Simplify the code and make it less error prone. NFCI.
Pointed out by Jim.
llvm-svn: 330047
|
#
24fff242 |
| 13-Apr-2018 |
Davide Italiano <davide@freebsd.org> |
[Command] Implement `statistics` command.
This allows us to collect useful metrics about lldb debugging sessions.
I thought that an example would be better than a thousand words:
Process 19705 s
[Command] Implement `statistics` command.
This allows us to collect useful metrics about lldb debugging sessions.
I thought that an example would be better than a thousand words:
Process 19705 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = step in frame #0: 0x0000000100000fb4 blah`main at blah.c:3 1 int main(void) { 2 int a = 6; -> 3 return 0; 4 } (lldb) statistics enable (lldb) frame var a (int) a = 6 (lldb) expr a (int) $1 = 6 (lldb) statistics disable (lldb) statistics dump Number of expr evaluation successes : 1 Number of expr evaluation failures : 0 Number of frame var successes : 1 Number of frame var failures : 0
Future improvements might include:
1. Passing a file, or implementing categories. The way this patch has been implemented is generic enough to allow this to be extended easily without breaking the grammar. 2. Adding an SBAPI and Python API for use in scripts.
Thanks to Jim Ingham for discussing the design with me.
<rdar://problem/36555975>
Differential Revision: https://reviews.llvm.org/D45547
llvm-svn: 330043
show more ...
|
#
47cbf4a0 |
| 10-Apr-2018 |
Pavel Labath <labath@google.com> |
Move Args::StringTo*** functions to a new OptionArgParser class
Summary: The idea behind this is to move the functionality which depend on other lldb classes into a separate class. This way, the Arg
Move Args::StringTo*** functions to a new OptionArgParser class
Summary: The idea behind this is to move the functionality which depend on other lldb classes into a separate class. This way, the Args class can be turned into a lightweight arc+argv wrapper and moved into the lower lldb layers.
Reviewers: jingham, zturner
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D44306
llvm-svn: 329677
show more ...
|
Revision tags: llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1, llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2, llvmorg-5.0.1-rc1, llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1 |
|
#
d0309916 |
| 19-Jul-2017 |
Jim Ingham <jingham@apple.com> |
Add help text for "expression" telling how to enter multi-line mode.
This seemed natural to us, but wasn't documented anywhere and was not clear to everybody.
<rdar://problem/33316164>
llvm-svn: 3
Add help text for "expression" telling how to enter multi-line mode.
This seemed natural to us, but wasn't documented anywhere and was not clear to everybody.
<rdar://problem/33316164>
llvm-svn: 308549
show more ...
|
Revision tags: llvmorg-4.0.1, llvmorg-4.0.1-rc3, llvmorg-4.0.1-rc2 |
|
#
97206d57 |
| 12-May-2017 |
Zachary Turner <zturner@google.com> |
Rename Error -> Status.
This renames the LLDB error class to Status, as discussed on the lldb-dev mailing list.
A change of this magnitude cannot easily be done without find and replace, but that h
Rename Error -> Status.
This renames the LLDB error class to Status, as discussed on the lldb-dev mailing list.
A change of this magnitude cannot easily be done without find and replace, but that has potential to catch unwanted occurrences of common strings such as "Error". Every effort was made to find all the obvious things such as the word "Error" appearing in a string, etc, but it's possible there are still some lingering occurences left around. Hopefully nothing too serious.
llvm-svn: 302872
show more ...
|
Revision tags: llvmorg-4.0.1-rc1 |
|
#
3eb2b44d |
| 22-Mar-2017 |
Zachary Turner <zturner@google.com> |
Delete some more dead includes.
This breaks the cycle between Target and PluginLanguageC++, reducing the overall cycle count from 43 to 42.
llvm-svn: 298561
|
Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3, llvmorg-4.0.0-rc2, llvmorg-4.0.0-rc1, llvmorg-3.9.1, llvmorg-3.9.1-rc3 |
|
#
43d35418 |
| 06-Dec-2016 |
Pavel Labath <labath@google.com> |
Use Timeout<> in EvaluateExpressionOptions class
llvm-svn: 288797
|
Revision tags: llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1 |
|
#
c1edf566 |
| 11-Nov-2016 |
Mehdi Amini <mehdi.amini@apple.com> |
Prevent at compile time converting from Error::success() to Expected<T>
This would trigger an assertion at runtime otherwise.
Differential Revision: https://reviews.llvm.org/D26482
llvm-svn: 286562
|
#
41af4309 |
| 11-Nov-2016 |
Mehdi Amini <mehdi.amini@apple.com> |
Make the Error class constructor protected
This is forcing to use Error::success(), which is in a wide majority of cases a lot more readable.
Differential Revision: https://reviews.llvm.org/D26481
Make the Error class constructor protected
This is forcing to use Error::success(), which is in a wide majority of cases a lot more readable.
Differential Revision: https://reviews.llvm.org/D26481
llvm-svn: 286561
show more ...
|
#
981da8d3 |
| 17-Oct-2016 |
Jim Ingham <jingham@apple.com> |
Fix a crash in expressions with fixits in the dummy target.
In the expression command, if the target is NULL, you have to use the dummy target.
<rdar://problem/28811687>
llvm-svn: 284439
|
#
0354a688 |
| 11-Oct-2016 |
Sean Callanan <scallanan@apple.com> |
Clarified the explanation of expr --top-level.
llvm-svn: 283904
|
#
a449698c |
| 05-Oct-2016 |
Zachary Turner <zturner@google.com> |
Convert CommandObject constructors to StringRef.
llvm-svn: 283384
|
#
543a26e9 |
| 26-Sep-2016 |
Enrico Granata <egranata@apple.com> |
Fix an issue where LLDB would not accept the --description-verbosity option to 'po' without an argument after the StringRef refactoring
Fixes rdar://28480275
llvm-svn: 282445
|
#
514d8cd8 |
| 23-Sep-2016 |
Zachary Turner <zturner@google.com> |
Update the prompt related functions to use StringRefs.
llvm-svn: 282269
|
#
8cef4b0b |
| 23-Sep-2016 |
Zachary Turner <zturner@google.com> |
Update OptionGroup::SetValue to take StringRef.
Then deal with all the fallout.
Differential Revision: https://reviews.llvm.org/D24847
llvm-svn: 282265
|
#
70602439 |
| 22-Sep-2016 |
Zachary Turner <zturner@google.com> |
Try to fix build errors on Android.
It doesn't like the implicit conversion from T[] to ArrayRef<T> so I'm using `llvm::makeArrayRef()`. Hopefully I got everything.
llvm-svn: 282195
|
#
1f0f5b5b |
| 22-Sep-2016 |
Zachary Turner <zturner@google.com> |
Convert option tables to ArrayRefs.
This change is very mechanical. All it does is change the signature of `Options::GetDefinitions()` and `OptionGroup:: GetDefinitions()` to return an `ArrayRef<Op
Convert option tables to ArrayRefs.
This change is very mechanical. All it does is change the signature of `Options::GetDefinitions()` and `OptionGroup:: GetDefinitions()` to return an `ArrayRef<OptionDefinition>` instead of a `const OptionDefinition *`. In the case of the former, it deletes the sentinel entry from every table, and in the case of the latter, it removes the `GetNumDefinitions()` method from the interface. These are no longer necessary as `ArrayRef` carries its own length.
In the former case, iteration was done by using a sentinel entry, so there was no knowledge of length. Because of this the individual option tables were allowed to be defined below the corresponding class (after all, only a pointer was needed). Now, however, the length must be known at compile time to construct the `ArrayRef`, and as a result it is necessary to move every option table before its corresponding class. This results in this CL looking very big, but in terms of substance there is not much here.
Differential revision: https://reviews.llvm.org/D24834
llvm-svn: 282188
show more ...
|
#
ecbb0bb1 |
| 19-Sep-2016 |
Zachary Turner <zturner@google.com> |
Fix more functions in Args to use StringRef.
This patch also marks the const char* versions as =delete to prevent their use. This has the potential to cause build breakages on some platforms which
Fix more functions in Args to use StringRef.
This patch also marks the const char* versions as =delete to prevent their use. This has the potential to cause build breakages on some platforms which I can't compile. I have tested on Windows, Linux, and OSX. Best practices for fixing broken callsites are outlined in Args.h in a comment above the deleted function declarations.
Eventually we can remove these =delete declarations, but for now they are important to make sure that all implicit conversions from const char * are manually audited to make sure that they do not invoke a conversion from nullptr.
llvm-svn: 281919
show more ...
|
#
b9c1b51e |
| 06-Sep-2016 |
Kate Stone <katherine.stone@apple.com> |
*** 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 t
*** 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
show more ...
|
#
ac9c3a62 |
| 26-Aug-2016 |
Kate Stone <katherine.stone@apple.com> |
Tables of command options in LLDB benefit from hand-formatting to make it easier to scan a set of options with a relatively large number of positional arguments. This commit standardizes their format
Tables of command options in LLDB benefit from hand-formatting to make it easier to scan a set of options with a relatively large number of positional arguments. This commit standardizes their formatting throughout LLDB and applies surrounding directives to exempt them from being formatted by clang-format.
These kinds of exemptions should be rare cases that benefit significantly from alternative formatting. They also imply a long-term obligation to maintain their format since the automated tools will not do so.
llvm-svn: 279882
show more ...
|