diff --git a/sys/arm/arm/db_trace.c b/sys/arm/arm/db_trace.c index e0d755266853..0f06486c9d12 100644 --- a/sys/arm/arm/db_trace.c +++ b/sys/arm/arm/db_trace.c @@ -345,9 +345,16 @@ db_unwind_tab(struct unwind_state *state) /* * The program counter was not updated, load it from the link register. */ - if (state->registers[PC] == 0) + if (state->registers[PC] == 0) { state->registers[PC] = state->registers[LR]; + /* + * If the program counter changed, flag it in the update mask. + */ + if (state->start_pc != state->registers[PC]) + state->update_mask |= 1 << PC; + } + return 0; }