summaryrefslogtreecommitdiff
path: root/gdb/ctf.c
Commit message (Collapse)AuthorAgeFilesLines
* gdb/qiyao2013-06-261-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* gdb/qiyao2013-06-071-0/+2
| | | | | | | | | | | | * 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.
* gdb/qiyao2013-04-201-2/+2
| | | | | | * 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 *'.
* -Wpointer-sign: ctf.c.Pedro Alves2013-04-191-7/+8
| | | | | | | | | | | | | | | 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 *'.
* gdb/qiyao2013-04-131-1/+2
| | | | | | | | | | * 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.
* gdb/qiyao2013-04-101-10/+1186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* gdb/qiyao2013-03-251-1/+2
| | | | | * ctf.c [USE_WIN32API]: Undef 'mkdir' and use 'mkdir' instead of '_mkdir'.
* gdb/qiyao2013-03-211-2/+18
| | | | | | * ctf.c: Include "gdb_stat.h". [USE_WIN32API]: New macro 'mkdir'. (ctf_start): Use permission bits macros if they are defined.
* gdb/qiyao2013-03-201-1/+9
| | | | | * ctf.c (ctf_save_metadata_header): Define macro HOST_ENDIANNESS and write it to CTF metadata.
* gdb/qiyao2013-03-141-0/+647
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".