This project is mirrored from https://github.com/llvm-doe-org/llvm-project.git.
Pull mirroring updated .
- 23 Jan, 2022 1 commit
-
-
Kazu Hirata authored
Identified with readability-redundant-member-init.
-
- 22 Jan, 2022 1 commit
-
-
Dave Lee authored
Allow users to create aliases for aliases to raw input commands. That probably sounds convoluted, so here's an example: ``` command alias some-setup env SOMEVAR=SOMEVALUE ``` This an alias based on `env`, which itself is an alias for `_regex-env`. `_regex-env` is a `command regex` command, which takes raw input. The above `some-setup` alias fails with: ``` error: Unable to create requested alias. ``` This change allows such aliases to be created. lldb already supports aliases to aliases for parsed commands. Differential Revision: https://reviews.llvm.org/D117259
-
- 18 Oct, 2021 1 commit
-
-
Jim Ingham authored
The point is to allow users with a related set of script based commands to organize their commands in a hierarchy in the command set, rather than having to have only top-level commands. Differential Revision: https://reviews.llvm.org/D110298
-
- 30 Sep, 2021 1 commit
-
-
Jim Ingham authored
have linked command files in a source tree and get to them all from one main command file. Differential Revision: https://reviews.llvm.org/D110601
-
- 09 Jul, 2021 1 commit
-
-
Jonas Devlieghere authored
Add the ability to silence command script import. The motivation for this change is being able to add command script import -s lldb.macosx.crashlog to your ~/.lldbinit without it printing the following message at the beginning of every debug session. "malloc_info", "ptr_refs", "cstr_refs", "find_variable", and "objc_refs" commands have been installed, use the "--help" options on these commands for detailed help. In addition to forwarding the silent option to LoadScriptingModule, this also changes ScriptInterpreterPythonImpl::ExecuteOneLineWithReturn and ScriptInterpreterPythonImpl::ExecuteMultipleLines to honor the enable IO option in ExecuteScriptOptions, which until now was ignored. Note that IO is only enabled (or disabled) at the start of a session, and for this particular use case, that's done when taking the Python lock in LoadScriptingModule, which means that the changes to these two functions are not strictly necessary, but (IMO) desirable nonetheless. Differential revision: https://reviews.llvm.org/D105327
-
- 17 Jun, 2021 1 commit
-
-
David Spickett authored
This is part 2, covering the commands source. Some uses remain where it's tricky to see what the logic is or they are not used with AppendError. Reviewed By: teemperor Differential Revision: https://reviews.llvm.org/D104448
-
- 09 Jun, 2021 1 commit
-
-
Jonas Devlieghere authored
This converts a default constructor's member initializers into C++11 default member initializers. This patch was automatically generated with clang-tidy and the modernize-use-default-member-init check. $ run-clang-tidy.py -header-filter='lldb' -checks='-*,modernize-use-default-member-init' -fix This is a mass-refactoring patch and this commit will be added to .git-blame-ignore-revs. Differential revision: https://reviews.llvm.org/D103483
-
- 08 Feb, 2021 1 commit
-
-
Tatyana Krasnukha authored
-
- 23 Dec, 2020 1 commit
-
-
Jonas Devlieghere authored
GetCommandSPExact is called exaclty once with include_aliases set to true, so make it a default argument. Use early returns to simplify the implementation.
-
- 17 Dec, 2020 1 commit
-
-
Pavel Labath authored
This reverts commit a01b26fb, because it breaks the "finish" command in some way -- the command does not terminate after it steps out, but continues running the target. The exact blast radius is not clear, but it at least affects the usage of the "finish" command in TestGuiBasicDebug.py. The error is *not* gui-related, as the same issue can be reproduced by running the same steps outside of the gui. There is some kind of a race going on, as the test fails only 20% of the time on the buildbot.
-
- 12 Dec, 2020 1 commit
-
-
Tatyana Krasnukha authored
Currently, the interpreter's context is not updated until a command is executed. This has resulted in the behavior of SB-interface functions and some commands depends on previous user actions. The interpreter's context can stay uninitialized, point to a currently selected target, or point to one of previously selected targets. This patch removes any usages of CommandInterpreter::UpdateExecutionContext. CommandInterpreter::HandleCommand* functions still may override context temporarily, but now they always restore it before exiting. CommandInterpreter saves overriden contexts to the stack, that makes nesting commands possible. Added test reproduces one of the issues. Without this fix, the last assertion fails because interpreter's execution context is empty until running "target list", so, the value of the global property was updated instead of process's local instance. Differential Revision: https://reviews.llvm.org/D92164
-
- 27 Oct, 2020 1 commit
-
-
Jonas Devlieghere authored
Make it possible to use a relative path in command script import to the location of the file being sourced. This allows the user to put Python scripts next to LLDB command files and importing them without having to specify an absolute path. To enable this behavior pass `-c` to `command script import`. The argument can only be used when sourcing the command from a file. rdar://68310384 Differential revision: https://reviews.llvm.org/D89334
-
- 02 Sep, 2020 1 commit
-
-
Jonas Devlieghere authored
Move the CommandObjectScript and CommandObjectRegexCommand under Commands where all the other CommandObject implementations live. Although neither implementations currently use the TableGen-generated CommandOptions.inc, this move would have been necessary anyway if they were to in the future.
-
- 11 Aug, 2020 1 commit
-
-
Gongyu Deng authored
Provided dedicated tab completions for `command delete/unalias`. Reviewed By: teemperor Differential Revision: https://reviews.llvm.org/D81128
-
- 27 Jul, 2020 1 commit
-
-
Raphael Isemann authored
Summary: This way we can get rid of this 1024 char buffer workaround. Reviewers: #lldb, labath Reviewed By: labath Subscribers: JDevlieghere Differential Revision: https://reviews.llvm.org/D84528
-
- 23 Jul, 2020 1 commit
-
-
Med Ismail Bennani authored
This patch moves the `history` subcommand from the `command` to `session` command. I think it makes more sense to have it there because as the `command` usage suggests, it should be used to manage custom LLDB commands. However, `history` is essentially tied to a debugging session and holds all the commands (not specifically custom ones). This also makes it more discoverable by adding an alias for it (mimicking the shell builtin). Differential Revision: https://reviews.llvm.org/D84307 Signed-off-by:
Med Ismail Bennani <medismail.bennani@gmail.com>
-
- 16 Jun, 2020 1 commit
-
-
Jonas Devlieghere authored
-
- 04 Jun, 2020 2 commits
-
-
Raphael Isemann authored
In the similar review D81128, Jonas pointed out some style errors that also apply to D80775 (which is already committed). Also applying the changes suggested there to this code.
-
Gongyu Deng authored
Summary: Added the tab completion for `command script delete`. Reviewers: teemperor, JDevlieghere Reviewed By: teemperor Tags: #lldb Differential Revision: https://reviews.llvm.org/D80775
-
- 26 Mar, 2020 1 commit
-
-
Shivam Mittal authored
Reviewers: jingham, aprantl, labath, jankratochvil Reviewed By: labath, jankratochvil Subscribers: labath, jankratochvil, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D76569
-
- 28 Jan, 2020 1 commit
-
-
Benjamin Kramer authored
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here. This is mostly mechanical from a custom clang-tidy check, with a lot of manual fixups. It uncovers a lot of minor inefficiencies. This doesn't actually modify StringRef yet, I'll do that in a follow-up.
-
- 24 Jan, 2020 1 commit
-
-
Raphael Isemann authored
Summary: A *.cpp file header in LLDB (and in LLDB) should like this: ``` //===-- TestUtilities.cpp -------------------------------------------------===// ``` However in LLDB most of our source files have arbitrary changes to this format and these changes are spreading through LLDB as folks usually just use the existing source files as templates for their new files (most notably the unnecessary editor language indicator `-*- C++ -*-` is spreading and in every review someone is pointing out that this is wrong, resulting in people pointing out that this is done in the same way in other files). This patch removes most of these inconsistencies including the editor language indicators, all the different missing/additional '-' characters, files that center the file name, missing trailing `===//` (mostly caused by clang-format breaking the line). Reviewers: aprantl, espindola, jfb, shafik, JDevlieghere Reviewed By: JDevlieghere Subscribers: dexonsmith, wuzish, emaste, sdardis, nemanjai, kbarton, MaskRay, atanasyan, arphaman, jfb, abidh, jsji, JDevlieghere, usaxena95, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D73258
-
- 15 Jan, 2020 2 commits
-
-
Jonas Devlieghere authored
Make it clear form the method names whether they are synchronous or asynchronous.
-
Jonas Devlieghere authored
The 'asynchronously' argument to both GetLLDBCommandsFromIOHandler and GetPythonCommandsFromIOHandler is true for all call sites. This commit simplifies the API by dropping it and giving the baton a default argument.
-
- 23 Dec, 2019 2 commits
-
-
Jonas Devlieghere authored
The `-r` option for `command script import` is there for legacy compatibility, however the can_reload flag is always set to true. This patch removes the flag and any code that relies on it being false.
-
Jonas Devlieghere authored
Rather than checking for Python explicitly, let the script interpreter handle things and print an error if the functionality is not supported.
-
- 16 Dec, 2019 1 commit
-
-
Raphael Isemann authored
Summary: This removes most of unnecessary includes in the `source/Commands` directory. This was generated by IWYU and a script that fixed all the bogus reports from IWYU. Patch is tested on Linux and macOS. Reviewers: JDevlieghere Reviewed By: JDevlieghere Subscribers: krytarowski, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71489
-
- 30 Oct, 2019 1 commit
-
-
Adrian Prantl authored
These files had a lot of whitespace errors in them which was a constant source of merge conflicts downstream.
-
- 27 Sep, 2019 1 commit
-
-
Lawrence D'Anna authored
Summary: This patch removes File::SetStream() and File::SetDescriptor(), and replaces most direct uses of File with pointers to File. Instead of calling SetStream() on a file, we make a new file and replace it. My ultimate goal here is to introduce a new API class SBFile, which has full support for python io.IOStream file objects. These can redirect read() and write() to python code, so lldb::Files will need a way to dispatch those methods. Additionally it will need some form of sharing and assigning files, as a SBFile will be passed in and assigned to the main IO streams of the debugger. In my prototype patch queue, I make File itself copyable and add a secondary class FileOps to manage the sharing and dispatch. In that case SBFile was a unique_ptr<File>. (here: https://github.com/smoofra/llvm-project/tree/files) However in review, Pavel Labath suggested that it be shared_ptr instead. (here: https://reviews.llvm.org/D67793) In order for SBFile to use shared_ptr<File>, everything else should as well. If this patch is accepted, I will make SBFile use a shared_ptr I will remove FileOps from future patches and use subclasses of File instead. Reviewers: JDevlieghere, jasonmolenda, zturner, jingham, labath Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67891 llvm-svn: 373090
-
- 13 Sep, 2019 1 commit
-
-
Raphael Isemann authored
The StringRef should always be identical to the C string, so we might as well just create the StringRef from the C-string. This might be slightly slower until we implement the storage of ArgEntry with a string instead of a std::unique_ptr<char[]>. Until then we have to do the additional strlen on the C string to construct the StringRef. llvm-svn: 371842
-
- 03 Sep, 2019 1 commit
-
-
Raphael Isemann authored
llvm-svn: 370712
-
- 22 Aug, 2019 2 commits
-
-
Raphael Isemann authored
Summary: We currently have a bunch of code that is supposed to handle invalid command options, but all this code is unreachable because invalid options are already handled in `Options::Parse`. The only way we can reach this code is when we declare but then not implement an option (which will be made impossible with D65386, which is also when we can completely remove the `default` cases). This patch replaces all this code with `llvm_unreachable` to make clear this is dead code that can't be reached. Reviewers: JDevlieghere Reviewed By: JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66522 llvm-svn: 369625
-
Raphael Isemann authored
[lldb][NFC] Remove WordComplete mode, make result array indexed from 0 and remove any undocumented/redundant return values Summary: We still have some leftovers of the old completion API in the internals of LLDB that haven't been replaced by the new CompletionRequest. These leftovers are: * The return values (int/size_t) in all completion functions. * Our result array that starts indexing at 1. * `WordComplete` mode. I didn't replace them back then because it's tricky to figure out what exactly they are used for and the completion code is relatively untested. I finally got around to writing more tests for the API and understanding the semantics, so I think it's a good time to get rid of them. A few words why those things should be removed/replaced: * The return values are really cryptic, partly redundant and rarely documented. They are also completely ignored by Xcode, so whatever information they contain will end up breaking Xcode's completion mechanism. They are also partly impossible to even implement as we assign negative values special meaning and our completion API sometimes returns size_t. Completion functions are supposed to return -2 to rewrite the current line. We seem to use this in some untested code path to expand the history repeat character to the full command, but I haven't figured out why that doesn't work at the moment. Completion functions return -1 to 'insert the completion character', but that isn't implemented (even though we seem to activate this feature in LLDB sometimes). All positive values have to match the number of results. This is obviously just redundant information as the user can just look at the result list to get that information (which is what Xcode does). * The result array that starts indexing at 1 is obviously unexpected. The first element of the array is reserved for the common prefix of all completions (e.g. "foobar" and "footar" -> "foo"). The idea is that we calculate this to make the life of the API caller easier, but obviously forcing people to have 1-based indices is not helpful (or even worse, forces them to manually copy the results to make it 0-based like Xcode has to do). * The `WordComplete` mode indicates that LLDB should enter a space behind the completion. The idea is that we let the top-level API know that we just provided a full completion. Interestingly we `WordComplete` is just a single bool that somehow represents all N completions. And we always provide full completions in LLDB, so in theory it should always be true. The only use it currently serves is providing redundant information about whether we have a single definitive completion or not (which we already know from the number of results we get). This patch essentially removes `WordComplete` mode and makes the result array indexed from 0. It also removes all return values from all internal completion functions. The only non-redundant information they contain is about rewriting the current line (which is broken), so that functionality was moved to the CompletionRequest API. So you can now do `addCompletion("blub", "description", CompletionMode::RewriteLine)` to do the same. For the SB API we emulate the old behaviour by making the array indexed from 1 again with the common prefix at index 0. I didn't keep the special negative return codes as we either never sent them before (e.g. -2) or we didn't even implement them in the Editline handler (e.g. -1). I tried to keep this patch minimal and I'm aware we can probably now even further simplify a bunch of related code, but I would prefer doing this in follow-up NFC commits Reviewers: JDevlieghere Reviewed By: JDevlieghere Subscribers: arphaman, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66536 llvm-svn: 369624
-
- 16 Aug, 2019 1 commit
-
-
Raphael Isemann authored
llvm-svn: 369113
-
- 14 Aug, 2019 1 commit
-
-
Jonas Devlieghere authored
Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368933
-
- 07 Aug, 2019 1 commit
-
-
Jonas Devlieghere authored
llvm-svn: 368208
-
- 02 Aug, 2019 1 commit
-
-
Jonas Devlieghere authored
Reformat OptionEnumValueElement to make it easier to distinguish between its fields. This also removes the need to disable clang-format for these arrays. Differential revision: https://reviews.llvm.org/D65489 llvm-svn: 367638
-
- 28 Jul, 2019 1 commit
-
-
Raphael Isemann authored
Summary: Right now our CommandOptions.inc only generates the initializer for the options list but not the array declaration boilerplate around it. As the array definition is identical for all arrays, we might as well also let the CommandOptions.inc generate it alongside the initializers. This patch will also allow us to generate additional declarations related to that option list in the future (e.g. a enum class representing the specific options which would make our handling code less prone). This patch also fixes a few option tables that didn't follow our naming style. Reviewers: JDevlieghere Reviewed By: JDevlieghere Subscribers: abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65331 llvm-svn: 367186
-
- 18 Jul, 2019 1 commit
-
-
Raphael Isemann authored
(Converting these commands together as they are all simple commands that share the same file). llvm-svn: 366440
-
- 08 May, 2019 1 commit
-
-
Jonas Devlieghere authored
This patch ensures that we propagate errors coming from the lldbinit file trough the command/script interpreter. Before, if you did something like command script import syntax_error.py, and the python file contained a syntax error, lldb wouldn't tell you about it. This changes with the current patch: errors are now propagated by default. PS: Jim authored this change and I added testing. Differential revision: https://reviews.llvm.org/D61579 llvm-svn: 360216
-