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/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.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/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp')
-rw-r--r-- | lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp index 0dbad50a884..8225d3decf0 100644 --- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp +++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp @@ -326,12 +326,11 @@ DynamicLoaderDarwinKernel::UpdateImageLoadAddress (OSKextLoadedKextSummary& info } else { - fprintf (stderr, - "warning: unable to find and load segment named '%s' at 0x%llx in '%s/%s' in macosx dynamic loader plug-in.\n", - info.segments[i].name.AsCString("<invalid>"), - (uint64_t)new_section_load_addr, - image_object_file->GetFileSpec().GetDirectory().AsCString(), - image_object_file->GetFileSpec().GetFilename().AsCString()); + Host::SystemLog (Host::eSystemLogWarning, "warning: unable to find and load segment named '%s' at 0x%llx in '%s/%s' in macosx dynamic loader plug-in.\n", + info.segments[i].name.AsCString("<invalid>"), + (uint64_t)new_section_load_addr, + image_object_file->GetFileSpec().GetDirectory().AsCString(), + image_object_file->GetFileSpec().GetFilename().AsCString()); } } else @@ -389,11 +388,11 @@ DynamicLoaderDarwinKernel::UnloadImageLoadAddress (OSKextLoadedKextSummary& info } else { - fprintf (stderr, - "warning: unable to find and unload segment named '%s' in '%s/%s' in macosx dynamic loader plug-in.\n", - info.segments[i].name.AsCString("<invalid>"), - image_object_file->GetFileSpec().GetDirectory().AsCString(), - image_object_file->GetFileSpec().GetFilename().AsCString()); + Host::SystemLog (Host::eSystemLogWarning, + "warning: unable to find and unload segment named '%s' in '%s/%s' in macosx dynamic loader plug-in.\n", + info.segments[i].name.AsCString("<invalid>"), + image_object_file->GetFileSpec().GetDirectory().AsCString(), + image_object_file->GetFileSpec().GetFilename().AsCString()); } } } |