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/Core/ModuleList.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/Core/ModuleList.cpp')
-rw-r--r-- | lldb/source/Core/ModuleList.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp index 9799f924575..47ca09c5399 100644 --- a/lldb/source/Core/ModuleList.cpp +++ b/lldb/source/Core/ModuleList.cpp @@ -15,6 +15,7 @@ // Project includes #include "lldb/Core/Log.h" #include "lldb/Core/Module.h" +#include "lldb/Host/Host.h" #include "lldb/Host/Symbols.h" #include "lldb/Symbol/ClangNamespaceDecl.h" #include "lldb/Symbol/ObjectFile.h" @@ -700,11 +701,12 @@ ModuleList::GetModuleSP (const Module *module_ptr) char uuid_cstr[256]; const_cast<Module *>(module_ptr)->GetUUID().GetAsCString (uuid_cstr, sizeof(uuid_cstr)); const FileSpec &module_file_spec = module_ptr->GetFileSpec(); - fprintf (stderr, "warning: module not in shared module list: %s (%s) \"%s/%s\"\n", - uuid_cstr, - module_ptr->GetArchitecture().GetArchitectureName(), - module_file_spec.GetDirectory().GetCString(), - module_file_spec.GetFilename().GetCString()); + Host::SystemLog (Host::eSystemLogWarning, + "warning: module not in shared module list: %s (%s) \"%s/%s\"\n", + uuid_cstr, + module_ptr->GetArchitecture().GetArchitectureName(), + module_file_spec.GetDirectory().GetCString(), + module_file_spec.GetFilename().GetCString()); } } return module_sp; |