btrace: no replay without history
authorMarkus Metzger <markus.t.metzger@intel.com>
Thu, 15 May 2014 08:57:36 +0000 (10:57 +0200)
committerMarkus Metzger <markus.t.metzger@intel.com>
Tue, 20 May 2014 12:18:10 +0000 (14:18 +0200)
commite59fa00fa07f37aa04d38aecaf8098e01aaf253d
tree0d8f16048122b342d48c2b03acfb8438c57bfb57
parent00b32ff21f710a5eed92c9fdf51c32103bcc4176
btrace: no replay without history

When using a reverse execution command without execution history, GDB
might end up in a state where replaying has been started but remains
at the current instruction.  This state is illegal.

Do not step if there is no execution history to avoid this.

2014-05-20  Markus Metzger  <markus.t.metzger@intel.com>

* record-btrace.c (record_btrace_step_thread): Check for empty history.

testsuite/
* gdb.btrace/nohist.exp: New.
gdb/ChangeLog
gdb/record-btrace.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.btrace/nohist.exp [new file with mode: 0644]