btrace: move breakpoint checking into stepping functions
Breakpoints are only checked for BTHR_CONT and BTHR_RCONT stepping requests.
A BTHR_STEP and BTHR_RSTEP request will always report stopped without reason.
Since breakpoints are reported correctly, I assume infrun is handling this.
Move the breakpoint check into the btrace single stepping functions. This
will cause us to report breakpoint hits now also for single-step requests.
One thing to notice is that
- when executing forwards, the breakpoint is checked before 'executing'
the instruction, i.e. before moving the PC to the next instruction.
- when executing backwards, the breakpoint is checked after 'executing'
the instruction, i.e. after moving the PC to the preceding instruction
in the recorded execution.
There is code in infrun (see, for example proceed and adjust_pc_after_break)
that handles this and also depends on this behaviour.
gdb/
* record-btrace.c (record_btrace_step_thread): Move breakpoint check
to ...
(record_btrace_single_step_forward): ... here and
(record_btrace_single_step_backward): ... here.