summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2014-07-19 01:09:16 +0000
committerJim Ingham <jingham@apple.com>2014-07-19 01:09:16 +0000
commit4ac0443fd90e264762f71f30d7a03b585009e109 (patch)
tree36dae089941127ab360d3e2146cadfc1238bae9c /lldb/source
parent3875a82d422230ba97c3c1a4fc452c5ad81af513 (diff)
downloadbcm5719-llvm-4ac0443fd90e264762f71f30d7a03b585009e109.tar.gz
bcm5719-llvm-4ac0443fd90e264762f71f30d7a03b585009e109.zip
Add the ability to suppress the creation of a persistent
result variable and use in in "Process::LoadImage" so that, for instance, "process load" doesn't increment the return variable number. llvm-svn: 213440
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/Expression/ClangUserExpression.cpp5
-rw-r--r--lldb/source/Target/Process.cpp2
2 files changed, 7 insertions, 0 deletions
diff --git a/lldb/source/Expression/ClangUserExpression.cpp b/lldb/source/Expression/ClangUserExpression.cpp
index 62f2869dd4b..5c1b467edac 100644
--- a/lldb/source/Expression/ClangUserExpression.cpp
+++ b/lldb/source/Expression/ClangUserExpression.cpp
@@ -1070,6 +1070,11 @@ ClangUserExpression::Evaluate (ExecutionContext &exe_ctx,
user_expression_sp,
expr_result);
+ if (options.GetResultIsInternal())
+ {
+ process->GetTarget().GetPersistentVariables().RemovePersistentVariable (expr_result);
+ }
+
if (execution_results != lldb::eExpressionCompleted)
{
if (log)
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 5446ae67a0d..7e09e7e79af 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -1524,6 +1524,8 @@ Process::LoadImage (const FileSpec &image_spec, Error &error)
expr_options.SetUnwindOnError(true);
expr_options.SetIgnoreBreakpoints(true);
expr_options.SetExecutionPolicy(eExecutionPolicyAlways);
+ expr_options.SetResultIsInternal(true);
+
StreamString expr;
expr.Printf(R"(
struct __lldb_dlopen_result { void *image_ptr; const char *error_str; } the_result;
OpenPOWER on IntegriCloud