Wrote the code that looks at a context to see
if the variables in that context allow a particular
JIT compiled expression to run in that context.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108485 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectExpression.cpp b/source/Commands/CommandObjectExpression.cpp
index 56f97fb..e3f2baa 100644
--- a/source/Commands/CommandObjectExpression.cpp
+++ b/source/Commands/CommandObjectExpression.cpp
@@ -304,8 +304,22 @@
return false;
}
- log->Printf("Function is at 0x%llx", (uint64_t)function_address);
+ Error err;
+
+ lldb::addr_t struct_address = expr_decl_map.Materialize(&m_exe_ctx, err);
+
+ if (struct_address == LLDB_INVALID_ADDRESS)
+ {
+ error_stream.Printf ("Couldn't materialize struct: %s\n", err.AsCString("unknown error"));
+ return false;
+ }
+
+ log->Printf("Function address : 0x%llx", (uint64_t)function_address);
+ log->Printf("Structure address : 0x%llx", (uint64_t)struct_address);
}
+
+ return true;
+
}
else
{