summaryrefslogtreecommitdiffstats
path: root/lldb
diff options
context:
space:
mode:
Diffstat (limited to 'lldb')
-rw-r--r--lldb/include/lldb/Core/ValueObjectMemory.h10
-rw-r--r--lldb/source/Breakpoint/Watchpoint.cpp6
-rw-r--r--lldb/source/Commands/CommandObjectMemory.cpp2
-rw-r--r--lldb/source/Core/ValueObjectMemory.cpp10
-rw-r--r--lldb/source/Target/StackFrame.cpp2
5 files changed, 17 insertions, 13 deletions
diff --git a/lldb/include/lldb/Core/ValueObjectMemory.h b/lldb/include/lldb/Core/ValueObjectMemory.h
index d7a064028c5..f9891c41cec 100644
--- a/lldb/include/lldb/Core/ValueObjectMemory.h
+++ b/lldb/include/lldb/Core/ValueObjectMemory.h
@@ -28,11 +28,13 @@ public:
~ValueObjectMemory() override;
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope,
- const char *name, const Address &address,
+ llvm::StringRef name,
+ const Address &address,
lldb::TypeSP &type_sp);
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope,
- const char *name, const Address &address,
+ llvm::StringRef name,
+ const Address &address,
const CompilerType &ast_type);
uint64_t GetByteSize() override;
@@ -59,10 +61,10 @@ protected:
CompilerType m_compiler_type;
private:
- ValueObjectMemory(ExecutionContextScope *exe_scope, const char *name,
+ ValueObjectMemory(ExecutionContextScope *exe_scope, llvm::StringRef name,
const Address &address, lldb::TypeSP &type_sp);
- ValueObjectMemory(ExecutionContextScope *exe_scope, const char *name,
+ ValueObjectMemory(ExecutionContextScope *exe_scope, llvm::StringRef name,
const Address &address, const CompilerType &ast_type);
//------------------------------------------------------------------
// For ValueObject only
diff --git a/lldb/source/Breakpoint/Watchpoint.cpp b/lldb/source/Breakpoint/Watchpoint.cpp
index b213d0ee1b0..13dba8c8b19 100644
--- a/lldb/source/Breakpoint/Watchpoint.cpp
+++ b/lldb/source/Breakpoint/Watchpoint.cpp
@@ -109,9 +109,9 @@ bool Watchpoint::CaptureWatchedValue(const ExecutionContext &exe_ctx) {
// we can go grab the value raw and print it as unsigned.
return false;
}
- m_new_value_sp =
- ValueObjectMemory::Create(exe_ctx.GetBestExecutionContextScope(),
- watch_name.AsCString(), watch_address, m_type);
+ m_new_value_sp = ValueObjectMemory::Create(
+ exe_ctx.GetBestExecutionContextScope(), watch_name.GetStringRef(),
+ watch_address, m_type);
m_new_value_sp = m_new_value_sp->CreateConstantValue(watch_name);
return (m_new_value_sp && m_new_value_sp->GetError().Success());
}
diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp
index 553357f2d07..5d0dc1126d9 100644
--- a/lldb/source/Commands/CommandObjectMemory.cpp
+++ b/lldb/source/Commands/CommandObjectMemory.cpp
@@ -810,7 +810,7 @@ protected:
StreamString name_strm;
name_strm.Printf("0x%" PRIx64, item_addr);
ValueObjectSP valobj_sp(ValueObjectMemory::Create(
- exe_scope, name_strm.GetString().c_str(), address, clang_ast_type));
+ exe_scope, name_strm.GetString(), address, clang_ast_type));
if (valobj_sp) {
Format format = m_format_options.GetFormat();
if (format != eFormatDefault)
diff --git a/lldb/source/Core/ValueObjectMemory.cpp b/lldb/source/Core/ValueObjectMemory.cpp
index d631098243a..86747b84522 100644
--- a/lldb/source/Core/ValueObjectMemory.cpp
+++ b/lldb/source/Core/ValueObjectMemory.cpp
@@ -33,21 +33,22 @@ using namespace lldb;
using namespace lldb_private;
ValueObjectSP ValueObjectMemory::Create(ExecutionContextScope *exe_scope,
- const char *name,
+ llvm::StringRef name,
const Address &address,
lldb::TypeSP &type_sp) {
return (new ValueObjectMemory(exe_scope, name, address, type_sp))->GetSP();
}
ValueObjectSP ValueObjectMemory::Create(ExecutionContextScope *exe_scope,
- const char *name,
+ llvm::StringRef name,
const Address &address,
const CompilerType &ast_type) {
return (new ValueObjectMemory(exe_scope, name, address, ast_type))->GetSP();
}
ValueObjectMemory::ValueObjectMemory(ExecutionContextScope *exe_scope,
- const char *name, const Address &address,
+ llvm::StringRef name,
+ const Address &address,
lldb::TypeSP &type_sp)
: ValueObject(exe_scope), m_address(address), m_type_sp(type_sp),
m_compiler_type() {
@@ -73,7 +74,8 @@ ValueObjectMemory::ValueObjectMemory(ExecutionContextScope *exe_scope,
}
ValueObjectMemory::ValueObjectMemory(ExecutionContextScope *exe_scope,
- const char *name, const Address &address,
+ llvm::StringRef name,
+ const Address &address,
const CompilerType &ast_type)
: ValueObject(exe_scope), m_address(address), m_type_sp(),
m_compiler_type(ast_type) {
diff --git a/lldb/source/Target/StackFrame.cpp b/lldb/source/Target/StackFrame.cpp
index 1cec05c440e..9ef6109eb91 100644
--- a/lldb/source/Target/StackFrame.cpp
+++ b/lldb/source/Target/StackFrame.cpp
@@ -1595,7 +1595,7 @@ lldb::ValueObjectSP DoGuessValueAt(StackFrame &frame, ConstString reg,
name_str.append("()");
Address return_value_address(return_value.GetAsUInt64());
ValueObjectSP return_value_sp = ValueObjectMemory::Create(
- &frame, name_str.c_str(), return_value_address, return_type);
+ &frame, name_str, return_value_address, return_type);
return GetValueForDereferincingOffset(frame, return_value_sp, offset);
}
}
OpenPOWER on IntegriCloud