This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] circ.exp


Ping. Original post at
http://sourceware.org/ml/gdb-patches/2013-03/msg00760.html


On 20/03/13 18:23:15, Abid, Hafiz wrote:
Hi All,
This is patch to refactor circ.exp. I noticed that it was quitting early as gdb_target_supports_trace was failing. There were some other issues too. After the changes, it is running to completion. How does it look?

One test is failing that probably shows a defect. Following session, which is edited for clarity, shows the problem. When there is not enough buffer left (3rd frame onward), target does not stop the trace. It continues but only uses 6 bytes for the frame.

(gdb) set trace-buffer-size 200
(gdb) tstart
(gdb) c
...
(gdb) tstatus
Collected 1 trace frames.
Trace buffer has 131 bytes of 200 bytes free (34% full).
...
(gdb) c
...
(gdb) tstatus
Collected 2 trace frames.
Trace buffer has 62 bytes of 200 bytes free (69% full).
...
(gdb) c
...
(gdb) tstatus
Trace is running on the target.
Collected 3 trace frames.
Trace buffer has 56 bytes of 200 bytes free (72% full).
...
(gdb) c
...
(gdb) tstatus
Collected 4 trace frames.
Trace buffer has 50 bytes of 200 bytes free (75% full).
...
(gdb) c
...
(gdb) tstatus
Collected 5 trace frames.
Trace buffer has 44 bytes of 200 bytes free (78% full).
...
(gdb) tstop
(gdb) tfind start
Found trace frame 0, tracepoint 11
#0  func0 () at ../.././../git/gdb/testsuite/gdb.trace/circ.c:11
11	}
(gdb) p testload
$4 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}
(gdb) tfind 4
Found trace frame 4, tracepoint 5
27	}
(gdb) p testload
$5 = {<unavailable> <repeats 13 times>}


Regards,
Abid

gdb/testsuite:

2013-03-20  Hafiz Abid Qadeer  <abidh@codesourcery.com>

	* gdb.trace/circ.exp: (run_trace_experiment): Test
	setup_tracepoints and 'break end' in it.
	(trace_buffer_normal): Refactor it to...
	(support_trace_packet). ..this.
	(gdb_trace_circular_tests): Remove. Move tests to...
	(top level): ... here.  Call 'runto_main' before checking for
	trace support. 	Call 'support_trace_packets' to check the
	support for QTBuffer:size and QTBuffer:circular.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]