Added extra logging, and made sure that the argument
struct for expressions is deallocated when the
ClangExpressionDeclMap is taken down.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116028 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ClangExpressionDeclMap.cpp b/source/Expression/ClangExpressionDeclMap.cpp
index 8937571..6d72ed2 100644
--- a/source/Expression/ClangExpressionDeclMap.cpp
+++ b/source/Expression/ClangExpressionDeclMap.cpp
@@ -74,6 +74,12 @@
pvar.DisableParserVars();
}
+ if (m_materialized_location)
+ {
+ m_exe_ctx->process->DeallocateMemory(m_materialized_location);
+ m_materialized_location = 0;
+ }
+
if (m_sym_ctx)
delete m_sym_ctx;
}
@@ -495,6 +501,9 @@
m_materialized_location = 0;
}
+ if (log)
+ log->PutCString("Allocating memory for materialized argument struct");
+
lldb::addr_t mem = exe_ctx->process->AllocateMemory(m_struct_alignment + m_struct_size,
lldb::ePermissionsReadable | lldb::ePermissionsWritable,
err);
diff --git a/source/Expression/ClangExpressionParser.cpp b/source/Expression/ClangExpressionParser.cpp
index 60b0f7a..7085f40 100644
--- a/source/Expression/ClangExpressionParser.cpp
+++ b/source/Expression/ClangExpressionParser.cpp
@@ -449,6 +449,8 @@
if (m_expr.NeedsValidation())
{
+ /*
+ Disabled temporarily - TODO Centralize and re-enable this inside Process to avoid race conditions
IRDynamicChecks ir_dynamic_checks(*exe_ctx.process->GetDynamicCheckers(), function_name.c_str());
if (!ir_dynamic_checks.runOnModule(*module))
@@ -457,6 +459,7 @@
err.SetErrorString("Couldn't add dynamic checks to the expression");
return err;
}
+ */
}
}