From 527d2c5867ce93bbd4e28384ea9006a5032162d4 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Tue, 15 Mar 2022 14:21:10 -0700 Subject: [PATCH] [lldb] Fix AppleObjCRuntime log channels The log channel was changed from Types to Commands in a007a6d84471bb956abe10974cac3066799f583f: - Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_TYPES)); + Log *log = GetLog(LLDBLog::Process | LLDBLog::Commands); --- .../AppleObjCClassDescriptorV2.cpp | 2 +- .../ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp | 24 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp index d991624..5e83d43 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp @@ -543,7 +543,7 @@ void ClassDescriptorV2::iVarsStorage::fill(AppleObjCRuntimeV2 &runtime, if (m_filled) return; std::lock_guard guard(m_mutex); - Log *log = GetLog(LLDBLog::Commands); + Log *log = GetLog(LLDBLog::Types); LLDB_LOGV(log, "class_name = {0}", descriptor.GetClassName()); m_filled = true; ObjCLanguageRuntime::EncodingToTypeSP encoding_to_type_sp( diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp index 853da6a..a3c3e0b 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -1467,7 +1467,7 @@ AppleObjCRuntimeV2::GetClassDescriptor(ValueObject &valobj) { objc_class_sp = GetClassDescriptorFromISA(isa); if (isa && !objc_class_sp) { - Log *log = GetLog(LLDBLog::Process | LLDBLog::Commands); + Log *log = GetLog(LLDBLog::Process | LLDBLog::Types); LLDB_LOGF(log, "0x%" PRIx64 ": AppleObjCRuntimeV2::GetClassDescriptor() ISA was " "not in class descriptor cache 0x%" PRIx64, @@ -1539,7 +1539,7 @@ lldb::addr_t AppleObjCRuntimeV2::GetISAHashTablePointer() { std::unique_ptr AppleObjCRuntimeV2::DynamicClassInfoExtractor::GetClassInfoUtilityFunctionImpl( ExecutionContext &exe_ctx, std::string code, std::string name) { - Log *log = GetLog(LLDBLog::Process | LLDBLog::Commands); + Log *log = GetLog(LLDBLog::Process | LLDBLog::Types); LLDB_LOG(log, "Creating utility function {0}", name); @@ -1644,7 +1644,7 @@ AppleObjCRuntimeV2::DynamicClassInfoExtractor::ComputeHelper() const { std::unique_ptr AppleObjCRuntimeV2::SharedCacheClassInfoExtractor:: GetClassInfoUtilityFunctionImpl(ExecutionContext &exe_ctx) { - Log *log = GetLog(LLDBLog::Process | LLDBLog::Commands); + Log *log = GetLog(LLDBLog::Process | LLDBLog::Types); LLDB_LOG(log, "Creating utility function {0}", g_get_shared_cache_class_info_name); @@ -1747,7 +1747,7 @@ AppleObjCRuntimeV2::DynamicClassInfoExtractor::UpdateISAToDescriptorMap( uint32_t num_class_infos = 0; - Log *log = GetLog(LLDBLog::Process | LLDBLog::Commands); + Log *log = GetLog(LLDBLog::Process | LLDBLog::Types); ExecutionContext exe_ctx; @@ -1823,7 +1823,7 @@ AppleObjCRuntimeV2::DynamicClassInfoExtractor::UpdateISAToDescriptorMap( // Only dump the runtime classes from the expression evaluation if the log is // verbose: - Log *type_log = GetLog(LLDBLog::Commands); + Log *type_log = GetLog(LLDBLog::Types); bool dump_log = type_log && type_log->GetVerbose(); arguments.GetValueAtIndex(3)->GetScalar() = dump_log ? 1 : 0; @@ -1903,7 +1903,7 @@ uint32_t AppleObjCRuntimeV2::ParseClassInfoArray(const DataExtractor &data, // uint32_t hash; // } __attribute__((__packed__)); - Log *log = GetLog(LLDBLog::Commands); + Log *log = GetLog(LLDBLog::Types); bool should_log = log && log->GetVerbose(); uint32_t num_parsed = 0; @@ -1976,7 +1976,7 @@ AppleObjCRuntimeV2::SharedCacheClassInfoExtractor::UpdateISAToDescriptorMap() { if (process == nullptr) return DescriptorMapUpdateResult::Fail(); - Log *log = GetLog(LLDBLog::Process | LLDBLog::Commands); + Log *log = GetLog(LLDBLog::Process | LLDBLog::Types); ExecutionContext exe_ctx; @@ -2057,7 +2057,7 @@ AppleObjCRuntimeV2::SharedCacheClassInfoExtractor::UpdateISAToDescriptorMap() { arguments.GetValueAtIndex(4)->GetScalar() = class_infos_byte_size; // Only dump the runtime classes from the expression evaluation if the log is // verbose: - Log *type_log = GetLog(LLDBLog::Commands); + Log *type_log = GetLog(LLDBLog::Types); bool dump_log = type_log && type_log->GetVerbose(); arguments.GetValueAtIndex(5)->GetScalar() = dump_log ? 1 : 0; @@ -2217,7 +2217,7 @@ lldb::addr_t AppleObjCRuntimeV2::GetSharedCacheBaseAddress() { void AppleObjCRuntimeV2::UpdateISAToDescriptorMapIfNeeded() { LLDB_SCOPED_TIMER(); - Log *log = GetLog(LLDBLog::Process | LLDBLog::Commands); + Log *log = GetLog(LLDBLog::Process | LLDBLog::Types); // Else we need to check with our process to see when the map was updated. Process *process = GetProcess(); @@ -2304,7 +2304,7 @@ bool AppleObjCRuntimeV2::RealizedClassGenerationCountChanged() { objc_debug_realized_class_generation_count) return false; - Log *log = GetLog(LLDBLog::Process | LLDBLog::Commands); + Log *log = GetLog(LLDBLog::Process | LLDBLog::Types); LLDB_LOG(log, "objc_debug_realized_class_generation_count changed from {0} to {1}", m_realized_class_generation_count, @@ -2458,7 +2458,7 @@ AppleObjCRuntimeV2::NonPointerISACache::CreateInstance( Status error; - Log *log = GetLog(LLDBLog::Commands); + Log *log = GetLog(LLDBLog::Types); auto objc_debug_isa_magic_mask = ExtractRuntimeGlobalSymbol( process, ConstString("objc_debug_isa_magic_mask"), objc_module_sp, error); @@ -2888,7 +2888,7 @@ AppleObjCRuntimeV2::NonPointerISACache::GetClassDescriptor(ObjCISA isa) { bool AppleObjCRuntimeV2::NonPointerISACache::EvaluateNonPointerISA( ObjCISA isa, ObjCISA &ret_isa) { - Log *log = GetLog(LLDBLog::Commands); + Log *log = GetLog(LLDBLog::Types); LLDB_LOGF(log, "AOCRT::NPI Evaluate(isa = 0x%" PRIx64 ")", (uint64_t)isa); -- 2.7.4