diff options
| author | Ewan Crawford <ewan@codeplay.com> | 2015-06-26 09:38:27 +0000 |
|---|---|---|
| committer | Ewan Crawford <ewan@codeplay.com> | 2015-06-26 09:38:27 +0000 |
| commit | 682e84285514bfae8845f1d05d1ff8c9345def57 (patch) | |
| tree | 6f72ea6a4e6851d99c6adc29b441104e824d5cba /lldb/source/Plugins/Process/gdb-remote | |
| parent | f4388a2ba4502a98188356605d61fd47d4223163 (diff) | |
| download | bcm5719-llvm-682e84285514bfae8845f1d05d1ff8c9345def57.tar.gz bcm5719-llvm-682e84285514bfae8845f1d05d1ff8c9345def57.zip | |
XML register info fix
There are a couple of bugs in the XML register info handling which this patch fixes:
+ conflicting variable names in lambda, both capture list and parameters contains a variable called 'name'.
+ prev_reg_num, which sets the register number, should be incremented after each register is processed.
+ Windows errors regarding empty strings and the 'xi:' prefix disappearing from 'xi:include' node name.
Reviewers: clayborg
Subscribers: lldb-commits, deepak2427
Differential Revision: http://reviews.llvm.org/D10731
llvm-svn: 240768
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote')
| -rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | 4 | ||||
| -rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp index 167198950fa..63c1946dace 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -4224,8 +4224,8 @@ GDBRemoteCommunicationClient::ReadExtFeature (const lldb_private::ConstString ob // send query extended feature packet std::stringstream packet; packet << "qXfer:" - << object.AsCString( ) << ":read:" - << annex.AsCString( ) << ":" + << object.AsCString("") << ":read:" + << annex.AsCString("") << ":" << std::hex << offset << "," << std::hex << size; diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index a7e4d8c95e4..5c3cf82ab88 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -3969,7 +3969,6 @@ ParseRegisters (XMLNode feature_node, GdbServerTargetInfo &target_info, GDBRemot uint32_t reg_offset = 0; feature_node.ForEachChildElementWithName("reg", [&target_info, &dyn_reg_info, &prev_reg_num, ®_offset](const XMLNode ®_node) -> bool { - std::string name; std::string gdb_group; std::string gdb_type; ConstString reg_name; @@ -3996,7 +3995,7 @@ ParseRegisters (XMLNode feature_node, GdbServerTargetInfo &target_info, GDBRemot NULL }; - reg_node.ForEachAttribute([&target_info, &name, &gdb_group, &gdb_type, ®_name, &alt_name, &set_name, &value_regs, &invalidate_regs, &encoding_set, &format_set, ®_info, &prev_reg_num, ®_offset](const llvm::StringRef &name, const llvm::StringRef &value) -> bool { + reg_node.ForEachAttribute([&target_info, &gdb_group, &gdb_type, ®_name, &alt_name, &set_name, &value_regs, &invalidate_regs, &encoding_set, &format_set, ®_info, &prev_reg_num, ®_offset](const llvm::StringRef &name, const llvm::StringRef &value) -> bool { if (name == "name") { reg_name.SetString(value); @@ -4131,6 +4130,7 @@ ParseRegisters (XMLNode feature_node, GdbServerTargetInfo &target_info, GDBRemot reg_info.invalidate_regs = invalidate_regs.data(); } + ++prev_reg_num; dyn_reg_info.AddRegister(reg_info, reg_name, alt_name, set_name); return true; // Keep iterating through all "reg" elements @@ -4192,7 +4192,7 @@ ProcessGDBRemote::GetGDBServerRegisterInfo () { node.GetElementText(target_info.osabi); } - else if (name == "xi:include") + else if (name == "xi:include" || name == "include") { llvm::StringRef href = node.GetAttributeValue("href"); if (!href.empty()) |

