Conversation
0f826c5 to
b6258dd
Compare
|
Oh wow the Zephyr binary size is actually slightly smaller than the current size on main. |
| } | ||
|
|
||
| this->dumpHeapInfo(m); | ||
| void Debugger::dump(Module *m, bool) const { snapshot(m); } |
There was a problem hiding this comment.
Makes me wonder, should we still even have dump since it's the same as snapshot? Command dump and command snapshot are just the same at this point, might be good to just remove one now.
| } | ||
|
|
||
| void Debugger::checkpoint(Module *m, const bool force, const bool full) { | ||
| void Debugger::checkpoint(Module *, const bool force, const bool) { |
There was a problem hiding this comment.
Support for full seems to have gone missing here (just putting that here so we don't forget).
| endIdx++; | ||
| namespace { | ||
|
|
||
| bool decodeFrameLength(const std::vector<uint8_t> &bytes, size_t *headerSize, |
There was a problem hiding this comment.
Would be nice to have some comments/documentation of how this works.
There was a problem hiding this comment.
this code has been removed
| functionBodies[update.function_index] = std::move(instructions); | ||
| Block &function = m->functions[update.function_index]; | ||
| function.start_ptr = functionBodies[update.function_index].data(); | ||
| function.end_ptr = function.start_ptr + | ||
| functionBodies[update.function_index].size() - 1; | ||
| function.br_ptr = function.end_ptr; | ||
| sendOperationResult(message->type, true); |
There was a problem hiding this comment.
Seems a bit strange to have functionBodies as a field in the Debugger but maybe it's used somewhere else that I'm not aware of.
49e9d78 to
e8a4b03
Compare
Refactors the existing debugger API using a protobuf scheme. The new scheme his optimized for low message size.
protobuf scheme
Protobuf defines two message type enums:
For instance:
Payloads are defined in protobuf as messages. For instance:
Debug messages are not fully encoded by protobuf, only these payload.
This means that debug messages are of this form:
This allows for minimal message size. Sending messages looks like this:
Which results in this message on the wire:
ABI improvements
Improvements are split over the entire PR stack. (#406, #411, #413)
DUMPcommands andinspecthave been removed over the more generalsnapshot