History log of /external/lldb/include/lldb/Core/UserSettingsController.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
87e9d32a982a0fb76b8657a897ad5781f9a5d25e 19-Oct-2012 Greg Clayton <gclayton@apple.com> Added the infrastructure necessary for plug-ins to be able to add their own settings instead of having settings added to existing ones. In particular "target.disable-kext-loading" was added to "target" where it should actually be specific to the the dynamic loader plugin. Now the plug-in manager has the ability to create settings at the root level starting with "plugin". Each plug-in type can add new sub dictionaries, and then each plug-in can register a setting dictionary under its own short name. For example the DynamicLoaderDarwinKernel plug-in now registers a setting dictionary at:

plugin
dynamic-loader
macosx-kernel
(bool) disable-kext-loading

To settings can be set using:

(lldb) settings set plugin.dynamic-loader.macosx-kernel.disable-kext-loading true

I currently only hooked up the DynamicLoader plug-ins, but the code is very easy to duplicate when and if we need settings for other plug-ins.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166294 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/UserSettingsController.h
c6e82e4a323d7a7168b05365c53c9bc2e0d418e3 22-Aug-2012 Greg Clayton <gclayton@apple.com> Remove further outdated "settings" code and also implement a few missing things.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162376 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/UserSettingsController.h
73844aa19a7360b662e2be710fc3c969d6c86606 22-Aug-2012 Greg Clayton <gclayton@apple.com> Reimplemented the code that backed the "settings" in lldb. There were many 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".



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/UserSettingsController.h
598df88bd6fc33c6fb330bc859bdc277795501f3 14-Mar-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10434005>

Prepare LLDB to be built with C++11 by hiding all accesses to std::tr1 behind
macros that allows us to easily compile for either C++.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/UserSettingsController.h
9ce953807eb814a93b449dc243de4f7bf32c3115 14-Feb-2012 Greg Clayton <gclayton@apple.com> Full core file support has been added for mach-o core files.

Tracking modules down when you have a UUID and a path has been improved.

DynamicLoaderDarwinKernel no longer parses mach-o load commands and it
now uses the memory based modules now that we can load modules from memory.

Added a target setting named "target.exec-search-paths" which can be used
to supply a list of directories to use when trying to look for executables.
This allows one or more directories to be used when searching for modules
that may not exist in the SDK/PDK. The target automatically adds the directory
for the main executable to this list so this should help us in tracking down
shared libraries and other binaries.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150426 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/UserSettingsController.h
334d33a19fd28cf41cba74cc61cf149e7101a603 30-Jan-2012 Greg Clayton <gclayton@apple.com> SBFrame is now threadsafe using some extra tricks. One issue is that stack
frames might go away (the object itself, not the actual logical frame) when
we are single stepping due to the way we currently sometimes end up flushing
frames when stepping in/out/over. They later will come back to life
represented by another object yet they have the same StackID. Now when you get
a lldb::SBFrame object, it will track the frame it is initialized with until
the thread goes away or the StackID no longer exists in the stack for the
thread it was created on. It uses a weak_ptr to both the frame and thread and
also stores the StackID. These three items allow us to determine when the
stack frame object has gone away (the weak_ptr will be NULL) and allows us to
find the correct frame again. In our test suite we had such cases where we
were just getting lucky when something like this happened:

1 - stop at breakpoint
2 - get first frame in thread where we stopped
3 - run an expression that causes the program to JIT and run code
4 - run more expressions on the frame from step 2 which was very very luckily
still around inside a shared pointer, yet, not part of the current
thread (a new stack frame object had appeared with the same stack ID and
depth).

We now avoid all such issues and properly keep up to date, or we start
returning errors when the frame doesn't exist and always responds with
invalid answers.

Also fixed the UserSettingsController (not going to rewrite this just yet)
so that it doesn't crash on shutdown. Using weak_ptr's came in real handy to
track when the master controller has already gone away and this allowed me to
pull out the previous NotifyOwnerIsShuttingDown() patch as it is no longer
needed.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149231 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/UserSettingsController.h
d13a4dfd32e4b2a4c2b53acd1839c945a85e9b04 27-Jan-2012 Johnny Chen <johnny.chen@apple.com> Add an InstanceSettings::NotifyOwnerIsShuttingDown() method so that the owner can notify InstanceSettings instances
that their owner reference is no longer valid.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149145 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/UserSettingsController.h
ff44ab42e9f5d8e4d550e11d1b69413e0bc75b71 23-Apr-2011 Greg Clayton <gclayton@apple.com> Fixed the SymbolContext::DumpStopContext() to correctly indent and dump
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.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/UserSettingsController.h
17cd995147b3324680d845b3fc897febcc23c9e0 22-Apr-2011 Greg Clayton <gclayton@apple.com> Did some work on the "register read" command to only show the first register
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.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/UserSettingsController.h
f91b735a8e7aaf42fd4eed4f848a613b8dad0850 20-Apr-2011 Caroline Tice <ctice@apple.com> Fix typo (accidental second 'const' qualifier).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129859 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/UserSettingsController.h
41c56fab98d16adf31dabdb623111ae4371a2d41 20-Apr-2011 Greg Clayton <gclayton@apple.com> General cleanup on the UserSettingsController stuff. There were 5 different
places that were dumping values for the settings. Centralized all of the
value dumping into a single place. When dumping values that aren't strings
we no longer surround the value with single quotes. When dumping values that
are strings, surround the string value with double quotes. When dumping array
values, assume they are always string values, and don't put quotes around
dictionary values.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129826 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/UserSettingsController.h
b344843f75ef893762c93fd0a22d2d45712ce74d 24-Mar-2011 Greg Clayton <gclayton@apple.com> Fixed the LLDB build so that we can have private types, private enums and
public types and public enums. This was done to keep the SWIG stuff from
parsing all sorts of enums and types that weren't needed, and allows us to
abstract our API better.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/UserSettingsController.h
2e8cb8a7342a2ea672792067d712a794e215a3a7 19-Feb-2011 Jim Ingham <jingham@apple.com> - Changed all the places where CommandObjectReturn was exporting a 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@126015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/UserSettingsController.h
a04acd854c172427917054904dd0675d3cce4619 04-Feb-2011 Caroline Tice <ctice@apple.com> Modify 'apropos' command to search settings variable descriptions as well.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124836 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/UserSettingsController.h
bcb5b454767121980d937d2610ba762fdb575c45 20-Sep-2010 Caroline Tice <ctice@apple.com> Make GetInstanceSettingsValue methods take an Error * rather than an Error &,
and have them return a bool to indicate success or not.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114361 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/UserSettingsController.h
5bc8c97d62b2e399bd90fb7e00c903d7887412ab 20-Sep-2010 Caroline Tice <ctice@apple.com> Add UserSettings to Target class, making Target settings
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.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/UserSettingsController.h
d0a5a23d734da7a2170802ccd096f53b8a527811 19-Sep-2010 Greg Clayton <gclayton@apple.com> Added code that will allow completely customizable prompts for use in
replacing the "(lldb)" prompt, the "frame #1..." displays when doing
stack backtracing and the "thread #1....". This will allow you to see
exactly the information that you want to see where you want to see it.
This currently isn't hookup up to the prompts yet, but it will be soon.

So what is the format of the prompts? Prompts can contain variables that
have access to the current program state. Variables are text that appears
in between a prefix of "${" and ends with a "}". Some of the interesting
variables include:

// The frame index (0, 1, 2, 3...)
${frame.index}

// common frame registers with generic names
${frame.pc}
${frame.sp}
${frame.fp}
${frame.ra}
${frame.flags}

// Access to any frame registers by name where REGNAME is any register name:
${frame.reg.REGNAME}

// The current compile unit file where the frame is located
${file.basename}
${file.fullpath}

// Function information
${function.name}
${function.pc-offset}

// Process info
${process.file.basename}
${process.file.fullpath}
${process.id}
${process.name}

// Thread info
${thread.id}
${thread.index}
${thread.name}
${thread.queue}
${thread.stop-reason}

// Target information
${target.arch}

// The current module for the current frame (the shared library or executable
// that contains the current frame PC value):
${module.file.basename}
${module.file.fullpath}

// Access to the line entry for where the current frame is when your thread
// is stopped:
${line.file.basename}
${line.file.fullpath}
${line.number}
${line.start-addr}
${line.end-addr}

Many times the information that you might have in your prompt might not be
available and you won't want it to print out if it isn't valid. To take care
of this you can enclose everything that must resolve into a scope. A scope
is starts with '{' and ends with '}'. For example in order to only display
the current file and line number when the information is available the format
would be:

"{ at {$line.file.basename}:${line.number}}"

Broken down this is:

start the scope: "{"

format whose content will only be displayed if all information is available:
"at {$line.file.basename}:${line.number}"

end the scope: "}"

We currently can represent the infomration we see when stopped at a frame:

frame #0: 0x0000000100000e85 a.out`main + 4 at test.c:19

with the following format:

"frame #${frame.index}: ${frame.pc} {${module.file.basename}`}{${function.name}{${function.pc-offset}}{ at ${line.file.basename}:${line.number}}\n"

This breaks down to always print:

"frame #${frame.index}: ${frame.pc} "

only print the module followed by a tick if we have a valid module:

"{${module.file.basename}`}"

print the function name with optional offset:
"{${function.name}{${function.pc-offset}}"

print the line info if it is available:

"{ at ${line.file.basename}:${line.number}}"

then finish off with a newline:

"\n"

Notice you can also put newlines ("\n") and tabs and everything else you
are used to putting in a format string when desensitized with the \ character.

Cleaned up some of the user settings controller subclasses. All of them
do not have any global settings variables and were all implementing stubs
for the get/set global settings variable. Now there is a default version
in UserSettingsController that will do nothing.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114306 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/UserSettingsController.h
75b11a343a035ab426473a785a045f0614af9984 16-Sep-2010 Caroline Tice <ctice@apple.com> Fix issues with CreateInstanceName, a virtual function, being called
in an initializer.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114107 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/UserSettingsController.h
41ae21783ad6827b4c2e0f6856ecee730f925d78 15-Sep-2010 Caroline Tice <ctice@apple.com> Modify "settings list" so you can specify a particular instance setting name,
or a settings prefix, and it will list information about the subset of settings
you requested. Also added tab-completion (now that it takes an optional argument).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/UserSettingsController.h
d9ece2a74d30a0610e56b85dc472b9b09344c2c3 15-Sep-2010 Caroline Tice <ctice@apple.com> Remove all visible uses of "[DEFAULT]" instance name.

Add ability to rename UserSettingsInstances after they have been created
(via UserSettingsController::RenameInstanceSettings.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113950 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/UserSettingsController.h
1d2aefd474c9893407ef4deacefd08dd2ca2e806 09-Sep-2010 Caroline Tice <ctice@apple.com> Make all debugger-level user settable variables into instance variables.
Make get/set variable at the debugger level always set the particular debugger's instance variables rather than
the default variables.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113474 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/UserSettingsController.h
004afcb95736e97d071b1dd9b5254800e11e581c 08-Sep-2010 Caroline Tice <ctice@apple.com> Make sure creating a pending instance doesn't also trigger creating a live instance; also make sure creating a
pending instance uses the specified instance name rather than creating a new one; add brackets to instance names
when searching for and removing pending instances.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113370 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/UserSettingsController.h
7ac83bd367f4baf856cbb8a1fa82f8edf44edb93 07-Sep-2010 Jim Ingham <jingham@apple.com> Move common code from GetSettingsController in Process & Debugger into static functions
in UserSettingsController.cpp.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113268 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/UserSettingsController.h
6e4c5ce0f697eb9899a54854a2a9004e961b0de2 04-Sep-2010 Caroline Tice <ctice@apple.com> 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).




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113041 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/UserSettingsController.h