summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/NamedOptionValue.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Reimplemented the code that backed the "settings" in lldb. There were many ↵Greg Clayton2012-08-221-503/+0
| | | | | | | | | | | | | issues with the previous implementation: - no setting auto completion - very manual and error prone way of getting/setting variables - tons of code duplication - useless instance names for processes, threads Now settings can easily be defined like option values. The new settings makes use of the "OptionValue" classes so we can re-use the option value code that we use to set settings in command options. No more instances, just "does the right thing". llvm-svn: 162366
* Cleaned up many error codes. For any who is filling in error strings intoGreg Clayton2011-10-261-7/+7
| | | | | | | | | | | | | lldb_private::Error objects the rules are: - short strings that don't start with a capitol letter unless the name is a class or anything else that is always capitolized - no trailing newline character - should be one line if possible Implemented a first pass at adding "--gdb-format" support to anything that accepts format with optional size/count. llvm-svn: 142999
* Updated all commands that use a "--format" / "-f" options to use the newGreg Clayton2011-10-251-4/+1
| | | | | | | | | | | | OptionGroupFormat. Updated OptionGroupFormat to be able to also use the "--size" and "--count" options. Commands that use a OptionGroupFormat instance can choose which of the options they want by initializing OptionGroupFormat accordingly. Clients can either get only the "--format", "--format" + "--size", or "--format" + "--size" + "--count". This is in preparation for upcoming chnages where there are alternate ways (GDB format specification) to set a format. llvm-svn: 142911
* Added "target variable" command that allows introspection of globalGreg Clayton2011-07-071-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | variables prior to running your binary. Zero filled sections now get section data correctly filled with zeroes when Target::ReadMemory reads from the object file section data. Added new option groups and option values for file lists. I still need to hook up all of the options to "target variable" to allow more complete introspection by file and shlib. Added the ability for ValueObjectVariable objects to be created with only the target as the execution context. This allows them to be read from the object files through Target::ReadMemory(...). Added a "virtual Module * GetModule()" function to the ValueObject class. By default it will look to the parent variable object and return its module. The module is needed when we have global variables that have file addresses (virtual addresses that are specific to module object files) and in turn allows global variables to be displayed prior to running. Removed all of the unused proxy object support that bit rotted in lldb_private::Value. Replaced a lot of places that used "FileSpec::Compare (lhs, rhs) == 0" code with the more efficient "FileSpec::Equal (lhs, rhs)". Improved logging in GDB remote plug-in. llvm-svn: 134579
* Centralized all of the format to c-string and to format character code insideGreg Clayton2011-06-231-1/+2
| | | | | | | | | | | | | | | 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
* Added new OptionGroup classes for UInt64, UUID, File and Boolean values.Greg Clayton2011-05-031-0/+28
| | | | | | | | | | | | | | | | | | | | | 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
* Added the ability to specify dumping options (show types, show location,Greg Clayton2011-04-281-1/+4
| | | | | | | depth control, pointer depth, and more) when dumping memory and viewing as a type. llvm-svn: 130436
* Added a new OptionValue subclass for lldb::Format: OptionValueFormat. AddedGreg Clayton2011-04-271-17/+59
| | | | | | | | | | | | | | | | | | | | | 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
* Fixed the SymbolContext::DumpStopContext() to correctly indent and dumpGreg Clayton2011-04-231-12/+6
| | | | | | | | | | | | | | | | | 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
* Change code for reading emulation data files to read the new fileCaroline Tice2011-04-221-0/+15
| | | | | | | format. (The newly formatted files will go in as a separate commit in a few minutes). llvm-svn: 129981
* Did some work on the "register read" command to only show the first registerGreg Clayton2011-04-221-19/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* More iteration on the new option value stuff. We now define an Greg Clayton2011-04-211-37/+2
| | | | | | | OptionValueCollection class that can be subclassed to provide access to internal settings that are stored as ObjectValue subclasses. llvm-svn: 129926
* Made the constructors public for all OptionValue classesGreg Clayton2011-04-211-56/+138
| | | | | | | | 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
* Added the ability for users to create new regex commands.Greg Clayton2011-04-201-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Added the start of a new option value system that we can use for many thingsGreg Clayton2011-04-201-0/+264
around the debugger. The class isn't hooked into anything yet, but it will be soon. llvm-svn: 129843
OpenPOWER on IntegriCloud