#
e1cd7cac |
| 21-Aug-2020 |
Gongyu Deng <gy_deng@icloud.com> |
[lldb] Tab completion for process load/unload
1. Complete `process load` with the common disk file completion, so there is not test provided for it; 2. Complete `process unload` with the tokens of v
[lldb] Tab completion for process load/unload
1. Complete `process load` with the common disk file completion, so there is not test provided for it; 2. Complete `process unload` with the tokens of valid loaded images.
Thanks for Raphael's help on the test for `process unload`.
Reviewed By: teemperor
Differential Revision: https://reviews.llvm.org/D79887
show more ...
|
Revision tags: llvmorg-11.0.0-rc2 |
|
#
249a1d4f |
| 05-Aug-2020 |
Jonas Devlieghere <jonas@devlieghere.com> |
[lldb] Add an option to inherit TCC permissions from parent.
Add an option that allows the user to decide to not make the inferior is responsible for its own TCC permissions. If you don't make the i
[lldb] Add an option to inherit TCC permissions from parent.
Add an option that allows the user to decide to not make the inferior is responsible for its own TCC permissions. If you don't make the inferior responsible, it inherits the permissions of its parent. The motivation is the scenario of running the LLDB test suite from an external hard drive. If the inferior is responsible, every test needs to be granted access to the external volume. When the permissions are inherited, approval needs to be granted only once.
Differential revision: https://reviews.llvm.org/D85237
show more ...
|
Revision tags: llvmorg-11.0.0-rc1 |
|
#
db203e02 |
| 27-Jul-2020 |
Raphael Isemann <teemperor@gmail.com> |
[lldb] Modernize away some snprintf calls
Reviewers: #lldb, JDevlieghere
Reviewed By: #lldb, JDevlieghere
Subscribers: JDevlieghere
Differential Revision: https://reviews.llvm.org/D84530
|
Revision tags: llvmorg-12-init |
|
#
706cccb8 |
| 14-Jul-2020 |
Jonas Devlieghere <jonas@devlieghere.com> |
[lldb] Make `process connect` blocking in synchronous mode.
In synchronous mode, the process connect command and its aliases should wait for the stop event before claiming the command is complete. C
[lldb] Make `process connect` blocking in synchronous mode.
In synchronous mode, the process connect command and its aliases should wait for the stop event before claiming the command is complete. Currently, the stop event is always handled asynchronously by the debugger.
The implementation takes the same approach as Process::ResumeSynchronous which hijacks the event and handles it on the current thread. Similarly, after this patch, the stop event is part of the command return object, which is the property used by the test case.
Differential revision: https://reviews.llvm.org/D83728
show more ...
|
Revision tags: llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3 |
|
#
9010cef2 |
| 01-Jul-2020 |
Raphael Isemann <teemperor@gmail.com> |
[lldb] Replace StringConvert with llvm::to_integer when parsing integer values in CommandObjects
Summary:
This replaces the current use of LLDB's own `StringConvert` with LLVM's `to_integer` which
[lldb] Replace StringConvert with llvm::to_integer when parsing integer values in CommandObjects
Summary:
This replaces the current use of LLDB's own `StringConvert` with LLVM's `to_integer` which has a less error-prone API and doesn't use special 'error values' to designate parsing problems.
Where needed I also added missing error handling code that prints a parsing error instead of continuing with the error value returned from `StringConvert` (which either gave a cryptic error message or just took the error value performed an incorrect action with it. For example, `frame recognizer delete -1` just deleted the frame recognizer at index 0).
Reviewers: #lldb, labath
Reviewed By: labath
Subscribers: labath, abidh, JDevlieghere
Differential Revision: https://reviews.llvm.org/D82297
show more ...
|
Revision tags: llvmorg-10.0.1-rc2 |
|
#
388afd84 |
| 16-Jun-2020 |
Jonas Devlieghere <jonas@devlieghere.com> |
[lldb] Remove redundant access specifiers (NFC)
|
#
763bc230 |
| 27-May-2020 |
Gongyu Deng <gy_deng@icloud.com> |
[lldb] Tab completion for process plugin name
Summary:
1. Added tab completion to `process launch -p`, `process attach -P`, `process connect -p`;
2. Bound the plugin name common completion as the
[lldb] Tab completion for process plugin name
Summary:
1. Added tab completion to `process launch -p`, `process attach -P`, `process connect -p`;
2. Bound the plugin name common completion as the default completion for `eArgTypePlugin` arguments.
Reviewers: teemperor, JDevlieghere
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D79929
show more ...
|
Revision tags: llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4 |
|
#
638b06cf |
| 12-Mar-2020 |
Jonas Devlieghere <jonas@devlieghere.com> |
[lldb/Utility] Replace ProcessInstanceInfoList with std::vector. (NFCI)
Replace ProcessInstanceInfoList with std::vector<ProcessInstanceInfo> and update the call sites.
|
#
2bba1c22 |
| 06-Mar-2020 |
Raphael Isemann <teemperor@gmail.com> |
tab completion for process signal
Summary: Provide a list of Unix signals for the tap completion for command "process signal".
Reviewers: teemperor
Subscribers: labath, jingham, JDevlieghere, lldb
tab completion for process signal
Summary: Provide a list of Unix signals for the tap completion for command "process signal".
Reviewers: teemperor
Subscribers: labath, jingham, JDevlieghere, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D75418
show more ...
|
Revision tags: llvmorg-10.0.0-rc3 |
|
#
eefda182 |
| 24-Feb-2020 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/Plugins] Move SBTarget::GetExtendedCrashInformation to SBProcess
This patch moves the SB API method GetExtendedCrashInformation from SBTarget to SBProcess since it only makes sense to call thi
[lldb/Plugins] Move SBTarget::GetExtendedCrashInformation to SBProcess
This patch moves the SB API method GetExtendedCrashInformation from SBTarget to SBProcess since it only makes sense to call this method on a sane process which might not be the case on a SBTarget object.
It also addresses some feedbacks received after landing the first patch for the 'crash-info' feature.
Differential Revision: https://reviews.llvm.org/D75049
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
show more ...
|
#
d7c403e6 |
| 21-Feb-2020 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/Plugins] Add ability to fetch crash information on crashed processes
Currently, in macOS, when a process crashes, lldb halts inside the implementation disassembly without yielding any useful i
[lldb/Plugins] Add ability to fetch crash information on crashed processes
Currently, in macOS, when a process crashes, lldb halts inside the implementation disassembly without yielding any useful information. The only way to get more information is to detach from the process, then wait for ReportCrash to generate a report, find the report, then see what error message was included in it. Instead of waiting for this to happen, lldb could locate the error_string and make it available to the user.
This patch addresses this issue by enabling the user to fetch extended crash information for crashed processes using `process status --verbose`.
Depending on the platform, this will try to gather different crash information into an structured data dictionnary. This dictionnary is generic and extensible, as it contains an array for each different type of crash information.
On Darwin Platforms, lldb will iterate over each of the target's images, extract their `__crash_info` section and generated a StructuredData::Array containing, in each entry, the module spec, its UUID, the crash messages and the abort cause. The array will be inserted into the platform's `m_extended_crash_info` dictionnary and `FetchExtendedCrashInformation` will return its JSON representation like this:
``` { "crash-info annotations": [ { "abort-cause": 0, "image": "/usr/lib/system/libsystem_malloc.dylib", "message": "main(76483,0x1000cedc0) malloc: *** error for object 0x1003040a0: pointer being freed was not allocated", "message2": "", "uuid": "5747D0C9-900D-3306-8D70-1E2EA4B7E821" }, ... ], ... } ```
This crash information can also be fetched using the SB API or lldb-rpc protocol using SBTarget::GetExtendedCrashInformation().
rdar://37736535
Differential Revision: https://reviews.llvm.org/D74657
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
show more ...
|
Revision tags: llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1 |
|
#
adcd0268 |
| 28-Jan-2020 |
Benjamin Kramer <benny.kra@googlemail.com> |
Make llvm::StringRef to std::string conversions explicit.
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 m
Make llvm::StringRef to std::string conversions explicit.
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.
show more ...
|
#
80814287 |
| 24-Jan-2020 |
Raphael Isemann <teemperor@gmail.com> |
[lldb][NFC] Fix all formatting errors in .cpp file headers
Summary: A *.cpp file header in LLDB (and in LLDB) should like this: ``` //===-- TestUtilities.cpp ----------------------------------------
[lldb][NFC] Fix all formatting errors in .cpp file headers
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
show more ...
|
Revision tags: llvmorg-11-init |
|
#
06832501 |
| 16-Dec-2019 |
Raphael Isemann <teemperor@gmail.com> |
[lldb][NFC] Remove unnecessary includes in source/Commands
Summary: This removes most of unnecessary includes in the `source/Commands` directory. This was generated by IWYU and a script that fixed a
[lldb][NFC] Remove unnecessary includes in source/Commands
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
show more ...
|
Revision tags: llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1 |
|
#
a925974b |
| 30-Oct-2019 |
Adrian Prantl <aprantl@apple.com> |
Run clang-format on lldb/source/Commands (NFC)
These files had a lot of whitespace errors in them which was a constant source of merge conflicts downstream.
|
#
a11668e8 |
| 26-Sep-2019 |
Tatyana Krasnukha <tatyana@synopsys.com> |
Don't stop execution in batch mode when process stops with SIGINT or SIGSTOP
Summary: Usually, SIGINT and SIGSTOP don't imply a crash, e.g. SIGSTOP is sent on process launch and attach on some platf
Don't stop execution in batch mode when process stops with SIGINT or SIGSTOP
Summary: Usually, SIGINT and SIGSTOP don't imply a crash, e.g. SIGSTOP is sent on process launch and attach on some platforms.
Differential Revision: https://reviews.llvm.org/D67776
llvm-svn: 372961
show more ...
|
Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6 |
|
#
0d9a201e |
| 13-Sep-2019 |
Raphael Isemann <teemperor@gmail.com> |
[lldb][NFC] Remove ArgEntry::ref member
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
[lldb][NFC] Remove ArgEntry::ref member
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
show more ...
|
Revision tags: llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4 |
|
#
04a4c091 |
| 31-Aug-2019 |
Raphael Isemann <teemperor@gmail.com> |
[lldb] Unify target checking in CommandObject
Summary: We currently have several CommandObjects that manually reimplement the checking for a selected target or a target in the execution context (whi
[lldb] Unify target checking in CommandObject
Summary: We currently have several CommandObjects that manually reimplement the checking for a selected target or a target in the execution context (which is the selected target when they are invoked). This patch removes all these checks and replaces them by setting the eCommandRequiresTarget flag that Pavel suggested. With this flag we are doing the same check but without having to duplicate this code in all these CommandObjects.
I also added a `GetSelectedTarget()` variant of the `GetSelectedOrDummyTarget()` function to the CommandObject that checks that the flag is set and then returns a reference to the target. I didn't rewrite all the `target` variables from `Target *` to `Target &` in this patch as last time this change caused a lot of merge conflicts in Swift and I would prefer having that in a separate NFC commit.
Reviewers: labath, clayborg
Reviewed By: labath, clayborg
Subscribers: clayborg, JDevlieghere, jingham, amccarth, abidh, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D66863
llvm-svn: 370571
show more ...
|
Revision tags: llvmorg-9.0.0-rc3 |
|
#
72ca5f36 |
| 26-Aug-2019 |
Raphael Isemann <teemperor@gmail.com> |
[lldb][NFC] Add ProcessInfo::GetNameAsStringRef to simplify some code
llvm-svn: 369880
|
#
4ae79199 |
| 22-Aug-2019 |
Raphael Isemann <teemperor@gmail.com> |
[lldb] Remove ')' to fix the build
That ')' slipped in by accident in the reformatting commit.
llvm-svn: 369660
|
#
00235e1b |
| 22-Aug-2019 |
Raphael Isemann <teemperor@gmail.com> |
[lldb][NFC] Fix indentation in CommandObjectProcess
llvm-svn: 369652
|
#
494370c1 |
| 22-Aug-2019 |
Raphael Isemann <teemperor@gmail.com> |
[lldb][NFC] Remove unused return value from HandleOptionArgumentCompletion
llvm-svn: 369635
|
#
1153dc96 |
| 22-Aug-2019 |
Raphael Isemann <teemperor@gmail.com> |
[lldb][NFC] NFC cleanup for the completion code
llvm-svn: 369632
|
#
36162014 |
| 22-Aug-2019 |
Raphael Isemann <teemperor@gmail.com> |
[lldb][NFC] Remove dead code that is supposed to handle invalid command options
Summary: We currently have a bunch of code that is supposed to handle invalid command options, but all this code is un
[lldb][NFC] Remove dead code that is supposed to handle invalid command options
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
show more ...
|
#
ae34ed2c |
| 22-Aug-2019 |
Raphael Isemann <teemperor@gmail.com> |
[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 inte
[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
show more ...
|