GDBserver
|
#include "server.h"
#include "tracepoint.h"
#include "gdbthread.h"
#include "agent.h"
#include "rsp-low.h"
#include <ctype.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/time.h>
#include <inttypes.h>
#include "ax.h"
#include "tdesc.h"
Go to the source code of this file.
Classes | |
struct | ipa_sym_addresses |
struct | tracepoint_action_ops |
struct | tracepoint_action |
struct | collect_memory_action |
struct | collect_registers_action |
struct | eval_expr_action |
struct | collect_static_trace_data_action |
struct | source_string |
struct | tracepoint |
struct | wstep_state |
struct | trace_state_variable |
struct | traceframe |
struct | trace_buffer_control |
struct | ipa_trace_buffer_control |
struct | readonly_region |
struct | tracepoint_hit_ctx |
struct | trap_tracepoint_ctx |
struct | collecting_t |
Typedefs | |
typedef enum eval_result_type(* | condfn) (struct tracepoint_hit_ctx *, ULONGEST *) |
typedef struct collecting_t | collecting_t |
Enumerations | |
enum | tracepoint_type { trap_tracepoint, fast_tracepoint, static_tracepoint } |
Functions | |
static int | read_inferior_integer (CORE_ADDR symaddr, int *val) |
static int | in_process_agent_supports_ust (void) |
static void | write_e_ipa_not_loaded (char *buffer) |
static void | write_e_ust_not_loaded (char *buffer) |
static int | maybe_write_ipa_not_loaded (char *buffer) |
static int | maybe_write_ipa_ust_not_loaded (char *buffer) |
void | tracepoint_look_up_symbols (void) |
static int | tracepoint_handler (CORE_ADDR address) |
static int | stop_tracing_handler (CORE_ADDR) |
static int | flush_trace_buffer_handler (CORE_ADDR) |
static void | download_trace_state_variables (void) |
static void | upload_fast_traceframes (void) |
static int | run_inferior_command (char *cmd, int len) |
static int | tracepoint_send_agent (struct tracepoint *tpoint) |
static int | read_inferior_uinteger (CORE_ADDR symaddr, unsigned int *val) |
static int | read_inferior_data_pointer (CORE_ADDR symaddr, CORE_ADDR *val) |
static int | write_inferior_data_pointer (CORE_ADDR symaddr, CORE_ADDR val) |
static int | write_inferior_integer (CORE_ADDR symaddr, int val) |
static int | write_inferior_uinteger (CORE_ADDR symaddr, unsigned int val) |
static CORE_ADDR | target_malloc (ULONGEST size) |
static int | write_inferior_data_ptr (CORE_ADDR where, CORE_ADDR ptr) |
static CORE_ADDR | m_tracepoint_action_download (const struct tracepoint_action *action) |
static char * | m_tracepoint_action_send (char *buffer, const struct tracepoint_action *action) |
static CORE_ADDR | r_tracepoint_action_download (const struct tracepoint_action *action) |
static char * | r_tracepoint_action_send (char *buffer, const struct tracepoint_action *action) |
static CORE_ADDR | download_agent_expr (struct agent_expr *expr) |
static CORE_ADDR | x_tracepoint_action_download (const struct tracepoint_action *action) |
static char * | agent_expr_send (char *p, const struct agent_expr *aexpr) |
static char * | x_tracepoint_action_send (char *buffer, const struct tracepoint_action *action) |
static CORE_ADDR | l_tracepoint_action_download (const struct tracepoint_action *action) |
static char * | l_tracepoint_action_send (char *buffer, const struct tracepoint_action *action) |
static CORE_ADDR | traceframe_get_pc (struct traceframe *tframe) |
static int | traceframe_read_tsv (int num, LONGEST *val) |
static int | condition_true_at_tracepoint (struct tracepoint_hit_ctx *ctx, struct tracepoint *tpoint) |
static void | clear_readonly_regions (void) |
static void | clear_installed_tracepoints (void) |
static void | collect_data_at_tracepoint (struct tracepoint_hit_ctx *ctx, CORE_ADDR stop_pc, struct tracepoint *tpoint) |
static void | collect_data_at_step (struct tracepoint_hit_ctx *ctx, CORE_ADDR stop_pc, struct tracepoint *tpoint, int current_step) |
static void | compile_tracepoint_condition (struct tracepoint *tpoint, CORE_ADDR *jump_entry) |
static void | do_action_at_tracepoint (struct tracepoint_hit_ctx *ctx, CORE_ADDR stop_pc, struct tracepoint *tpoint, struct traceframe *tframe, struct tracepoint_action *taction) |
static struct tracepoint * | fast_tracepoint_from_ipa_tpoint_address (CORE_ADDR) |
static void | install_tracepoint (struct tracepoint *, char *own_buf) |
static void | download_tracepoint (struct tracepoint *) |
static int | install_fast_tracepoint (struct tracepoint *, char *errbuf) |
static void | clone_fast_tracepoint (struct tracepoint *to, const struct tracepoint *from) |
static LONGEST | get_timestamp (void) |
static void | record_tracepoint_error (struct tracepoint *tpoint, const char *which, enum eval_result_type rtype) |
static void | clear_trace_buffer (void) |
static void | clear_inferior_trace_buffer (void) |
static void | init_trace_buffer (LONGEST bufsize) |
static void * | trace_buffer_alloc (size_t amt) |
static int | free_space (void) |
static struct tracepoint * | add_tracepoint (int num, CORE_ADDR addr) |
static struct tracepoint * | find_tracepoint (int id, CORE_ADDR addr) |
static void | remove_tracepoint (struct tracepoint *tpoint) |
static struct tracepoint * | find_next_tracepoint_by_number (struct tracepoint *prev_tp, int num) |
static void | add_tracepoint_action (struct tracepoint *tpoint, char *packet) |
static struct trace_state_variable * | get_trace_state_variable (int num) |
static struct trace_state_variable * | create_trace_state_variable (int num, int gdb) |
IP_AGENT_EXPORT_FUNC LONGEST | get_trace_state_variable_value (int num) |
IP_AGENT_EXPORT_FUNC void | set_trace_state_variable_value (int num, LONGEST val) |
LONGEST | agent_get_trace_state_variable_value (int num) |
void | agent_set_trace_state_variable_value (int num, LONGEST val) |
static void | set_trace_state_variable_name (int num, const char *name) |
static void | set_trace_state_variable_getter (int num, LONGEST(*getter)(void)) |
static struct traceframe * | add_traceframe (struct tracepoint *tpoint) |
static unsigned char * | add_traceframe_block (struct traceframe *tframe, struct tracepoint *tpoint, int amt) |
static void | finish_traceframe (struct traceframe *tframe) |
static struct traceframe * | find_traceframe (int num) |
static CORE_ADDR | get_traceframe_address (struct traceframe *tframe) |
static struct traceframe * | find_next_traceframe_in_range (CORE_ADDR lo, CORE_ADDR hi, int inside_p, int *tfnump) |
static struct traceframe * | find_next_traceframe_by_tracepoint (int num, int *tfnump) |
static void | cmd_qtinit (char *packet) |
static void | unprobe_marker_at (CORE_ADDR address) |
static void | cmd_qtdp (char *own_buf) |
static void | cmd_qtdpsrc (char *own_buf) |
static void | cmd_qtdv (char *own_buf) |
static void | cmd_qtenable_disable (char *own_buf, int enable) |
static void | cmd_qtv (char *own_buf) |
static void | cmd_qtro (char *own_buf) |
int | in_readonly_region (CORE_ADDR addr, ULONGEST length) |
static CORE_ADDR | get_jump_space_head (void) |
static void | claim_jump_space (ULONGEST used) |
int | claim_trampoline_space (ULONGEST used, CORE_ADDR *trampoline) |
int | have_fast_tracepoint_trampoline_buffer (char *buf) |
static int | probe_marker_at (CORE_ADDR address, char *errout) |
static void | download_tracepoint_1 (struct tracepoint *tpoint) |
static void | cmd_qtstart (char *packet) |
void | stop_tracing (void) |
static void | cmd_qtstop (char *packet) |
static void | cmd_qtdisconnected (char *own_buf) |
static void | cmd_qtframe (char *own_buf) |
static void | cmd_qtstatus (char *packet) |
static void | cmd_qtp (char *own_buf) |
static void | response_tracepoint (char *packet, struct tracepoint *tpoint) |
static void | response_action (char *packet, struct tracepoint *tpoint, char *taction, int step) |
static void | response_source (char *packet, struct tracepoint *tpoint, struct source_string *src) |
static void | cmd_qtfp (char *packet) |
static void | cmd_qtsp (char *packet) |
static void | response_tsv (char *packet, struct trace_state_variable *tsv) |
static void | cmd_qtfv (char *packet) |
static void | cmd_qtsv (char *packet) |
static void | cmd_qtfstm (char *packet) |
static void | cmd_qtsstm (char *packet) |
static void | cmd_qtstmat (char *packet) |
static int | same_process_p (struct inferior_list_entry *entry, void *data) |
void | gdb_agent_about_to_close (int pid) |
static void | cmd_qtminftpilen (char *packet) |
static void | cmd_qtbuffer (char *own_buf) |
static void | cmd_bigqtbuffer_circular (char *own_buf) |
static void | cmd_bigqtbuffer_size (char *own_buf) |
static void | cmd_qtnotes (char *own_buf) |
int | handle_tracepoint_general_set (char *packet) |
int | handle_tracepoint_query (char *packet) |
static void | add_while_stepping_state (struct thread_info *tinfo, int tp_number, CORE_ADDR tp_address) |
static void | release_while_stepping_state (struct wstep_state *wstep) |
void | release_while_stepping_state_list (struct thread_info *tinfo) |
int | tracepoint_finished_step (struct thread_info *tinfo, CORE_ADDR stop_pc) |
int | handle_tracepoint_bkpts (struct thread_info *tinfo, CORE_ADDR stop_pc) |
int | tracepoint_was_hit (struct thread_info *tinfo, CORE_ADDR stop_pc) |
static struct regcache * | get_context_regcache (struct tracepoint_hit_ctx *ctx) |
int | agent_mem_read (struct eval_agent_expr_context *ctx, unsigned char *to, CORE_ADDR from, ULONGEST len) |
int | agent_mem_read_string (struct eval_agent_expr_context *ctx, unsigned char *to, CORE_ADDR from, ULONGEST len) |
int | agent_tsv_read (struct eval_agent_expr_context *ctx, int n) |
static int | match_blocktype (char blocktype, unsigned char *dataptr, void *data) |
static unsigned char * | traceframe_walk_blocks (unsigned char *database, unsigned int datasize, int tfnum, int(*callback)(char blocktype, unsigned char *dataptr, void *data), void *data) |
static unsigned char * | traceframe_find_block_type (unsigned char *database, unsigned int datasize, int tfnum, char type_wanted) |
static unsigned char * | traceframe_find_regblock (struct traceframe *tframe, int tfnum) |
int | fetch_traceframe_registers (int tfnum, struct regcache *regcache, int regnum) |
int | traceframe_read_mem (int tfnum, CORE_ADDR addr, unsigned char *buf, ULONGEST length, ULONGEST *nbytes) |
int | traceframe_read_sdata (int tfnum, ULONGEST offset, unsigned char *buf, ULONGEST length, ULONGEST *nbytes) |
static int | build_traceframe_info_xml (char blocktype, unsigned char *dataptr, void *data) |
int | traceframe_read_info (int tfnum, struct buffer *buffer) |
static struct tracepoint * | fast_tracepoint_from_jump_pad_address (CORE_ADDR pc) |
static struct tracepoint * | fast_tracepoint_from_trampoline_address (CORE_ADDR pc) |
void | force_unlock_trace_buffer (void) |
int | fast_tracepoint_collecting (CORE_ADDR thread_area, CORE_ADDR stop_pc, struct fast_tpoint_collect_status *status) |
CORE_ADDR | get_raw_reg_func_addr (void) |
CORE_ADDR | get_get_tsv_func_addr (void) |
CORE_ADDR | get_set_tsv_func_addr (void) |
void | initialize_tracepoint (void) |
#define ATTR_PACKED /* nothing */ |
Definition at line 948 of file tracepoint.c.
#define cmpxchg | ( | mem, | |
oldval, | |||
newval | |||
) | __sync_val_compare_and_swap (mem, oldval, newval) |
Definition at line 1406 of file tracepoint.c.
Referenced by record_tracepoint_error(), and trace_buffer_alloc().
#define COPY_FIELD_TO_BUF | ( | BUF, | |
OBJ, | |||
FIELD | |||
) |
Definition at line 458 of file tracepoint.c.
Referenced by m_tracepoint_action_send(), and tracepoint_send_agent().
#define DEFAULT_TRACE_BUFFER_SIZE 5242880 /* 5*1024*1024 */ |
Definition at line 33 of file tracepoint.c.
Referenced by cmd_bigqtbuffer_size(), and initialize_tracepoint().
#define FIRST_TRACEFRAME | ( | ) | ((struct traceframe *) trace_buffer_start) |
Definition at line 1190 of file tracepoint.c.
Referenced by find_traceframe(), and trace_buffer_alloc().
#define GDBSERVER_FLUSH_COUNT_MASK 0xfffffff0 |
Definition at line 1150 of file tracepoint.c.
Referenced by trace_buffer_alloc(), and upload_fast_traceframes().
#define GDBSERVER_FLUSH_COUNT_MASK_CURR 0x0007ff00 |
Definition at line 1156 of file tracepoint.c.
Referenced by trace_buffer_alloc(), and upload_fast_traceframes().
#define GDBSERVER_FLUSH_COUNT_MASK_PREV 0x7ff00000 |
Definition at line 1155 of file tracepoint.c.
Referenced by trace_buffer_alloc().
#define GDBSERVER_UPDATED_FLUSH_COUNT_BIT 0x80000000 |
Definition at line 1160 of file tracepoint.c.
Referenced by upload_fast_traceframes().
#define IPA_FIRST_TRACEFRAME | ( | ) | (ipa_trace_buffer_ctrl.start) |
Referenced by upload_fast_traceframes().
#define IPA_NEXT_TRACEFRAME | ( | TF, | |
TFOBJ | |||
) |
Referenced by upload_fast_traceframes().
#define IPA_NEXT_TRACEFRAME_1 | ( | TF, | |
TFOBJ | |||
) | ((TF) + sizeof (struct traceframe) + (TFOBJ)->data_size) |
#define IPA_PROTO_FAST_TRACE_ADDR_ON_TARGET 2 |
Definition at line 6069 of file tracepoint.c.
Referenced by tracepoint_send_agent().
#define IPA_PROTO_FAST_TRACE_FJUMP_INSN 22 |
Definition at line 6072 of file tracepoint.c.
Referenced by tracepoint_send_agent().
#define IPA_PROTO_FAST_TRACE_FJUMP_SIZE 18 |
Definition at line 6071 of file tracepoint.c.
Referenced by tracepoint_send_agent().
#define IPA_PROTO_FAST_TRACE_FLAG 0 |
Definition at line 6068 of file tracepoint.c.
#define IPA_PROTO_FAST_TRACE_JUMP_PAD 10 |
Definition at line 6070 of file tracepoint.c.
Referenced by tracepoint_send_agent().
#define MAX_JUMP_SIZE 20 |
Definition at line 3071 of file tracepoint.c.
Referenced by install_fast_tracepoint().
#define memory_barrier | ( | ) | do {} while (0) |
Definition at line 1400 of file tracepoint.c.
Referenced by trace_buffer_alloc().
#define NEXT_TRACEFRAME | ( | TF | ) |
Definition at line 1199 of file tracepoint.c.
Referenced by find_next_traceframe_by_tracepoint(), find_next_traceframe_in_range(), find_traceframe(), and trace_buffer_alloc().
#define NEXT_TRACEFRAME_1 | ( | TF | ) | (((unsigned char *) (TF)) + sizeof (struct traceframe) + (TF)->data_size) |
Definition at line 1196 of file tracepoint.c.
#define TRACE_BUFFER_CTRL_CURR 0 |
Definition at line 1176 of file tracepoint.c.
#define trace_buffer_end_free (trace_buffer_ctrl[TRACE_BUFFER_CTRL_CURR].end_free) |
Definition at line 1183 of file tracepoint.c.
Referenced by clear_trace_buffer(), and free_space().
#define trace_buffer_free (trace_buffer_ctrl[TRACE_BUFFER_CTRL_CURR].free) |
Definition at line 1182 of file tracepoint.c.
Referenced by clear_trace_buffer(), and free_space().
#define trace_buffer_start (trace_buffer_ctrl[TRACE_BUFFER_CTRL_CURR].start) |
Definition at line 1181 of file tracepoint.c.
Referenced by clear_trace_buffer(), and cmd_qtbuffer().
#define trace_buffer_wrap (trace_buffer_ctrl[TRACE_BUFFER_CTRL_CURR].wrap) |
Definition at line 1185 of file tracepoint.c.
Referenced by clear_trace_buffer(), cmd_qtbuffer(), and traceframe_walk_blocks().
#define trace_debug | ( | FMT, | |
args... | |||
) | trace_debug_1 (1, FMT, ##args) |
Definition at line 97 of file tracepoint.c.
Referenced by add_tracepoint_action(), agent_mem_read(), agent_tsv_read(), claim_jump_space(), claim_trampoline_space(), clear_installed_tracepoints(), cmd_bigqtbuffer_circular(), cmd_bigqtbuffer_size(), cmd_qtbuffer(), cmd_qtdp(), cmd_qtdpsrc(), cmd_qtenable_disable(), cmd_qtfp(), cmd_qtframe(), cmd_qtfv(), cmd_qtinit(), cmd_qtnotes(), cmd_qtp(), cmd_qtro(), cmd_qtsp(), cmd_qtstart(), cmd_qtstatus(), cmd_qtsv(), collect_data_at_step(), collect_data_at_tracepoint(), compile_tracepoint_condition(), condition_true_at_tracepoint(), do_action_at_tracepoint(), fast_tracepoint_collecting(), fetch_traceframe_registers(), flush_trace_buffer_handler(), get_trace_state_variable_value(), handle_tracepoint_bkpts(), install_fast_tracepoint(), install_tracepoint(), record_tracepoint_error(), run_inferior_command(), set_trace_state_variable_getter(), set_trace_state_variable_name(), set_trace_state_variable_value(), stop_tracing(), stop_tracing_handler(), trace_buffer_alloc(), traceframe_find_regblock(), traceframe_read_info(), traceframe_read_mem(), traceframe_read_sdata(), traceframe_read_tsv(), traceframe_walk_blocks(), tracepoint_finished_step(), tracepoint_handler(), tracepoint_send_agent(), tracepoint_was_hit(), and upload_fast_traceframes().
#define trace_debug_1 | ( | level, | |
fmt, | |||
args... | |||
) |
Definition at line 86 of file tracepoint.c.
#define traceframe_count ((unsigned int) (traceframe_write_count - traceframe_read_count)) |
Definition at line 1214 of file tracepoint.c.
Referenced by cmd_qtstatus().
#define TRACEFRAME_EOB_MARKER_SIZE offsetof (struct traceframe, data) |
Definition at line 979 of file tracepoint.c.
Referenced by init_trace_buffer(), and trace_buffer_alloc().
#define UALIGN | ( | V, | |
N | |||
) | (((V) + ((N) - 1)) & ~((N) - 1)) |
Definition at line 5987 of file tracepoint.c.
Referenced by download_tracepoint_1().
typedef struct collecting_t collecting_t |
typedef enum eval_result_type(* condfn) (struct tracepoint_hit_ctx *, ULONGEST *) |
Definition at line 699 of file tracepoint.c.
enum tracepoint_type |
Enumerator | |
---|---|
trap_tracepoint | |
fast_tracepoint | |
static_tracepoint |
Definition at line 684 of file tracepoint.c.
|
static |
Definition at line 2199 of file tracepoint.c.
References traceframe::data_size, tracepoint::number, traceframe::tpnum, and trace_buffer_alloc().
Referenced by collect_data_at_step(), collect_data_at_tracepoint(), and upload_fast_traceframes().
|
static |
Definition at line 2217 of file tracepoint.c.
References traceframe::data_size, gdb_assert, tracepoint::number, traceframe::tpnum, trace_buffer_alloc(), and tracepoint::traceframe_usage.
Referenced by agent_mem_read(), agent_mem_read_string(), agent_tsv_read(), do_action_at_tracepoint(), and upload_fast_traceframes().
|
static |
Definition at line 1800 of file tracepoint.c.
References tracepoint::actions, tracepoint::actions_str, tracepoint::address, tracepoint::compiled_cond, tracepoint::cond, tracepoint::handle, tracepoint::next, tracepoint::num_step_actions, tracepoint::numactions, tracepoint::number, tracepoint::orig_size, tracepoint::source_strings, tracepoint::step_actions, tracepoint::step_actions_str, trap_tracepoint, tracepoint::type, and xmalloc().
Referenced by cmd_qtdp().
|
static |
Definition at line 1918 of file tracepoint.c.
References tracepoint::actions, tracepoint::actions_str, collect_memory_action::addr, collect_memory_action::base, eval_expr_action::base, collect_registers_action::base, collect_static_trace_data_action::base, collect_memory_action::basereg, eval_expr_action::expr, gdb_parse_agent_expr(), l_tracepoint_action_ops, collect_memory_action::len, m_tracepoint_action_ops, tracepoint::num_step_actions, tracepoint::numactions, tracepoint_action::ops, paddress(), pulongest(), r_tracepoint_action_ops, savestring(), tracepoint::step_actions, tracepoint::step_actions_str, trace_debug, tracepoint_action::type, unpack_varlen_hex(), x_tracepoint_action_ops, xmalloc(), and xrealloc().
Referenced by cmd_qtdp().
|
static |
Definition at line 4324 of file tracepoint.c.
References wstep_state::current_step, wstep_state::next, wstep_state::tp_address, wstep_state::tp_number, thread_info::while_stepping, and xmalloc().
Referenced by tracepoint_was_hit().
|
static |
Definition at line 604 of file tracepoint.c.
References agent_expr::bytes, and agent_expr::length.
Referenced by tracepoint_send_agent(), and x_tracepoint_action_send().
LONGEST agent_get_trace_state_variable_value | ( | int | num | ) |
Definition at line 2153 of file tracepoint.c.
References get_trace_state_variable_value().
Referenced by gdb_eval_agent_expr().
int agent_mem_read | ( | struct eval_agent_expr_context * | ctx, |
unsigned char * | to, | ||
CORE_ADDR | from, | ||
ULONGEST | len | ||
) |
Definition at line 4938 of file tracepoint.c.
References add_traceframe_block(), read_inferior_memory(), eval_agent_expr_context::tframe, eval_agent_expr_context::tpoint, and trace_debug.
Referenced by do_action_at_tracepoint(), and gdb_eval_agent_expr().
int agent_mem_read_string | ( | struct eval_agent_expr_context * | ctx, |
unsigned char * | to, | ||
CORE_ADDR | from, | ||
ULONGEST | len | ||
) |
Definition at line 4980 of file tracepoint.c.
References add_traceframe_block(), read_inferior_memory(), eval_agent_expr_context::tframe, eval_agent_expr_context::tpoint, xfree(), and xmalloc().
Referenced by gdb_eval_agent_expr().
void agent_set_trace_state_variable_value | ( | int | num, |
LONGEST | val | ||
) |
Definition at line 2159 of file tracepoint.c.
References set_trace_state_variable_value().
Referenced by gdb_eval_agent_expr().
int agent_tsv_read | ( | struct eval_agent_expr_context * | ctx, |
int | n | ||
) |
Definition at line 5042 of file tracepoint.c.
References add_traceframe_block(), get_trace_state_variable_value(), eval_agent_expr_context::tframe, eval_agent_expr_context::tpoint, and trace_debug.
Referenced by gdb_eval_agent_expr().
|
static |
Definition at line 5413 of file tracepoint.c.
References buffer_xml_printf(), paddress(), phex_nz(), and warning().
Referenced by traceframe_read_info().
|
static |
Definition at line 2943 of file tracepoint.c.
References paddress(), pulongest(), and trace_debug.
Referenced by download_tracepoint_1(), and install_fast_tracepoint().
Definition at line 2958 of file tracepoint.c.
References ipa_sym_addresses::addr_gdb_trampoline_buffer, ipa_sym_addresses::addr_gdb_trampoline_buffer_end, internal_error(), ipa_sym_addrs, paddress(), pulongest(), read_inferior_data_pointer(), trace_debug, and trampoline_buffer_head.
Referenced by i386_install_fast_tracepoint_jump_pad().
|
static |
Definition at line 1451 of file tracepoint.c.
References ipa_sym_addresses::addr_trace_buffer_ctrl, ipa_sym_addresses::addr_trace_buffer_ctrl_curr, ipa_sym_addresses::addr_trace_buffer_hi, ipa_sym_addresses::addr_trace_buffer_lo, ipa_sym_addresses::addr_traceframe_read_count, ipa_sym_addresses::addr_traceframe_write_count, ipa_sym_addresses::addr_traceframes_created, ipa_trace_buffer_control::end_free, ipa_trace_buffer_control::free, ipa_sym_addrs, read_inferior_data_pointer(), ipa_trace_buffer_control::start, ipa_trace_buffer_control::wrap, write_inferior_integer(), write_inferior_memory(), and write_inferior_uinteger().
Referenced by cmd_qtinit().
|
static |
Definition at line 2427 of file tracepoint.c.
References tracepoint::address, delete_breakpoint(), delete_fast_tracepoint_jump(), fast_tracepoint, tracepoint::handle, tracepoint::next, tracepoint::number, paddress(), pause_all, static_tracepoint, trace_debug, trap_tracepoint, tracepoint::type, unpause_all, and unprobe_marker_at().
Referenced by cmd_qtinit(), cmd_qtstart(), and stop_tracing().
|
static |
Definition at line 2854 of file tracepoint.c.
References readonly_region::next, and readonly_regions.
Referenced by cmd_qtinit(), and cmd_qtro().
|
static |
Definition at line 1435 of file tracepoint.c.
References trace_buffer_end_free, trace_buffer_free, trace_buffer_hi, trace_buffer_lo, trace_buffer_start, and trace_buffer_wrap.
Referenced by cmd_qtinit(), and init_trace_buffer().
|
static |
Definition at line 3057 of file tracepoint.c.
References tracepoint::adjusted_insn_addr, tracepoint::adjusted_insn_addr_end, gdb_assert, tracepoint::handle, inc_ref_fast_tracepoint_jump(), tracepoint::jump_pad, tracepoint::jump_pad_end, tracepoint::trampoline, and tracepoint::trampoline_end.
Referenced by cmd_qtdp(), and cmd_qtstart().
|
static |
Definition at line 4052 of file tracepoint.c.
References own_buf, trace_debug, unpack_varlen_hex(), and write_ok().
Referenced by handle_tracepoint_general_set().
|
static |
Definition at line 4067 of file tracepoint.c.
References DEFAULT_TRACE_BUFFER_SIZE, init_trace_buffer(), own_buf, plongest(), trace_debug, unpack_varlen_hex(), write_enn(), and write_ok().
Referenced by handle_tracepoint_general_set().
|
static |
Definition at line 4003 of file tracepoint.c.
References bin2hex(), free_space(), offset, own_buf, PBUFSIZ, phex_nz(), trace_buffer_lo, trace_buffer_start, trace_buffer_wrap, trace_debug, unpack_varlen_hex(), and write_enn().
Referenced by handle_tracepoint_query().
|
static |
Definition at line 3528 of file tracepoint.c.
References own_buf, unpack_varlen_hex(), and write_ok().
Referenced by handle_tracepoint_general_set().
|
static |
Definition at line 2481 of file tracepoint.c.
References add_tracepoint(), add_tracepoint_action(), tracepoint::address, AGENT_CAPA_FAST_TRACE, agent_capability_check(), clone_fast_tracepoint(), tracepoint::cond, download_tracepoint(), tracepoint::enabled, fast_tracepoint, find_tracepoint(), gdb_parse_agent_expr(), tracepoint::handle, install_tracepoint(), tracepoint::next, tracepoint::number, tracepoint::orig_size, own_buf, paddress(), tracepoint::pass_count, pause_all, remove_tracepoint(), stabilize_threads, static_tracepoint, tracepoint::step_count, trace_debug, tracepoint_send_agent(), trap_tracepoint, tracepoint::type, unpack_varlen_hex(), unpause_all, use_agent, write_enn(), and write_ok().
Referenced by handle_tracepoint_general_set().
|
static |
Definition at line 2658 of file tracepoint.c.
References find_tracepoint(), hex2bin(), last, source_string::next, own_buf, paddress(), tracepoint::source_strings, source_string::str, trace_debug, source_string::type, unpack_varlen_hex(), write_enn(), write_ok(), and xmalloc().
Referenced by handle_tracepoint_general_set().
|
static |
Definition at line 2719 of file tracepoint.c.
References create_trace_state_variable(), hex2bin(), trace_state_variable::initial_value, trace_state_variable::name, own_buf, set_trace_state_variable_value(), unpack_varlen_hex(), write_ok(), and xmalloc().
Referenced by handle_tracepoint_general_set().
|
static |
Definition at line 2751 of file tracepoint.c.
References done_accessing_memory, tracepoint::enabled, fast_tracepoint, find_tracepoint(), tracepoint::obj_addr_on_target, offset, own_buf, paddress(), prepare_to_access_memory, static_tracepoint, trace_debug, tracepoint::type, unpack_varlen_hex(), write_enn(), write_inferior_integer(), and write_ok().
Referenced by handle_tracepoint_general_set().
|
static |
Definition at line 3797 of file tracepoint.c.
References response_tracepoint(), trace_debug, and tracepoints.
Referenced by handle_tracepoint_query().
|
static |
Definition at line 3543 of file tracepoint.c.
References find_next_traceframe_by_tracepoint(), find_next_traceframe_in_range(), find_traceframe(), own_buf, paddress(), startswith(), traceframe::tpnum, trace_debug, unpack_varlen_hex(), and write_ok().
Referenced by handle_tracepoint_general_set().
|
static |
Definition at line 3921 of file tracepoint.c.
References maybe_write_ipa_ust_not_loaded(), and run_inferior_command().
Referenced by handle_tracepoint_query().
|
static |
Definition at line 3885 of file tracepoint.c.
References response_tsv(), trace_debug, and trace_state_variables.
Referenced by handle_tracepoint_query().
|
static |
Definition at line 2356 of file tracepoint.c.
References clear_inferior_trace_buffer(), clear_installed_tracepoints(), clear_readonly_regions(), clear_trace_buffer(), current_thread, trace_state_variable::getter, trace_state_variable::next, trace_state_variable::number, stop_tracing(), trace_debug, trace_state_variables, write_enn(), and write_ok().
Referenced by handle_tracepoint_general_set().
|
static |
Definition at line 3986 of file tracepoint.c.
References current_thread, and target_get_min_fast_tracepoint_insn_len.
Referenced by handle_tracepoint_query().
|
static |
Definition at line 4098 of file tracepoint.c.
References hex2bin(), own_buf, startswith(), trace_debug, write_ok(), xfree(), and xmalloc().
Referenced by handle_tracepoint_general_set().
|
static |
Definition at line 3698 of file tracepoint.c.
References find_tracepoint(), tracepoint::hit_count, own_buf, paddress(), trace_debug, tracepoint::traceframe_usage, unpack_varlen_hex(), and write_enn().
Referenced by handle_tracepoint_query().
|
static |
Definition at line 2871 of file tracepoint.c.
References clear_readonly_regions(), readonly_region::end, readonly_region::next, own_buf, paddress(), readonly_regions, readonly_region::start, trace_debug, unpack_varlen_hex(), write_ok(), and xmalloc().
Referenced by handle_tracepoint_general_set().
|
static |
Definition at line 3817 of file tracepoint.c.
References tracepoint::actions_str, cur_action, cur_step_action, source_string::next, tracepoint::next, response_action(), response_source(), response_tracepoint(), tracepoint::source_strings, tracepoint::step_actions_str, and trace_debug.
Referenced by handle_tracepoint_query().
|
static |
Definition at line 3930 of file tracepoint.c.
References maybe_write_ipa_ust_not_loaded(), and run_inferior_command().
Referenced by handle_tracepoint_query().
|
static |
Definition at line 3196 of file tracepoint.c.
References ipa_sym_addresses::addr_flush_trace_buffer, ipa_sym_addresses::addr_stop_tracing, ipa_sym_addresses::addr_stopping_tracepoint, ipa_sym_addresses::addr_trace_buffer_is_full, ipa_sym_addresses::addr_tracepoints, ipa_sym_addresses::addr_tracing, tracepoint::address, AGENT_CAPA_FAST_TRACE, agent_capability_check(), agent_loaded_p(), clear_installed_tracepoints(), clone_fast_tracepoint(), download_trace_state_variables(), download_tracepoint_1(), error(), expr_eval_no_error, fast_tracepoint, flush_trace_buffer_handler(), get_timestamp(), tracepoint::handle, tracepoint::hit_count, in_process_agent_supports_ust(), install_fast_tracepoint(), internal_error(), ipa_sym_addrs, maybe_write_ipa_not_loaded(), tracepoint::next, tracepoint::obj_addr_on_target, pause_all, probe_marker_at(), set_breakpoint_at(), stabilize_threads, static_tracepoint, stop_tracing_handler(), trace_debug, tracepoint::traceframe_usage, tracepoint_handler(), tracepoint_send_agent(), trap_tracepoint, tracepoint::type, unpause_all, use_agent, write_enn(), write_inferior_data_pointer(), write_inferior_data_ptr(), write_inferior_integer(), and write_ok().
Referenced by handle_tracepoint_general_set().
|
static |
Definition at line 3613 of file tracepoint.c.
References agent_loaded_p(), alloca(), bin2hex(), free_space(), pause_all, phex_nz(), startswith(), trace_debug, traceframe_count, unpause_all, and upload_fast_traceframes().
Referenced by handle_tracepoint_query().
|
static |
Definition at line 3940 of file tracepoint.c.
References maybe_write_ipa_ust_not_loaded(), and run_inferior_command().
Referenced by handle_tracepoint_query().
|
static |
Definition at line 3521 of file tracepoint.c.
References stop_tracing(), and write_ok().
Referenced by handle_tracepoint_general_set().
|
static |
Definition at line 3900 of file tracepoint.c.
References trace_state_variable::next, response_tsv(), and trace_debug.
Referenced by handle_tracepoint_query().
|
static |
Definition at line 2818 of file tracepoint.c.
References get_trace_state_variable_value(), own_buf, phex_nz(), traceframe_read_tsv(), and unpack_varlen_hex().
Referenced by handle_tracepoint_query().
|
static |
Definition at line 4673 of file tracepoint.c.
References add_traceframe(), tracepoint::address, do_action_at_tracepoint(), finish_traceframe(), tracepoint::hit_count, tracepoint::num_step_actions, tracepoint::number, paddress(), tracepoint::step_actions, tracepoint::step_actions_str, tracepoint::step_count, and trace_debug.
Referenced by tracepoint_finished_step().
|
static |
Definition at line 4625 of file tracepoint.c.
References tracepoint::actions, tracepoint::actions_str, add_traceframe(), tracepoint::address, do_action_at_tracepoint(), finish_traceframe(), tracepoint::hit_count, tracepoint::numactions, tracepoint::number, paddress(), tracepoint::pass_count, tracepoint::step_count, and trace_debug.
Referenced by tracepoint_was_hit().
|
static |
Definition at line 5878 of file tracepoint.c.
References compile_bytecodes(), tracepoint::compiled_cond, tracepoint::cond, current_insn_ptr, emit_epilogue(), emit_prologue(), expr_eval_no_error, tracepoint::number, and trace_debug.
Referenced by download_tracepoint_1().
|
static |
Definition at line 4887 of file tracepoint.c.
References tracepoint::address, tracepoint::compiled_cond, tracepoint::cond, expr_eval_no_error, gdb_eval_agent_expr(), get_context_regcache(), tracepoint::number, paddress(), pulongest(), record_tracepoint_error(), eval_agent_expr_context::regcache, eval_agent_expr_context::tframe, eval_agent_expr_context::tpoint, and trace_debug.
Referenced by tracepoint_was_hit().
|
static |
Definition at line 2080 of file tracepoint.c.
References get_trace_state_variable(), trace_state_variable::getter, trace_state_variable::initial_value, trace_state_variable::name, trace_state_variable::next, trace_state_variable::number, trace_state_variables, trace_state_variable::value, and xmalloc().
Referenced by cmd_qtdv(), and initialize_tracepoint().
|
static |
Definition at line 4770 of file tracepoint.c.
References add_traceframe_block(), agent_mem_read(), expr_eval_no_error, gdb_eval_agent_expr(), get_context_regcache(), init_register_cache(), paddress(), pulongest(), record_tracepoint_error(), eval_agent_expr_context::regcache, regcache_cpy(), regcache_write_pc(), register_cache_size(), regcache::tdesc, eval_agent_expr_context::tframe, eval_agent_expr_context::tpoint, trace_debug, and tracepoint_action::type.
Referenced by collect_data_at_step(), and collect_data_at_tracepoint().
|
static |
Definition at line 5970 of file tracepoint.c.
References agent_expr::bytes, agent_expr::length, target_malloc(), write_inferior_data_ptr(), and write_inferior_memory().
Referenced by download_tracepoint_1(), and x_tracepoint_action_download().
|
static |
Definition at line 6204 of file tracepoint.c.
References ipa_sym_addresses::addr_trace_state_variables, gdb_assert, trace_state_variable::getter, ipa_sym_addrs, name, trace_state_variable::name, trace_state_variable::next, target_malloc(), write_inferior_data_ptr(), and write_inferior_memory().
Referenced by cmd_qtstart().
|
static |
Definition at line 6154 of file tracepoint.c.
References ipa_sym_addresses::addr_tracepoints, download_tracepoint_1(), fast_tracepoint, internal_error(), ipa_sym_addrs, tracepoint::next, tracepoint::obj_addr_on_target, read_inferior_data_pointer(), static_tracepoint, tracepoint::type, and write_inferior_data_ptr().
Referenced by cmd_qtdp().
|
static |
Definition at line 5992 of file tracepoint.c.
References tracepoint::actions, claim_jump_space(), compile_tracepoint_condition(), tracepoint::cond, tracepoint_action_ops::download, download_agent_expr(), fast_tracepoint, gdb_assert, get_jump_space_head(), tracepoint::hit_count, tracepoint::next, tracepoint::numactions, tracepoint::obj_addr_on_target, tracepoint_action::ops, static_tracepoint, target_emit_ops, target_malloc(), tracepoint::type, UALIGN, write_inferior_data_ptr(), and write_inferior_memory().
Referenced by cmd_qtstart(), and download_tracepoint().
int fast_tracepoint_collecting | ( | CORE_ADDR | thread_area, |
CORE_ADDR | stop_pc, | ||
struct fast_tpoint_collect_status * | status | ||
) |
Definition at line 5569 of file tracepoint.c.
References ipa_sym_addresses::addr_collecting, ipa_sym_addresses::addr_gdb_jump_pad_buffer, ipa_sym_addresses::addr_gdb_jump_pad_buffer_end, ipa_sym_addresses::addr_gdb_trampoline_buffer, ipa_sym_addresses::addr_gdb_trampoline_buffer_end, tracepoint::address, fast_tpoint_collect_status::adjusted_insn_addr, tracepoint::adjusted_insn_addr, fast_tpoint_collect_status::adjusted_insn_addr_end, tracepoint::adjusted_insn_addr_end, fast_tracepoint_from_ipa_tpoint_address(), fast_tracepoint_from_jump_pad_address(), fast_tracepoint_from_trampoline_address(), internal_error(), ipa_sym_addrs, tracepoint::jump_pad, tracepoint::jump_pad_end, tracepoint::number, paddress(), read_inferior_data_pointer(), read_inferior_memory(), collecting_t::thread_area, collecting_t::tpoint, fast_tpoint_collect_status::tpoint_addr, fast_tpoint_collect_status::tpoint_num, trace_debug, tracepoint::trampoline, tracepoint::trampoline_end, and warning().
Referenced by linux_fast_tracepoint_collecting().
|
static |
Definition at line 5518 of file tracepoint.c.
References fast_tracepoint, tracepoint::next, tracepoint::obj_addr_on_target, and tracepoint::type.
Referenced by fast_tracepoint_collecting(), and handle_tracepoint_bkpts().
|
static |
Definition at line 5484 of file tracepoint.c.
References fast_tracepoint, tracepoint::jump_pad, tracepoint::jump_pad_end, tracepoint::next, and tracepoint::type.
Referenced by fast_tracepoint_collecting().
|
static |
Definition at line 5499 of file tracepoint.c.
References fast_tracepoint, tracepoint::next, tracepoint::trampoline, tracepoint::trampoline_end, and tracepoint::type.
Referenced by fast_tracepoint_collecting().
int fetch_traceframe_registers | ( | int | tfnum, |
struct regcache * | regcache, | ||
int | regnum | ||
) |
Definition at line 5183 of file tracepoint.c.
References tracepoint::address, find_next_tracepoint_by_number(), find_traceframe(), regcache_write_pc(), supply_regblock(), traceframe::tpnum, trace_debug, and traceframe_find_regblock().
Referenced by process_serial_event().
|
static |
Definition at line 2325 of file tracepoint.c.
References find_traceframe(), NEXT_TRACEFRAME, and traceframe::tpnum.
Referenced by cmd_qtframe().
|
static |
Definition at line 2291 of file tracepoint.c.
References find_traceframe(), get_traceframe_address(), NEXT_TRACEFRAME, and traceframe::tpnum.
Referenced by cmd_qtframe().
|
static |
Definition at line 1898 of file tracepoint.c.
References tracepoint::next, tracepoint::number, and tracepoints.
Referenced by fetch_traceframe_registers(), get_traceframe_address(), and upload_fast_traceframes().
|
static |
Definition at line 2253 of file tracepoint.c.
References FIRST_TRACEFRAME, NEXT_TRACEFRAME, and traceframe::tpnum.
Referenced by cmd_qtframe(), fetch_traceframe_registers(), find_next_traceframe_by_tracepoint(), find_next_traceframe_in_range(), traceframe_read_info(), traceframe_read_mem(), traceframe_read_sdata(), and traceframe_read_tsv().
|
static |
Definition at line 1859 of file tracepoint.c.
References tracepoint::address, tracepoint::next, and tracepoint::number.
Referenced by cmd_qtdp(), cmd_qtdpsrc(), cmd_qtenable_disable(), cmd_qtp(), and tracepoint_finished_step().
|
static |
Definition at line 2241 of file tracepoint.c.
References traceframe_write_count, and traceframes_created.
Referenced by collect_data_at_step(), collect_data_at_tracepoint(), and upload_fast_traceframes().
|
static |
void force_unlock_trace_buffer | ( | void | ) |
Definition at line 5553 of file tracepoint.c.
References ipa_sym_addresses::addr_collecting, ipa_sym_addrs, and write_inferior_data_pointer().
Referenced by maybe_move_out_of_jump_pad().
|
static |
Definition at line 1782 of file tracepoint.c.
References trace_buffer_end_free, and trace_buffer_free.
Referenced by cmd_qtbuffer(), and cmd_qtstatus().
void gdb_agent_about_to_close | ( | int | pid | ) |
Definition at line 3960 of file tracepoint.c.
References all_threads, current_thread, find_inferior(), IPA_CMD_BUF_SIZE, maybe_write_ipa_not_loaded(), run_inferior_command(), and same_process_p().
Referenced by kill_inferior().
|
static |
Definition at line 4718 of file tracepoint.c.
References fast_tracepoint, gdb_assert, init_register_cache(), trap_tracepoint_ctx::regcache, static_tracepoint, supply_fast_tracepoint_registers(), supply_regblock(), trap_tracepoint, and tracepoint_hit_ctx::type.
Referenced by condition_true_at_tracepoint(), and do_action_at_tracepoint().
CORE_ADDR get_get_tsv_func_addr | ( | void | ) |
Definition at line 5866 of file tracepoint.c.
References ipa_sym_addresses::addr_get_trace_state_variable_value, and ipa_sym_addrs.
Referenced by compile_bytecodes().
|
static |
Definition at line 2925 of file tracepoint.c.
References ipa_sym_addresses::addr_gdb_jump_pad_buffer, gdb_jump_pad_head, internal_error(), ipa_sym_addrs, and read_inferior_data_pointer().
Referenced by download_tracepoint_1(), install_fast_tracepoint(), and tracepoint_send_agent().
CORE_ADDR get_raw_reg_func_addr | ( | void | ) |
Definition at line 5860 of file tracepoint.c.
References ipa_sym_addresses::addr_get_raw_reg, and ipa_sym_addrs.
Referenced by i386_emit_reg().
CORE_ADDR get_set_tsv_func_addr | ( | void | ) |
Definition at line 5872 of file tracepoint.c.
References ipa_sym_addresses::addr_set_trace_state_variable_value, and ipa_sym_addrs.
Referenced by compile_bytecodes().
|
static |
Definition at line 7334 of file tracepoint.c.
Referenced by cmd_qtstart(), initialize_tracepoint(), and stop_tracing().
|
static |
Definition at line 2058 of file tracepoint.c.
References trace_state_variable::next, and trace_state_variable::number.
Referenced by create_trace_state_variable(), get_trace_state_variable_value(), set_trace_state_variable_getter(), set_trace_state_variable_name(), and set_trace_state_variable_value().
IP_AGENT_EXPORT_FUNC LONGEST get_trace_state_variable_value | ( | int | num | ) |
Definition at line 2111 of file tracepoint.c.
References get_trace_state_variable(), trace_state_variable::getter, plongest(), trace_debug, and trace_state_variable::value.
Referenced by agent_get_trace_state_variable_value(), agent_tsv_read(), and cmd_qtv().
|
static |
Definition at line 2271 of file tracepoint.c.
References tracepoint::address, find_next_tracepoint_by_number(), traceframe::tpnum, and traceframe_get_pc().
Referenced by find_next_traceframe_in_range().
int handle_tracepoint_bkpts | ( | struct thread_info * | tinfo, |
CORE_ADDR | stop_pc | ||
) |
Definition at line 4474 of file tracepoint.c.
References ipa_sym_addresses::addr_error_tracepoint, ipa_sym_addresses::addr_expr_eval_result, ipa_sym_addresses::addr_flush_trace_buffer, ipa_sym_addresses::addr_stop_tracing, ipa_sym_addresses::addr_stopping_tracepoint, ipa_sym_addresses::addr_trace_buffer_is_full, agent_loaded_p(), debug_threads, expr_eval_no_error, fast_tracepoint_from_ipa_tpoint_address(), ipa_sym_addrs, paddress(), read_inferior_data_pointer(), read_inferior_integer(), stop_tracing(), trace_debug, upload_fast_traceframes(), write_inferior_data_pointer(), and write_inferior_integer().
Referenced by handle_tracepoints().
int handle_tracepoint_general_set | ( | char * | packet | ) |
Definition at line 4158 of file tracepoint.c.
References cmd_bigqtbuffer_circular(), cmd_bigqtbuffer_size(), cmd_qtdisconnected(), cmd_qtdp(), cmd_qtdpsrc(), cmd_qtdv(), cmd_qtenable_disable(), cmd_qtframe(), cmd_qtinit(), cmd_qtnotes(), cmd_qtro(), cmd_qtstart(), cmd_qtstop(), and startswith().
Referenced by handle_general_set().
int handle_tracepoint_query | ( | char * | packet | ) |
Definition at line 4235 of file tracepoint.c.
References cmd_qtbuffer(), cmd_qtfp(), cmd_qtfstm(), cmd_qtfv(), cmd_qtminftpilen(), cmd_qtp(), cmd_qtsp(), cmd_qtsstm(), cmd_qtstatus(), cmd_qtstmat(), cmd_qtsv(), cmd_qtv(), and startswith().
Referenced by handle_query().
int have_fast_tracepoint_trampoline_buffer | ( | char * | buf | ) |
Definition at line 3001 of file tracepoint.c.
References ipa_sym_addresses::addr_gdb_trampoline_buffer_end, ipa_sym_addresses::addr_gdb_trampoline_buffer_error, internal_error(), ipa_sym_addrs, read_inferior_data_pointer(), and read_inferior_memory().
Referenced by x86_get_min_fast_tracepoint_insn_len().
|
static |
Definition at line 222 of file tracepoint.c.
References ipa_sym_addresses::addr_ust_loaded, AGENT_CAPA_STATIC_TRACE, agent_capability_check(), agent_loaded_p(), ipa_sym_addrs, read_inferior_integer(), and warning().
Referenced by cmd_qtstart(), install_tracepoint(), and maybe_write_ipa_ust_not_loaded().
Definition at line 2906 of file tracepoint.c.
References readonly_region::end, readonly_region::next, and readonly_region::start.
Referenced by gdb_read_memory().
|
static |
Definition at line 1488 of file tracepoint.c.
References clear_trace_buffer(), trace_buffer_size, TRACEFRAME_EOB_MARKER_SIZE, and xrealloc().
Referenced by cmd_bigqtbuffer_size(), and initialize_tracepoint().
void initialize_tracepoint | ( | void | ) |
Definition at line 7345 of file tracepoint.c.
References create_trace_state_variable(), DEFAULT_TRACE_BUFFER_SIZE, get_timestamp(), init_trace_buffer(), initialize_low_tracepoint(), IPA_BUFSIZ, perror_with_name(), set_trace_state_variable_getter(), set_trace_state_variable_name(), and xmalloc().
Referenced by captured_main().
|
static |
Definition at line 3077 of file tracepoint.c.
References ipa_sym_addresses::addr_collecting, ipa_sym_addresses::addr_gdb_collect, tracepoint::address, tracepoint::adjusted_insn_addr, tracepoint::adjusted_insn_addr_end, claim_jump_space(), get_jump_space_head(), tracepoint::handle, install_fast_tracepoint_jump_pad, ipa_sym_addrs, tracepoint::jump_pad, tracepoint::jump_pad_end, MAX_JUMP_SIZE, tracepoint::obj_addr_on_target, tracepoint::orig_size, set_fast_tracepoint_jump(), target_get_min_fast_tracepoint_insn_len, trace_debug, tracepoint::trampoline, and tracepoint::trampoline_end.
Referenced by cmd_qtstart(), and install_tracepoint().
|
static |
Definition at line 3139 of file tracepoint.c.
References tracepoint::address, agent_loaded_p(), fast_tracepoint, tracepoint::handle, in_process_agent_supports_ust(), install_fast_tracepoint(), internal_error(), probe_marker_at(), set_breakpoint_at(), static_tracepoint, trace_debug, tracepoint_handler(), trap_tracepoint, tracepoint::type, write_e_ipa_not_loaded(), write_e_ust_not_loaded(), write_enn(), and write_ok().
Referenced by cmd_qtdp().
|
static |
Definition at line 639 of file tracepoint.c.
References target_malloc(), tracepoint_action::type, and write_inferior_memory().
|
static |
Definition at line 652 of file tracepoint.c.
|
static |
Definition at line 525 of file tracepoint.c.
References target_malloc(), tracepoint_action::type, and write_inferior_memory().
|
static |
Definition at line 537 of file tracepoint.c.
References collect_memory_action::addr, collect_memory_action::basereg, and COPY_FIELD_TO_BUF.
|
static |
Definition at line 5067 of file tracepoint.c.
Referenced by traceframe_find_block_type().
|
static |
Definition at line 275 of file tracepoint.c.
References agent_loaded_p(), and write_e_ipa_not_loaded().
Referenced by cmd_qtstart(), and gdb_agent_about_to_close().
|
static |
Definition at line 290 of file tracepoint.c.
References agent_loaded_p(), in_process_agent_supports_ust(), write_e_ipa_not_loaded(), and write_e_ust_not_loaded().
Referenced by cmd_qtfstm(), cmd_qtsstm(), and cmd_qtstmat().
|
static |
Definition at line 3036 of file tracepoint.c.
References IPA_CMD_BUF_SIZE, paddress(), and run_inferior_command().
Referenced by cmd_qtstart(), and install_tracepoint().
|
static |
Definition at line 556 of file tracepoint.c.
References target_malloc(), tracepoint_action::type, and write_inferior_memory().
|
static |
Definition at line 569 of file tracepoint.c.
Definition at line 425 of file tracepoint.c.
References read_inferior_memory().
Referenced by claim_trampoline_space(), clear_inferior_trace_buffer(), download_tracepoint(), fast_tracepoint_collecting(), get_jump_space_head(), handle_tracepoint_bkpts(), have_fast_tracepoint_trampoline_buffer(), target_malloc(), and upload_fast_traceframes().
|
static |
Definition at line 408 of file tracepoint.c.
References read_inferior_memory().
Referenced by handle_tracepoint_bkpts(), and in_process_agent_supports_ust().
|
static |
Definition at line 418 of file tracepoint.c.
References read_inferior_memory().
Referenced by upload_fast_traceframes().
|
static |
Definition at line 1412 of file tracepoint.c.
References tracepoint::address, cmpxchg, expr_eval_no_error, tracepoint::number, paddress(), and trace_debug.
Referenced by condition_true_at_tracepoint(), and do_action_at_tracepoint().
|
static |
Definition at line 4342 of file tracepoint.c.
Referenced by release_while_stepping_state_list(), and tracepoint_finished_step().
void release_while_stepping_state_list | ( | struct thread_info * | tinfo | ) |
Definition at line 4351 of file tracepoint.c.
References wstep_state::next, release_while_stepping_state(), and thread_info::while_stepping.
Referenced by linux_resume_one_lwp_throw(), and tracepoint_finished_step().
|
static |
Definition at line 1873 of file tracepoint.c.
References tracepoint::next, and xfree().
Referenced by cmd_qtdp().
|
static |
Definition at line 3765 of file tracepoint.c.
References tracepoint::address, tracepoint::number, and paddress().
Referenced by cmd_qtsp().
|
static |
Definition at line 3777 of file tracepoint.c.
References tracepoint::address, alloca(), bin2hex(), tracepoint::number, paddress(), source_string::str, and source_string::type.
Referenced by cmd_qtsp().
|
static |
Definition at line 3736 of file tracepoint.c.
References tracepoint::address, tracepoint::cond, tracepoint::enabled, fast_tracepoint, gdb_unparse_agent_expr(), agent_expr::length, tracepoint::number, tracepoint::orig_size, paddress(), tracepoint::pass_count, static_tracepoint, tracepoint::step_count, and tracepoint::type.
Referenced by cmd_qtfp(), and cmd_qtsp().
|
static |
Definition at line 3865 of file tracepoint.c.
References alloca(), bin2hex(), trace_state_variable::getter, trace_state_variable::initial_value, trace_state_variable::name, trace_state_variable::number, and phex_nz().
Referenced by cmd_qtfv(), and cmd_qtsv().
|
static |
Definition at line 6799 of file tracepoint.c.
References agent_run_command(), current_ptid, pause_all, ptid_get_pid(), reinsert_all_breakpoints(), trace_debug, uninsert_all_breakpoints(), and unpause_all.
Referenced by cmd_qtfstm(), cmd_qtsstm(), cmd_qtstmat(), gdb_agent_about_to_close(), probe_marker_at(), tracepoint_send_agent(), and unprobe_marker_at().
|
static |
Definition at line 3950 of file tracepoint.c.
References inferior_list_entry::id, and ptid_get_pid().
Referenced by gdb_agent_about_to_close().
|
static |
Definition at line 2181 of file tracepoint.c.
References get_trace_state_variable(), trace_state_variable::getter, and trace_debug.
Referenced by initialize_tracepoint().
|
static |
Definition at line 2165 of file tracepoint.c.
References get_trace_state_variable(), trace_state_variable::name, and trace_debug.
Referenced by initialize_tracepoint().
IP_AGENT_EXPORT_FUNC void set_trace_state_variable_value | ( | int | num, |
LONGEST | val | ||
) |
Definition at line 2137 of file tracepoint.c.
References get_trace_state_variable(), trace_debug, and trace_state_variable::value.
Referenced by agent_set_trace_state_variable_value(), and cmd_qtdv().
void stop_tracing | ( | void | ) |
Definition at line 3403 of file tracepoint.c.
References ipa_sym_addresses::addr_tracing, agent_loaded_p(), clear_installed_tracepoints(), delete_breakpoint(), expr_eval_no_error, expr_eval_result, gdb_connected(), get_timestamp(), internal_error(), ipa_sym_addrs, tracepoint::number, tracepoint::pass_count, pause_all, trace_debug, unpause_all, upload_fast_traceframes(), and write_inferior_integer().
Referenced by captured_main(), cmd_qtinit(), cmd_qtstop(), handle_tracepoint_bkpts(), process_serial_event(), tracepoint_finished_step(), tracepoint_was_hit(), and upload_fast_traceframes().
|
static |
Definition at line 5945 of file tracepoint.c.
References ipa_sym_addresses::addr_gdb_tp_heap_buffer, internal_error(), ipa_sym_addrs, read_inferior_data_pointer(), and target_tp_heap.
Referenced by download_agent_expr(), download_trace_state_variables(), download_tracepoint_1(), l_tracepoint_action_download(), m_tracepoint_action_download(), r_tracepoint_action_download(), and x_tracepoint_action_download().
|
static |
Definition at line 1521 of file tracepoint.c.
References cmpxchg, debug_threads, trace_buffer_control::end_free, FIRST_TRACEFRAME, trace_buffer_control::free, GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_FLUSH_COUNT_MASK_PREV, memory_barrier, NEXT_TRACEFRAME, trace_buffer_control::start, traceframe::tpnum, trace_buffer_ctrl, trace_buffer_hi, trace_buffer_lo, trace_debug, TRACEFRAME_EOB_MARKER_SIZE, traceframe_write_count, and trace_buffer_control::wrap.
Referenced by add_traceframe(), and add_traceframe_block().
|
static |
Definition at line 5158 of file tracepoint.c.
References match_blocktype(), and traceframe_walk_blocks().
Referenced by traceframe_find_regblock(), traceframe_read_mem(), traceframe_read_sdata(), and traceframe_read_tsv().
|
static |
Definition at line 5166 of file tracepoint.c.
References traceframe::data, traceframe::data_size, trace_debug, and traceframe_find_block_type().
Referenced by fetch_traceframe_registers(), and traceframe_get_pc().
|
static |
Definition at line 5217 of file tracepoint.c.
References current_target_desc(), init_register_cache(), regcache_read_pc(), and traceframe_find_regblock().
Referenced by get_traceframe_address().
int traceframe_read_info | ( | int | tfnum, |
struct buffer * | buffer | ||
) |
Definition at line 5460 of file tracepoint.c.
References buffer_grow_str, buffer_grow_str0, build_traceframe_info_xml(), traceframe::data, traceframe::data_size, find_traceframe(), trace_debug, and traceframe_walk_blocks().
Referenced by handle_qxfer_traceframe_info().
int traceframe_read_mem | ( | int | tfnum, |
CORE_ADDR | addr, | ||
unsigned char * | buf, | ||
ULONGEST | length, | ||
ULONGEST * | nbytes | ||
) |
Definition at line 5234 of file tracepoint.c.
References traceframe::data, traceframe::data_size, find_traceframe(), paddress(), trace_debug, and traceframe_find_block_type().
Referenced by gdb_read_memory().
int traceframe_read_sdata | ( | int | tfnum, |
ULONGEST | offset, | ||
unsigned char * | buf, | ||
ULONGEST | length, | ||
ULONGEST * | nbytes | ||
) |
Definition at line 5359 of file tracepoint.c.
References traceframe::data, traceframe::data_size, find_traceframe(), offset, trace_debug, and traceframe_find_block_type().
Referenced by handle_qxfer_statictrace().
|
static |
Definition at line 5296 of file tracepoint.c.
References current_traceframe, traceframe::data, traceframe::data_size, find_traceframe(), trace_debug, and traceframe_find_block_type().
Referenced by cmd_qtv().
|
static |
Definition at line 5085 of file tracepoint.c.
References current_target_desc(), target_desc::registers_size, trace_buffer_lo, trace_buffer_wrap, and trace_debug.
Referenced by traceframe_find_block_type(), and traceframe_read_info().
int tracepoint_finished_step | ( | struct thread_info * | tinfo, |
CORE_ADDR | stop_pc | ||
) |
Definition at line 4369 of file tracepoint.c.
References agent_loaded_p(), trap_tracepoint_ctx::base, collect_data_at_step(), wstep_state::current_step, thread_info::entry, expr_eval_no_error, find_tracepoint(), get_thread_regcache(), tracepoint::hit_count, inferior_list_entry::id, wstep_state::next, paddress(), tracepoint::pass_count, trap_tracepoint_ctx::regcache, release_while_stepping_state(), release_while_stepping_state_list(), tracepoint::step_count, stop_tracing(), target_pid_to_str(), wstep_state::tp_address, wstep_state::tp_number, trace_debug, trap_tracepoint, tracepoint_hit_ctx::type, upload_fast_traceframes(), and thread_info::while_stepping.
Referenced by handle_tracepoints().
|
static |
Definition at line 387 of file tracepoint.c.
References paddress(), and trace_debug.
Referenced by cmd_qtstart(), and install_tracepoint().
void tracepoint_look_up_symbols | ( | void | ) |
Definition at line 312 of file tracepoint.c.
References agent_loaded_p(), agent_look_up_symbols(), debug_printf(), debug_threads, ipa_sym_addrs, look_up_one_symbol(), name, and symbol_list.
Referenced by handle_query().
|
static |
Definition at line 6077 of file tracepoint.c.
References tracepoint::actions, tracepoint::address, agent_expr_send(), tracepoint::cond, COPY_FIELD_TO_BUF, fast_tracepoint, get_jump_space_head(), tracepoint::handle, IPA_CMD_BUF_SIZE, IPA_PROTO_FAST_TRACE_ADDR_ON_TARGET, IPA_PROTO_FAST_TRACE_FJUMP_INSN, IPA_PROTO_FAST_TRACE_FJUMP_SIZE, IPA_PROTO_FAST_TRACE_JUMP_PAD, tracepoint::numactions, tracepoint::obj_addr_on_target, tracepoint_action::ops, run_inferior_command(), tracepoint_action_ops::send, set_fast_tracepoint_jump(), startswith(), trace_debug, tracepoint_action::type, and tracepoint::type.
Referenced by cmd_qtdp(), and cmd_qtstart().
int tracepoint_was_hit | ( | struct thread_info * | tinfo, |
CORE_ADDR | stop_pc | ||
) |
Definition at line 4556 of file tracepoint.c.
References add_while_stepping_state(), tracepoint::address, trap_tracepoint_ctx::base, collect_data_at_tracepoint(), tracepoint::cond, condition_true_at_tracepoint(), tracepoint::enabled, thread_info::entry, expr_eval_no_error, get_thread_regcache(), inferior_list_entry::id, tracepoint::next, tracepoint::number, paddress(), trap_tracepoint_ctx::regcache, static_tracepoint, tracepoint::step_count, stop_tracing(), target_pid_to_str(), trace_debug, trap_tracepoint, tracepoint::type, and tracepoint_hit_ctx::type.
Referenced by handle_tracepoints().
|
static |
Definition at line 2414 of file tracepoint.c.
References IPA_CMD_BUF_SIZE, paddress(), and run_inferior_command().
Referenced by clear_installed_tracepoints().
|
static |
Definition at line 6280 of file tracepoint.c.
References add_traceframe(), add_traceframe_block(), ipa_sym_addresses::addr_about_to_request_buffer_space, ipa_sym_addresses::addr_trace_buffer_ctrl, ipa_sym_addresses::addr_trace_buffer_ctrl_curr, ipa_sym_addresses::addr_trace_buffer_hi, ipa_sym_addresses::addr_trace_buffer_lo, ipa_sym_addresses::addr_traceframe_read_count, ipa_sym_addresses::addr_traceframe_write_count, traceframe::data, traceframe::data_size, debug_threads, delete_breakpoint(), ipa_trace_buffer_control::end_free, error(), find_next_tracepoint_by_number(), finish_traceframe(), ipa_trace_buffer_control::free, GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT, internal_error(), IPA_FIRST_TRACEFRAME, IPA_NEXT_TRACEFRAME, ipa_sym_addrs, paddress(), pause_all, read_inferior_data_pointer(), read_inferior_memory(), read_inferior_uinteger(), set_breakpoint_at(), ipa_trace_buffer_control::start, stop_tracing(), traceframe::tpnum, trace_debug, unpause_all, ipa_trace_buffer_control::wrap, write_inferior_integer(), write_inferior_memory(), and write_inferior_uinteger().
Referenced by cmd_qtstatus(), handle_tracepoint_bkpts(), stop_tracing(), and tracepoint_finished_step().
|
static |
Definition at line 249 of file tracepoint.c.
Referenced by install_tracepoint(), maybe_write_ipa_not_loaded(), and maybe_write_ipa_ust_not_loaded().
|
static |
Definition at line 260 of file tracepoint.c.
Referenced by install_tracepoint(), and maybe_write_ipa_ust_not_loaded().
Definition at line 436 of file tracepoint.c.
References write_inferior_memory().
Referenced by cmd_qtstart(), force_unlock_trace_buffer(), and handle_tracepoint_bkpts().
Definition at line 5928 of file tracepoint.c.
References write_inferior_memory().
Referenced by cmd_qtstart(), download_agent_expr(), download_trace_state_variables(), download_tracepoint(), download_tracepoint_1(), and x_tracepoint_action_download().
|
static |
Definition at line 444 of file tracepoint.c.
References write_inferior_memory().
Referenced by clear_inferior_trace_buffer(), cmd_qtenable_disable(), cmd_qtstart(), handle_tracepoint_bkpts(), stop_tracing(), and upload_fast_traceframes().
|
static |
Definition at line 450 of file tracepoint.c.
References write_inferior_memory().
Referenced by clear_inferior_trace_buffer(), and upload_fast_traceframes().
|
static |
Definition at line 583 of file tracepoint.c.
References download_agent_expr(), eval_expr_action::expr, target_malloc(), tracepoint_action::type, write_inferior_data_ptr(), and write_inferior_memory().
|
static |
Definition at line 625 of file tracepoint.c.
References agent_expr_send(), and eval_expr_action::expr.
struct traceframe ATTR_PACKED |
|
static |
Definition at line 991 of file tracepoint.c.
|
static |
Definition at line 3727 of file tracepoint.c.
Referenced by cmd_qtsp().
|
static |
Definition at line 3729 of file tracepoint.c.
|
static |
Definition at line 3728 of file tracepoint.c.
Referenced by cmd_qtsp().
|
static |
Definition at line 3726 of file tracepoint.c.
|
static |
Definition at line 3730 of file tracepoint.c.
int current_traceframe = -1 |
Definition at line 984 of file tracepoint.c.
Referenced by captured_main(), gdb_read_memory(), gdb_write_memory(), handle_qxfer_statictrace(), handle_qxfer_traceframe_info(), process_serial_event(), and traceframe_read_tsv().
int disconnected_tracing |
Definition at line 1256 of file tracepoint.c.
Referenced by captured_main(), and process_serial_event().
EXTERN_C_PUSH IP_AGENT_EXPORT_VAR struct tracepoint* error_tracepoint |
Definition at line 880 of file tracepoint.c.
|
static |
Definition at line 863 of file tracepoint.c.
IP_AGENT_EXPORT_VAR enum eval_result_type expr_eval_result = expr_eval_no_error |
Definition at line 852 of file tracepoint.c.
Referenced by stop_tracing().
struct breakpoint* flush_trace_buffer_bkpt |
Definition at line 399 of file tracepoint.c.
|
static |
Definition at line 2920 of file tracepoint.c.
Referenced by get_jump_space_head().
|
static |
Definition at line 213 of file tracepoint.c.
Referenced by claim_trampoline_space(), clear_inferior_trace_buffer(), cmd_qtstart(), download_trace_state_variables(), download_tracepoint(), fast_tracepoint_collecting(), force_unlock_trace_buffer(), get_get_tsv_func_addr(), get_jump_space_head(), get_raw_reg_func_addr(), get_set_tsv_func_addr(), handle_tracepoint_bkpts(), have_fast_tracepoint_trampoline_buffer(), in_process_agent_supports_ust(), install_fast_tracepoint(), stop_tracing(), target_malloc(), tracepoint_look_up_symbols(), and upload_fast_traceframes().
|
static |
Definition at line 657 of file tracepoint.c.
Referenced by add_tracepoint_action().
|
static |
Definition at line 861 of file tracepoint.c.
|
static |
Definition at line 549 of file tracepoint.c.
Referenced by add_tracepoint_action().
|
static |
Definition at line 2918 of file tracepoint.c.
const char* name |
Definition at line 178 of file tracepoint.c.
Referenced by download_trace_state_variables(), emit_dll_description(), free_char_ptr_vec(), linux_proc_pid_to_exec_file(), linux_qxfer_libraries_svr4(), linux_xfer_osdata_modules(), and tracepoint_look_up_symbols().
int offset |
Definition at line 179 of file tracepoint.c.
Referenced by aarch64_align_watchpoint(), arm_get_hwcap(), cmd_qtbuffer(), cmd_qtenable_disable(), handle_pread(), handle_pwrite(), handle_qxfer(), handle_qxfer_auxv(), handle_qxfer_btrace(), handle_qxfer_btrace_conf(), handle_qxfer_exec_file(), handle_qxfer_fdpic(), handle_qxfer_features(), handle_qxfer_libraries(), handle_qxfer_osdata(), handle_qxfer_siginfo(), handle_qxfer_spu(), handle_qxfer_threads(), handle_qxfer_traceframe_info(), i386_emit_call(), i386_install_fast_tracepoint_jump_pad(), init_target_desc(), linux_common_xfer_osdata(), linux_qxfer_libraries_svr4(), linux_xfer_osdata_cpus(), linux_xfer_osdata_fds(), linux_xfer_osdata_isockets(), linux_xfer_osdata_modules(), linux_xfer_osdata_msg(), linux_xfer_osdata_processes(), linux_xfer_osdata_processgroups(), linux_xfer_osdata_sem(), linux_xfer_osdata_shm(), linux_xfer_osdata_threads(), ppc_get_hwcap(), tic6x_supply_register(), and traceframe_read_sdata().
|
static |
Definition at line 574 of file tracepoint.c.
Referenced by add_tracepoint_action().
|
static |
Definition at line 1244 of file tracepoint.c.
Referenced by clear_readonly_regions(), and cmd_qtro().
int required |
Definition at line 180 of file tracepoint.c.
|
static |
Definition at line 1794 of file tracepoint.c.
struct breakpoint* stop_tracing_bkpt |
Definition at line 395 of file tracepoint.c.
IP_AGENT_EXPORT_VAR struct tracepoint* stopping_tracepoint |
Definition at line 844 of file tracepoint.c.
struct { ... } symbol_list[] |
Referenced by tracepoint_look_up_symbols().
|
static |
Definition at line 5939 of file tracepoint.c.
Referenced by target_malloc().
struct trace_buffer_control trace_buffer_ctrl[1] |
Definition at line 1175 of file tracepoint.c.
Referenced by trace_buffer_alloc().
IP_AGENT_EXPORT_VAR unsigned char* trace_buffer_hi |
Definition at line 1007 of file tracepoint.c.
Referenced by clear_trace_buffer(), and trace_buffer_alloc().
IP_AGENT_EXPORT_VAR int trace_buffer_is_full |
Definition at line 848 of file tracepoint.c.
EXTERN_C_PUSH IP_AGENT_EXPORT_VAR unsigned char* trace_buffer_lo |
Definition at line 1002 of file tracepoint.c.
Referenced by clear_trace_buffer(), cmd_qtbuffer(), trace_buffer_alloc(), and traceframe_walk_blocks().
|
static |
Definition at line 996 of file tracepoint.c.
Referenced by init_trace_buffer().
IP_AGENT_EXPORT_VAR struct trace_state_variable* trace_state_variables |
Definition at line 915 of file tracepoint.c.
Referenced by cmd_qtfv(), cmd_qtinit(), and create_trace_state_variable().
IP_AGENT_EXPORT_VAR unsigned int traceframe_read_count |
Definition at line 1210 of file tracepoint.c.
IP_AGENT_EXPORT_VAR unsigned int traceframe_write_count |
Definition at line 1209 of file tracepoint.c.
Referenced by finish_traceframe(), and trace_buffer_alloc().
IP_AGENT_EXPORT_VAR int traceframes_created |
Definition at line 1220 of file tracepoint.c.
Referenced by finish_traceframe().
EXTERN_C_PUSH IP_AGENT_EXPORT_VAR struct tracepoint* tracepoints |
Definition at line 840 of file tracepoint.c.
Referenced by cmd_qtfp(), and find_next_tracepoint_by_number().
IP_AGENT_EXPORT_VAR int tracing |
Definition at line 1250 of file tracepoint.c.
Referenced by captured_main(), and process_serial_event().
char* tracing_notes |
Definition at line 1280 of file tracepoint.c.
LONGEST tracing_start_time |
Definition at line 1269 of file tracepoint.c.
char* tracing_stop_note |
Definition at line 1285 of file tracepoint.c.
|
static |
Definition at line 1262 of file tracepoint.c.
LONGEST tracing_stop_time |
Definition at line 1270 of file tracepoint.c.
|
static |
Definition at line 1264 of file tracepoint.c.
char* tracing_user_name |
Definition at line 1275 of file tracepoint.c.
|
static |
Definition at line 2950 of file tracepoint.c.
Referenced by claim_trampoline_space().
|
static |
Definition at line 2951 of file tracepoint.c.
|
static |
Definition at line 632 of file tracepoint.c.
Referenced by add_tracepoint_action().