diff options
author | Greg Clayton <gclayton@apple.com> | 2011-02-18 01:44:25 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2011-02-18 01:44:25 +0000 |
commit | bfe5f3bf068eced49491eeecee1d0fa895d996b1 (patch) | |
tree | e347830ecb10ad734ea2543b1b26db5bfafe42b0 /lldb/source/Core/PluginManager.cpp | |
parent | 951e22e2c9a73f353c2ce4a246616c06cd5bc58a (diff) | |
download | bcm5719-llvm-bfe5f3bf068eced49491eeecee1d0fa895d996b1.tar.gz bcm5719-llvm-bfe5f3bf068eced49491eeecee1d0fa895d996b1.zip |
Added new target instance settings for execution settings:
Targets can now specify some additional parameters for when we debug
executables that can help with plug-in selection:
target.execution-level = auto | user | kernel
target.execution-mode = auto | dynamic | static
target.execution-os-type = auto | none | halted | live
On some systems, the binaries that are created are the same wether you use
them to debug a kernel, or a user space program. Many times inspecting an
object file can reveal what an executable should be. For these cases we can
now be a little more complete by specifying wether to detect all of these
things automatically (inspect the main executable file and select a plug-in
accordingly), or manually to force the selection of certain plug-ins.
To do this we now allow the specficifation of wether one is debugging a user
space program (target.execution-level = user) or a kernel program
(target.execution-level = kernel).
We can also specify if we want to debug a program where shared libraries
are dynamically loaded using a DynamicLoader plug-in
(target.execution-mode = dynamic), or wether we will treat all symbol files
as already linked at the correct address (target.execution-mode = static).
We can also specify if the inferior we are debugging is being debugged on
a bare board (target.execution-os-type = none), or debugging an OS where
we have a JTAG or other direct connection to the inferior stops the entire
OS (target.execution-os-type = halted), or if we are debugging a program on
something that has live debug services (target.execution-os-type = live).
For the "target.execution-os-type = halted" mode, we will need to create
ProcessHelper plug-ins that allow us to extract the process/thread and other
OS information by reading/writing memory.
This should allow LLDB to be used for a wide variety of debugging tasks and
handle them all correctly.
llvm-svn: 125815
Diffstat (limited to 'lldb/source/Core/PluginManager.cpp')
-rw-r--r-- | lldb/source/Core/PluginManager.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lldb/source/Core/PluginManager.cpp b/lldb/source/Core/PluginManager.cpp index 399fa126c4f..3c2907ed239 100644 --- a/lldb/source/Core/PluginManager.cpp +++ b/lldb/source/Core/PluginManager.cpp @@ -1278,6 +1278,24 @@ PluginManager::RegisterPlugin return false; } +const char * +PluginManager::GetProcessPluginNameAtIndex (uint32_t idx) +{ + ProcessInstance instance; + if (AccessProcessInstances (ePluginGetInstanceAtIndex, instance, idx)) + return instance.name.c_str(); + return NULL; +} + +const char * +PluginManager::GetProcessPluginDescriptionAtIndex (uint32_t idx) +{ + ProcessInstance instance; + if (AccessProcessInstances (ePluginGetInstanceAtIndex, instance, idx)) + return instance.description.c_str(); + return NULL; +} + bool PluginManager::UnregisterPlugin (ProcessCreateInstance create_callback) { |