Commit Graph

10 Commits

Author SHA1 Message Date
Yao Qi 28a9351183 gdb/
2013-06-26  Pedro Alves  <pedro@codesourcery.com>
	    Yao Qi  <yao@codesourcery.com>

	* ctf.c (ctf_traceframe_info): Push trace state variables
	present in the trace data into the traceframe info object.
	* breakpoint.c (DEF_VEC_I): Remove.
	* common/filestuff.c (DEF_VEC_I): Likewise.
	* dwarf2loc.c (DEF_VEC_I): Likewise.
	* mi/mi-main.c (DEF_VEC_I): Likewise.
	* common/gdb_vecs.h (DEF_VEC_I): Define vector for int.
	* features/traceframe-info.dtd: Add tvar element and its
	attributes.
	* tracepoint.c (free_traceframe_info): Free vector 'tvars'.
	(build_traceframe_info): Push trace state variables present in the
	trace data into the traceframe info object.
	(traceframe_info_start_tvar): New function.
	(tvar_attributes): New.
	(traceframe_info_children): Add "tvar" element.
	* tracepoint.h (struct traceframe_info) <tvars>: New field.

	* NEWS: Mention the change in GDB and GDBserver.

gdb/doc:

2013-06-26  Pedro Alves  <pedro@codesourcery.com>

	* gdb.texinfo (Traceframe Info Format): Document tvar element and
	its attributes.

gdb/gdbserver:

2013-06-26  Pedro Alves  <pedro@codesourcery.com>

	* tracepoint.c (build_traceframe_info_xml): Output trace state
	variables present in the trace buffer.
2013-06-26 08:01:57 +00:00
Yao Qi aef525cb15 gdb/
* tracepoint.c (start_tracing): Move code to ...
	(trace_reset_local_state): ... here.  New.
	(disconnect_tracing): Don't call set_current_traceframe,
	set_tracepoint_num, and set_traceframe_context. Call
	trace_reset_local_state instead.
	(tfile_close): Call trace_reset_local_state.
	* ctf.c (ctf_close): Likewise.
	* remote.c (remote_close): Likewise.
	* tracepoint.h (trace_reset_local_state): Declare.
2013-06-07 00:19:36 +00:00
Yao Qi 8b4833e358 gdb/
* ctf.c (ctf_fetch_registers): Change the type of 'regs' from
	'char *' to 'gdb_byte *'.  Cast the return value of
	'bt_ctf_get_char_array' to 'gdb_byte *'.
2013-04-20 07:38:39 +00:00
Pedro Alves a398505b40 -Wpointer-sign: ctf.c.
ctf_save_write's second parameter is gdb_byte *, and all these
arguments are 'char *'.  Since this function is ultimately just
writing host bytes to a local file with fwrite, an alternative would
be to change ctf_save_write to take a 'void *' instead of 'gdb_byte
*', thus removing the need for any cast (we have more calls with casts
than without).

gdb/
2013-04-19  Pedro Alves  <palves@redhat.com>

	* ctf.c (ctf_write_uploaded_tsv, ctf_write_uploaded_tp): Add casts
	to 'gdb_byte *'.
2013-04-19 15:36:52 +00:00
Yao Qi da9160e4c8 gdb/
* ctf.c (_initialize_ctf): Include "completer.h".
	Call add_target_with_completer instead of add_target.

gdb/testsuite/

	* gdb.base/completion.exp: Test completion of command
	'target ctf' if target ctf is supported.
2013-04-13 14:14:08 +00:00
Yao Qi 393fd4c376 gdb/
2013-04-10  Hui Zhu  <hui@codesourcery.com>
	    Yao Qi  <yao@codesourcery.com>

	* configure.ac: Check libbabeltrace is installed.
	* config.in: Regenerate.
	* configure: Regenerate.
	* Makefile.in (LIBBABELTRACE): New.
	(CLIBS): Add LIBBABELTRACE.
	* ctf.c: Include "exec.h".
	(CTF_EVENT_ID_STATUS, CTF_EVENT_ID_TSV_DEF): New macros.
	(CTF_EVENT_ID_TP_DEF, ctf_save_write_int32): New macros.
	(ctf_save_metadata_header): Define new type aliases in
	metadata.
	(ctf_write_header): Define event type "tsv_def" and "tp_def"
	in metadata.  Start a new faked packet for trace status.
	(ctf_write_status): Write trace status to CTF.
	(ctf_write_uploaded_tsv): Write TSV to CTF.
	(ctf_write_uploaded_tp): Write tracepoint definition to CTF.
	(ctf_write_definition_end): End the faked packet.

	(ctx, ctf_iter, trace_dirname): New.
	(start_pos): New variable.
	(ctf_destroy, ctf_open_dir, ctf_open): New.
	(SET_INT32_FIELD, SET_ARRAY_FIELD, SET_STRING_FIELD): New
	macros.
	(ctf_read_tsv, ctf_read_tp, ctf_close, ctf_files_info): New.
	(ctf_fetch_registers, ctf_xfer_partial): New.
	(ctf_get_trace_state_variable_value): New.
	(ctf_get_tpnum_from_frame_event): New.
	(ctf_get_traceframe_address): New.
	(ctf_trace_find, ctf_has_stack): New.
	(ctf_has_registers, ctf_traceframe_info, init_ctf_ops): New.
	(ctf_get_trace_status, ctf_read_status): New.
	(_initialize_ctf): New.
	* tracepoint.c (get_tracepoint_number): New
	(get_uploaded_tsv): Remove 'static'.
 	(struct traceframe_info, trace_regblock_size): Move it to ...
	* tracepoint.h: ... here.
	(get_tracepoint_number): Declare it.
	(get_uploaded_tsv): Declare it.

	* NEWS: Mention new configure option.

gdb/doc/

2013-04-10  Yao Qi  <yao@codesourcery.com>

	* gdb.texinfo (Trace Files): Add "target ctf".

gdb/testsuite/

2013-04-10  Yao Qi  <yao@codesourcery.com>

	* gdb.trace/actions.exp: Save trace data to CTF.
	Change to ctf target if GDB supports, read CTF data in ctf
	target, and check the actions of tracepoints.
	* gdb.trace/while-stepping.exp: Likewise.
	* gdb.trace/report.exp: Test GDB saves trace data to CTF
	format and read CTF trace file if GDB supports.
	* gdb.trace/tstatus.exp: Save trace data to CTF.  If ctf
	target is supported, change to ctf target, read trace data and
	check output of command "tstatus".
	* gdb.trace/tsv.exp: Save trace frame to CTF.  If GDB supports,
	read CTF data by target ctf and call check_tsv.
2013-04-10 09:42:57 +00:00
Yao Qi a4341769f7 gdb/
* ctf.c [USE_WIN32API]: Undef 'mkdir' and use 'mkdir'
	instead of '_mkdir'.
2013-03-25 10:55:28 +00:00
Yao Qi af307d6a5b gdb/
* ctf.c: Include "gdb_stat.h".
	[USE_WIN32API]: New macro 'mkdir'.
	(ctf_start): Use permission bits macros if they are defined.
2013-03-21 01:08:46 +00:00
Yao Qi 8249a5a9e2 gdb/
* ctf.c (ctf_save_metadata_header): Define macro HOST_ENDIANNESS
	and write it to CTF metadata.
2013-03-20 02:54:22 +00:00
Yao Qi d0353e7691 gdb/
2013-03-14  Hui Zhu  <hui@codesourcery.com>
	    Yao Qi  <yao@codesourcery.com>

	* Makefile.in (REMOTE_OBS): Add ctf.o.
	(SFILES): Add ctf.c.
	(HFILES_NO_SRCDIR): Add ctf.h.
	* ctf.c, ctf.h: New files.
	* tracepoint.c: Include 'ctf.h'.
	(collect_pseudocommand): Remove static.
	(trace_save_command): Parse option "-ctf".
	Produce different trace file writers per option.
	Adjust output message.
	(trace_save_tfile, trace_save_ctf): New.
	* tracepoint.h (trace_save_tfile, trace_save_ctf): Declare.
	* mi/mi-main.c: Include 'ctf.h'.
	(mi_cmd_trace_save): Handle option '-ctf'.  Call either
	trace_save_tfile or trace_save_ctf.
	* NEWS: Mention these changes.

gdb/doc/
2013-03-14  Hui Zhu  <hui@codesourcery.com>
	    Yao Qi  <yao@codesourcery.com>

	* gdb.texinfo (Trace Files): Add "tsave -ctf".
2013-03-14 09:02:30 +00:00