llvm-project/lldb/tools/lldb-server/SystemInitializerLLGS.h
Jonas Devlieghere 329c52c100
[lldb] Change the way the shlib directory helper is set (#183637)
This PR changes the way we set the shlib directory helper. Instead of
setting it while initializing the Host plugin, we register it when
initializing the Python plugin. The motivation is that the current
approach is incompatible with the dynamically linked script
interpreters, as they will not have been loaded at the time the Host
plugin is initialized.

The downside of the new approach is that we set the helper after having
initialized the Host plugin, which theoretically introduces a small
window where someone could query the helper before it has been set.
Fortunately the window is pretty small and limited to when we're
initializing plugins, but it's less "pure" than what we had previously.
That said, I think it balances out with removing the plugin include.
2026-02-27 15:27:02 -08:00

24 lines
860 B
C++

//===-- SystemInitializerLLGS.h ---------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLDB_TOOLS_LLDB_SERVER_SYSTEMINITIALIZERLLGS_H
#define LLDB_TOOLS_LLDB_SERVER_SYSTEMINITIALIZERLLGS_H
#include "lldb/Initialization/SystemInitializer.h"
#include "lldb/Initialization/SystemInitializerCommon.h"
class SystemInitializerLLGS : public lldb_private::SystemInitializerCommon {
public:
SystemInitializerLLGS() : SystemInitializerCommon() {}
llvm::Error Initialize() override;
void Terminate() override;
};
#endif // LLDB_TOOLS_LLDB_SERVER_SYSTEMINITIALIZERLLGS_H