diff options
author | Greg Clayton <gclayton@apple.com> | 2012-04-13 21:24:18 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-04-13 21:24:18 +0000 |
commit | d451c1a8432f038c42697ae8ed80a4a16d7489d9 (patch) | |
tree | 6844012bb7ad30ec4bb5caa39b98ac97579121cb /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h | |
parent | f4db4b2cb4a639f0906abb8602cec49f1dc46de6 (diff) | |
download | bcm5719-llvm-d451c1a8432f038c42697ae8ed80a4a16d7489d9.tar.gz bcm5719-llvm-d451c1a8432f038c42697ae8ed80a4a16d7489d9.zip |
Added the thread ID (tid) to each packet history item and the packet history now always dumps to a lldb_private::Stream.
Enable logging the packet history when registers fail to read due to not getting the sequence mutex if "--verbose" is enabled on the log channel for the "gdb-remote" log category.
This will help us track down some issues.
llvm-svn: 154704
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h | 35 |
1 files changed, 7 insertions, 28 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h index 83bbfd59b8d..b3bad7ede5c 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h @@ -114,7 +114,7 @@ public: lldb_private::ProcessLaunchInfo &launch_info); void - DumpHistory(const char *path); + DumpHistory(lldb_private::Stream &strm); protected: @@ -134,7 +134,8 @@ protected: packet(), type (ePacketTypeInvalid), bytes_transmitted (0), - packet_idx (0) + packet_idx (0), + tid (LLDB_INVALID_THREAD_ID) { } @@ -145,12 +146,13 @@ protected: type = ePacketTypeInvalid; bytes_transmitted = 0; packet_idx = 0; - + tid = LLDB_INVALID_THREAD_ID; } std::string packet; PacketType type; uint32_t bytes_transmitted; uint32_t packet_idx; + lldb::tid_t tid; }; History (uint32_t size); @@ -161,35 +163,12 @@ protected: void AddPacket (char packet_char, PacketType type, - uint32_t bytes_transmitted) - { - const size_t size = m_packets.size(); - if (size > 0) - { - const uint32_t idx = GetNextIndex(); - m_packets[idx].packet.assign (1, packet_char); - m_packets[idx].type = type; - m_packets[idx].bytes_transmitted = bytes_transmitted; - m_packets[idx].packet_idx = m_total_packet_count; - } - } - + uint32_t bytes_transmitted); void AddPacket (const std::string &src, uint32_t src_len, PacketType type, - uint32_t bytes_transmitted) - { - const size_t size = m_packets.size(); - if (size > 0) - { - const uint32_t idx = GetNextIndex(); - m_packets[idx].packet.assign (src, 0, src_len); - m_packets[idx].type = type; - m_packets[idx].bytes_transmitted = bytes_transmitted; - m_packets[idx].packet_idx = m_total_packet_count; - } - } + uint32_t bytes_transmitted); void Dump (lldb_private::Stream &strm) const; |