Author: Jonas Devlieghere Date: 2022-03-21T15:35:21-07:00 New Revision: 3323321f4ef04308c50a3dc4ad17dfa1e13d8477
URL: https://github.com/llvm/llvm-project/commit/3323321f4ef04308c50a3dc4ad17dfa1e13d8477 DIFF: https://github.com/llvm/llvm-project/commit/3323321f4ef04308c50a3dc4ad17dfa1e13d8477.diff LOG: [lldb] Fix log & progress report for in-memory binaries Fix the log and progress report message for in-memory binaries. If there's no object file, use the name from the Module. With this patch we correctly show the library name when attaching to a remote process without an expanded shared cache. Differential revision: https://reviews.llvm.org/D122177 Added: Modified: lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Removed: ################################################################################ diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp index ff4d0a1cc41cf..d728978c3e3aa 100644 --- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -2201,14 +2201,14 @@ ParseNList(DataExtractor &nlist_data, lldb::offset_t &nlist_data_offset, enum { DebugSymbols = true, NonDebugSymbols = false }; void ObjectFileMachO::ParseSymtab(Symtab &symtab) { - LLDB_SCOPED_TIMERF("ObjectFileMachO::ParseSymtab () module = %s", - m_file.GetFilename().AsCString("")); ModuleSP module_sp(GetModule()); if (!module_sp) return; - Progress progress(llvm::formatv("Parsing symbol table for {0}", - m_file.GetFilename().AsCString("<Unknown>"))); + const FileSpec &file = m_file ? m_file : module_sp->GetFileSpec(); + const char *file_name = file.GetFilename().AsCString("<Unknown>"); + LLDB_SCOPED_TIMERF("ObjectFileMachO::ParseSymtab () module = %s", file_name); + Progress progress(llvm::formatv("Parsing symbol table for {0}", file_name)); llvm::MachO::symtab_command symtab_load_command = {0, 0, 0, 0, 0, 0}; llvm::MachO::linkedit_data_command function_starts_load_command = {0, 0, 0, 0}; _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits