mstorsjo created this revision.
mstorsjo added reviewers: amccarth, labath, aleksandr.urakov.
Herald added a project: LLDB.
This should allow lldb-server to operate on files with non-ascii pathnames.
I tried looking around in lldb/tools, and this seemed like the only other tool
(other than the main lldb driver itself) that would be used (implicitly) by an
end user (which could be working in non-ascii paths).
This does the same as for D68770 <https://reviews.llvm.org/D68770> (where the
main driver earlier was using custom code in the driver to convert unicode to
utf8), while lldb-server didn't have any unicode handling at all before (where
the main arguments would be given in the native local codepage, while the rest
of llvm internals expect utf8).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D68864
Files:
lldb/tools/lldb-server/lldb-server.cpp
Index: lldb/tools/lldb-server/lldb-server.cpp
===================================================================
--- lldb/tools/lldb-server/lldb-server.cpp
+++ lldb/tools/lldb-server/lldb-server.cpp
@@ -12,6 +12,7 @@
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/PrettyStackTrace.h"
#include "llvm/Support/Signals.h"
@@ -48,6 +49,7 @@
// main
int main(int argc, char *argv[]) {
+ llvm::InitLLVM IL(argc, argv);
llvm::StringRef ToolName = argv[0];
llvm::sys::PrintStackTraceOnErrorSignal(ToolName);
llvm::PrettyStackTraceProgram X(argc, argv);
Index: lldb/tools/lldb-server/lldb-server.cpp
===================================================================
--- lldb/tools/lldb-server/lldb-server.cpp
+++ lldb/tools/lldb-server/lldb-server.cpp
@@ -12,6 +12,7 @@
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/PrettyStackTrace.h"
#include "llvm/Support/Signals.h"
@@ -48,6 +49,7 @@
// main
int main(int argc, char *argv[]) {
+ llvm::InitLLVM IL(argc, argv);
llvm::StringRef ToolName = argv[0];
llvm::sys::PrintStackTraceOnErrorSignal(ToolName);
llvm::PrettyStackTraceProgram X(argc, argv);
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits