Author: jingham
Date: Tue Jul  7 17:12:17 2015
New Revision: 241632

URL: http://llvm.org/viewvc/llvm-project?rev=241632&view=rev
Log:
Add a version of SBTarget::EvaluateExpression that doesn't require
an options (and makes an appropriate defaulted option for you.)

<rdar://problem/20639202>

Modified:
    lldb/trunk/include/lldb/API/SBTarget.h
    lldb/trunk/scripts/interface/SBTarget.i
    lldb/trunk/source/API/SBTarget.cpp

Modified: lldb/trunk/include/lldb/API/SBTarget.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTarget.h?rev=241632&r1=241631&r2=241632&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBTarget.h (original)
+++ lldb/trunk/include/lldb/API/SBTarget.h Tue Jul  7 17:12:17 2015
@@ -769,6 +769,9 @@ public:
     GetDescription (lldb::SBStream &description, lldb::DescriptionLevel 
description_level);
 
     lldb::SBValue
+    EvaluateExpression (const char *expr);
+
+    lldb::SBValue
     EvaluateExpression (const char *expr, const SBExpressionOptions &options);
 
     lldb::addr_t

Modified: lldb/trunk/scripts/interface/SBTarget.i
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBTarget.i?rev=241632&r1=241631&r2=241632&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBTarget.i (original)
+++ lldb/trunk/scripts/interface/SBTarget.i Tue Jul  7 17:12:17 2015
@@ -739,7 +739,11 @@ public:
     operator != (const lldb::SBTarget &rhs) const;
 
     lldb::SBValue
+    EvaluateExpression (const char *expr);
+
+    lldb::SBValue
     EvaluateExpression (const char *expr, const lldb::SBExpressionOptions 
&options);
+
     %pythoncode %{
         class modules_access(object):
             '''A helper object that will lazily hand out lldb.SBModule objects 
for a target when supplied an index, or by full or partial path.'''

Modified: lldb/trunk/source/API/SBTarget.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=241632&r1=241631&r2=241632&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTarget.cpp (original)
+++ lldb/trunk/source/API/SBTarget.cpp Tue Jul  7 17:12:17 2015
@@ -2293,6 +2293,19 @@ SBTarget::FindSymbols (const char *name,
     
 }
 
+lldb::SBValue
+SBTarget::EvaluateExpression (const char *expr)
+{
+    TargetSP target_sp(GetSP());
+    if (!target_sp)
+        return SBValue();
+
+    SBExpressionOptions options;
+    lldb::DynamicValueType fetch_dynamic_value = 
target_sp->GetPreferDynamicValue();
+    options.SetFetchDynamicValue (fetch_dynamic_value);
+    options.SetUnwindOnError (true);
+    return EvaluateExpression(expr, options);
+}
 
 lldb::SBValue
 SBTarget::EvaluateExpression (const char *expr, const SBExpressionOptions 
&options)


_______________________________________________
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to