- Jul 02, 2011
-
-
Enrico Granata authored
- type names can now be regular expressions (exact matching is done first, and is faster) - integral (and floating) types can be printed as bitfields, i.e. ${var[low-high]} will extract bits low thru high of the value and print them - array subscripts are supported, both for arrays and for pointers. the syntax is ${*var[low-high]}, or ${*var[]} to print the whole array (the latter only works for statically sized arrays) - summary is now printed by default when a summary string references a variable. if that variable's type has no summary, value is printed instead. to force value, you can use %V as a format specifier - basic support for ObjectiveC: - ObjectiveC inheritance chains are now walked through - %@ can be specified as a summary format, to print the ObjectiveC runtime description for an object - some bug fixes llvm-svn: 134293
-
- Jun 24, 2011
-
-
Peter Collingbourne authored
llvm-svn: 133781
-
- Jun 23, 2011
-
-
Greg Clayton authored
the FormatManager class. Modified the format arguments in any commands to be able to use a single character format, or a full format name, or a partial format name if no full format names match. Modified any code that was displaying formats to use the new FormatManager calls so that our help text and errors never get out of date. Modified the display of the "type format list" command to be a bit more human readable by showing the format as a format string rather than the single character format char. llvm-svn: 133765
-
Peter Collingbourne authored
llvm-svn: 133755
-
Charles Davis authored
llvm-svn: 133744
-
Greg Clayton authored
This commit adds a new top level command named "type". Currently this command implements three commands: type format add <format> <typename1> [<typename2> ...] type format delete <typename1> [<typename2> ...] type format list [<typename1> [<typename2>] ...] This allows you to specify the default format that will be used to display types when you use "frame variable" or "expression", or the SBValue classes. Examples: // Format uint*_t as hex type format add x uint16_t uint32_t uint64_t // Format intptr_t as a pointer type format add p intptr_t The format characters are the same as "printf" for the most part with many additions. These format character specifiers are also used in many other commands ("frame variable" for one). The current list of format characters include: a - char buffer b - binary B - boolean c - char C - printable char d - signed decimal e - float f - float g - float i - signed decimal I - complex integer o - octal O - OSType p - pointer s - c-string u - unsigned decimal x - hex X - complex float y - bytes Y - bytes with ASCII llvm-svn: 133728
-
Charles Davis authored
- Respect DESTDIR. - Use the realpath function on the path before prepending DESTDIR. - Don't depend on liblldb.{so,dylib} being installed already. - Don't put the DESTDIR into the _lldb.so symlink. Patch by Elias Pipping! llvm-svn: 133689
-
Peter Collingbourne authored
SWIG on Darwin does not support -MT, and it only means that we lose the .d target, which doesn't seem to be used or needed. Pointed out by Charles Davis. llvm-svn: 133660
-
- Jun 20, 2011
-
-
Peter Collingbourne authored
llvm-svn: 133463
-
Peter Collingbourne authored
This is required to run the test suite without installing. llvm-svn: 133459
-
- Jun 18, 2011
-
-
Greg Clayton authored
This us useful because sometomes you have to show a single character as: 'a' (using eFormatChar) and other times you might have an array of single charcters for display as: 'a' 'b' 'c', and other times you might want to show the contents of buffer of characters that can contain non printable chars: "\0\x22\n123". This also fixes an issue that currently happens when you have a single character C string (const char *a = "a"; or char b[1] = { 'b' };) that was being output as "'a'" incorrectly due to the way the eFormatChar format output worked. llvm-svn: 133316
-
- Jun 17, 2011
-
-
Greg Clayton authored
libraries and headers exist. This can be specified using the platform select function: platform select --sysroot /Volumes/remote-root remote-macosx Each platform subclass is free to interpret the sysroot as needed. Expose the new SDK root directory through the SBDebugger class. Fixed an issue with the GDB remote protocol where unimplemented packets were not being handled correctly. llvm-svn: 133231
-
- Jun 16, 2011
-
-
Caroline Tice authored
Add 'batch_mode' to CommandInterpreter. Modify InputReaders to not write output (prompts, instructions,etc.) if the CommandInterpreter is in batch_mode. Also, finish updating InputReaders to write to the asynchronous stream, rather than using the Debugger's output file directly. llvm-svn: 133162
-
- Jun 14, 2011
-
-
Caroline Tice authored
Add error message; clean up comment. llvm-svn: 132997
-
- Jun 13, 2011
-
-
Caroline Tice authored
Cleaning up the Python script interpreter: Use the embedded_interpreter.py file rather than keeping it all in a string and compiling the string (easier to maintain, easier to read, remove redundancy). llvm-svn: 132935
-
- Jun 03, 2011
-
-
Caroline Tice authored
Use Py_InitializeEx(0) instead of Py_Initialize, to prevent Python from installing its own signal handlers. llvm-svn: 132492
-
- Jun 01, 2011
-
-
Charles Davis authored
- The Swig post-processing scripts are now run. - edit-swig-python-wrapper-file.py has been modified so it can be run from the Makefile. - The issue that prompted me to pass -classic to swig is fixed by this, so -classic isn't passed anymore. Python shouldn't complain anymore about a missing method 'FindDebuggerByID' on the SBDebugger object whenever lldb is run. llvm-svn: 132383
-
- May 20, 2011
-
-
Charles Davis authored
installed liblldb instead of the built one. Now Python support won't break if you clean your build directories. llvm-svn: 131741
-
Charles Davis authored
llvm-svn: 131720
-
Charles Davis authored
- Make the generation of LLDBWrapPython.cpp respect the VERBOSE setting. - Use -classic mode when generating. LLDPWrapPython.cpp #errors out if -classic wasn't set when it was generated with recent Swig. - Install the Python modules. Now we shouldn't get loads of Python errors trying to run LLDB. Last of my build fixes. The LLDB that I built works, except that I can't debug anything with it until debugserver gets built. llvm-svn: 131719
-
- May 13, 2011
-
-
Johnny Chen authored
reflects this change. Marco Minutoli <mminutoli@gmail.com> llvm-svn: 131306
-
- May 11, 2011
-
-
Caroline Tice authored
Add ability to recognize/handle quotes around commands (e.g. '"target" create' works as well as 'target create'). llvm-svn: 131185
-
- May 06, 2011
-
-
Caroline Tice authored
Replace calls to HandleCommand in lldb core with more appropriate direct function calls. As part of this, collect code that processes arguments & options for aliases into a single function. llvm-svn: 131020
-
- May 04, 2011
-
-
Jim Ingham authored
Change the boolean "use_dynamic" over to a tri-state, no-dynamic, dynamic-w/o running target, and dynamic with running target. llvm-svn: 130832
-
Greg Clayton authored
Removed the "image" command and moved it to "target modules". Added an alias for "image" to "target modules". Added some new target commands to be able to add and load modules to a target: (lldb) target modules add <path> (lldb) target modules load [--file <path>] [--slide <offset>] [<sect-name> <sect-load-addr> ...] So you can load individual sections without running a target: (lldb) target modules load --file /usr/lib/libSystem.B.dylib __TEXT 0x7fccc80000 __DATA 0x1234000000 Or you can rigidly slide an entire shared library: (lldb) target modules load --file /usr/lib/libSystem.B.dylib --slid 0x7fccc80000 This should improve bare board debugging when symbol files need to be slid around manually. llvm-svn: 130796
-
- May 03, 2011
-
-
Caroline Tice authored
Pre-load the Python script interpreter with the following convenience variables (from the ExecutionContext) each time it is entered: lldb.debugger, lldb.target, lldb.process, lldb.thread, lldb.frame. If a frame (or thread, process, etc) does not currently exist, the variable contains the Python value 'None'. llvm-svn: 130792
-
- May 02, 2011
-
-
Caroline Tice authored
This patch captures and serializes all output being written by the command line driver, including the lldb prompt being output by editline, the asynchronous process output & error messages, and asynchronous messages written by target stop-hooks. As part of this it introduces a new Stream class, StreamAsynchronousIO. A StreamAsynchronousIO object is created with a broadcaster, who will eventually broadcast the stream's data for a listener to handle, and an event type indicating what type of event the broadcaster will broadcast. When the Write method is called on a StreamAsynchronousIO object, the data is appended to an internal string. When the Flush method is called on a StreamAsynchronousIO object, it broadcasts it's data string and clears the string. Anything in lldb-core that needs to generate asynchronous output for the end-user should use the StreamAsynchronousIO objects. I have also added a new notification type for InputReaders, to let them know that a asynchronous output has been written. This is to allow the input readers to, for example, refresh their prompts and lines, if desired. I added the case statements to all the input readers to catch this notification, but I haven't added any code for handling them yet (except to the IOChannel input reader). llvm-svn: 130721
-
- Apr 28, 2011
-
-
Greg Clayton authored
depth control, pointer depth, and more) when dumping memory and viewing as a type. llvm-svn: 130436
-
Greg Clayton authored
new OptionGroup subclasses for: - output file for use with options: long opts: --outfile <path> --append--output short opts: -o <path> -A - format for use with options: long opts: --format <format> - variable object display controls for depth, pointer depth, wether to show types, show summary, show location, flat output, use objc "po" style summary. Modified ValueObjectMemory to be able to be created either with a TypeSP or a ClangASTType. Switched "memory read" over to use OptionGroup subclasses: one for the outfile options, one for the command specific options, and one for the format. llvm-svn: 130334
-
- Apr 23, 2011
-
-
Greg Clayton authored
inline contexts when the deepest most block is not inlined. Added source path remappings to the lldb_private::Target class that allow it to remap paths found in debug info so we can find source files that are elsewhere on the current system. Fixed disassembly by function name to disassemble inline functions that are inside other functions much better and to show enough context before the disassembly output so you can tell where things came from. Added the ability to get more than one address range from a SymbolContext class for the case where a block or function has discontiguous address ranges. llvm-svn: 130044
-
- Apr 22, 2011
-
-
Greg Clayton authored
llvm-svn: 130013
-
Caroline Tice authored
Change code for reading emulation data files to read the new file format. (The newly formatted files will go in as a separate commit in a few minutes). llvm-svn: 129981
-
Greg Clayton authored
set by default when dumping registers. If you want to see all of the register sets you can use the "--all" option: (lldb) register read --all If you want to just see some register sets, you can currently specify them by index: (lldb) register read --set 0 --set 2 We need to get shorter register set names soon so we can specify the register sets by name without having to type too much. I will make this change soon. You can also have any integer encoded registers resolve the address values back to any code or data from the object files using the "--lookup" option. Below is sample output when stopped in the libc function "puts" with some const strings in registers: Process 8973 stopped * thread #1: tid = 0x2c03, 0x00007fff828fa30f libSystem.B.dylib`puts + 1, stop reason = instruction step into frame #0: 0x00007fff828fa30f libSystem.B.dylib`puts + 1 (lldb) register read --lookup General Purpose Registers: rax = 0x0000000100000e98 "----------------------------------------------------------------------" rbx = 0x0000000000000000 rcx = 0x0000000000000001 rdx = 0x0000000000000000 rdi = 0x0000000100000e98 "----------------------------------------------------------------------" rsi = 0x0000000100800000 rbp = 0x00007fff5fbff710 rsp = 0x00007fff5fbff280 r8 = 0x0000000000000040 r9 = 0x0000000000000000 r10 = 0x0000000000000000 r11 = 0x0000000000000246 r12 = 0x0000000000000000 r13 = 0x0000000000000000 r14 = 0x0000000000000000 r15 = 0x0000000000000000 rip = 0x00007fff828fa30f libSystem.B.dylib`puts + 1 rflags = 0x0000000000000246 cs = 0x0000000000000027 fs = 0x0000000000000000 gs = 0x0000000000000000 As we can see, we see two constant strings and the PC (register "rip") is showing the code it resolves to. I fixed the register "--format" option to work as expected. Added a setting to disable skipping the function prologue when setting breakpoints as a target settings variable: (lldb) settings set target.skip-prologue false Updated the user settings controller boolean value handler funciton to be able to take the default value so it can correctly respond to the eVarSetOperationClear operation. Did some usability work on the OptionValue classes. Fixed the "image lookup" command to correctly respond to the "--verbose" option and display the detailed symbol context information when looking up line table entries and functions by name. This previously was only working for address lookups. llvm-svn: 129977
-
- Apr 21, 2011
-
-
Greg Clayton authored
OptionValueCollection class that can be subclassed to provide access to internal settings that are stored as ObjectValue subclasses. llvm-svn: 129926
-
Greg Clayton authored
so we can instantiate them, and also moved the code that can get the specific subclass for a OptionValue into the OptionValue class. llvm-svn: 129920
-
Johnny Chen authored
llvm-svn: 129897
-
- Apr 20, 2011
-
-
Greg Clayton authored
To do this currently, it must be done in multi-line mode: (lldb) commands regex --help "Help text for command" --syntax "syntax for command" <cmd-name> Any example that would use "f" for "finish" when there are no arguments, and "f <num>" to do a "frame select <num>" would be: (lldb) commands regex f Enter multiple regular expressions in the form s/find/replace/ then terminate with an empty line: s/^$/finish/ s/([0-9]+)/frame select %1/ (lldb) f 11 frame select 12 ... (lldb) f finish ... Also added the string version of the OptionValue as OptionValueString. llvm-svn: 129855
-
Greg Clayton authored
around the debugger. The class isn't hooked into anything yet, but it will be soon. llvm-svn: 129843
-
- Apr 18, 2011
-
-
Greg Clayton authored
threads, and stack frame down in the lldb_private::Process, lldb_private::Thread, lldb_private::StackFrameList and the lldb_private::StackFrame classes. We had some command line commands that had duplicate versions of the process status output ("thread list" and "process status" for example). Removed the "file" command and placed it where it should have been: "target create". Made an alias for "file" to "target create" so we stay compatible with GDB commands. We can now have multple usable targets in lldb at the same time. This is nice for comparing two runs of a program or debugging more than one binary at the same time. The new command is "target select <target-idx>" and also to see a list of the current targets you can use the new "target list" command. The flow in a debug session can be: (lldb) target create /path/to/exe/a.out (lldb) breakpoint set --name main (lldb) run ... hit breakpoint (lldb) target create /bin/ls (lldb) run /tmp Process 36001 exited with status = 0 (0x00000000) (lldb) target list Current targets: target #0: /tmp/args/a.out ( arch=x86_64-apple-darwin, platform=localhost, pid=35999, state=stopped ) * target #1: /bin/ls ( arch=x86_64-apple-darwin, platform=localhost, pid=36001, state=exited ) (lldb) target select 0 Current targets: * target #0: /tmp/args/a.out ( arch=x86_64-apple-darwin, platform=localhost, pid=35999, state=stopped ) target #1: /bin/ls ( arch=x86_64-apple-darwin, platform=localhost, pid=36001, state=exited ) (lldb) bt * thread #1: tid = 0x2d03, 0x0000000100000b9a a.out`main + 42 at main.c:16, stop reason = breakpoint 1.1 frame #0: 0x0000000100000b9a a.out`main + 42 at main.c:16 frame #1: 0x0000000100000b64 a.out`start + 52 Above we created a target for "a.out" and ran and hit a breakpoint at "main". Then we created a new target for /bin/ls and ran it. Then we listed the targest and selected our original "a.out" program, so we showed two concurent debug sessions going on at the same time. llvm-svn: 129695
-
- Apr 14, 2011
-
-
Greg Clayton authored
Modified the OptionGroupOptions to be able to specify only some of the options that should be appended by using the usage_mask in the group defintions and also provided a way to remap them to a new usage mask after the copy. This allows options to be re-used and also targetted for specific option groups. Modfied the CommandArgumentType to have a new eArgTypePlatform enumeration. Taught the option parser to be able to automatically use the appropriate auto completion for a given options if nothing is explicitly specified in the option definition. So you don't have to specify it in the option definition tables. Renamed the default host platform name to "host", and the default platform hostname to be "localhost". Modified the "file" and "platform select" commands to make sure all options and args are good prior to creating a new platform. Also defer the computation of the architecture in the file command until all options are parsed and the platform has either not been specified or reset to a new value to avoid computing the arch more than once. Switch the PluginManager code over to using llvm::StringRef for string comparisons and got rid of all the AccessorXXX functions in lieu of the newer mutex + collection singleton accessors. llvm-svn: 129483
-