summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands')
-rw-r--r--lldb/source/Commands/CommandObjectMemory.cpp3
-rw-r--r--lldb/source/Commands/CommandObjectProcess.cpp6
-rw-r--r--lldb/source/Commands/CommandObjectSettings.cpp2
3 files changed, 5 insertions, 6 deletions
diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp
index e49f49f2621..727a7fa6bbe 100644
--- a/lldb/source/Commands/CommandObjectMemory.cpp
+++ b/lldb/source/Commands/CommandObjectMemory.cpp
@@ -1062,8 +1062,7 @@ protected:
DataBufferHeap buffer;
if (m_memory_options.m_string.OptionWasSet())
- buffer.CopyData(m_memory_options.m_string.GetStringValue(),
- strlen(m_memory_options.m_string.GetStringValue()));
+ buffer.CopyData(m_memory_options.m_string.GetStringValue());
else if (m_memory_options.m_expr.OptionWasSet()) {
StackFrame *frame = m_exe_ctx.GetFramePtr();
ValueObjectSP result_sp;
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp
index dea996c0ff9..144ba3f1c48 100644
--- a/lldb/source/Commands/CommandObjectProcess.cpp
+++ b/lldb/source/Commands/CommandObjectProcess.cpp
@@ -175,7 +175,7 @@ protected:
if (!StopProcessIfNecessary(m_exe_ctx.GetProcessPtr(), state, result))
return false;
- const char *target_settings_argv0 = target->GetArg0();
+ llvm::StringRef target_settings_argv0 = target->GetArg0();
// Determine whether we will disable ASLR or leave it in the default state
// (i.e. enabled if the platform supports it).
@@ -210,9 +210,9 @@ protected:
m_options.launch_info.GetEnvironmentEntries().AppendArguments(
environment);
- if (target_settings_argv0) {
+ if (!target_settings_argv0.empty()) {
m_options.launch_info.GetArguments().AppendArgument(
- llvm::StringRef(target_settings_argv0));
+ target_settings_argv0);
m_options.launch_info.SetExecutableFile(
exe_module_sp->GetPlatformFileSpec(), false);
} else {
diff --git a/lldb/source/Commands/CommandObjectSettings.cpp b/lldb/source/Commands/CommandObjectSettings.cpp
index 54efead2070..0a97804fbf6 100644
--- a/lldb/source/Commands/CommandObjectSettings.cpp
+++ b/lldb/source/Commands/CommandObjectSettings.cpp
@@ -1011,7 +1011,7 @@ protected:
}
Error error(m_interpreter.GetDebugger().SetPropertyValue(
- &m_exe_ctx, eVarSetOperationClear, var_name, nullptr));
+ &m_exe_ctx, eVarSetOperationClear, var_name, llvm::StringRef()));
if (error.Fail()) {
result.AppendError(error.AsCString());
result.SetStatus(eReturnStatusFailed);
OpenPOWER on IntegriCloud