LLDB  mainline
Public Member Functions | Private Member Functions | Private Attributes | List of all members
lldb_private::process_gdb_remote::GDBRemoteCommunicationHistory Class Reference

The history keeps a circular buffer of GDB remote packets. More...

#include <GDBRemoteCommunicationHistory.h>

Collaboration diagram for lldb_private::process_gdb_remote::GDBRemoteCommunicationHistory:
Collaboration graph
[legend]

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
 
void SetRecorder (repro::PacketRecorder *recorder)
 

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< GDBRemotePacketm_packets
 
uint32_t m_curr_idx
 
uint32_t m_total_packet_count
 
bool m_dumped_to_log
 
repro::PacketRecorderm_recorder = nullptr
 

Detailed Description

The history keeps a circular buffer of GDB remote packets.

The history is used for logging and replaying GDB remote packets.

Definition at line 29 of file GDBRemoteCommunicationHistory.h.

Constructor & Destructor Documentation

◆ GDBRemoteCommunicationHistory()

GDBRemoteCommunicationHistory::GDBRemoteCommunicationHistory ( uint32_t  size = 0)

Definition at line 21 of file GDBRemoteCommunicationHistory.cpp.

References m_packets.

◆ ~GDBRemoteCommunicationHistory()

GDBRemoteCommunicationHistory::~GDBRemoteCommunicationHistory ( )

Definition at line 28 of file GDBRemoteCommunicationHistory.cpp.

Member Function Documentation

◆ AddPacket() [1/2]

void GDBRemoteCommunicationHistory::AddPacket ( char  packet_char,
GDBRemotePacket::Type  type,
uint32_t  bytes_transmitted 
)

◆ AddPacket() [2/2]

void GDBRemoteCommunicationHistory::AddPacket ( const std::string &  src,
uint32_t  src_len,
GDBRemotePacket::Type  type,
uint32_t  bytes_transmitted 
)

◆ DidDumpToLog()

bool lldb_private::process_gdb_remote::GDBRemoteCommunicationHistory::DidDumpToLog ( ) const
inline

◆ Dump() [1/2]

void GDBRemoteCommunicationHistory::Dump ( Stream strm) const

◆ Dump() [2/2]

void GDBRemoteCommunicationHistory::Dump ( Log log) const

◆ GetFirstSavedPacketIndex()

uint32_t lldb_private::process_gdb_remote::GDBRemoteCommunicationHistory::GetFirstSavedPacketIndex ( ) const
inlineprivate

Definition at line 51 of file GDBRemoteCommunicationHistory.h.

Referenced by Dump().

◆ GetNextIndex()

uint32_t lldb_private::process_gdb_remote::GDBRemoteCommunicationHistory::GetNextIndex ( )
inlineprivate

Definition at line 65 of file GDBRemoteCommunicationHistory.h.

Referenced by AddPacket().

◆ GetNumPacketsInHistory()

uint32_t lldb_private::process_gdb_remote::GDBRemoteCommunicationHistory::GetNumPacketsInHistory ( ) const
inlineprivate

Definition at line 58 of file GDBRemoteCommunicationHistory.h.

Referenced by Dump().

◆ NormalizeIndex()

uint32_t lldb_private::process_gdb_remote::GDBRemoteCommunicationHistory::NormalizeIndex ( uint32_t  i) const
inlineprivate

Definition at line 72 of file GDBRemoteCommunicationHistory.h.

Referenced by Dump().

◆ SetRecorder()

void lldb_private::process_gdb_remote::GDBRemoteCommunicationHistory::SetRecorder ( repro::PacketRecorder recorder)
inline

Member Data Documentation

◆ m_curr_idx

uint32_t lldb_private::process_gdb_remote::GDBRemoteCommunicationHistory::m_curr_idx
private

Definition at line 77 of file GDBRemoteCommunicationHistory.h.

Referenced by Dump().

◆ m_dumped_to_log

bool lldb_private::process_gdb_remote::GDBRemoteCommunicationHistory::m_dumped_to_log
mutableprivate

Definition at line 79 of file GDBRemoteCommunicationHistory.h.

Referenced by Dump().

◆ m_packets

std::vector<GDBRemotePacket> lldb_private::process_gdb_remote::GDBRemoteCommunicationHistory::m_packets
private

Definition at line 76 of file GDBRemoteCommunicationHistory.h.

Referenced by AddPacket(), Dump(), and GDBRemoteCommunicationHistory().

◆ m_recorder

repro::PacketRecorder* lldb_private::process_gdb_remote::GDBRemoteCommunicationHistory::m_recorder = nullptr
private

Definition at line 80 of file GDBRemoteCommunicationHistory.h.

Referenced by AddPacket().

◆ m_total_packet_count

uint32_t lldb_private::process_gdb_remote::GDBRemoteCommunicationHistory::m_total_packet_count
private

Definition at line 78 of file GDBRemoteCommunicationHistory.h.

Referenced by AddPacket().


The documentation for this class was generated from the following files: