diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-12-07 15:28:30 -0800 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-12-10 11:16:52 -0800 |
commit | e81268d03e73aef4f9c7bd8ece8ad02f5b017dcf (patch) | |
tree | cd875ff5d4d81e0f45178c3dfc1e32a7e3950de0 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationHistory.cpp | |
parent | 21b43885b81a6180e7231e575b5433202582f2fb (diff) | |
download | bcm5719-llvm-e81268d03e73aef4f9c7bd8ece8ad02f5b017dcf.tar.gz bcm5719-llvm-e81268d03e73aef4f9c7bd8ece8ad02f5b017dcf.zip |
[lldb/Reproducers] Support multiple GDB remotes
When running the test suite with always capture on, a handful of tests
are failing because they have multiple targets and therefore multiple
GDB remote connections. The current reproducer infrastructure is capable
of dealing with that.
This patch reworks the GDB remote provider to support multiple GDB
remote connections, similar to how the reproducers support shadowing
multiple command interpreter inputs. The provider now keeps a list of
packet recorders which deal with a single GDB remote connection. During
replay we rely on the order of creation to match the number of packets
to the GDB remote connection.
Differential revision: https://reviews.llvm.org/D71105
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationHistory.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationHistory.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationHistory.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationHistory.cpp index d2cc32f63f2..9e5646985f8 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationHistory.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationHistory.cpp @@ -40,8 +40,8 @@ void GDBRemoteCommunicationHistory::AddPacket(char packet_char, m_packets[idx].bytes_transmitted = bytes_transmitted; m_packets[idx].packet_idx = m_total_packet_count; m_packets[idx].tid = llvm::get_threadid(); - if (m_stream) - m_packets[idx].Serialize(*m_stream); + if (m_recorder) + m_recorder->Record(m_packets[idx]); } void GDBRemoteCommunicationHistory::AddPacket(const std::string &src, @@ -58,8 +58,8 @@ void GDBRemoteCommunicationHistory::AddPacket(const std::string &src, m_packets[idx].bytes_transmitted = bytes_transmitted; m_packets[idx].packet_idx = m_total_packet_count; m_packets[idx].tid = llvm::get_threadid(); - if (m_stream) - m_packets[idx].Serialize(*m_stream); + if (m_recorder) + m_recorder->Record(m_packets[idx]); } void GDBRemoteCommunicationHistory::Dump(Stream &strm) const { |