Cleaning up debugger threading and adding hacky callstacks to UI.

This commit is contained in:
Ben Vanik
2015-08-05 07:50:37 -07:00
parent 0a8d6eec91
commit 48d6e6becf
17 changed files with 283 additions and 110 deletions

View File

@@ -82,6 +82,16 @@ class PacketReader {
packet_offset_ = 0;
}
std::unique_ptr<PacketReader> ClonePacket() {
assert_not_null(current_packet_);
size_t length = sizeof(Packet) + current_packet_->body_length;
auto clone = std::make_unique<PacketReader>(length);
std::memcpy(clone->buffer_.data(), buffer_.data() + buffer_offset_ - length,
length);
clone->buffer_size_ = length;
return clone;
}
const uint8_t* Read(size_t length) {
// Can't read into next packet/off of end.
assert_not_null(current_packet_);