summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectPlatform.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands/CommandObjectPlatform.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectPlatform.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectPlatform.cpp b/lldb/source/Commands/CommandObjectPlatform.cpp
index 1a981ce49ea..295f4c7133c 100644
--- a/lldb/source/Commands/CommandObjectPlatform.cpp
+++ b/lldb/source/Commands/CommandObjectPlatform.cpp
@@ -29,6 +29,8 @@
#include "lldb/Target/Process.h"
#include "lldb/Utility/Utils.h"
+#include "llvm/ADT/SmallString.h"
+
using namespace lldb;
using namespace lldb_private;
@@ -1057,9 +1059,9 @@ protected:
Module *exe_module = target->GetExecutableModulePointer();
if (exe_module) {
m_options.launch_info.GetExecutableFile() = exe_module->GetFileSpec();
- char exe_path[PATH_MAX];
- if (m_options.launch_info.GetExecutableFile().GetPath(exe_path,
- sizeof(exe_path)))
+ llvm::SmallString<PATH_MAX> exe_path;
+ m_options.launch_info.GetExecutableFile().GetPath(exe_path);
+ if (!exe_path.empty())
m_options.launch_info.GetArguments().AppendArgument(exe_path);
m_options.launch_info.GetArchitecture() = exe_module->GetArchitecture();
}
OpenPOWER on IntegriCloud