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/Symbol/DWARFCallFrameInfo.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/Symbol/DWARFCallFrameInfo.cpp')
| -rw-r--r-- | lldb/source/Symbol/DWARFCallFrameInfo.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lldb/source/Symbol/DWARFCallFrameInfo.cpp b/lldb/source/Symbol/DWARFCallFrameInfo.cpp index 2a3b91ed0ca..3cf8673d517 100644 --- a/lldb/source/Symbol/DWARFCallFrameInfo.cpp +++ b/lldb/source/Symbol/DWARFCallFrameInfo.cpp @@ -14,14 +14,15 @@ #include "lldb/Core/Log.h" #include "lldb/Core/Section.h" -#include "lldb/Symbol/DWARFCallFrameInfo.h" #include "lldb/Core/ArchSpec.h" #include "lldb/Core/Module.h" +#include "lldb/Core/Section.h" +#include "lldb/Host/Host.h" +#include "lldb/Symbol/DWARFCallFrameInfo.h" #include "lldb/Symbol/ObjectFile.h" +#include "lldb/Symbol/UnwindPlan.h" #include "lldb/Target/RegisterContext.h" -#include "lldb/Core/Section.h" #include "lldb/Target/Thread.h" -#include "lldb/Symbol/UnwindPlan.h" using namespace lldb; using namespace lldb_private; @@ -146,7 +147,7 @@ DWARFCallFrameInfo::ParseCIE (const dw_offset_t cie_offset) if (i == CFI_AUG_MAX_SIZE && cie_sp->augmentation[CFI_AUG_MAX_SIZE-1] != '\0') { - fprintf(stderr, "CIE parse error: CIE augmentation string was too large for the fixed sized buffer of %d bytes.\n", CFI_AUG_MAX_SIZE); + Host::SystemLog (Host::eSystemLogError, "CIE parse error: CIE augmentation string was too large for the fixed sized buffer of %d bytes.\n", CFI_AUG_MAX_SIZE); return cie_sp; } cie_sp->code_align = (uint32_t)m_cfi_data.GetULEB128(&offset); @@ -330,11 +331,11 @@ DWARFCallFrameInfo::GetFDEIndex () } else { - fprintf (stderr, - "error: unable to find CIE at 0x%8.8x for cie_id = 0x%8.8x for entry at 0x%8.8x.\n", - cie_offset, - cie_id, - current_entry); + Host::SystemLog (Host::eSystemLogError, + "error: unable to find CIE at 0x%8.8x for cie_id = 0x%8.8x for entry at 0x%8.8x.\n", + cie_offset, + cie_id, + current_entry); } offset = next_entry; } |

