Skip to content

Commit e51383c

Browse files
authored
Make a checkpoint when hitting a breakpoint (#309)
This also means that step over will now always have a checkpoint and not just when single stepping.
1 parent 8b5f32e commit e51383c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Debug/debugger.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ bool Debugger::isBreakpoint(uint8_t *loc) {
144144
}
145145

146146
void Debugger::notifyBreakpoint(Module *m, uint8_t *pc_ptr) {
147+
if (snapshotPolicy == SnapshotPolicy::checkpointing) {
148+
checkpoint(m);
149+
}
147150
this->mark = nullptr;
148151
const uint32_t bp = toVirtualAddress(pc_ptr, m);
149152
this->channel->write("AT %" PRIu32 "!\n", bp);

0 commit comments

Comments
 (0)