uint32_t GetMaximumMemReadSize() const;
FileSpec GetStandardInputPath() const;
-
- void SetStandardInputPath(const char *path);
-
+ FileSpec GetStandardErrorPath() const;
FileSpec GetStandardOutputPath() const;
- void SetStandardOutputPath(const char *path);
-
- FileSpec GetStandardErrorPath() const;
+ void SetStandardInputPath(llvm::StringRef path);
+ void SetStandardOutputPath(llvm::StringRef path);
+ void SetStandardErrorPath(llvm::StringRef path);
- void SetStandardErrorPath(const char *path);
+ void SetStandardInputPath(const char *path) = delete;
+ void SetStandardOutputPath(const char *path) = delete;
+ void SetStandardErrorPath(const char *path) = delete;
bool GetBreakpointsConsultPlatformAvoidList();
return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr, idx);
}
-void TargetProperties::SetStandardInputPath(const char *p) {
+void TargetProperties::SetStandardInputPath(llvm::StringRef path) {
const uint32_t idx = ePropertyInputPath;
- m_collection_sp->SetPropertyAtIndexAsString(
- nullptr, idx, llvm::StringRef::withNullAsEmpty(p));
+ m_collection_sp->SetPropertyAtIndexAsString(nullptr, idx, path);
}
FileSpec TargetProperties::GetStandardOutputPath() const {
return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr, idx);
}
-void TargetProperties::SetStandardOutputPath(const char *p) {
+void TargetProperties::SetStandardOutputPath(llvm::StringRef path) {
const uint32_t idx = ePropertyOutputPath;
- m_collection_sp->SetPropertyAtIndexAsString(
- nullptr, idx, llvm::StringRef::withNullAsEmpty(p));
+ m_collection_sp->SetPropertyAtIndexAsString(nullptr, idx, path);
}
FileSpec TargetProperties::GetStandardErrorPath() const {
return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr, idx);
}
+void TargetProperties::SetStandardErrorPath(llvm::StringRef path) {
+ const uint32_t idx = ePropertyErrorPath;
+ m_collection_sp->SetPropertyAtIndexAsString(nullptr, idx, path);
+}
+
LanguageType TargetProperties::GetLanguage() const {
OptionValueLanguage *value =
m_collection_sp->GetPropertyAtIndexAsOptionValueLanguage(
return nullptr;
}
-void TargetProperties::SetStandardErrorPath(const char *p) {
- const uint32_t idx = ePropertyErrorPath;
- m_collection_sp->SetPropertyAtIndexAsString(
- nullptr, idx, llvm::StringRef::withNullAsEmpty(p));
-}
-
bool TargetProperties::GetBreakpointsConsultPlatformAvoidList() {
const uint32_t idx = ePropertyBreakpointUseAvoidList;
return m_collection_sp->GetPropertyAtIndexAsBoolean(
const FileAction *input_file_action =
launch_info.GetFileActionForFD(STDIN_FILENO);
if (input_file_action) {
- const char *input_path = input_file_action->GetPath();
- if (input_path)
- SetStandardInputPath(input_path);
+ SetStandardInputPath(input_file_action->GetPath());
}
const FileAction *output_file_action =
launch_info.GetFileActionForFD(STDOUT_FILENO);
if (output_file_action) {
- const char *output_path = output_file_action->GetPath();
- if (output_path)
- SetStandardOutputPath(output_path);
+ SetStandardOutputPath(output_file_action->GetPath());
}
const FileAction *error_file_action =
launch_info.GetFileActionForFD(STDERR_FILENO);
if (error_file_action) {
- const char *error_path = error_file_action->GetPath();
- if (error_path)
- SetStandardErrorPath(error_path);
+ SetStandardErrorPath(error_file_action->GetPath());
}
SetDetachOnError(launch_info.GetFlags().Test(lldb::eLaunchFlagDetachOnError));
SetDisableASLR(launch_info.GetFlags().Test(lldb::eLaunchFlagDisableASLR));