Skip to content

Commit bfbd76b

Browse files
committed
Improve logging.
In Core files the object file may not have a *file* name but still a name.
1 parent e238ee5 commit bfbd76b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lldb/source/Plugins/LanguageRuntime/Swift/SwiftLanguageRuntime.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -887,14 +887,14 @@ bool SwiftLanguageRuntimeImpl::AddModuleToReflectionContext(
887887

888888
if (load_ptr == 0 || load_ptr == LLDB_INVALID_ADDRESS) {
889889
if (obj_file->GetType() != ObjectFile::eTypeJIT)
890-
if (Log *log = GetLog(LLDBLog::Types))
891-
log->Printf("%s: failed to get start address for %s.", __FUNCTION__,
892-
obj_file->GetFileSpec().GetFilename().GetCString());
890+
LLDB_LOG(GetLog(LLDBLog::Types),
891+
"{0}: failed to get start address for \"{1}\".", __FUNCTION__,
892+
module_sp->GetObjectName());
893893
return false;
894894
}
895895
bool found = HasReflectionInfo(obj_file);
896-
LLDB_LOGF(GetLog(LLDBLog::Types), "%s reflection metadata in \"%s\"",
897-
found ? "Adding" : "No", obj_file->GetFileSpec().GetPath().c_str());
896+
LLDB_LOG(GetLog(LLDBLog::Types), "{0} reflection metadata in \"{1}\"",
897+
found ? "Adding" : "No", module_sp->GetObjectName());
898898
if (!found)
899899
return true;
900900

0 commit comments

Comments
 (0)