From 61cc47ad30368f9802355048a40ddb235f6185b2 Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Tue, 4 Apr 2017 17:48:21 +0000 Subject: [PATCH] Tone down the "lldb types" log a bit. Change the get shared class info function to only dump its results to the inferior stdout when the log is verbose. This matches the lldb side of the same process, which only logs what it found if the log is on verbose. llvm-svn: 299451 --- .../AppleObjCRuntime/AppleObjCRuntimeV2.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp index df42368494dd..42c5fe9248f6 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -1395,8 +1395,13 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapDynamic( arguments.GetValueAtIndex(0)->GetScalar() = hash_table.GetTableLoadAddress(); arguments.GetValueAtIndex(1)->GetScalar() = class_infos_addr; arguments.GetValueAtIndex(2)->GetScalar() = class_infos_byte_size; - arguments.GetValueAtIndex(3)->GetScalar() = - (GetLogIfAllCategoriesSet(LIBLLDB_LOG_TYPES) == nullptr ? 0 : 1); + + // Only dump the runtime classes from the expression evaluation if the + // log is verbose: + Log *type_log = GetLogIfAllCategoriesSet(LIBLLDB_LOG_TYPES); + bool dump_log = type_log && type_log->GetVerbose(); + + arguments.GetValueAtIndex(3)->GetScalar() = dump_log ? 1 : 0; bool success = false; @@ -1639,8 +1644,12 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapSharedCache() { arguments.GetValueAtIndex(0)->GetScalar() = objc_opt_ptr; arguments.GetValueAtIndex(1)->GetScalar() = class_infos_addr; arguments.GetValueAtIndex(2)->GetScalar() = class_infos_byte_size; - arguments.GetValueAtIndex(3)->GetScalar() = - (GetLogIfAllCategoriesSet(LIBLLDB_LOG_TYPES) == nullptr ? 0 : 1); + // Only dump the runtime classes from the expression evaluation if the + // log is verbose: + Log *type_log = GetLogIfAllCategoriesSet(LIBLLDB_LOG_TYPES); + bool dump_log = type_log && type_log->GetVerbose(); + + arguments.GetValueAtIndex(3)->GetScalar() = dump_log ? 1 : 0; bool success = false;