Remove workaround to libbabeltrace 1.1.0 issue
authorYao Qi <yao@codesourcery.com>
Thu, 21 Aug 2014 02:48:33 +0000 (10:48 +0800)
committerYao Qi <yao@codesourcery.com>
Fri, 22 Aug 2014 02:29:53 +0000 (10:29 +0800)
commit510db0520b763ca7cc9bf59e1f201ab2001d4217
tree41aa444a4d2b92572b9739e972f160ce86e1b2c2
parent4564fb94daa76c3b339507f0f985dc139f2db8ba
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.
gdb/ChangeLog
gdb/ctf.c
This page took 0.032959 seconds and 4 git commands to generate.