summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Debugger.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-08-23 00:22:02 +0000
committerGreg Clayton <gclayton@apple.com>2012-08-23 00:22:02 +0000
commit754a9369db5d566ec4ec14139c3276bddfbe44c8 (patch)
treebfb8843822afb5a84543873d6ac35a237fd45995 /lldb/source/Core/Debugger.cpp
parentbf493942b05b4c15aa93aab69c682ff7bdb44b45 (diff)
downloadbcm5719-llvm-754a9369db5d566ec4ec14139c3276bddfbe44c8.tar.gz
bcm5719-llvm-754a9369db5d566ec4ec14139c3276bddfbe44c8.zip
<rdar://problem/12022079>
Added a new "interpreter" properties to encapsulate any properties for the command interpreter. Right now this contains only "expand-regex-aliases", so you can now enable (disabled by default) the echoing of the command that a regular expression alias expands to: (lldb) b main Breakpoint created: 1: name = 'main', locations = 1 Note that the expanded regular expression command wasn't shown by default. You can enable it if you want to: (lldb) settings set interpreter.expand-regex-aliases true (lldb) b main breakpoint set --name 'main' Breakpoint created: 1: name = 'main', locations = 1 Also enabled auto completion for enumeration option values (OptionValueEnumeration) and for boolean option values (OptionValueBoolean). Fixed auto completion for settings names when nothing has been type (it should show all settings). llvm-svn: 162418
Diffstat (limited to 'lldb/source/Core/Debugger.cpp')
-rw-r--r--lldb/source/Core/Debugger.cpp35
1 files changed, 21 insertions, 14 deletions
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index 682d57cd4bf..23fbbadbace 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -101,8 +101,8 @@ g_language_enumerators[] =
-PropertyDefinition
-g_instance_settings_table[] =
+static PropertyDefinition
+g_properties[] =
{
{ "auto-confirm", OptionValue::eTypeBoolean, true, false, NULL, NULL, "If true all confirmation prompts will receive their default reply." },
{ "frame-format", OptionValue::eTypeString , true, 0 , DEFAULT_FRAME_FORMAT, NULL, "The default frame format string to use when displaying stack frame information for threads." },
@@ -151,28 +151,28 @@ bool
Debugger::GetAutoConfirm () const
{
const uint32_t idx = ePropertyAutoConfirm;
- return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_instance_settings_table[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0);
}
const char *
Debugger::GetFrameFormat() const
{
const uint32_t idx = ePropertyFrameFormat;
- return m_collection_sp->GetPropertyAtIndexAsString (NULL, idx, g_instance_settings_table[idx].default_cstr_value);
+ return m_collection_sp->GetPropertyAtIndexAsString (NULL, idx, g_properties[idx].default_cstr_value);
}
bool
Debugger::GetNotifyVoid () const
{
const uint32_t idx = ePropertyNotiftVoid;
- return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_instance_settings_table[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0);
}
const char *
Debugger::GetPrompt() const
{
const uint32_t idx = ePropertyPrompt;
- return m_collection_sp->GetPropertyAtIndexAsString (NULL, idx, g_instance_settings_table[idx].default_cstr_value);
+ return m_collection_sp->GetPropertyAtIndexAsString (NULL, idx, g_properties[idx].default_cstr_value);
}
void
@@ -189,14 +189,14 @@ const char *
Debugger::GetThreadFormat() const
{
const uint32_t idx = ePropertyThreadFormat;
- return m_collection_sp->GetPropertyAtIndexAsString (NULL, idx, g_instance_settings_table[idx].default_cstr_value);
+ return m_collection_sp->GetPropertyAtIndexAsString (NULL, idx, g_properties[idx].default_cstr_value);
}
lldb::ScriptLanguage
Debugger::GetScriptLanguage() const
{
const uint32_t idx = ePropertyScriptLanguage;
- return (lldb::ScriptLanguage)m_collection_sp->GetPropertyAtIndexAsEnumeration (NULL, idx, g_instance_settings_table[idx].default_uint_value);
+ return (lldb::ScriptLanguage)m_collection_sp->GetPropertyAtIndexAsEnumeration (NULL, idx, g_properties[idx].default_uint_value);
}
bool
@@ -210,7 +210,7 @@ uint32_t
Debugger::GetTerminalWidth () const
{
const uint32_t idx = ePropertyTerminalWidth;
- return m_collection_sp->GetPropertyAtIndexAsSInt64 (NULL, idx, g_instance_settings_table[idx].default_uint_value);
+ return m_collection_sp->GetPropertyAtIndexAsSInt64 (NULL, idx, g_properties[idx].default_uint_value);
}
bool
@@ -224,7 +224,7 @@ bool
Debugger::GetUseExternalEditor () const
{
const uint32_t idx = ePropertyUseExternalEditor;
- return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_instance_settings_table[idx].default_uint_value != 0);
+ return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0);
}
bool
@@ -238,21 +238,21 @@ uint32_t
Debugger::GetStopSourceLineCount (bool before) const
{
const uint32_t idx = before ? ePropertyStopLineCountBefore : ePropertyStopLineCountAfter;
- return m_collection_sp->GetPropertyAtIndexAsSInt64 (NULL, idx, g_instance_settings_table[idx].default_uint_value);
+ return m_collection_sp->GetPropertyAtIndexAsSInt64 (NULL, idx, g_properties[idx].default_uint_value);
}
Debugger::StopDisassemblyType
Debugger::GetStopDisassemblyDisplay () const
{
const uint32_t idx = ePropertyStopDisassemblyDisplay;
- return (Debugger::StopDisassemblyType)m_collection_sp->GetPropertyAtIndexAsEnumeration (NULL, idx, g_instance_settings_table[idx].default_uint_value);
+ return (Debugger::StopDisassemblyType)m_collection_sp->GetPropertyAtIndexAsEnumeration (NULL, idx, g_properties[idx].default_uint_value);
}
uint32_t
Debugger::GetDisassemblyLineCount () const
{
const uint32_t idx = ePropertyStopDisassemblyCount;
- return m_collection_sp->GetPropertyAtIndexAsSInt64 (NULL, idx, g_instance_settings_table[idx].default_uint_value);
+ return m_collection_sp->GetPropertyAtIndexAsSInt64 (NULL, idx, g_properties[idx].default_uint_value);
}
#pragma mark Debugger
@@ -431,11 +431,18 @@ Debugger::Debugger (lldb::LogOutputCallback log_callback, void *baton) :
assert (default_platform_sp.get());
m_platform_list.Append (default_platform_sp, true);
- m_collection_sp->Initialize (g_instance_settings_table);
+ m_collection_sp->Initialize (g_properties);
m_collection_sp->AppendProperty (ConstString("target"),
ConstString("Settings specify to debugging targets."),
true,
Target::GetGlobalProperties()->GetValueProperties());
+ if (m_command_interpreter_ap.get())
+ {
+ m_collection_sp->AppendProperty (ConstString("interpreter"),
+ ConstString("Settings specify to the debugger's command interpreter."),
+ true,
+ m_command_interpreter_ap->GetValueProperties());
+ }
OptionValueSInt64 *term_width = m_collection_sp->GetPropertyAtIndexAsOptionValueSInt64 (NULL, ePropertyTerminalWidth);
term_width->SetMinimumValue(10);
term_width->SetMaximumValue(1024);
OpenPOWER on IntegriCloud