aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp39
1 files changed, 19 insertions, 20 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 8ca2072..2fc446b 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -1926,24 +1926,23 @@ ThreadSP ProcessGDBRemote::SetThreadStopInfo(
lldb::ThreadSP
ProcessGDBRemote::SetThreadStopInfo(StructuredData::Dictionary *thread_dict) {
- static ConstString g_key_tid("tid");
- static ConstString g_key_name("name");
- static ConstString g_key_reason("reason");
- static ConstString g_key_metype("metype");
- static ConstString g_key_medata("medata");
- static ConstString g_key_qaddr("qaddr");
- static ConstString g_key_dispatch_queue_t("dispatch_queue_t");
- static ConstString g_key_associated_with_dispatch_queue(
+ static constexpr llvm::StringLiteral g_key_tid("tid");
+ static constexpr llvm::StringLiteral g_key_name("name");
+ static constexpr llvm::StringLiteral g_key_reason("reason");
+ static constexpr llvm::StringLiteral g_key_metype("metype");
+ static constexpr llvm::StringLiteral g_key_medata("medata");
+ static constexpr llvm::StringLiteral g_key_qaddr("qaddr");
+ static constexpr llvm::StringLiteral g_key_dispatch_queue_t(
+ "dispatch_queue_t");
+ static constexpr llvm::StringLiteral g_key_associated_with_dispatch_queue(
"associated_with_dispatch_queue");
- static ConstString g_key_queue_name("qname");
- static ConstString g_key_queue_kind("qkind");
- static ConstString g_key_queue_serial_number("qserialnum");
- static ConstString g_key_registers("registers");
- static ConstString g_key_memory("memory");
- static ConstString g_key_address("address");
- static ConstString g_key_bytes("bytes");
- static ConstString g_key_description("description");
- static ConstString g_key_signal("signal");
+ static constexpr llvm::StringLiteral g_key_queue_name("qname");
+ static constexpr llvm::StringLiteral g_key_queue_kind("qkind");
+ static constexpr llvm::StringLiteral g_key_queue_serial_number("qserialnum");
+ static constexpr llvm::StringLiteral g_key_registers("registers");
+ static constexpr llvm::StringLiteral g_key_memory("memory");
+ static constexpr llvm::StringLiteral g_key_description("description");
+ static constexpr llvm::StringLiteral g_key_signal("signal");
// Stop with signal and thread info
lldb::tid_t tid = LLDB_INVALID_THREAD_ID;
@@ -1971,7 +1970,7 @@ ProcessGDBRemote::SetThreadStopInfo(StructuredData::Dictionary *thread_dict) {
&thread_dispatch_qaddr, &queue_vars_valid,
&associated_with_dispatch_queue, &dispatch_queue_t,
&queue_name, &queue_kind, &queue_serial_number](
- ConstString key,
+ llvm::StringRef key,
StructuredData::Object *object) -> bool {
if (key == g_key_tid) {
// thread in big endian hex
@@ -2029,10 +2028,10 @@ ProcessGDBRemote::SetThreadStopInfo(StructuredData::Dictionary *thread_dict) {
if (registers_dict) {
registers_dict->ForEach(
- [&expedited_register_map](ConstString key,
+ [&expedited_register_map](llvm::StringRef key,
StructuredData::Object *object) -> bool {
uint32_t reg;
- if (llvm::to_integer(key.AsCString(), reg))
+ if (llvm::to_integer(key, reg))
expedited_register_map[reg] =
std::string(object->GetStringValue());
return true; // Keep iterating through all array items