diff --git a/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.h b/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.h --- a/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.h +++ b/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.h @@ -36,8 +36,6 @@ const lldb_private::ArchSpec &arch); void AddRegister(lldb_private::RegisterInfo ®_info, - lldb_private::ConstString ®_name, - lldb_private::ConstString ®_alt_name, lldb_private::ConstString &set_name); void Finalize(const lldb_private::ArchSpec &arch); diff --git a/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp b/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp --- a/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp +++ b/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp @@ -396,14 +396,10 @@ } void DynamicRegisterInfo::AddRegister(RegisterInfo ®_info, - ConstString ®_name, - ConstString ®_alt_name, ConstString &set_name) { assert(!m_finalized); const uint32_t reg_num = m_regs.size(); - reg_info.name = reg_name.AsCString(); assert(reg_info.name); - reg_info.alt_name = reg_alt_name.AsCString(nullptr); uint32_t i; if (reg_info.value_regs) { for (i = 0; reg_info.value_regs[i] != LLDB_INVALID_REGNUM; ++i) diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp @@ -992,19 +992,12 @@ } } for (i = 0; i < num_registers; ++i) { - ConstString name; - ConstString alt_name; - if (g_register_infos[i].name && g_register_infos[i].name[0]) - name.SetCString(g_register_infos[i].name); - if (g_register_infos[i].alt_name && g_register_infos[i].alt_name[0]) - alt_name.SetCString(g_register_infos[i].alt_name); - if (i <= 15 || i == 25) - AddRegister(g_register_infos[i], name, alt_name, gpr_reg_set); + AddRegister(g_register_infos[i], gpr_reg_set); else if (i <= 24) - AddRegister(g_register_infos[i], name, alt_name, sfp_reg_set); + AddRegister(g_register_infos[i], sfp_reg_set); else - AddRegister(g_register_infos[i], name, alt_name, vfp_reg_set); + AddRegister(g_register_infos[i], vfp_reg_set); } } else { // Add composite registers to our primordial registers, then. @@ -1040,8 +1033,6 @@ // If "match" is true, then we can add extra registers. if (match) { for (i = 0; i < num_composites; ++i) { - ConstString name; - ConstString alt_name; const uint32_t first_primordial_reg = g_comp_register_infos[i].value_regs[0]; const char *reg_name = g_register_infos[first_primordial_reg].name; @@ -1054,9 +1045,7 @@ // The name matches the existing primordial entry. Find and // assign the offset, and then add this composite register entry. g_comp_register_infos[i].byte_offset = reg_info->byte_offset; - name.SetCString(g_comp_register_infos[i].name); - AddRegister(g_comp_register_infos[i], name, alt_name, - vfp_reg_set); + AddRegister(g_comp_register_infos[i], vfp_reg_set); } } } diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -578,13 +578,14 @@ } reg_info.name = reg_name.AsCString(); + reg_info.alt_name = alt_name.AsCString(); // We have to make a temporary ABI here, and not use the GetABI because // this code gets called in DidAttach, when the target architecture // (and consequently the ABI we'll get from the process) may be wrong. if (ABISP abi_sp = ABI::FindPlugin(shared_from_this(), arch_to_use)) abi_sp->AugmentRegisterInfo(reg_info); - m_register_info_sp->AddRegister(reg_info, reg_name, alt_name, set_name); + m_register_info_sp->AddRegister(reg_info, set_name); } else { break; // ensure exit before reg_num is incremented } @@ -4554,9 +4555,10 @@ reg_num_remote = reg_info.kinds[eRegisterKindProcessPlugin] + 1; ++reg_num_local; reg_info.name = reg_name.AsCString(); + reg_info.alt_name = alt_name.AsCString(); if (abi_sp) abi_sp->AugmentRegisterInfo(reg_info); - dyn_reg_info.AddRegister(reg_info, reg_name, alt_name, set_name); + dyn_reg_info.AddRegister(reg_info, set_name); return true; // Keep iterating through all "reg" elements });