diff options
author | Greg Clayton <gclayton@apple.com> | 2012-01-05 03:57:59 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-01-05 03:57:59 +0000 |
commit | e38a5edd9e878c21ab794e4a37fbe4af3e270412 (patch) | |
tree | ce745a042987f5a73199c8843c806a9c98af875b /lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp | |
parent | 71c8055f8e335310d1feb2b35fc4b6677b2a1d43 (diff) | |
download | bcm5719-llvm-e38a5edd9e878c21ab794e4a37fbe4af3e270412.tar.gz bcm5719-llvm-e38a5edd9e878c21ab794e4a37fbe4af3e270412.zip |
Added code in the Host layer that can report system log messages
so that we don't have "fprintf (stderr, ...)" calls sprinkled everywhere.
Changed all needed locations over to using this.
For non-darwin, we log to stderr only. On darwin, we log to stderr _and_
to ASL (Apple System Log facility). This will allow GUI apps to have a place
for these error and warning messages to go, and also allows the command line
apps to log directly to the terminal.
llvm-svn: 147596
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp')
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp index e8b0e6bebee..2b263aae498 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp @@ -170,9 +170,9 @@ DWARFCompileUnit::ExtractDIEsIfNeeded (bool cu_die_only) LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO)); if (log) { - m_dwarf2Data->LogMessage (log.get(), - "DWARFCompileUnit::ExtractDIEsIfNeeded () for compile unit at .debug_info[0x%8.8x]", - GetOffset()); + m_dwarf2Data->GetObjectFile()->GetModule()->LogMessage (log.get(), + "DWARFCompileUnit::ExtractDIEsIfNeeded () for compile unit at .debug_info[0x%8.8x]", + GetOffset()); } } @@ -266,9 +266,9 @@ DWARFCompileUnit::ExtractDIEsIfNeeded (bool cu_die_only) // unit header). if (offset > next_cu_offset) { - m_dwarf2Data->ReportWarning ("DWARF compile unit extends beyond its bounds cu 0x%8.8x at 0x%8.8x\n", - GetOffset(), - offset); + m_dwarf2Data->GetObjectFile()->GetModule()->ReportWarning ("DWARF compile unit extends beyond its bounds cu 0x%8.8x at 0x%8.8x\n", + GetOffset(), + offset); } // Since std::vector objects will double their size, we really need to @@ -404,9 +404,9 @@ DWARFCompileUnit::GetFunctionAranges () if (log) { - m_dwarf2Data->LogMessage (log.get(), - "DWARFCompileUnit::GetFunctionAranges() for compile unit at .debug_info[0x%8.8x]", - GetOffset()); + m_dwarf2Data->GetObjectFile()->GetModule()->LogMessage (log.get(), + "DWARFCompileUnit::GetFunctionAranges() for compile unit at .debug_info[0x%8.8x]", + GetOffset()); } DIE()->BuildFunctionAddressRangeTable (m_dwarf2Data, this, m_func_aranges_ap.get()); const bool minimize = false; @@ -577,9 +577,9 @@ DWARFCompileUnit::Index (const uint32_t cu_idx, if (log) { - m_dwarf2Data->LogMessage (log.get(), - "DWARFCompileUnit::Index() for compile unit at .debug_info[0x%8.8x]", - GetOffset()); + m_dwarf2Data->GetObjectFile()->GetModule()->LogMessage (log.get(), + "DWARFCompileUnit::Index() for compile unit at .debug_info[0x%8.8x]", + GetOffset()); } DWARFDebugInfoEntry::const_iterator pos; @@ -765,8 +765,7 @@ DWARFCompileUnit::Index (const uint32_t cu_idx, { if (specification_die_offset != DW_INVALID_OFFSET) { - const DWARFDebugInfoEntry *specification_die - = m_dwarf2Data->DebugInfo()->GetDIEPtr (specification_die_offset, NULL); + const DWARFDebugInfoEntry *specification_die = m_dwarf2Data->DebugInfo()->GetDIEPtr (specification_die_offset, NULL); if (specification_die) { parent = specification_die->GetParent(); |