summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectMultiword.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Factor resolution of abbreviations and aliases so that they can be tested ↵Adrian McCarthy2015-04-231-1/+1
| | | | | | directly. http://reviews.llvm.org/D9033 llvm-svn: 235633
* If you try to auto-complete "target symbols<TAB>" you get "target ↵Greg Clayton2015-02-251-15/+19
| | | | | | | | | | symbolsadd" instead of "target symbols ". Fix this by returning the fact that the "symbols" word is complete if there is nothing else to complete after the "symbols" word. <rdar://problem/19164599> llvm-svn: 230408
* Fix autocompletion for multi-word commands.Greg Clayton2013-12-101-4/+5
| | | | | | <rdar://problem/14183288> llvm-svn: 196949
* <rdar://problem/11914077>Enrico Granata2013-06-121-8/+5
| | | | | | | If you type help command <word> <word> <word> <missingSubCommand> (e.g. help script import or help type summary fake), you will get help on the deepest matched command word (i.e. script or type summary in the examples) Also, reworked the logic for commands to produce their help to make it more object-oriented llvm-svn: 183822
* <rdar://problem/13265017>Enrico Granata2013-02-211-18/+0
| | | | | | | | | | | | | | | The notion of Crossref command has long been forgotten, and there is nothing using CommandObjectCrossref in the current LLDB codebase However, this was causing a conflict with process plugins and command aliases ending up in an infinite loop under situations such as: (lldb) command alias monitor process plugin packet monitor (lldb) process att -n Calendar Process 28709 stopped Executable module set to "/Applications/Calendar.app/Contents/MacOS/Calendar". Architecture set to: x86_64-apple-macosx. (lldb) command alias monitor process plugin packet monitor This fixes the loop (and consequent crash) by disposing of Crossref commands and related code llvm-svn: 175831
* Fix CommandObjectMultiword to initialize all members, and beef up ↵Daniel Malea2013-02-211-1/+2
| | | | | | corresponding test case. llvm-svn: 175798
* <rdar://problem/13069948>Greg Clayton2013-01-251-3/+3
| | | | | | | | | | | | Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary. So I defined a new "lldb::offset_t" which should be used for all file offsets. After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed. Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections. llvm-svn: 173463
* Fix Linux build warnings due to redefinition of macros:Daniel Malea2012-12-051-0/+2
| | | | | | | | | - add new header lldb-python.h to be included before other system headers - short term fix (eventually python dependencies must be cleaned up) Patch by Matt Kopec! llvm-svn: 169341
* <rdar://problem/12491387>Greg Clayton2012-10-131-0/+229
| | | | | | | | | | | I added the ability for a process plug-in to implement custom commands. All the lldb_private::Process plug-in has to do is override: virtual CommandObject * GetPluginCommandObject(); This object returned should be a multi-word command that vends LLDB commands. There is a sample implementation in ProcessGDBRemote that is hollowed out. It is intended to be used for sending a custom packet, though the body of the command execute function has yet to be implemented! llvm-svn: 165861
* Make raw & parsed commands subclasses of CommandObject rather than having ↵Jim Ingham2012-06-081-6/+3
| | | | | | | | | | | | | | | | the raw version implement an Execute which was never going to get run and another ExecuteRawCommandString. Took the knowledge of how to prepare raw & parsed commands out of CommandInterpreter and put it in CommandObject where it belongs. Also took all the cases where there were the subcommands of Multiword commands declared in the .h file for the overall command and moved them into the .cpp file. Made the CommandObject flags work for raw as well as parsed commands. Made "expr" use the flags so that it requires you to be paused to run "expr". llvm-svn: 158235
* - Changed all the places where CommandObjectReturn was exporting a ↵Jim Ingham2011-02-191-1/+1
| | | | | | | | | | | | | | | | StreamString to just exporting a Stream, and then added GetOutputData & GetErrorData to get the accumulated data. - Added a StreamTee that will tee output to two provided lldb::StreamSP's. - Made the CommandObjectReturn use this so you can Tee the results immediately to the debuggers output file, as well as saving up the results to return when the command is done executing. - HandleCommands now uses this so that if you have a set of commands that continue the target you will see the commands come out as they are processed. - The Driver now uses this to output the command results as you go, which makes the interface more reactive seeming. llvm-svn: 126015
* Make CommandObjectMultiword::GetSubcommandSP() more robust by appending theJohnny Chen2010-12-011-1/+5
| | | | | | exactly-matched sub_cmd to the passed in 'matches' string list. llvm-svn: 120516
* Add infrastructure for standardizing arguments for commands andCaroline Tice2010-10-011-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | command options; makes it easier to ensure that the same type of argument will have the same name everywhere, hooks up help for command arguments, so that users can ask for help when they are confused about what an argument should be; puts in the beginnings of the ability to do tab-completion for certain types of arguments, allows automatic syntax help generation for commands with arguments, and adds command arguments into command options help correctly. Currently only the breakpoint-id and breakpoint-id-range arguments, in the breakpoint commands, have been hooked up to use the new mechanism. The next steps will be to fix the command options arguments to use this mechanism, and to fix the rest of the regular command arguments to use this mechanism. Most of the help text is currently missing or dummy text; this will need to be filled in, and the existing argument help text will need to be cleaned up a bit (it was thrown in quickly, mostly for testing purposes). Help command now works for all argument types, although the help may not be very helpful yet. Those commands that take "raw" command strings now indicate it in their help text. llvm-svn: 115318
* Fixed the way set/show variables were being accessed to being natively Greg Clayton2010-09-181-19/+16
| | | | | | | | | | | | | | | | | | accessed by the objects that own the settings. The previous approach wasn't very usable and made for a lot of unnecessary code just to access variables that were already owned by the objects. While I fixed those things, I saw that CommandObject objects should really have a reference to their command interpreter so they can access the terminal with if they want to output usaage. Fixed up all CommandObjects to take an interpreter and cleaned up the API to not need the interpreter to be passed in. Fixed the disassemble command to output the usage if no options are passed down and arguments are passed (all disassebmle variants take options, there are no "args only"). llvm-svn: 114252
* Changed the StackID to store its start PC address as a load address instead of Greg Clayton2010-08-261-4/+3
| | | | | | | | a section offset address. Fixed up some very inefficient STL code. llvm-svn: 112230
* Fixing a crashing bug in multiword commands from William Lynch.Greg Clayton2010-07-201-3/+2
| | | | llvm-svn: 108958
* Fix GetRepeatCommand so it works with multi-word commands.Jim Ingham2010-07-071-0/+13
| | | | | | | | Move the "source", "alias", and "unalias" commands to "commands *". Move "source-file" to "source list". Added a "source info" command but it isn't implemented yet. llvm-svn: 107751
* Add a source file completer to the CommandCompleters.Jim Ingham2010-06-301-2/+9
| | | | | | | | Add a way for the completers to say whether the completed argument should have a space inserted after is or not. Added the file name completer to the "file" command. llvm-svn: 107247
* Very large changes that were needed in order to allow multiple connectionsGreg Clayton2010-06-231-21/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to the debugger from GUI windows. Previously there was one global debugger instance that could be accessed that had its own command interpreter and current state (current target/process/thread/frame). When a GUI debugger was attached, if it opened more than one window that each had a console window, there were issues where the last one to setup the global debugger object won and got control of the debugger. To avoid this we now create instances of the lldb_private::Debugger that each has its own state: - target list for targets the debugger instance owns - current process/thread/frame - its own command interpreter - its own input, output and error file handles to avoid conflicts - its own input reader stack So now clients should call: SBDebugger::Initialize(); // (static function) SBDebugger debugger (SBDebugger::Create()); // Use which ever file handles you wish debugger.SetErrorFileHandle (stderr, false); debugger.SetOutputFileHandle (stdout, false); debugger.SetInputFileHandle (stdin, true); // main loop SBDebugger::Terminate(); // (static function) SBDebugger::Initialize() and SBDebugger::Terminate() are ref counted to ensure nothing gets destroyed too early when multiple clients might be attached. Cleaned up the command interpreter and the CommandObject and all subclasses to take more appropriate arguments. llvm-svn: 106615
* Move Args.{cpp,h} and Options.{cpp,h} to Interpreter where they really belong.Jim Ingham2010-06-151-1/+1
| | | | llvm-svn: 106034
* Moved files around for linux build. Fixed up Xcode project toGreg Clayton2010-06-121-0/+263
refer to the new locations. llvm-svn: 105885
OpenPOWER on IntegriCloud