On Thu, 07 Nov 2013 16:41:40 +0100, Metzger, Markus T wrote: > I hacked a first prototype of this (see below). It passes most tests but > results in three fails in the record_goto suite. > > One thing that it shows, though, is that it only removes the 'mostly harmless' > hack in the various goto functions shown above. > > The more serious hacks in record_btrace_start_replaying > > /* Make sure we're not using any stale registers. */ > registers_changed_ptid (tp->ptid); > > /* We just started replaying. The frame id cached for stepping is based > on unwinding, not on branch tracing. Recompute it. */ > frame = get_current_frame_nocheck (); > insn = btrace_insn_get (replay); > sal = find_pc_line (insn->pc, 0); > set_step_info (frame, sal); > > and record_btrace_stop_replaying > > /* Make sure we're not leaving any stale registers. */ > registers_changed_ptid (tp->ptid); > > however, are not removed by this. In such case it is not finished. These hacks should not be needed. > They are required when reverse-stepping the first time or when > stepping past the end of the execution trace. I have patched what you describe as the problem. But as I do not have a box with reliably working BTS so it is difficult for me to say whether it works or not. I can look at other problems if you describe them from a reliable box. > Plus the patch has the potential of messing things up pretty badly if > somehow (maybe due to some unexpected error () somewhere in proceed ()) the > record goto command does not complete and BTHR_GOTO remains set. It can be cleaned up as I did there, thanks for catching it. Thanks, Jan