summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/CommandInterpreter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add UserSettings to Target class, making Target settingsCaroline Tice2010-09-201-20/+3
| | | | | | | | | | | | | | | | | | the parent of Process settings; add 'default-arch' as a class-wide setting for Target. Replace lldb::GetDefaultArchitecture with Target::GetDefaultArchitecture & Target::SetDefaultArchitecture. Add 'use-external-editor' as user setting to Debugger class & update code appropriately. Add Error parameter to methods that get user settings, for easier reporting of bad requests. Fix various other minor related bugs. Fix test cases to work with new changes. llvm-svn: 114352
* Fixed the way set/show variables were being accessed to being natively Greg Clayton2010-09-181-25/+18
| | | | | | | | | | | | | | | | | | 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
* Added default more aliases to ease gdb converts:Greg Clayton2010-09-161-1/+3
| | | | | | | | "b" is now aliased to "regexp-break" "p" is now aliased to "frame variable" "print" is now aliased to "frame variable" llvm-svn: 114092
* Clean up help text.Caroline Tice2010-09-131-1/+1
| | | | llvm-svn: 113738
* Make all debugger-level user settable variables into instance variables.Caroline Tice2010-09-091-7/+12
| | | | | | | Make get/set variable at the debugger level always set the particular debugger's instance variables rather than the default variables. llvm-svn: 113474
* Small help text fixes, to make it more consistent and accurate.Caroline Tice2010-09-071-1/+1
| | | | | | Temporarily remove -l option from 'expr' command (at Sean's request). llvm-svn: 113298
* This is a very large commit that completely re-does the way lldbCaroline Tice2010-09-041-194/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | handles user settable internal variables (the equivalent of set/show variables in gdb). In addition to the basic infrastructure (most of which is defined in UserSettingsController.{h,cpp}, there are examples of two classes that have been set up to contain user settable variables (the Debugger and Process classes). The 'settings' command has been modified to be a command-subcommand structure, and the 'set', 'show' and 'append' commands have been moved into this sub-commabnd structure. The old StateVariable class has been completely replaced by this, and the state variable dictionary has been removed from the Command Interpreter. Places that formerly accessed the state variable mechanism have been modified to access the variables in this new structure instead (checking the term-width; getting/checking the prompt; etc.) Variables are attached to classes; there are two basic "flavors" of variables that can be set: "global" variables (static/class-wide), and "instance" variables (one per instance of the class). The whole thing has been set up so that any global or instance variable can be set at any time (e.g. on start up, in your .lldbinit file), whether or not any instances actually exist (there's a whole pending and default values mechanism to help deal with that). llvm-svn: 113041
* Delete the vestigal "select", "info" and "delete" commands.Jim Ingham2010-09-031-7/+0
| | | | | | Also move "Carbon.framework" to the right place. llvm-svn: 112993
* Move "variable list" to "frame variable"Jim Ingham2010-09-021-2/+0
| | | | llvm-svn: 112782
* Added the ability to disable ASLR (Address Space Layout Randomization). ASLRGreg Clayton2010-08-311-0/+13
| | | | | | | | is disabled by default, and can be enabled using: (lldb) set disable-aslr 0 llvm-svn: 112616
* This is a major refactoring of the expression parser.Sean Callanan2010-08-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The goal is to separate the parser's data from the data belonging to the parser's clients. This allows clients to use the parser to obtain (for example) a JIT compiled function or some DWARF code, and then discard the parser state. Previously, parser state was held in ClangExpression and used liberally by ClangFunction, which inherited from ClangExpression. The main effects of this refactoring are: - reducing ClangExpression to an abstract class that declares methods that any client must expose to the expression parser, - moving the code specific to implementing the "expr" command from ClangExpression and CommandObjectExpression into ClangUserExpression, a new class, - moving the common parser interaction code from ClangExpression into ClangExpressionParser, a new class, and - making ClangFunction rely only on ClangExpressionParser and not depend on the internal implementation of ClangExpression. Side effects include: - the compiler interaction code has been factored out of ClangFunction and is now in an AST pass (ASTStructExtractor), - the header file for ClangFunction is now fully documented, - several bugs that only popped up when Clang was deallocated (which never happened, since the lifetime of the compiler was essentially infinite) are now fixed, and - the developer-only "call" command has been disabled. I have tested the expr command and the Objective-C step-into code, which use ClangUserExpression and ClangFunction, respectively, and verified that they work. Please let me know if you encounter bugs or poor documentation. llvm-svn: 112249
* Changed the StackID to store its start PC address as a load address instead of Greg Clayton2010-08-261-19/+13
| | | | | | | | a section offset address. Fixed up some very inefficient STL code. llvm-svn: 112230
* Updated help text to refer to "commands alias"Sean Callanan2010-08-091-1/+1
| | | | | | | instead of "alias." Also fixed a bunch of indentation in the help for "commands alias." llvm-svn: 110585
* The unix "source" command maps to "command source" in lldb. :-)Johnny Chen2010-07-281-1/+1
| | | | llvm-svn: 109673
* Remove includes for removed files...Jim Ingham2010-07-071-2/+0
| | | | llvm-svn: 107753
* Fix GetRepeatCommand so it works with multi-word commands.Jim Ingham2010-07-071-27/+25
| | | | | | | | 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
* Added a "GetRepeatCommand" to the command object. The Interpreter uses thisJim Ingham2010-07-061-4/+19
| | | | | | | | instead of the last history item to provide a command for the "empty" command. Use this in the source-file command to make <RETURN> continue the listing rather than relist the first listing... llvm-svn: 107736
* Hide the logic for command resolution for commands, aliases & user commands ↵Jim Ingham2010-07-061-47/+74
| | | | | | | | | | | | behind a single interface so everybody does it the same way. Add an "exact" lookup for internal uses. Fix up a few little cases where we weren't reporting command lookup errors correctly. Added "b" as an alias for "breakpoint" so it doesn't collide with "bt". llvm-svn: 107718
* Add a source file completer to the CommandCompleters.Jim Ingham2010-06-301-3/+13
| | | | | | | | 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
* Fix a bug in handling command resolution for non-exact matches. Now we will ↵Jim Ingham2010-06-241-4/+4
| | | | | | correctly give help options when there are both aliases & real commands matching the current input string. llvm-svn: 106782
* Very large changes that were needed in order to allow multiple connectionsGreg Clayton2010-06-231-67/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Remove an include of the deleted CommandObjectStatus.h.Jim Ingham2010-06-181-1/+0
| | | | llvm-svn: 106297
* Move the "status" command to "process status" since that's where it belongs. ↵Jim Ingham2010-06-181-1/+0
| | | | | | | | Also make it print "running" if invoked when the current process is running. llvm-svn: 106265
* Move Args.{cpp,h} and Options.{cpp,h} to Interpreter where they really belong.Jim Ingham2010-06-151-1/+1
| | | | llvm-svn: 106034
* Fix include paths; please check that this works on Mac.Eli Friedman2010-06-131-34/+34
| | | | llvm-svn: 105906
* Fix include path.Eli Friedman2010-06-091-1/+1
| | | | llvm-svn: 105757
* Initial checkin of lldb code from internal Apple repo.Chris Lattner2010-06-081-0/+1300
llvm-svn: 105619
OpenPOWER on IntegriCloud