GDB (xrefs)
|
#include "defs.h"
#include "tracefile.h"
#include "readline/tilde.h"
#include "gdbsupport/filestuff.h"
#include "gdbsupport/rsp-low.h"
#include "regcache.h"
#include "inferior.h"
#include "gdbthread.h"
#include "exec.h"
#include "completer.h"
#include "filenames.h"
#include "remote.h"
#include "xml-tdesc.h"
#include "target-descriptions.h"
#include "gdbsupport/pathstuff.h"
#include <algorithm>
Go to the source code of this file.
Classes | |
class | tfile_target |
struct | tfile_trace_file_writer |
Macros | |
#define | O_LARGEFILE 0 |
#define | MAX_TRACE_UPLOAD 2000 |
#define | TRACE_HEADER_SIZE 8 |
#define | TFILE_PID (1) |
Functions | |
static int | tfile_target_save (struct trace_file_writer *self, const char *filename) |
static void | tfile_dtor (struct trace_file_writer *self) |
static void | tfile_start (struct trace_file_writer *self, const char *filename) |
static void | tfile_write_header (struct trace_file_writer *self) |
static void | tfile_write_regblock_type (struct trace_file_writer *self, int size) |
static void | tfile_write_status (struct trace_file_writer *self, struct trace_status *ts) |
static void | tfile_write_uploaded_tsv (struct trace_file_writer *self, struct uploaded_tsv *utsv) |
static void | tfile_write_uploaded_tp (struct trace_file_writer *self, struct uploaded_tp *utp) |
static void | tfile_write_tdesc (struct trace_file_writer *self) |
static void | tfile_write_definition_end (struct trace_file_writer *self) |
static void | tfile_write_raw_data (struct trace_file_writer *self, gdb_byte *buf, LONGEST len) |
static void | tfile_end (struct trace_file_writer *self) |
struct trace_file_writer * | tfile_trace_file_writer_new (void) |
static void | tfile_append_tdesc_line (const char *line) |
static void | tfile_interp_line (const char *line, struct uploaded_tp **utpp, struct uploaded_tsv **utsvp) |
static void | tfile_read (gdb_byte *readbuf, int size) |
static void | tfile_target_open (const char *arg, int from_tty) |
static CORE_ADDR | tfile_get_traceframe_address (off_t tframe_offset) |
static int | traceframe_walk_blocks (gdb::function_view< bool(char)> callback, int pos) |
static int | traceframe_find_block_type (char type_wanted, int pos) |
static enum target_xfer_status | tfile_xfer_partial_features (const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len) |
static bool | build_traceframe_info (char blocktype, struct traceframe_info *info) |
void | _initialize_tracefile_tfile () |
Variables | |
static const target_info | tfile_target_info |
static const struct trace_file_write_ops | tfile_write_ops |
static tfile_target | tfile_ops |
static gdb::unique_xmalloc_ptr< 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 |
static std::string | trace_tdesc |
#define MAX_TRACE_UPLOAD 2000 |
Definition at line 243 of file tracefile-tfile.c.
Referenced by tfile_write_uploaded_tp().
#define O_LARGEFILE 0 |
Definition at line 38 of file tracefile-tfile.c.
Referenced by tfile_target_open().
#define TFILE_PID (1) |
Definition at line 416 of file tracefile-tfile.c.
Referenced by tfile_target_open().
#define TRACE_HEADER_SIZE 8 |
Definition at line 414 of file tracefile-tfile.c.
Referenced by tfile_target_open().
void _initialize_tracefile_tfile | ( | ) |
Definition at line 1118 of file tracefile-tfile.c.
Referenced by initialize_all_files().
|
static |
Definition at line 1049 of file tracefile-tfile.c.
References extract_unsigned_integer(), gdbarch_byte_order(), gdbarch::info(), target_gdbarch(), and tfile_read().
Referenced by tfile_target::traceframe_info().
|
static |
Definition at line 1110 of file tracefile-tfile.c.
References trace_tdesc.
Referenced by tfile_interp_line().
|
static |
Definition at line 103 of file tracefile-tfile.c.
References tfile_trace_file_writer::fp, tfile_trace_file_writer::pathname, and xfree().
|
static |
Definition at line 365 of file tracefile-tfile.c.
References tfile_trace_file_writer::fp, and tfile_trace_file_writer::pathname.
|
static |
Definition at line 648 of file tracefile-tfile.c.
References bp_location::address, cur_offset, extract_signed_integer(), breakpoint::first_loc(), gdbarch_byte_order(), get_tracepoint_by_number_on_target(), breakpoint::has_locations(), SEEK_SET, target_gdbarch(), tfile_read(), and trace_fd.
Referenced by tfile_target::trace_find().
|
static |
Definition at line 577 of file tracefile-tfile.c.
References current_trace_status(), parse_trace_status(), parse_tracepoint_definition(), parse_tsv_definition(), tfile_append_tdesc_line(), and trace_regblock_size.
Referenced by tfile_target_open().
|
static |
Definition at line 438 of file tracefile-tfile.c.
References read(), size, trace_fd, and trace_filename.
Referenced by build_traceframe_info(), tfile_target::fetch_registers(), tfile_target::get_trace_state_variable_value(), tfile_get_traceframe_address(), tfile_target_open(), tfile_target::trace_find(), traceframe_walk_blocks(), and tfile_target::xfer_partial().
|
static |
Definition at line 119 of file tracefile-tfile.c.
References tfile_trace_file_writer::fp, and tfile_trace_file_writer::pathname.
|
static |
Definition at line 452 of file tracefile-tfile.c.
References add_thread_silent(), trace_status::buffer_free, trace_status::circular_buffer, current_inferior(), current_trace_status(), trace_status::disconnected_tracing, trace_status::filename, flags, inferior_appeared(), merge_uploaded_trace_state_variables(), merge_uploaded_tracepoints(), O_BINARY, O_LARGEFILE, post_create_inferior(), inferior::push_target(), trace_status::running_known, trace_status::stop_reason, switch_to_thread(), target_find_description(), target_preopen(), tfile_interp_line(), tfile_ops, TFILE_PID, tfile_read(), trace_fd, trace_filename, trace_frames_offset, TRACE_HEADER_SIZE, trace_regblock_size, trace_stop_reason_unknown, trace_tdesc, trace_status::traceframe_count, and inferior::unpush_target().
|
static |
Definition at line 91 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 398 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, and tfile_write_ops.
Referenced by trace_save_tfile().
|
static |
Definition at line 339 of file tracefile-tfile.c.
References tfile_trace_file_writer::fp.
|
static |
Definition at line 135 of file tracefile-tfile.c.
References tfile_trace_file_writer::fp, and tfile_trace_file_writer::pathname.
|
static |
Definition at line 351 of file tracefile-tfile.c.
References tfile_trace_file_writer::fp, and tfile_trace_file_writer::pathname.
|
static |
Definition at line 153 of file tracefile-tfile.c.
References tfile_trace_file_writer::fp, and size.
|
static |
Definition at line 165 of file tracefile-tfile.c.
References trace_status::buffer_free, trace_status::buffer_size, trace_status::circular_buffer, trace_status::disconnected_tracing, tfile_trace_file_writer::fp, trace_status::notes, 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_stop_command, trace_status::traceframe_count, trace_status::traceframes_created, tracepoint_error, and trace_status::user_name.
|
static |
Definition at line 303 of file tracefile-tfile.c.
References current_inferior(), tfile_trace_file_writer::fp, and target_fetch_description_xml().
|
static |
Definition at line 249 of file tracefile-tfile.c.
References uploaded_tp::actions, uploaded_tp::addr, uploaded_tp::at_string, bp_fast_tracepoint, uploaded_tp::cmd_strings, 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, uploaded_tp::step, uploaded_tp::step_actions, uploaded_tp::traceframe_usage, and uploaded_tp::type.
|
static |
Definition at line 225 of file tracefile-tfile.c.
References uploaded_tsv::builtin, tfile_trace_file_writer::fp, uploaded_tsv::initial_value, uploaded_tsv::name, uploaded_tsv::number, and xmalloc().
|
static |
Definition at line 894 of file tracefile-tfile.c.
References TARGET_XFER_E_IO, TARGET_XFER_EOF, TARGET_XFER_OK, and trace_tdesc.
Referenced by tfile_target::xfer_partial().
|
static |
Definition at line 837 of file tracefile-tfile.c.
References traceframe_walk_blocks().
Referenced by tfile_target::fetch_registers(), tfile_target::get_trace_state_variable_value(), and tfile_target::xfer_partial().
|
static |
Definition at line 784 of file tracefile-tfile.c.
References cur_data_size, cur_offset, extract_unsigned_integer(), gdbarch_byte_order(), SEEK_CUR, SEEK_SET, target_gdbarch(), tfile_read(), trace_fd, and trace_regblock_size.
Referenced by traceframe_find_block_type(), and tfile_target::traceframe_info().
|
static |
Definition at line 422 of file tracefile-tfile.c.
Referenced by tfile_target::trace_find(), and traceframe_walk_blocks().
|
static |
Definition at line 421 of file tracefile-tfile.c.
Referenced by tfile_get_traceframe_address(), tfile_target::trace_find(), and traceframe_walk_blocks().
|
static |
Definition at line 412 of file tracefile-tfile.c.
Referenced by tfile_target_open().
|
static |
Definition at line 43 of file tracefile-tfile.c.
Referenced by tfile_target::info().
|
static |
Definition at line 378 of file tracefile-tfile.c.
Referenced by tfile_trace_file_writer_new().
|
static |
Definition at line 419 of file tracefile-tfile.c.
Referenced by tfile_target::close(), tfile_get_traceframe_address(), tfile_read(), tfile_target_open(), tfile_target::trace_find(), traceframe_walk_blocks(), and tfile_target::xfer_partial().
|
static |
Definition at line 418 of file tracefile-tfile.c.
Referenced by tfile_target::close(), tfile_target::files_info(), tfile_read(), and tfile_target_open().
|
static |
Definition at line 420 of file tracefile-tfile.c.
Referenced by tfile_target_open(), and tfile_target::trace_find().
int trace_regblock_size |
Definition at line 423 of file tracefile-tfile.c.
Referenced by tfile_target::fetch_registers(), remote_target::get_trace_status(), tfile_interp_line(), tfile_target_open(), trace_save(), and traceframe_walk_blocks().
|
static |
Definition at line 424 of file tracefile-tfile.c.
Referenced by tfile_target::close(), tfile_append_tdesc_line(), tfile_target_open(), and tfile_xfer_partial_features().