Initialize ProcessPOSIXLog by NativeProcessLinux
Previously it was initialized by ProcessLinux but lldb-server don't contain ProcessLinux anymore (since the separation of the dependencies) so it have to be initialized by NativeProcessLinux also.
Differential D8080
Initialize ProcessPOSIXLog by NativeProcessLinux tberghammer on Mar 5 2015, 6:28 AM. Authored by
Details Initialize ProcessPOSIXLog by NativeProcessLinux Previously it was initialized by ProcessLinux but lldb-server don't contain ProcessLinux anymore (since the separation of the dependencies) so it have to be initialized by NativeProcessLinux also.
Diff Detail
Event TimelineComment Actions Ah of course, makes sense. Can we remove the common code from ProcessLinux and only register the plugin in ProcessLinux::Initialize or implicitly initialize NativeProcessLinux from ProcessLinux::Initialize? Comment Actions We can, but ProcessPOSIXLog is a dependency for both of them, so I think it isn't a good idea. If we want to reduce the amount of code duplication, then I would suggest to simplify the process of registering a log channel to just one function call (e.g.: create a ProcessPOSIXLog::RegisterLogger (const ConstString& name)) function. Comment Actions But lldb_private::Initialize initializes everything (i.e. calls lldb_private::InitializeForLLGS), I think it's reasonable to expect there are some inter-dependencies. That being said I'm fine with moving it to ProcessPOSIXLog::RegisterLogger as long as it doesn't matter that it will be called twice, just trying to reduce code duplication. |