mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 05:32:28 +08:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user