summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectReproducer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [lldb][NFC] Remove unnecessary includes in source/CommandsRaphael Isemann2019-12-161-1/+0
| | | | | | | | | | | | | | 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
* Revert "Temporarily revert [lldb] e81268d - [lldb/Reproducers] Support ↵Eric Christopher2019-12-101-22/+25
| | | | | | | | | multiple GDB remotes" On multiple retry this issue won't duplicate - will revisit with author if duplication works again. This reverts commit c9e0b354e2749ce7ab553974692cb35c8651a869.
* Temporarily revert [lldb] e81268d - [lldb/Reproducers] Support multiple GDB ↵Eric Christopher2019-12-101-25/+22
| | | | | | | | | remotes This was causing a crash in opt+assert builds on linux and a follow-up message was posted. This reverts commit e81268d03e73aef4f9c7bd8ece8ad02f5b017dcf
* [lldb/Reproducers] Support multiple GDB remotesJonas Devlieghere2019-12-101-22/+25
| | | | | | | | | | | | | | | | When running the test suite with always capture on, a handful of tests are failing because they have multiple targets and therefore multiple GDB remote connections. The current reproducer infrastructure is capable of dealing with that. This patch reworks the GDB remote provider to support multiple GDB remote connections, similar to how the reproducers support shadowing multiple command interpreter inputs. The provider now keeps a list of packet recorders which deal with a single GDB remote connection. During replay we rely on the order of creation to match the number of packets to the GDB remote connection. Differential revision: https://reviews.llvm.org/D71105
* [Reproducer] Make 'reproducer xcrash' behave the same during capture & replayJonas Devlieghere2019-11-211-2/+3
| | | | | There's no point in preventing this command from running during replay. We should simulate the same crash as during capture.
* [Reproducer] Limit signals to macro define sin <csignal>Jonas Devlieghere2019-11-201-9/+0
| | | | SIGBUS is not part of the signal macros defined in the header <csignal>.
* [Reproducer] Generate LLDB reproducer on crashJonas Devlieghere2019-11-201-2/+124
| | | | | | | | | | | | | | | | | | | | This patch hooks the reproducer infrastructure with the signal handlers. When lldb crashes with reproducers capture enabled, it will now generate the reproducer and print a short message the standard out. This doesn't affect the pretty stack traces, which are still printed before. This patch also introduces a new reproducer sub-command that intentionally raises a given signal to test the reproducer signal handling. Currently the signal handler is doing too much work. Instead of copying over files into the reproducers in the signal handler, we should re-invoke ourselves with a special command line flag that looks at the VFS mapping and performs the copy. This is a NO-OP when reproducers are disabled. Differential revision: https://reviews.llvm.org/D70474
* [Reproducer] Namespace the reproducer dump options.Jonas Devlieghere2019-11-191-2/+2
| | | | Make it clear that the current reproducer options are for dumping.
* [Reproducer] Quit the debugger after generating a reproducerJonas Devlieghere2019-11-111-2/+4
| | | | | | | Currently nothing prevents you from continuing your debug session after generating the reproducer. This can cause the reproducer to end up in an inconsistent state. Most of the time this doesn't matter, but I want to prevent this from causing bugs in the future.
* [Reproducer] Improve reproducer help (NFC)Jonas Devlieghere2019-10-181-2/+12
| | | | | | Provide a little more detail for the reproducer command. llvm-svn: 375292
* [Reproducer] Support dumping the reproducer CWDJonas Devlieghere2019-10-171-2/+19
| | | | | | | Add support for dumping the current working directory with `reproducer dump -p cwd`. llvm-svn: 375061
* [Reproducer] Add LoadBuffer<> helper (NFC)Jonas Devlieghere2019-10-171-11/+4
| | | | | | | Introduce a helper method named LoadBuffer in the Loader to abstract reading a reproducer file from disk. llvm-svn: 375060
* [Reproducer] Add convenience methods IsCapturing and IsReplaying.Jonas Devlieghere2019-10-091-3/+3
| | | | | | | Add convenience methods to the Reproducer class for when you don't need access to the generator and the loader. llvm-svn: 374236
* [Reproducer] Implement dumping packets.Jonas Devlieghere2019-09-161-3/+21
| | | | | | | | | This patch completes the dump functionality by adding support for dumping a reproducer's GDB remote packets. Differential revision: https://reviews.llvm.org/D67636 llvm-svn: 372046
* [Reproducer] Add reproducer dump command.Jonas Devlieghere2019-09-131-2/+235
| | | | | | | | | | | This adds a reproducer dump commands which makes it possible to inspect a reproducer from inside LLDB. Currently it supports the Files, Commands and Version providers. I'm planning to add support for the GDB Remote provider in a follow-up patch. Differential revision: https://reviews.llvm.org/D67474 llvm-svn: 371909
* [Reproducers] Fix incorrect help messageJonas Devlieghere2019-07-301-2/+2
| | | | | | | The help message mentioned the `log` command (probably because I copied it from there originally). llvm-svn: 367338
* [Reproducers] Improve reproducer helpJonas Devlieghere2019-05-031-7/+18
| | | | | | Extend the documentation for the reproducer command. llvm-svn: 359848
* [Reproducers] Print warning when generating the reproducer.Jonas Devlieghere2019-04-021-0/+3
| | | | | | | Encourage users to look at the directory so they know what data they'd be sharing by uploading the reproducer. llvm-svn: 357507
* [Reproducer] Make 'reproducer generate' a NOOP during replay.Jonas Devlieghere2019-02-271-0/+5
| | | | | | | Instead of filtering out the 'reproducer generate' command during replay, just make the operation a NOOP. llvm-svn: 355009
* Fix some warnings in building LLDB.Zachary Turner2019-01-291-3/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D57413 llvm-svn: 352557
* 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
* [Reproducers] Change how reproducers are initialized.Jonas Devlieghere2018-12-031-111/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the way the reproducer is initialized. Rather than making changes at run time we now do everything at initialization time. To make this happen we had to introduce initializer options and their SB variant. This allows us to tell the initializer that we're running in reproducer capture/replay mode. Because of this change we also had to alter our testing strategy. We cannot reinitialize LLDB when using the dotest infrastructure. Instead we use lit and invoke two instances of the driver. Another consequence is that we can no longer enable capture or replay through commands. This was bound to go away form the beginning, but I had something in mind where you could enable/disable specific providers. However this seems like it adds very little value right now so the corresponding commands were removed. Finally this change also means you now have to control this through the driver, for which I replaced --reproducer with --capture and --replay to differentiate between the two modes. Differential revision: https://reviews.llvm.org/D55038 llvm-svn: 348152
* [Reproducers] Improve reproducer API and add unit tests.Jonas Devlieghere2018-11-271-14/+2
| | | | | | | | | | | | | | | | | | | When I landed the initial reproducer framework I knew there were some things that needed improvement. Rather than bundling it with a patch that adds more functionality I split it off into this patch. I also think the API is stable enough to add unit testing, which is included in this patch as well. Other improvements include: - Refactor how we initialize the loader and generator. - Improve naming consistency: capture and replay seems the least ambiguous. - Index providers by name and make sure there's only one of each. - Add convenience methods for creating and accessing providers. Differential revision: https://reviews.llvm.org/D54616 llvm-svn: 347716
* [reproducer] Post-commit cleanupJonas Devlieghere2018-11-151-8/+5
| | | | | | | | | After committing the initial reproducer feature I noticed a few small issues which warranted addressing here. It fixes incorrect documentation in the command object and extract some duplicated code into the debugger object. llvm-svn: 346919
* Add GDB remote packet reproducer.Jonas Devlieghere2018-11-131-0/+206
llvm-svn: 346780
OpenPOWER on IntegriCloud