diff options
Diffstat (limited to 'contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp')
-rw-r--r-- | contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp index 4efc454967a1..3d37bb226a65 100644 --- a/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp +++ b/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp @@ -595,6 +595,8 @@ static llvm::StringRef GetKindGenericOrEmpty(const RegisterInfo ®_info) { return "arg7"; case LLDB_REGNUM_GENERIC_ARG8: return "arg8"; + case LLDB_REGNUM_GENERIC_TP: + return "tp"; default: return ""; } @@ -631,7 +633,7 @@ static void WriteRegisterValueInHexFixedWidth( } else { // Zero-out any unreadable values. if (reg_info.byte_size > 0) { - std::basic_string<uint8_t> zeros(reg_info.byte_size, '\0'); + std::vector<uint8_t> zeros(reg_info.byte_size, '\0'); AppendHexValue(response, zeros.data(), zeros.size(), false); } } @@ -2304,7 +2306,7 @@ GDBRemoteCommunicationServerLLGS::Handle_P(StringExtractorGDBRemote &packet) { // Build the reginfos response. StreamGDBRemote response; - RegisterValue reg_value(ArrayRef(m_reg_bytes, reg_size), + RegisterValue reg_value(ArrayRef<uint8_t>(m_reg_bytes, reg_size), m_current_process->GetArchitecture().GetByteOrder()); Status error = reg_context.WriteRegister(reg_info, reg_value); if (error.Fail()) { @@ -3092,6 +3094,12 @@ GDBRemoteCommunicationServerLLGS::BuildTargetXml() { continue; } + if (reg_info->flags_type) { + response.IndentMore(); + reg_info->flags_type->ToXML(response); + response.IndentLess(); + } + response.Indent(); response.Printf("<reg name=\"%s\" bitsize=\"%" PRIu32 "\" regnum=\"%d\" ", @@ -3111,6 +3119,9 @@ GDBRemoteCommunicationServerLLGS::BuildTargetXml() { if (!format.empty()) response << "format=\"" << format << "\" "; + if (reg_info->flags_type) + response << "type=\"" << reg_info->flags_type->GetID() << "\" "; + const char *const register_set_name = reg_context.GetRegisterSetNameForRegisterAtIndex(reg_index); if (register_set_name) @@ -3910,7 +3921,7 @@ GDBRemoteCommunicationServerLLGS::Handle_qSaveCore( std::string path_hint; StringRef packet_str{packet.GetStringRef()}; - assert(packet_str.startswith("qSaveCore")); + assert(packet_str.starts_with("qSaveCore")); if (packet_str.consume_front("qSaveCore;")) { for (auto x : llvm::split(packet_str, ';')) { if (x.consume_front("path-hint:")) @@ -3936,7 +3947,7 @@ GDBRemoteCommunicationServerLLGS::Handle_QNonStop( Log *log = GetLog(LLDBLog::Process); StringRef packet_str{packet.GetStringRef()}; - assert(packet_str.startswith("QNonStop:")); + assert(packet_str.starts_with("QNonStop:")); packet_str.consume_front("QNonStop:"); if (packet_str == "0") { if (m_non_stop) @@ -4295,7 +4306,7 @@ lldb_private::process_gdb_remote::LLGSArgToURL(llvm::StringRef url_arg, std::string host_port = url_arg.str(); // If host_and_port starts with ':', default the host to be "localhost" and // expect the remainder to be the port. - if (url_arg.startswith(":")) + if (url_arg.starts_with(":")) host_port.insert(0, "localhost"); // Try parsing the (preprocessed) argument as host:port pair. |