summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp6
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp9
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h3
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp6
4 files changed, 12 insertions, 12 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index 8d91db87b5a..550ec0ea499 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -3224,12 +3224,12 @@ ParseModuleSpec(StructuredData::Dictionary *dict) {
if (!dict)
return llvm::None;
- std::string string;
+ llvm::StringRef string;
uint64_t integer;
if (!dict->GetValueForKeyAsString("uuid", string))
return llvm::None;
- result.GetUUID().SetFromCString(string.c_str(), string.size());
+ result.GetUUID().SetFromStringRef(string, string.size());
if (!dict->GetValueForKeyAsInteger("file_offset", integer))
return llvm::None;
@@ -3241,7 +3241,7 @@ ParseModuleSpec(StructuredData::Dictionary *dict) {
if (!dict->GetValueForKeyAsString("triple", string))
return llvm::None;
- result.GetArchitecture().SetTriple(string.c_str());
+ result.GetArchitecture().SetTriple(string);
if (!dict->GetValueForKeyAsString("file_path", string))
return llvm::None;
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
index d0000a001ce..de2400c51ba 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
@@ -1140,7 +1140,7 @@ GDBRemoteCommunicationServerCommon::Handle_jModulesInfo(
packet_array->GetItemAtIndex(i)->GetAsDictionary();
if (!query)
continue;
- std::string file, triple;
+ llvm::StringRef file, triple;
if (!query->GetValueForKeyAsString("file", file) ||
!query->GetValueForKeyAsString("triple", triple))
continue;
@@ -1278,9 +1278,10 @@ FileSpec GDBRemoteCommunicationServerCommon::FindModuleFile(
#endif
}
-ModuleSpec GDBRemoteCommunicationServerCommon::GetModuleInfo(
- const std::string &module_path, const std::string &triple) {
- ArchSpec arch(triple.c_str());
+ModuleSpec
+GDBRemoteCommunicationServerCommon::GetModuleInfo(llvm::StringRef module_path,
+ llvm::StringRef triple) {
+ ArchSpec arch(triple);
const FileSpec req_module_path_spec(module_path, true);
const FileSpec module_path_spec =
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h
index 14d5612af20..e9ab8f1a11d 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h
@@ -153,8 +153,7 @@ protected:
const ArchSpec &arch);
private:
- ModuleSpec GetModuleInfo(const std::string &module_path,
- const std::string &triple);
+ ModuleSpec GetModuleInfo(llvm::StringRef module_path, llvm::StringRef triple);
};
} // namespace process_gdb_remote
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 37a4153711d..64684c5963b 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -2113,9 +2113,9 @@ ProcessGDBRemote::SetThreadStopInfo(StructuredData::Dictionary *thread_dict) {
if (mem_cache_dict->GetValueForKeyAsInteger<lldb::addr_t>(
"address", mem_cache_addr)) {
if (mem_cache_addr != LLDB_INVALID_ADDRESS) {
- StringExtractor bytes;
- if (mem_cache_dict->GetValueForKeyAsString(
- "bytes", bytes.GetStringRef())) {
+ llvm::StringRef str;
+ if (mem_cache_dict->GetValueForKeyAsString("bytes", str)) {
+ StringExtractor bytes(str);
bytes.SetFilePos(0);
const size_t byte_size = bytes.GetStringRef().size() / 2;
OpenPOWER on IntegriCloud