summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectGUI.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
* [lldb/CMake] Rename LLDB_DISABLE_CURSES to LLDB_ENABLE_CURSESJonas Devlieghere2019-12-121-1/+1
| | | | | | This matches the naming scheme used by LLVM. Differential revision: https://reviews.llvm.org/D71377
* [lldb/Host] Use Host/Config.h entries instead of a global define.Jonas Devlieghere2019-12-101-0/+1
| | | | | | | | | | | As suggested by Pavel in a code review: > Can we replace this (and maybe python too, while at it) with a > Host/Config.h entry? A global definition means that one has to > recompile everything when these change in any way, whereas in > practice only a handful of files need this.. Differential revision: https://reviews.llvm.org/D71280
* [lldb][NFC] Move Curses interface implementation to own fileRaphael Isemann2019-12-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: The IOHandler class source file is currently around 4600 LOC. However only 200 of these lines are concerned with the actual IOHandler class and the rest are the implementations for Editline, IOHandlerConfirm and the Curses interface. All these large features also cause that the IOHandler (which is in Core) has a large set of dependencies on other parts of LLDB. This patch splits out the code for the curses interface into its own file. This way the simple IOHandler code is no longer buried in-between much larger functionalities. Next up is splitting out the other IOHandlers into their own files and then move them to more appropriate parts of LLDB. Reviewers: labath, clayborg, JDevlieghere Reviewed By: labath Subscribers: mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70946
* protect libedit and LLDB gui from receiving null FILE* streamsLawrence D'Anna2019-10-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | Summary: We now have valid files that will return NULL from GetStream(). libedit and the LLDB gui are the only places left that need FILE* streams. Both are doing curses-like user interaction that only make sense with a real terminal anyway, so there is no need to convert them off of their use of FILE*. But we should check for null streams before enabling these features. Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: JDevlieghere, labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68677 llvm-svn: 374197
* remove File::SetStream(), make new files instead.Lawrence D'Anna2019-09-271-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [CommandObject] Use GetDebugger() helper method (NFC)Jonas Devlieghere2019-04-271-1/+1
| | | | | | | | | | In r359354 a GetDebugger() method was added to the CommandObject class, so that we didn't have to go through the command interpreter to obtain the script interpreter. This patch simplifies other call sites where m_interpreter.GetDebugger() was used, and replaces them with a shorter call to the new method. llvm-svn: 359373
* [NFC] Remove ASCII lines from commentsJonas Devlieghere2019-04-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | | A lot of comments in LLDB are surrounded by an ASCII line to delimit the begging and end of the comment. Its use is not really consistent across the code base, sometimes the lines are longer, sometimes they are shorter and sometimes they are omitted. Furthermore, it looks kind of weird with the 80 column limit, where the comment actually extends past the line, but not by much. Furthermore, when /// is used for Doxygen comments, it looks particularly odd. And when // is used, it incorrectly gives the impression that it's actually a Doxygen comment. I assume these lines were added to improve distinguishing between comments and code. However, given that todays editors and IDEs do a great job at highlighting comments, I think it's worth to drop this for the sake of consistency. The alternative is fixing all the inconsistencies, which would create a lot more churn. Differential revision: https://reviews.llvm.org/D60508 llvm-svn: 358135
* 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
* Remove header grouping comments.Jonas Devlieghere2018-11-111-4/+0
| | | | | | | | This patch removes the comments grouping header includes. They were added after running IWYU over the LLDB codebase. However they add little value, are often outdates and burdensome to maintain. llvm-svn: 346626
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-39/+26
| | | | | | | | | | | | | | | | | | | | | | | *** 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
* Don't #include "lldb-python.h" from anywhere.Zachary Turner2015-05-291-2/+0
| | | | | | | | | | | | | Since interaction with the python interpreter is moving towards being more isolated, we won't be able to include this header from normal files anymore, all includes of it should be localized to the python library which will live under source/bindings/API/Python after a future patch. None of the files that were including this header actually depended on it anyway, so it was just a dead include in every single instance. llvm-svn: 238581
* Typing "gui" will crash programs that don't give LLDB a real terminal. Greg Clayton2015-01-141-4/+16
| | | | | | | | | | We now verify that the debugger's input file is a valid terminal file descriptor before allowing the "gui" command to try to run. Xcode would crash if you typed "gui" at the command line prior to this fix. <rdar://problem/18775851> llvm-svn: 226027
* Fixing the Windows build for the changes brought in from the iohandler merge.Deepak Panickal2014-01-311-0/+5
| | | | llvm-svn: 200565
* Merging the iohandler branch back into main. Greg Clayton2014-01-271-0/+56
The many many benefits include: 1 - Input/Output/Error streams are now handled as real streams not a push style input 2 - auto completion in python embedded interpreter 3 - multi-line input for "script" and "expression" commands now allow you to edit previous/next lines using up and down arrow keys and this makes multi-line input actually a viable thing to use 4 - it is now possible to use curses to drive LLDB (please try the "gui" command) We will need to deal with and fix any buildbot failures and tests and arise now that input/output and error are correctly hooked up in all cases. llvm-svn: 200263
OpenPOWER on IntegriCloud