btrace: split record_btrace_step_thread
The code for BTHR_STEP and BTHR_CONT is fairly similar. Extract the common
parts into a new function record_btrace_single_step_forward. The function
returns TARGET_WAITKIND_SPURIOUS to indicate that the single-step completed
without triggering a trap.
Same for BTHR_RSTEP and BTHR_RCONT.
gdb/
* record-btrace.c (btrace_step_spurious)
(record_btrace_single_step_forward)
(record_btrace_single_step_backward): New.
(record_btrace_step_thread): Call record_btrace_single_step_forward
and record_btrace_single_step_backward.