aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
index b4fb5b6..f9d3749 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
@@ -340,13 +340,13 @@ GDBRemoteCommunicationServerCommon::Handle_qfProcessInfo(
llvm::StringRef value;
while (packet.GetNameColonValue(key, value)) {
bool success = true;
- if (key.equals("name")) {
+ if (key == "name") {
StringExtractor extractor(value);
std::string file;
extractor.GetHexByteString(file);
match_info.GetProcessInfo().GetExecutableFile().SetFile(
file, FileSpec::Style::native);
- } else if (key.equals("name_match")) {
+ } else if (key == "name_match") {
NameMatch name_match = llvm::StringSwitch<NameMatch>(value)
.Case("equals", NameMatch::Equals)
.Case("starts_with", NameMatch::StartsWith)
@@ -357,40 +357,40 @@ GDBRemoteCommunicationServerCommon::Handle_qfProcessInfo(
match_info.SetNameMatchType(name_match);
if (name_match == NameMatch::Ignore)
return SendErrorResponse(2);
- } else if (key.equals("pid")) {
+ } else if (key == "pid") {
lldb::pid_t pid = LLDB_INVALID_PROCESS_ID;
if (value.getAsInteger(0, pid))
return SendErrorResponse(2);
match_info.GetProcessInfo().SetProcessID(pid);
- } else if (key.equals("parent_pid")) {
+ } else if (key == "parent_pid") {
lldb::pid_t pid = LLDB_INVALID_PROCESS_ID;
if (value.getAsInteger(0, pid))
return SendErrorResponse(2);
match_info.GetProcessInfo().SetParentProcessID(pid);
- } else if (key.equals("uid")) {
+ } else if (key == "uid") {
uint32_t uid = UINT32_MAX;
if (value.getAsInteger(0, uid))
return SendErrorResponse(2);
match_info.GetProcessInfo().SetUserID(uid);
- } else if (key.equals("gid")) {
+ } else if (key == "gid") {
uint32_t gid = UINT32_MAX;
if (value.getAsInteger(0, gid))
return SendErrorResponse(2);
match_info.GetProcessInfo().SetGroupID(gid);
- } else if (key.equals("euid")) {
+ } else if (key == "euid") {
uint32_t uid = UINT32_MAX;
if (value.getAsInteger(0, uid))
return SendErrorResponse(2);
match_info.GetProcessInfo().SetEffectiveUserID(uid);
- } else if (key.equals("egid")) {
+ } else if (key == "egid") {
uint32_t gid = UINT32_MAX;
if (value.getAsInteger(0, gid))
return SendErrorResponse(2);
match_info.GetProcessInfo().SetEffectiveGroupID(gid);
- } else if (key.equals("all_users")) {
+ } else if (key == "all_users") {
match_info.SetMatchAllUsers(
OptionArgParser::ToBoolean(value, false, &success));
- } else if (key.equals("triple")) {
+ } else if (key == "triple") {
match_info.GetProcessInfo().GetArchitecture() =
HostInfo::GetAugmentedArchSpec(value);
} else {
@@ -472,7 +472,7 @@ GDBRemoteCommunicationServerCommon::Handle_qSpeedTest(
llvm::StringRef key;
llvm::StringRef value;
bool success = packet.GetNameColonValue(key, value);
- if (success && key.equals("response_size")) {
+ if (success && key == "response_size") {
uint32_t response_size = 0;
if (!value.getAsInteger(0, response_size)) {
if (response_size == 0)