summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/OptionValueProperties.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-09-01 00:38:36 +0000
committerGreg Clayton <gclayton@apple.com>2012-09-01 00:38:36 +0000
commit4c05410f8f7d312fd45d8f156015cc2c13f5c977 (patch)
treeb15804f461fdae043af43925495b53ab83080573 /lldb/source/Interpreter/OptionValueProperties.cpp
parentc373ca5c74ab69b94fa0f48a58a0c16f2e7e16e1 (diff)
downloadbcm5719-llvm-4c05410f8f7d312fd45d8f156015cc2c13f5c977.tar.gz
bcm5719-llvm-4c05410f8f7d312fd45d8f156015cc2c13f5c977.zip
Made it so changes to the prompt via "settings set prompt" get noticed by the command line.
Added the ability for OptionValueString objects to take flags. The only flag is currently for parsing escape sequences. Not the prompt string can have escape characters translate which will allow colors in the prompt. Added functions to Args that will parse the escape sequences in a string, and also re-encode the escape sequences for display. This was looted from other parts of LLDB (the Debugger::FormatString() function). llvm-svn: 163043
Diffstat (limited to 'lldb/source/Interpreter/OptionValueProperties.cpp')
-rw-r--r--lldb/source/Interpreter/OptionValueProperties.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/OptionValueProperties.cpp b/lldb/source/Interpreter/OptionValueProperties.cpp
index 304ce6299ed..607a93212a9 100644
--- a/lldb/source/Interpreter/OptionValueProperties.cpp
+++ b/lldb/source/Interpreter/OptionValueProperties.cpp
@@ -526,6 +526,16 @@ OptionValueProperties::SetPropertyAtIndexAsString (const ExecutionContext *exe_c
return false;
}
+OptionValueString *
+OptionValueProperties::GetPropertyAtIndexAsOptionValueString (const ExecutionContext *exe_ctx, bool will_modify, uint32_t idx) const
+{
+ OptionValueSP value_sp(GetPropertyValueAtIndex (exe_ctx, will_modify, idx));
+ if (value_sp)
+ return value_sp->GetAsString();
+ return NULL;
+}
+
+
uint64_t
OptionValueProperties::GetPropertyAtIndexAsUInt64 (const ExecutionContext *exe_ctx, uint32_t idx, uint64_t fail_value) const
{
OpenPOWER on IntegriCloud