btrace: split record_btrace_step_thread
authorMarkus Metzger <markus.t.metzger@intel.com>
Mon, 24 Aug 2015 12:49:43 +0000 (14:49 +0200)
committerMarkus Metzger <markus.t.metzger@intel.com>
Fri, 18 Sep 2015 12:21:31 +0000 (14:21 +0200)
commitd825d248105e1c9a13fef4a35e76b6f4912e3792
tree9deaf2973e66ff9c7db9c745bbd9cbfb93f838b8
parent3c615f99d3923df7dfa94c6587733c682efbbc78
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.
gdb/ChangeLog
gdb/record-btrace.c