aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index 83ba277..d7a0baa 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -1632,17 +1632,9 @@ Status GDBRemoteCommunicationClient::GetMemoryRegionInfo(
}
}
} else if (name == "type") {
- std::string comma_sep_str = value.str();
- size_t comma_pos;
- while ((comma_pos = comma_sep_str.find(',')) != std::string::npos) {
- comma_sep_str[comma_pos] = '\0';
- if (comma_sep_str == "stack") {
+ for (llvm::StringRef entry : llvm::split(value, ',')) {
+ if (entry == "stack")
region_info.SetIsStackMemory(MemoryRegionInfo::eYes);
- }
- }
- // handle final (or only) type of "stack"
- if (comma_sep_str == "stack") {
- region_info.SetIsStackMemory(MemoryRegionInfo::eYes);
}
} else if (name == "error") {
StringExtractorGDBRemote error_extractor(value);