This was previously initialized by ProcessGDBRemote::Initialize but lldb-server does not contain ProcessGDBRemote anymore so this needs to be initialized directly.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Please see my comments.
| source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | ||
|---|---|---|
| 142 ↗ | (On Diff #21525) | Maybe introduce ProcessGDBRemoteLog::Initialize() instead of this method? We can put Log::Callbacks log_callbacks = {
ProcessGDBRemoteLog::DisableLog,
ProcessGDBRemoteLog::EnableLog,
ProcessGDBRemoteLog::ListLogCategories
};
Log::RegisterLogChannel (g_name, log_callbacks);inside of ProcessGDBRemoteLog::Initialize and call it from ProcessGDBRemote::Initialize and lldb-server.cpp. |
| 147 ↗ | (On Diff #21525) | Could you use std::call_once here? |
| tools/lldb-server/lldb-server.cpp | ||
| 11 ↗ | (On Diff #21525) | GDBRemoteCommunication.h ? |
| source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | ||
|---|---|---|
| 142 ↗ | (On Diff #21525) | I like your idea about creating ProcessGDBRemoteLog::Initialize, but I would prefer to call it from lldb.cpp:initializeLLGS(). |
Move Log initialization to Log class Initialize functions and use std::call_once to guard against multiple calls.
Please update ProcessFreeBSD::Initialize() to use the newly created ProcessPOSIXLog::Initialize() function.
| source/Plugins/Process/Linux/ProcessLinux.cpp | ||
|---|---|---|
| 64 | Please move this line into ProcessPOSIXLog::Initialize() | |
| source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp | ||
| 41 | Please make it an argument, instead of a hard coded string. | |
Looks good.
| tools/lldb-server/lldb-gdbserver.cpp | ||
|---|---|---|
| 490–494 | We'll need to apply such conditional compilation in lldb-platform.cpp as well https://github.com/llvm-mirror/lldb/blob/master/tools/lldb-server/lldb-platform.cpp#L108 - but not necessary for this CL. | |
| tools/lldb-server/lldb-gdbserver.cpp | ||
|---|---|---|
| 490–494 | lldb-platform not used on Windows (at least not yet) | |
Please move this line into ProcessPOSIXLog::Initialize()