From 5deb06eb43c73ded9debc59a87947a91649c94c0 Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Mon, 26 Sep 2016 20:18:51 +0000 Subject: Added a setting that enables saving all .o files from a given JIT expression. This allows debugging of the JIT and other analyses of the internals of the expression parser. I've also added a testcase that verifies that the setting works correctly when off and on. llvm-svn: 282434 --- lldb/source/Target/Target.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lldb/source/Target/Target.cpp') diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index ee7eab71c6a..f4a91192cfd 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -3246,6 +3246,8 @@ static PropertyDefinition g_properties[] = { nullptr, "Automatically apply fix-it hints to expressions."}, {"notify-about-fixits", OptionValue::eTypeBoolean, false, true, nullptr, nullptr, "Print the fixed expression text."}, + {"save-jit-objects", OptionValue::eTypeBoolean, false, false, nullptr, + nullptr, "Save intermediate object files generated by the LLVM JIT"}, {"max-children-count", OptionValue::eTypeSInt64, false, 256, nullptr, nullptr, "Maximum number of children to expand in any level of depth."}, {"max-string-summary-length", OptionValue::eTypeSInt64, false, 1024, @@ -3370,6 +3372,7 @@ enum { ePropertyAutoImportClangModules, ePropertyAutoApplyFixIts, ePropertyNotifyAboutFixIts, + ePropertySaveObjects, ePropertyMaxChildrenCount, ePropertyMaxSummaryLength, ePropertyMaxMemReadSize, @@ -3788,6 +3791,12 @@ bool TargetProperties::GetEnableNotifyAboutFixIts() const { nullptr, idx, g_properties[idx].default_uint_value != 0); } +bool TargetProperties::GetEnableSaveObjects() const { + const uint32_t idx = ePropertySaveObjects; + return m_collection_sp->GetPropertyAtIndexAsBoolean( + nullptr, idx, g_properties[idx].default_uint_value != 0); +} + bool TargetProperties::GetEnableSyntheticValue() const { const uint32_t idx = ePropertyEnableSynthetic; return m_collection_sp->GetPropertyAtIndexAsBoolean( -- cgit v1.2.3