- Oct 01, 2010
-
-
Caroline Tice authored
Add infrastructure for standardizing arguments for commands and 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
-
- Sep 27, 2010
-
-
Caroline Tice authored
generated Python function, and passed the stoppoint context frame and bp_loc as parameters. llvm-svn: 114894
-
Caroline Tice authored
an auto-generated Python function, and pass the stoppoint context frame and breakpoint location as parameters to the function (named 'frame' and 'bp_loc'), to be used inside the breakpoint command Python code, if desired. llvm-svn: 114849
-
- Sep 22, 2010
-
-
Caroline Tice authored
Update help text for breakpoint command one-liners. Fix minor bug in 'commands alias'; alias commands can now handle command options and arguments in the same alias. Also fixes problem that disallowed "process launch --" as an alias. Fix typo in comment in Python script interpreter. llvm-svn: 114499
-
- Sep 21, 2010
-
-
Caroline Tice authored
Add a warning if no command was attached to the breakpoint. Update the help slightly. llvm-svn: 114467
-
- Sep 20, 2010
-
-
Caroline Tice authored
command options detailed help section (since it's sorted by short option). llvm-svn: 114364
-
Caroline Tice authored
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
-
- Sep 18, 2010
-
-
Greg Clayton authored
- All single character options will now be printed together - Changed all options that contains underscores to contain '-' instead - Made the help come out a little flatter by showing the long and short option on the same line. - Modified the short character for "--ignore-count" options to "-i" llvm-svn: 114265
-
Greg Clayton authored
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
-
- Sep 16, 2010
-
-
Greg Clayton authored
"b" is now aliased to "regexp-break" "p" is now aliased to "frame variable" "print" is now aliased to "frame variable" llvm-svn: 114092
-
- Sep 15, 2010
-
-
Caroline Tice authored
Fix Python script interpreter to not fail when the Debugger does not have input/output file handles. llvm-svn: 113880
-
- Sep 13, 2010
-
-
Caroline Tice authored
llvm-svn: 113738
-
- Sep 12, 2010
-
-
Caroline Tice authored
missing arguments for some of the command options. llvm-svn: 113714
-
- Sep 11, 2010
-
-
Johnny Chen authored
llvm-svn: 113673
-
- Sep 10, 2010
-
-
Johnny Chen authored
command for a breakpoint, for example: (lldb) breakpoint command add -p 1 "conditional_break.stop_if_called_from_a()" The ScriptInterpreter interface has an extra method: /// Set a one-liner as the callback for the breakpoint command. virtual void SetBreakpointCommandCallback (CommandInterpreter &interpreter, BreakpointOptions *bp_options, const char *oneliner); to accomplish the above. Also added a test case to demonstrate lldb's use of breakpoint callback command to stop at function c() only when its immediate caller is function a(). The following session shows the user entering the following commands: 1) command source .lldb (set up executable, breakpoint, and breakpoint command) 2) run (the callback mechanism will skip two breakpoints where c()'s immeidate caller is not a()) 3) bt (to see that indeed c()'s immediate caller is a()) 4) c (to continue and finish the program) test/conditional_break $ ../../build/Debug/lldb (lldb) command source .lldb Executing commands in '.lldb'. (lldb) file a.out Current executable set to 'a.out' (x86_64). (lldb) breakpoint set -n c Breakpoint created: 1: name = 'c', locations = 1 (lldb) script import sys, os (lldb) script sys.path.append(os.path.join(os.getcwd(), os.pardir)) (lldb) script import conditional_break (lldb) breakpoint command add -p 1 "conditional_break.stop_if_called_from_a()" (lldb) run run Launching '/Volumes/data/lldb/svn/trunk/test/conditional_break/a.out' (x86_64) (lldb) Checking call frames... Stack trace for thread id=0x2e03 name=None queue=com.apple.main-thread: frame #0: a.out`c at main.c:39 frame #1: a.out`b at main.c:34 frame #2: a.out`a at main.c:25 frame #3: a.out`main at main.c:44 frame #4: a.out`start c called from b Continuing... Checking call frames... Stack trace for thread id=0x2e03 name=None queue=com.apple.main-thread: frame #0: a.out`c at main.c:39 frame #1: a.out`b at main.c:34 frame #2: a.out`main at main.c:47 frame #3: a.out`start c called from b Continuing... Checking call frames... Stack trace for thread id=0x2e03 name=None queue=com.apple.main-thread: frame #0: a.out`c at main.c:39 frame #1: a.out`a at main.c:27 frame #2: a.out`main at main.c:50 frame #3: a.out`start c called from a Stopped at c() with immediate caller as a(). a(1) returns 4 b(2) returns 5 Process 20420 Stopped * thread #1: tid = 0x2e03, 0x0000000100000de8 a.out`c + 7 at main.c:39, stop reason = breakpoint 1.1, queue = com.apple.main-thread 36 37 int c(int val) 38 { 39 -> return val + 3; 40 } 41 42 int main (int argc, char const *argv[]) (lldb) bt bt thread #1: tid = 0x2e03, stop reason = breakpoint 1.1, queue = com.apple.main-thread frame #0: 0x0000000100000de8 a.out`c + 7 at main.c:39 frame #1: 0x0000000100000dbc a.out`a + 44 at main.c:27 frame #2: 0x0000000100000e4b a.out`main + 91 at main.c:50 frame #3: 0x0000000100000d88 a.out`start + 52 (lldb) c c Resuming process 20420 Process 20420 Exited a(3) returns 6 (lldb) llvm-svn: 113596
-
Johnny Chen authored
set the debugger_unique_id with the lldb prefix. llvm-svn: 113589
-
- Sep 09, 2010
-
-
Caroline Tice authored
are always printed immediately after the command, before optional options; also so that in the detailed descriptions of each command option, the options and their help are output in alphabetical order (sorted by the short option) rather in whatever order they happened to be in the table. llvm-svn: 113496
-
Caroline Tice authored
Make get/set variable at the debugger level always set the particular debugger's instance variables rather than the default variables. llvm-svn: 113474
-
- Sep 08, 2010
-
-
Caroline Tice authored
Small help text fixes, to make it more consistent and accurate. Temporarily remove -l option from 'expr' command (at Sean's request). llvm-svn: 113298
-
- Sep 04, 2010
-
-
Caroline Tice authored
This is a very large commit that completely re-does the way lldb 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
-
- Sep 03, 2010
-
-
Jim Ingham authored
Also move "Carbon.framework" to the right place. llvm-svn: 112993
-
- Sep 02, 2010
-
-
Jim Ingham authored
llvm-svn: 112782
-
- Aug 31, 2010
-
-
Greg Clayton authored
is disabled by default, and can be enabled using: (lldb) set disable-aslr 0 llvm-svn: 112616
-
- Aug 27, 2010
-
-
Sean Callanan authored
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
-
Greg Clayton authored
a section offset address. Fixed up some very inefficient STL code. llvm-svn: 112230
-
- Aug 26, 2010
-
-
Jim Ingham authored
Change "Current" as in GetCurrentThread, GetCurrentStackFrame, etc, to "Selected" i.e. GetSelectedThread. Selected makes more sense, since these are set by some user action (a selection). I didn't change "CurrentProcess" since this is always controlled by the target, and a given target can only have one process, so it really can't be selected. llvm-svn: 112221
-
- Aug 10, 2010
-
-
Johnny Chen authored
interpreter right before calling Py_Finalize(). This also fixed the crash as reported in rdar://problem/8252903. llvm-svn: 110731
-
- Aug 09, 2010
-
-
Sean Callanan authored
instead of "alias." Also fixed a bunch of indentation in the help for "commands alias." llvm-svn: 110585
-
- Jul 31, 2010
-
-
Johnny Chen authored
Change the prototype of ScriptInterpreter::ExecuteOneLine() to return bool instead of void and take one additional parameter as CommandReturnObject *. Propagate the status of one-liner execution back appropriately. llvm-svn: 109899
-
- Jul 28, 2010
-
-
Johnny Chen authored
llvm-svn: 109673
-
- Jul 21, 2010
-
-
Greg Clayton authored
part of C++'98. Most of these were "std::vector<T>::data()" and "std::string::data()". llvm-svn: 108957
-
- Jul 20, 2010
-
-
Benjamin Kramer authored
llvm-svn: 108840
-
- Jul 14, 2010
-
-
Greg Clayton authored
virtual functions and caught some things and did some general code cleanup. llvm-svn: 108299
-
- Jul 13, 2010
-
-
Greg Clayton authored
Makefile patch to explicitly use PROJ_SRC_DIR when required. It fixes build when obj dir is not source dir. I also fixed a build warning in ClangResultSynthesizer.cpp. llvm-svn: 108210
-
- Jul 10, 2010
-
-
Eli Friedman authored
llvm-svn: 108030
-
- Jul 09, 2010
-
-
Greg Clayton authored
enabled LLVM make style building and made this compile LLDB on Mac OS X. We can now iterate on this to make the build work on both linux and macosx. llvm-svn: 108009
-
- Jul 07, 2010
-
-
Greg Clayton authored
llvm-svn: 107801
-
Jim Ingham authored
llvm-svn: 107753
-
Jim Ingham authored
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
-
Jim Ingham authored
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
-