GDB (xrefs)
|
#include "defs.h"
#include "tracefile.h"
#include "readline/tilde.h"
#include "filestuff.h"
#include "rsp-low.h"
#include "regcache.h"
#include "inferior.h"
#include "gdbthread.h"
#include "exec.h"
#include "completer.h"
#include "filenames.h"
Go to the source code of this file.
Classes | |
struct | tfile_trace_file_writer |
Macros | |
#define | O_LARGEFILE 0 |
#define | MAX_TRACE_UPLOAD 2000 |
#define | TRACE_HEADER_SIZE 8 |
#define | TFILE_PID (1) |
Typedefs | |
typedef int(* | walk_blocks_callback_func) (char blocktype, void *data) |
Variables | |
static const struct trace_file_write_ops | tfile_write_ops |
static struct target_ops | tfile_ops |
static char * | trace_filename |
static int | trace_fd = -1 |
static off_t | trace_frames_offset |
static off_t | cur_offset |
static int | cur_data_size |
int | trace_regblock_size |
initialize_file_ftype | _initialize_tracefile_tfile |
#define MAX_TRACE_UPLOAD 2000 |
Definition at line 208 of file tracefile-tfile.c.
Referenced by tfile_write_uploaded_tp().
#define O_LARGEFILE 0 |
Definition at line 33 of file tracefile-tfile.c.
Referenced by tfile_open().
#define TFILE_PID (1) |
Definition at line 347 of file tracefile-tfile.c.
Referenced by tfile_open().
#define TRACE_HEADER_SIZE 8 |
Definition at line 345 of file tracefile-tfile.c.
Referenced by tfile_open().
typedef int(* walk_blocks_callback_func) (char blocktype, void *data) |
Definition at line 708 of file tracefile-tfile.c.
void _initialize_tracefile_tfile | ( | void | ) |
Definition at line 1050 of file tracefile-tfile.c.
References add_target_with_completer(), init_tfile_ops(), and tfile_ops.
|
static |
Definition at line 967 of file tracefile-tfile.c.
References _, extract_unsigned_integer(), gdbarch_byte_order(), mem_range::length, mem_range::start, target_gdbarch(), tfile_read(), VEC_safe_push, and warning().
Referenced by tfile_traceframe_info().
|
static |
Definition at line 1027 of file tracefile-tfile.c.
References init_tracefile_ops(), tfile_close(), tfile_fetch_registers(), tfile_files_info(), tfile_get_trace_state_variable_value(), tfile_get_tracepoint_status(), tfile_open(), tfile_ops, tfile_trace_find(), tfile_traceframe_info(), tfile_xfer_partial(), target_ops::to_close, target_ops::to_doc, target_ops::to_fetch_registers, target_ops::to_files_info, target_ops::to_get_trace_state_variable_value, target_ops::to_get_tracepoint_status, target_ops::to_longname, target_ops::to_open, target_ops::to_shortname, target_ops::to_trace_find, target_ops::to_traceframe_info, and target_ops::to_xfer_partial.
Referenced by _initialize_tracefile_tfile().
|
static |
Definition at line 714 of file tracefile-tfile.c.
Referenced by traceframe_find_block_type().
|
static |
Definition at line 540 of file tracefile-tfile.c.
References exit_inferior_silent(), inferior_ptid, null_ptid, pid, ptid_get_pid(), trace_fd, trace_filename, trace_reset_local_state(), and xfree().
Referenced by init_tfile_ops().
|
static |
Definition at line 65 of file tracefile-tfile.c.
References tfile_trace_file_writer::fp, tfile_trace_file_writer::pathname, and xfree().
|
static |
Definition at line 295 of file tracefile-tfile.c.
References tfile_trace_file_writer::fp, tfile_trace_file_writer::pathname, and perror_with_name().
|
static |
Definition at line 795 of file tracefile-tfile.c.
References gdbarch_num_regs(), get_regcache_arch(), offset, REG_UNKNOWN, regcache_raw_supply(), regcache_register_status(), register_size(), tfile_read(), trace_regblock_size, tracefile_fetch_registers(), and traceframe_find_block_type().
Referenced by init_tfile_ops().
|
static |
Definition at line 560 of file tracefile-tfile.c.
References printf_filtered(), and trace_filename.
Referenced by init_tfile_ops().
|
static |
Definition at line 930 of file tracefile-tfile.c.
References extract_signed_integer(), gdbarch_byte_order(), int, target_gdbarch(), tfile_read(), and traceframe_find_block_type().
Referenced by init_tfile_ops().
|
static |
Definition at line 579 of file tracefile-tfile.c.
References bp_location::address, tracepoint::base, cur_offset, extract_signed_integer(), gdbarch_byte_order(), get_tracepoint_by_number_on_target(), breakpoint::loc, SEEK_SET, target_gdbarch(), tfile_read(), and trace_fd.
Referenced by tfile_trace_find().
|
static |
Definition at line 566 of file tracefile-tfile.c.
Referenced by init_tfile_ops().
|
static |
Definition at line 508 of file tracefile-tfile.c.
References _, current_trace_status(), line, parse_trace_status(), parse_tracepoint_definition(), parse_tsv_definition(), startswith(), trace_regblock_size, and warning().
Referenced by tfile_open().
Definition at line 379 of file tracefile-tfile.c.
References _, add_thread_silent(), trace_status::buffer_free, CATCH, trace_status::circular_buffer, current_directory, current_inferior(), current_trace_status(), discard_cleanups(), trace_status::disconnected_tracing, END_CATCH, error(), trace_status::filename, flags, gdb_open_cloexec(), inferior_appeared(), inferior_ptid, make_cleanup(), merge_uploaded_trace_state_variables(), merge_uploaded_tracepoints(), O_BINARY, O_LARGEFILE, perror_with_name(), pid_to_ptid(), post_create_inferior(), push_target(), RETURN_MASK_ALL, trace_status::running_known, startswith(), trace_status::stop_reason, target_preopen(), tfile_interp_line(), tfile_ops, TFILE_PID, tfile_read(), throw_exception(), trace_fd, trace_filename, trace_frames_offset, TRACE_HEADER_SIZE, trace_regblock_size, trace_stop_reason_unknown, trace_status::traceframe_count, TRY, unpush_target(), warning(), and xfree().
Referenced by init_tfile_ops().
Definition at line 367 of file tracefile-tfile.c.
References _, error(), perror_with_name(), read(), trace_fd, and trace_filename.
Referenced by build_traceframe_info(), tfile_fetch_registers(), tfile_get_trace_state_variable_value(), tfile_get_traceframe_address(), tfile_open(), tfile_trace_find(), tfile_xfer_partial(), and traceframe_walk_blocks().
|
static |
Definition at line 81 of file tracefile-tfile.c.
References _, error(), tfile_trace_file_writer::fp, gdb_fopen_cloexec(), tfile_trace_file_writer::pathname, and safe_strerror().
|
static |
Definition at line 53 of file tracefile-tfile.c.
References err, and target_save_trace_data.
struct trace_file_writer* tfile_trace_file_writer_new | ( | void | ) |
Definition at line 327 of file tracefile-tfile.c.
References tfile_trace_file_writer::base, tfile_trace_file_writer::fp, trace_file_writer::ops, tfile_trace_file_writer::pathname, tfile_write_ops, and xmalloc().
Referenced by trace_save_command(), and trace_save_tfile().
|
static |
Definition at line 612 of file tracefile-tfile.c.
References _, cur_data_size, cur_offset, extract_signed_integer(), extract_unsigned_integer(), gdbarch_byte_order(), get_traceframe_number(), get_tracepoint(), int, internal_error(), tracepoint::number_on_target, offset, SEEK_CUR, SEEK_SET, target_gdbarch(), tfile_get_traceframe_address(), tfile_read(), tfind_number, tfind_outside, tfind_pc, tfind_range, tfind_tp, trace_fd, and trace_frames_offset.
Referenced by init_tfile_ops().
|
static |
Definition at line 1018 of file tracefile-tfile.c.
References build_traceframe_info(), and traceframe_walk_blocks().
Referenced by init_tfile_ops().
|
static |
Definition at line 269 of file tracefile-tfile.c.
References tfile_trace_file_writer::fp.
|
static |
Definition at line 97 of file tracefile-tfile.c.
References tfile_trace_file_writer::fp, tfile_trace_file_writer::pathname, and perror_with_name().
|
static |
Definition at line 281 of file tracefile-tfile.c.
References tfile_trace_file_writer::fp, tfile_trace_file_writer::pathname, and perror_with_name().
|
static |
Definition at line 115 of file tracefile-tfile.c.
References tfile_trace_file_writer::fp.
|
static |
Definition at line 127 of file tracefile-tfile.c.
References bin2hex(), trace_status::buffer_free, trace_status::buffer_size, trace_status::circular_buffer, trace_status::disconnected_tracing, tfile_trace_file_writer::fp, trace_status::notes, phex_nz(), trace_status::running, trace_status::start_time, trace_status::stop_desc, trace_status::stop_reason, stop_reason_names, trace_status::stop_time, trace_status::stopping_tracepoint, trace_status::traceframe_count, trace_status::traceframes_created, tracepoint_error, tstop_command, and trace_status::user_name.
|
static |
Definition at line 214 of file tracefile-tfile.c.
References uploaded_tp::addr, uploaded_tp::at_string, bp_fast_tracepoint, uploaded_tp::cond, uploaded_tp::cond_string, uploaded_tp::enabled, encode_source_string(), tfile_trace_file_writer::fp, uploaded_tp::hit_count, MAX_TRACE_UPLOAD, uploaded_tp::number, uploaded_tp::orig_size, uploaded_tp::pass, phex_nz(), uploaded_tp::step, uploaded_tp::traceframe_usage, uploaded_tp::type, and VEC_iterate.
|
static |
Definition at line 187 of file tracefile-tfile.c.
References bin2hex(), uploaded_tsv::builtin, tfile_trace_file_writer::fp, uploaded_tsv::initial_value, uploaded_tsv::name, uploaded_tsv::number, phex_nz(), xfree(), and xmalloc().
|
static |
Definition at line 841 of file tracefile-tfile.c.
References _, gdbarch::byte_order, error(), exec_read_partial_read_only(), extract_unsigned_integer(), gdbarch_byte_order(), get_traceframe_number(), len, min, section_table_read_available_memory(), SEEK_CUR, target_gdbarch(), TARGET_OBJECT_MEMORY, TARGET_XFER_E_IO, TARGET_XFER_OK, TARGET_XFER_UNAVAILABLE, tfile_read(), trace_fd, and traceframe_find_block_type().
Referenced by init_tfile_ops().
Definition at line 786 of file tracefile-tfile.c.
References match_blocktype(), and traceframe_walk_blocks().
Referenced by tfile_fetch_registers(), tfile_get_trace_state_variable_value(), and tfile_xfer_partial().
|
static |
Definition at line 732 of file tracefile-tfile.c.
References _, cur_data_size, cur_offset, error(), extract_unsigned_integer(), gdbarch_byte_order(), SEEK_CUR, SEEK_SET, target_gdbarch(), tfile_read(), trace_fd, and trace_regblock_size.
Referenced by tfile_traceframe_info(), and traceframe_find_block_type().
initialize_file_ftype _initialize_tracefile_tfile |
|
static |
Definition at line 353 of file tracefile-tfile.c.
Referenced by tfile_trace_find(), and traceframe_walk_blocks().
|
static |
Definition at line 352 of file tracefile-tfile.c.
Referenced by tfile_get_traceframe_address(), tfile_trace_find(), and traceframe_walk_blocks().
|
static |
Definition at line 341 of file tracefile-tfile.c.
Referenced by _initialize_tracefile_tfile(), init_tfile_ops(), and tfile_open().
|
static |
Definition at line 308 of file tracefile-tfile.c.
Referenced by tfile_trace_file_writer_new().
|
static |
Definition at line 350 of file tracefile-tfile.c.
Referenced by tfile_close(), tfile_get_traceframe_address(), tfile_open(), tfile_read(), tfile_trace_find(), tfile_xfer_partial(), and traceframe_walk_blocks().
|
static |
Definition at line 349 of file tracefile-tfile.c.
Referenced by tfile_close(), tfile_files_info(), tfile_open(), and tfile_read().
|
static |
Definition at line 351 of file tracefile-tfile.c.
Referenced by tfile_open(), and tfile_trace_find().
int trace_regblock_size |
Definition at line 354 of file tracefile-tfile.c.
Referenced by remote_get_trace_status(), tfile_fetch_registers(), tfile_interp_line(), tfile_open(), trace_save(), and traceframe_walk_blocks().