old-cross-binutils/gdb/testsuite/gdb.trace
Yao Qi cc3da68801 Fix PR16508
This patch fixes PR16508, which is about MI "-trace-find frame-number 0"
behaves differently from CLI "tfind 0".  In CLI, we check both
status->running and status->filename, but in MI, we only check
status->running, which looks wrong to me.  This patch moves the code
of checking to a new function check_trace_running, and use it in
both CLI and MI.

This patch also adds a test case pr16508.exp, which fails without this
fix, and passes with the fix applied.

  FAIL: gdb.trace/pr16508.exp: interpreter-exec mi "-trace-find frame-number 0"

gdb:

2014-03-06  Yao Qi  <yao@codesourcery.com>

	PR breakpoints/16508
	* tracepoint.c (check_trace_running): New function.
	(trace_find_command): Move code to check_trace_running and
	call check_trace_running.
	(trace_find_pc_command): Likewise.
	(trace_find_tracepoint_command): Likewise.
	(trace_find_line_command): Likewise.
	(trace_find_range_command): Likewise.
	* tracepoint.h (check_trace_running): Likewise.
	* mi/mi-main.c (mi_cmd_trace_find): Call check_trace_running.

gdb/testsuite:

2014-03-06  Yao Qi  <yao@codesourcery.com>

	* gdb.trace/pr16508.exp: New file.
2014-03-06 11:33:06 +08:00
..
actions-changed.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
actions-changed.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
actions.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
actions.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
ax.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
backtrace.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
change-loc-1.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
change-loc-2.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
change-loc.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
change-loc.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
change-loc.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
circ.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
circ.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
collection.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
collection.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
deltrace.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
disconnected-tracing.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
disconnected-tracing.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
entry-values.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
entry-values.exp Fix regression on s390x with entry-values.exp. 2014-01-22 17:02:13 +01:00
ftrace.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
ftrace.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
infotrace.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
Makefile.in tracepoint->step_count fixes 2013-04-04 19:22:38 +00:00
mi-trace-frame-collected.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-trace-unavailable.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-traceframe-changed.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-tracepoint-changed.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-tsv-changed.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
packetlen.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
passc-dyn.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
passcount.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
pending.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
pending.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
pendshr1.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
pendshr2.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
pr16508.exp Fix PR16508 2014-03-06 11:33:06 +08:00
qtro.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
qtro.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
range-stepping.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
range-stepping.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
read-memory.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
read-memory.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
report.exp Create inferior for ctf target. 2014-02-05 19:37:25 +08:00
save-trace.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
stap-trace.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
stap-trace.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
status-stop.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
status-stop.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
strace.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
strace.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
tfile.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
tfile.exp Create inferior for tfile target 2014-02-05 19:35:39 +08:00
tfind.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
trace-break.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
trace-break.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
trace-buffer-size.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
trace-buffer-size.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
trace-mt.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
trace-mt.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
trace-unavailable.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
tracecmd.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
tspeed.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
tspeed.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
tstatus.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
tsv.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
unavailable-dwarf-piece.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
unavailable-dwarf-piece.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
unavailable.cc Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
unavailable.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
while-dyn.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
while-stepping.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00