diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2024-07-27 23:34:35 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2024-10-23 18:26:01 +0000 |
commit | 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583 (patch) | |
tree | 6cf5ab1f05330c6773b1f3f64799d56a9c7a1faa /contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp | |
parent | 6b9f7133aba44189d9625c352bc2c2a59baf18ef (diff) | |
parent | ac9a064cb179f3425b310fa2847f8764ac970a4d (diff) |
Diffstat (limited to 'contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp')
-rw-r--r-- | contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp b/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp index b4fb5b68dd41..f9d37490e16a 100644 --- a/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp +++ b/contrib/llvm-project/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) |