LLDB mainline
|
The history keeps a circular buffer of GDB remote packets. More...
#include <GDBRemoteCommunicationHistory.h>
Public Member Functions | |
GDBRemoteCommunicationHistory (uint32_t size=0) | |
~GDBRemoteCommunicationHistory () | |
void | AddPacket (char packet_char, GDBRemotePacket::Type type, uint32_t bytes_transmitted) |
void | AddPacket (const std::string &src, uint32_t src_len, GDBRemotePacket::Type type, uint32_t bytes_transmitted) |
void | Dump (Stream &strm) const |
void | Dump (Log *log) const |
bool | DidDumpToLog () const |
Private Member Functions | |
uint32_t | GetFirstSavedPacketIndex () const |
uint32_t | GetNumPacketsInHistory () const |
uint32_t | GetNextIndex () |
uint32_t | NormalizeIndex (uint32_t i) const |
Private Attributes | |
std::vector< GDBRemotePacket > | m_packets |
uint32_t | m_curr_idx = 0 |
uint32_t | m_total_packet_count = 0 |
bool | m_dumped_to_log = false |
The history keeps a circular buffer of GDB remote packets.
The history is used for logging and replaying GDB remote packets.
Definition at line 24 of file GDBRemoteCommunicationHistory.h.
GDBRemoteCommunicationHistory::GDBRemoteCommunicationHistory | ( | uint32_t | size = 0 | ) |
Definition at line 20 of file GDBRemoteCommunicationHistory.cpp.
References m_packets.
|
default |
void GDBRemoteCommunicationHistory::AddPacket | ( | char | packet_char, |
GDBRemotePacket::Type | type, | ||
uint32_t | bytes_transmitted | ||
) |
Definition at line 28 of file GDBRemoteCommunicationHistory.cpp.
References GetNextIndex(), m_packets, and m_total_packet_count.
Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunication::CheckForPacket(), lldb_private::process_gdb_remote::GDBRemoteCommunication::SendAck(), lldb_private::process_gdb_remote::GDBRemoteCommunication::SendNack(), and lldb_private::process_gdb_remote::GDBRemoteCommunication::SendRawPacketNoLock().
void GDBRemoteCommunicationHistory::AddPacket | ( | const std::string & | src, |
uint32_t | src_len, | ||
GDBRemotePacket::Type | type, | ||
uint32_t | bytes_transmitted | ||
) |
Definition at line 43 of file GDBRemoteCommunicationHistory.cpp.
References GetNextIndex(), m_packets, and m_total_packet_count.
|
inline |
Definition at line 39 of file GDBRemoteCommunicationHistory.h.
References m_dumped_to_log.
Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunication::CheckForPacket(), and lldb_private::process_gdb_remote::GDBRemoteCommunication::SendRawPacketNoLock().
void GDBRemoteCommunicationHistory::Dump | ( | Log * | log | ) | const |
Definition at line 74 of file GDBRemoteCommunicationHistory.cpp.
References lldb_private::GDBRemotePacket::bytes_transmitted, lldb_private::GDBRemotePacket::BinaryData::data, lldb_private::GDBRemotePacket::ePacketTypeInvalid, lldb_private::GDBRemotePacket::ePacketTypeSend, GetFirstSavedPacketIndex(), GetNumPacketsInHistory(), LLDB_LOGF, m_curr_idx, m_dumped_to_log, m_packets, NormalizeIndex(), lldb_private::GDBRemotePacket::packet, lldb_private::GDBRemotePacket::packet_idx, lldb_private::GDBRemotePacket::tid, and lldb_private::GDBRemotePacket::type.
void GDBRemoteCommunicationHistory::Dump | ( | Stream & | strm | ) | const |
Definition at line 59 of file GDBRemoteCommunicationHistory.cpp.
References lldb_private::GDBRemotePacket::BinaryData::data, lldb_private::GDBRemotePacket::Dump(), lldb_private::GDBRemotePacket::ePacketTypeInvalid, GetFirstSavedPacketIndex(), GetNumPacketsInHistory(), m_curr_idx, m_packets, NormalizeIndex(), lldb_private::GDBRemotePacket::packet, lldb_private::GDBRemotePacket::packet_idx, lldb_private::Stream::Printf(), and lldb_private::GDBRemotePacket::type.
Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunication::CheckForPacket(), lldb_private::process_gdb_remote::GDBRemoteCommunication::DumpHistory(), and lldb_private::process_gdb_remote::GDBRemoteCommunication::SendRawPacketNoLock().
|
inlineprivate |
Definition at line 42 of file GDBRemoteCommunicationHistory.h.
References m_curr_idx, m_packets, and m_total_packet_count.
Referenced by Dump().
|
inlineprivate |
Definition at line 56 of file GDBRemoteCommunicationHistory.h.
References m_curr_idx, m_total_packet_count, and NormalizeIndex().
Referenced by AddPacket().
|
inlineprivate |
Definition at line 49 of file GDBRemoteCommunicationHistory.h.
References m_packets, and m_total_packet_count.
Referenced by Dump().
|
inlineprivate |
Definition at line 63 of file GDBRemoteCommunicationHistory.h.
References m_packets.
Referenced by Dump(), and GetNextIndex().
|
private |
Definition at line 68 of file GDBRemoteCommunicationHistory.h.
Referenced by Dump(), GetFirstSavedPacketIndex(), and GetNextIndex().
|
mutableprivate |
Definition at line 70 of file GDBRemoteCommunicationHistory.h.
Referenced by DidDumpToLog(), and Dump().
|
private |
Definition at line 67 of file GDBRemoteCommunicationHistory.h.
Referenced by AddPacket(), Dump(), GDBRemoteCommunicationHistory(), GetFirstSavedPacketIndex(), GetNumPacketsInHistory(), and NormalizeIndex().
|
private |
Definition at line 69 of file GDBRemoteCommunicationHistory.h.
Referenced by AddPacket(), GetFirstSavedPacketIndex(), GetNextIndex(), and GetNumPacketsInHistory().