summaryrefslogtreecommitdiffstats
path: root/lldb/source/API
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API')
-rw-r--r--lldb/source/API/SBExpressionOptions.cpp50
-rw-r--r--lldb/source/API/SBFrame.cpp8
-rw-r--r--lldb/source/API/SBValue.cpp4
3 files changed, 17 insertions, 45 deletions
diff --git a/lldb/source/API/SBExpressionOptions.cpp b/lldb/source/API/SBExpressionOptions.cpp
index 2a4b9f564b2..9733d25b5e4 100644
--- a/lldb/source/API/SBExpressionOptions.cpp
+++ b/lldb/source/API/SBExpressionOptions.cpp
@@ -16,25 +16,9 @@ using namespace lldb;
using namespace lldb_private;
-SBExpressionOptions::SBExpressionOptions ()
+SBExpressionOptions::SBExpressionOptions () :
+ m_opaque_ap(new EvaluateExpressionOptions())
{
- m_opaque_ap.reset(new EvaluateExpressionOptions());
-}
-
-SBExpressionOptions::SBExpressionOptions (bool coerce_to_id,
- bool unwind_on_error,
- bool keep_in_memory,
- bool run_others,
- DynamicValueType use_dynamic,
- uint32_t timeout_usec)
-{
- m_opaque_ap.reset(new EvaluateExpressionOptions());
- m_opaque_ap->SetCoerceToId(coerce_to_id);
- m_opaque_ap->SetUnwindOnError(unwind_on_error);
- m_opaque_ap->SetKeepInMemory(keep_in_memory);
- m_opaque_ap->SetRunOthers(run_others);
- m_opaque_ap->SetUseDynamic (use_dynamic);
- m_opaque_ap->SetTimeoutUsec (timeout_usec);
}
SBExpressionOptions::SBExpressionOptions (const SBExpressionOptions &rhs)
@@ -58,19 +42,19 @@ SBExpressionOptions::~SBExpressionOptions()
}
bool
-SBExpressionOptions::DoesCoerceToId () const
+SBExpressionOptions::GetCoerceResultToId () const
{
return m_opaque_ap->DoesCoerceToId ();
}
void
-SBExpressionOptions::SetCoerceToId (bool coerce)
+SBExpressionOptions::SetCoerceResultToId (bool coerce)
{
m_opaque_ap->SetCoerceToId (coerce);
}
bool
-SBExpressionOptions::DoesUnwindOnError () const
+SBExpressionOptions::GetUnwindOnError () const
{
return m_opaque_ap->DoesUnwindOnError ();
}
@@ -81,50 +65,38 @@ SBExpressionOptions::SetUnwindOnError (bool unwind)
m_opaque_ap->SetUnwindOnError (unwind);
}
-bool
-SBExpressionOptions::DoesKeepInMemory () const
-{
- return m_opaque_ap->DoesKeepInMemory ();
-}
-
-void
-SBExpressionOptions::SetKeepInMemory (bool keep)
-{
- m_opaque_ap->SetKeepInMemory (keep);
-}
-
lldb::DynamicValueType
-SBExpressionOptions::GetUseDynamic () const
+SBExpressionOptions::GetFetchDynamicValue () const
{
return m_opaque_ap->GetUseDynamic ();
}
void
-SBExpressionOptions::SetUseDynamic (lldb::DynamicValueType dynamic)
+SBExpressionOptions::SetFetchDynamicValue (lldb::DynamicValueType dynamic)
{
m_opaque_ap->SetUseDynamic (dynamic);
}
uint32_t
-SBExpressionOptions::GetTimeoutUsec () const
+SBExpressionOptions::GetTimeoutInMicroSeconds () const
{
return m_opaque_ap->GetTimeoutUsec ();
}
void
-SBExpressionOptions::SetTimeoutUsec (uint32_t timeout)
+SBExpressionOptions::SetTimeoutInMicroSeconds (uint32_t timeout)
{
m_opaque_ap->SetTimeoutUsec (timeout);
}
bool
-SBExpressionOptions::GetRunOthers () const
+SBExpressionOptions::GetTryAllThreads () const
{
return m_opaque_ap->GetRunOthers ();
}
void
-SBExpressionOptions::SetRunOthers (bool run_others)
+SBExpressionOptions::SetTryAllThreads (bool run_others)
{
m_opaque_ap->SetRunOthers (run_others);
}
diff --git a/lldb/source/API/SBFrame.cpp b/lldb/source/API/SBFrame.cpp
index f89c25b27e1..3fdadde1534 100644
--- a/lldb/source/API/SBFrame.cpp
+++ b/lldb/source/API/SBFrame.cpp
@@ -1043,7 +1043,7 @@ SBFrame::EvaluateExpression (const char *expr)
{
SBExpressionOptions options;
lldb::DynamicValueType fetch_dynamic_value = frame->CalculateTarget()->GetPreferDynamicValue();
- options.SetUseDynamic (fetch_dynamic_value);
+ options.SetFetchDynamicValue (fetch_dynamic_value);
options.SetUnwindOnError (true);
return EvaluateExpression (expr, options);
}
@@ -1054,7 +1054,7 @@ SBValue
SBFrame::EvaluateExpression (const char *expr, lldb::DynamicValueType fetch_dynamic_value)
{
SBExpressionOptions options;
- options.SetUseDynamic (fetch_dynamic_value);
+ options.SetFetchDynamicValue (fetch_dynamic_value);
options.SetUnwindOnError (true);
return EvaluateExpression (expr, options);
}
@@ -1063,7 +1063,7 @@ SBValue
SBFrame::EvaluateExpression (const char *expr, lldb::DynamicValueType fetch_dynamic_value, bool unwind_on_error)
{
SBExpressionOptions options;
- options.SetUseDynamic (fetch_dynamic_value);
+ options.SetFetchDynamicValue (fetch_dynamic_value);
options.SetUnwindOnError (unwind_on_error);
return EvaluateExpression (expr, options);
}
@@ -1096,7 +1096,7 @@ SBFrame::EvaluateExpression (const char *expr, const SBExpressionOptions &option
StreamString frame_description;
frame->DumpUsingSettingsFormat (&frame_description);
Host::SetCrashDescriptionWithFormat ("SBFrame::EvaluateExpression (expr = \"%s\", fetch_dynamic_value = %u) %s",
- expr, options.GetUseDynamic(), frame_description.GetString().c_str());
+ expr, options.GetFetchDynamicValue(), frame_description.GetString().c_str());
#endif
exe_results = target->EvaluateExpression (expr,
frame,
diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp
index 0aa01a6c9cc..5b38bc5e14a 100644
--- a/lldb/source/API/SBValue.cpp
+++ b/lldb/source/API/SBValue.cpp
@@ -720,7 +720,7 @@ lldb::SBValue
SBValue::CreateValueFromExpression (const char *name, const char* expression)
{
SBExpressionOptions options;
- options.SetKeepInMemory(true);
+ options.ref().SetKeepInMemory(true);
return CreateValueFromExpression (name, expression, options);
}
@@ -746,7 +746,7 @@ SBValue::CreateValueFromExpression (const char *name, const char *expression, SB
Target* target = exe_ctx.GetTargetPtr();
if (target)
{
- options.SetKeepInMemory(true);
+ options.ref().SetKeepInMemory(true);
target->EvaluateExpression (expression,
exe_ctx.GetFramePtr(),
new_value_sp,
OpenPOWER on IntegriCloud