Create inferior for tfile target

When a trace file is loaded in Eclipse, it is expected to see thread
and process (=thread-group-started and =thread-created).  Create an
inferior and add a thread for this purpose.

This patch just reverts my previous patch.

gdb/testsuite:

2014-02-05  Yao Qi  <yao@codesourcery.com>

	Revert this patch:

	2013-05-24  Yao Qi  <yao@codesourcery.com>

	* gdb.trace/tfile.exp: Test inferior and thread.

gdb:

2014-02-05  Yao Qi  <yao@codesourcery.com>

	Revert this patch:

	2013-05-24  Yao Qi  <yao@codesourcery.com>

	* tracepoint.c (TFILE_PID): Remove.
	(tfile_open): Don't add thread and inferior.
	(tfile_close): Don't set 'inferior_ptid'.  Don't call
	exit_inferior_silent.
	(tfile_thread_alive): Remove.
	(init_tfile_ops): Don't set field 'to_thread_alive' of
	tfile_ops.
Create inferior for ctf target.

This patch creates inferior when GDB opens a ctf trace data, to be
consistent with tfile target.  A test case is added to test for
live target, tfile and ctf target.

gdb:

2014-02-05  Yao Qi  <yao@codesourcery.com>

	* ctf.c: Include "inferior.h" and "gdbthread.h".
	(CTF_PID): A new macro.
	(ctf_open): Call inferior_appeared and add_thread_silent.
	(ctf_close): Call exit_inferior_silent and set inferior_ptid.
	(ctf_thread_alive): New function.
	(init_ctf_ops): Install ctf_thread_alive to to_thread_alive.

gdb/testsuite:

2014-02-05  Yao Qi  <yao@codesourcery.com>

	* gdb.trace/report.exp (use_collected_data): Test the output
	of "info threads" and "info inferiors".
Use rs->buf after getpkt

Hi,
The following code snippet looks wrong to me

 char *buf = rs->buf;

 getpkt (&rs->buf, &rs->buf_size, 0);
 packet_ok (buf, );

if rs->buf is reallocated in getpkt, buf points to an out of dated
memory.  This patch removes local 'buf' and uses rs->buf.

gdb:

2014-02-05  Yao Qi  <yao@codesourcery.com>

	* remote.c (remote_pass_signals): Remove local 'buf' and use
	rs->buf.
	(remote_program_signals): Likewise.
Avoid bison-isms when using yacc.

YYPRINT is a bison-ism so c_print_token() ends up being unused when yacc is
used which makes gcc unhappy.  Make sure we only define YYPRINT and
c_print_token() when bison is used to generate the parser.

gdb/ChangeLog:

        * c-exp.y (YYPRINT, c_print_token): Only define if YYBISON is
        defined.
daily update
Keep current_inferior in sync with event_child.

	* linux-low.c (linux_wait_for_event): Improve comment.
	(linux_wait_1): Keep current_inferior in sync with event_child.