Remove workaround to libbabeltrace 1.1.0 issue
When GDB uses recent version of babeltrace, such as 1.2.x, we'll see
such error emitted from babeltrace library,
(gdb) target ctf .../gdb/testsuite/gdb.trace/actions.ctf
[error] Invalid CTF stream: content size is smaller than packet headers.
[error] Stream index creation error.
[error] Open file stream error.
The problem can be reproduce out of GDB too, using babeltrace,
$ babeltrace ./fake-packet.ctf/
[error] Invalid CTF stream: content size is smaller than packet headers.
[error] Stream index creation error.
[error] Open file stream error.
Recent babeltrace library becomes more strict on CTF, and complains
about one "faked packet" GDB adds, when saving trace data in ctf
format from GDB. babeltrace 1.1.0 has a bug that it can't read trace
data smaller than a certain size (see https://bugs.lttng.org/issues/450).
We workaround it in GDB to append some meaningless data in a faked
packet to make sure trace file is large enough (see ctf.c:ctf_end).
The babeltrace issue was fixed in 1.1.1 release. However, babeltrace
recent release (since 1.1.2) starts to complain about such faked
packet. Here is a table shows that whether faked packet or no faked
packet is "supported" by various babeltrace releases,
faked packet no faked packet
1.1.0 Yes No
1.1.1 Yes Yes
1.1.2 No Yes
1.2.0 No Yes
We decide to get rid of this workaround in GDB, and people can build GDB
with libbabeltrace >= 1.1.1. In this way, both configure and ctf.c is
simpler.
Run gdb.trace/* tests in the following combinations:
wo/ this pattch 1.1.0
w/ this patch 1.1.1
w/ this patch 1.1.2
w/ this patch 1.2.0
No test results change.
gdb:
2014-08-22 Yao Qi <yao@codesourcery.com>
* ctf.c (CTF_FILE_MIN_SIZE): Remove.
(ctf_end): Remove code.