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
This commit is contained in:
Jim Ingham 2017-04-04 17:48:21 +00:00
parent 78cfbc1635
commit 61cc47ad30
1 changed files with 13 additions and 4 deletions

View File

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