From cfebbcfedd2d56a06be473ec2ce25a0b11ce4ff0 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Sat, 1 Oct 2011 01:37:20 +0000 Subject: [PATCH] Print object names in case we have a .o file in a static archive when logging DWARF errors and warnings. llvm-svn: 140918 --- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index 7beadf88c346..bebfdff30bfb 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -2347,6 +2347,9 @@ SymbolFileDWARF::ReportError (const char *format, ...) m_obj_file->GetFileSpec().GetDirectory().GetCString(), m_obj_file->GetFileSpec().GetFilename().GetCString()); + if (m_obj_file->GetModule()->GetObjectName()) + ::fprintf (stderr, "(%s) ", m_obj_file->GetModule()->GetObjectName().GetCString()); + va_list args; va_start (args, format); vfprintf (stderr, format, args); @@ -2361,6 +2364,9 @@ SymbolFileDWARF::ReportWarning (const char *format, ...) m_obj_file->GetFileSpec().GetDirectory().GetCString(), m_obj_file->GetFileSpec().GetFilename().GetCString()); + if (m_obj_file->GetModule()->GetObjectName()) + ::fprintf (stderr, "(%s) ", m_obj_file->GetModule()->GetObjectName().GetCString()); + va_list args; va_start (args, format); vfprintf (stderr, format, args);