Skip to content

Commit a4e2c9f

Browse files
[lldb] Use correct path for debugserver
1 parent 616d104 commit a4e2c9f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lldb/tools/lldb-server/SystemInitializerLLGS.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,17 @@
1111

1212
#include "lldb/Initialization/SystemInitializer.h"
1313
#include "lldb/Initialization/SystemInitializerCommon.h"
14+
#include "lldb/Utility/FileSpec.h"
1415

1516
class SystemInitializerLLGS : public lldb_private::SystemInitializerCommon {
1617
public:
17-
SystemInitializerLLGS() : SystemInitializerCommon(nullptr) {}
18+
SystemInitializerLLGS()
19+
: SystemInitializerCommon(
20+
// Finding the shared libraries directory on lldb-server is broken
21+
// since lldb-server isn't dynamically linked with liblldb.so.
22+
// Clearing the filespec here causes GetShlibDir to fail and
23+
// GetSupportExeDir to fall-back to using the binary path instead.
24+
[](lldb_private::FileSpec &file) { file.Clear(); }) {}
1825

1926
llvm::Error Initialize() override;
2027
void Terminate() override;

0 commit comments

Comments
 (0)