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);