diff options
| author | Tamas Berghammer <tberghammer@google.com> | 2015-03-06 15:47:23 +0000 |
|---|---|---|
| committer | Tamas Berghammer <tberghammer@google.com> | 2015-03-06 15:47:23 +0000 |
| commit | 6ad63744b337892c119c5dbefcb85eef8fc22415 (patch) | |
| tree | 2f5f43ee7b73223fa8e5a14c523d2fcbc35b96ff /lldb/source/Plugins/Process/Linux | |
| parent | 5b75f4a3564f004a02ed8d65322fce694b58cb33 (diff) | |
| download | bcm5719-llvm-6ad63744b337892c119c5dbefcb85eef8fc22415.tar.gz bcm5719-llvm-6ad63744b337892c119c5dbefcb85eef8fc22415.zip | |
Initialize ProcessPOSIXLog by NativeProcessLinux
Previously it was initialized by ProcessLinux but lldb-server don't
contain ProcessLinux anymore so it have to be initialized by
NativeProcessLinux also.
Differential revision: http://reviews.llvm.org/D8080
llvm-svn: 231482
Diffstat (limited to 'lldb/source/Plugins/Process/Linux')
| -rw-r--r-- | lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp | 21 | ||||
| -rw-r--r-- | lldb/source/Plugins/Process/Linux/NativeProcessLinux.h | 3 |
2 files changed, 24 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp index 78b98f29d36..9b91751aa0d 100644 --- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -1125,6 +1125,27 @@ NativeProcessLinux::AttachArgs::~AttachArgs() // Public Static Methods // ----------------------------------------------------------------------------- +void +NativeProcessLinux::Initialize() +{ + static ConstString g_name("linux"); + static bool g_initialized = false; + + if (!g_initialized) + { + g_initialized = true; + + Log::Callbacks log_callbacks = { + ProcessPOSIXLog::DisableLog, + ProcessPOSIXLog::EnableLog, + ProcessPOSIXLog::ListLogCategories + }; + + Log::RegisterLogChannel (g_name, log_callbacks); + ProcessPOSIXLog::RegisterPluginName (g_name); + } +} + lldb_private::Error NativeProcessLinux::LaunchProcess ( lldb_private::Module *exe_module, diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.h b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.h index 76aff7d41e3..7484fea8b32 100644 --- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.h +++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.h @@ -48,6 +48,9 @@ namespace lldb_private // --------------------------------------------------------------------- // Public Static Methods // --------------------------------------------------------------------- + static void + Initialize(); + static lldb_private::Error LaunchProcess ( Module *exe_module, |

