GDBserver
|
#include "server.h"
#include "tracepoint.h"
#include "gdbthread.h"
#include "agent.h"
#include <ctype.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/time.h>
#include <stddef.h>
#include <inttypes.h>
#include <stdint.h>
#include "ax.h"
#include "tdesc.h"
Go to the source code of this file.
#define ATTR_CONSTRUCTOR |
Definition at line 94 of file tracepoint.c.
#define ATTR_NOINLINE |
Definition at line 93 of file tracepoint.c.
#define ATTR_PACKED /* nothing */ |
Definition at line 957 of file tracepoint.c.
#define ATTR_USED |
Definition at line 92 of file tracepoint.c.
#define cmpxchg | ( | mem, | |
oldval, | |||
newval | |||
) | __sync_val_compare_and_swap (mem, oldval, newval) |
Definition at line 1411 of file tracepoint.c.
Referenced by record_tracepoint_error(), and trace_buffer_alloc().
#define COPY_FIELD_TO_BUF | ( | BUF, | |
OBJ, | |||
FIELD | |||
) |
do { \ memcpy (BUF, &(OBJ)->FIELD, sizeof ((OBJ)->FIELD)); \ BUF += sizeof ((OBJ)->FIELD); \ } while (0)
Definition at line 472 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 35 of file tracepoint.c.
Referenced by cmd_bigqtbuffer_size(), and initialize_tracepoint().
#define FIRST_TRACEFRAME | ( | ) | ((struct traceframe *) trace_buffer_start) |
Definition at line 1195 of file tracepoint.c.
Referenced by find_traceframe(), and trace_buffer_alloc().
#define GDBSERVER_FLUSH_COUNT_MASK 0xfffffff0 |
Definition at line 1155 of file tracepoint.c.
Referenced by trace_buffer_alloc(), and upload_fast_traceframes().
#define GDBSERVER_FLUSH_COUNT_MASK_CURR 0x0007ff00 |
Definition at line 1161 of file tracepoint.c.
Referenced by trace_buffer_alloc(), and upload_fast_traceframes().
#define GDBSERVER_FLUSH_COUNT_MASK_PREV 0x7ff00000 |
Definition at line 1160 of file tracepoint.c.
Referenced by trace_buffer_alloc().
#define GDBSERVER_UPDATED_FLUSH_COUNT_BIT 0x80000000 |
Definition at line 1165 of file tracepoint.c.
Referenced by upload_fast_traceframes().
#define IP_AGENT_EXPORT |
Definition at line 112 of file tracepoint.c.
#define IPA_FIRST_TRACEFRAME | ( | ) | (ipa_trace_buffer_ctrl.start) |
Referenced by upload_fast_traceframes().
#define IPA_NEXT_TRACEFRAME | ( | TF, | |
TFOBJ | |||
) |
(IPA_NEXT_TRACEFRAME_1 (TF, TFOBJ) \ - ((IPA_NEXT_TRACEFRAME_1 (TF, TFOBJ) >= ipa_trace_buffer_ctrl.wrap) \ ? (ipa_trace_buffer_ctrl.wrap - ipa_trace_buffer_lo) \ : 0))
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 6033 of file tracepoint.c.
Referenced by tracepoint_send_agent().
#define IPA_PROTO_FAST_TRACE_FJUMP_INSN 22 |
Definition at line 6036 of file tracepoint.c.
Referenced by tracepoint_send_agent().
#define IPA_PROTO_FAST_TRACE_FJUMP_SIZE 18 |
Definition at line 6035 of file tracepoint.c.
Referenced by tracepoint_send_agent().
#define IPA_PROTO_FAST_TRACE_FLAG 0 |
Definition at line 6032 of file tracepoint.c.
#define IPA_PROTO_FAST_TRACE_JUMP_PAD 10 |
Definition at line 6034 of file tracepoint.c.
Referenced by tracepoint_send_agent().
#define MAX_JUMP_SIZE 20 |
Definition at line 3067 of file tracepoint.c.
Referenced by install_fast_tracepoint().
#define memory_barrier | ( | ) | do {} while (0) |
Definition at line 1405 of file tracepoint.c.
Referenced by trace_buffer_alloc().
#define NEXT_TRACEFRAME | ( | TF | ) |
((struct traceframe *) (NEXT_TRACEFRAME_1 (TF) \ - ((NEXT_TRACEFRAME_1 (TF) >= trace_buffer_wrap) \ ? (trace_buffer_wrap - trace_buffer_lo) \ : 0)))
Definition at line 1204 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 1201 of file tracepoint.c.
#define TRACE_BUFFER_CTRL_CURR 0 |
Definition at line 1181 of file tracepoint.c.
#define trace_buffer_end_free (trace_buffer_ctrl[TRACE_BUFFER_CTRL_CURR].end_free) |
Definition at line 1188 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 1187 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 1186 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 1190 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 84 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... | |||
) |
do { \ if (level <= debug_threads) \ trace_vdebug ((fmt), ##args); \ } while (0)
Definition at line 78 of file tracepoint.c.
#define traceframe_count ((unsigned int) (traceframe_write_count - traceframe_read_count)) |
Definition at line 1219 of file tracepoint.c.
Referenced by cmd_qtstatus().
#define TRACEFRAME_EOB_MARKER_SIZE offsetof (struct traceframe, data) |
Definition at line 988 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 5951 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 713 of file tracepoint.c.
enum tracepoint_type |
Definition at line 698 of file tracepoint.c.
static struct traceframe* add_traceframe | ( | struct tracepoint * | tpoint | ) | [static, read] |
Definition at line 2204 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 unsigned char* add_traceframe_block | ( | struct traceframe * | tframe, |
struct tracepoint * | tpoint, | ||
int | amt | ||
) | [static] |
Definition at line 2222 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 struct tracepoint* add_tracepoint | ( | int | num, |
CORE_ADDR | addr | ||
) | [static, read] |
Definition at line 1805 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 void add_tracepoint_action | ( | struct tracepoint * | tpoint, |
char * | packet | ||
) | [static] |
Definition at line 1923 of file tracepoint.c.
References tracepoint::actions, tracepoint::actions_str, collect_memory_action::addr, collect_memory_action::base, collect_registers_action::base, eval_expr_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 void add_while_stepping_state | ( | struct thread_info * | tinfo, |
int | tp_number, | ||
CORE_ADDR | tp_address | ||
) | [static] |
Definition at line 4305 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 char* agent_expr_send | ( | char * | p, |
const struct agent_expr * | aexpr | ||
) | [static] |
Definition at line 618 of file tracepoint.c.
References agent_expr::bytes, agent_expr::length, memcpy(), and memset().
Referenced by tracepoint_send_agent(), and x_tracepoint_action_send().
LONGEST agent_get_trace_state_variable_value | ( | int | num | ) |
Definition at line 2158 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 4919 of file tracepoint.c.
References add_traceframe_block(), memcpy(), 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 4961 of file tracepoint.c.
References add_traceframe_block(), memcpy(), 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 2164 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 5023 of file tracepoint.c.
References add_traceframe_block(), get_trace_state_variable_value(), memcpy(), eval_agent_expr_context::tframe, eval_agent_expr_context::tpoint, and trace_debug.
Referenced by gdb_eval_agent_expr().
static int build_traceframe_info_xml | ( | char | blocktype, |
unsigned char * | dataptr, | ||
void * | data | ||
) | [static] |
Definition at line 5394 of file tracepoint.c.
References buffer_xml_printf(), memcpy(), paddress(), phex_nz(), and warning().
Referenced by traceframe_read_info().
static void claim_jump_space | ( | ULONGEST | used | ) | [static] |
Definition at line 2939 of file tracepoint.c.
References paddress(), pulongest(), and trace_debug.
Referenced by download_tracepoint_1(), and install_fast_tracepoint().
int claim_trampoline_space | ( | ULONGEST | used, |
CORE_ADDR * | trampoline | ||
) |
Definition at line 2954 of file tracepoint.c.
References ipa_sym_addresses::addr_gdb_trampoline_buffer, ipa_sym_addresses::addr_gdb_trampoline_buffer_end, fatal(), ipa_sym_addrs, paddress(), pulongest(), read_inferior_data_pointer(), trace_debug, and trampoline_buffer_head.
Referenced by i386_install_fast_tracepoint_jump_pad().
static void clear_inferior_trace_buffer | ( | void | ) | [static] |
Definition at line 1456 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 void clear_installed_tracepoints | ( | void | ) | [static] |
Definition at line 2425 of file tracepoint.c.
References tracepoint::address, cancel_breakpoints, 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 void clear_readonly_regions | ( | void | ) | [static] |
Definition at line 2853 of file tracepoint.c.
References readonly_region::next, and readonly_regions.
Referenced by cmd_qtinit(), and cmd_qtro().
static void clear_trace_buffer | ( | void | ) | [static] |
Definition at line 1440 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 void clone_fast_tracepoint | ( | struct tracepoint * | to, |
const struct tracepoint * | from | ||
) | [static] |
Definition at line 3053 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 void cmd_bigqtbuffer_circular | ( | char * | own_buf | ) | [static] |
Definition at line 4032 of file tracepoint.c.
References own_buf, trace_debug, unpack_varlen_hex(), and write_ok().
Referenced by handle_tracepoint_general_set().
static void cmd_bigqtbuffer_size | ( | char * | own_buf | ) | [static] |
Definition at line 4047 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 void cmd_qtbuffer | ( | char * | own_buf | ) | [static] |
Definition at line 3983 of file tracepoint.c.
References convert_int_to_ascii(), 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 void cmd_qtdisconnected | ( | char * | own_buf | ) | [static] |
Definition at line 3513 of file tracepoint.c.
References own_buf, unpack_varlen_hex(), and write_ok().
Referenced by handle_tracepoint_general_set().
static void cmd_qtdp | ( | char * | own_buf | ) | [static] |
Definition at line 2480 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 void cmd_qtdpsrc | ( | char * | own_buf | ) | [static] |
Definition at line 2657 of file tracepoint.c.
References find_tracepoint(), last, memcpy(), source_string::next, own_buf, paddress(), tracepoint::source_strings, source_string::str, strchr(), trace_debug, source_string::type, unhexify(), unpack_varlen_hex(), write_enn(), write_ok(), and xmalloc().
Referenced by handle_tracepoint_general_set().
static void cmd_qtdv | ( | char * | own_buf | ) | [static] |
Definition at line 2718 of file tracepoint.c.
References create_trace_state_variable(), trace_state_variable::initial_value, trace_state_variable::name, own_buf, set_trace_state_variable_value(), unhexify(), unpack_varlen_hex(), write_ok(), and xmalloc().
Referenced by handle_tracepoint_general_set().
static void cmd_qtenable_disable | ( | char * | own_buf, |
int | enable | ||
) | [static] |
Definition at line 2750 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 void cmd_qtfp | ( | char * | packet | ) | [static] |
Definition at line 3781 of file tracepoint.c.
References response_tracepoint(), and trace_debug.
Referenced by handle_tracepoint_query().
static void cmd_qtframe | ( | char * | own_buf | ) | [static] |
Definition at line 3528 of file tracepoint.c.
References find_next_traceframe_by_tracepoint(), find_next_traceframe_in_range(), find_traceframe(), own_buf, paddress(), traceframe::tpnum, trace_debug, unpack_varlen_hex(), and write_ok().
Referenced by handle_tracepoint_general_set().
static void cmd_qtfstm | ( | char * | packet | ) | [static] |
Definition at line 3905 of file tracepoint.c.
References maybe_write_ipa_ust_not_loaded(), and run_inferior_command().
Referenced by handle_tracepoint_query().
static void cmd_qtfv | ( | char * | packet | ) | [static] |
Definition at line 3869 of file tracepoint.c.
References response_tsv(), trace_debug, and trace_state_variables.
Referenced by handle_tracepoint_query().
static void cmd_qtinit | ( | char * | packet | ) | [static] |
Definition at line 2361 of file tracepoint.c.
References clear_inferior_trace_buffer(), clear_installed_tracepoints(), clear_readonly_regions(), clear_trace_buffer(), trace_state_variable::getter, trace_state_variable::next, trace_state_variable::number, stop_tracing(), trace_debug, trace_state_variables, and write_ok().
Referenced by handle_tracepoint_general_set().
static void cmd_qtminftpilen | ( | char * | packet | ) | [static] |
Definition at line 3966 of file tracepoint.c.
References current_inferior, and target_get_min_fast_tracepoint_insn_len.
Referenced by handle_tracepoint_query().
static void cmd_qtnotes | ( | char * | own_buf | ) | [static] |
Definition at line 4078 of file tracepoint.c.
References own_buf, strchr(), trace_debug, unhexify(), write_ok(), xfree(), and xmalloc().
Referenced by handle_tracepoint_general_set().
static void cmd_qtp | ( | char * | own_buf | ) | [static] |
Definition at line 3682 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 void cmd_qtro | ( | char * | own_buf | ) | [static] |
Definition at line 2870 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 void cmd_qtsp | ( | char * | packet | ) | [static] |
Definition at line 3801 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 void cmd_qtsstm | ( | char * | packet | ) | [static] |
Definition at line 3914 of file tracepoint.c.
References maybe_write_ipa_ust_not_loaded(), and run_inferior_command().
Referenced by handle_tracepoint_query().
static void cmd_qtstart | ( | char * | packet | ) | [static] |
Definition at line 3192 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, fatal(), flush_trace_buffer_handler(), get_timestamp(), tracepoint::handle, tracepoint::hit_count, in_process_agent_supports_ust(), install_fast_tracepoint(), 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 void cmd_qtstatus | ( | char * | packet | ) | [static] |
Definition at line 3598 of file tracepoint.c.
References agent_loaded_p(), convert_int_to_ascii(), free_space(), hexify(), pause_all, phex_nz(), trace_debug, traceframe_count, unpause_all, and upload_fast_traceframes().
Referenced by handle_tracepoint_query().
static void cmd_qtstmat | ( | char * | packet | ) | [static] |
Definition at line 3924 of file tracepoint.c.
References maybe_write_ipa_ust_not_loaded(), and run_inferior_command().
Referenced by handle_tracepoint_query().
static void cmd_qtstop | ( | char * | packet | ) | [static] |
Definition at line 3506 of file tracepoint.c.
References stop_tracing(), and write_ok().
Referenced by handle_tracepoint_general_set().
static void cmd_qtsv | ( | char * | packet | ) | [static] |
Definition at line 3884 of file tracepoint.c.
References trace_state_variable::next, response_tsv(), and trace_debug.
Referenced by handle_tracepoint_query().
static void cmd_qtv | ( | char * | own_buf | ) | [static] |
Definition at line 2817 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 void collect_data_at_step | ( | struct tracepoint_hit_ctx * | ctx, |
CORE_ADDR | stop_pc, | ||
struct tracepoint * | tpoint, | ||
int | current_step | ||
) | [static] |
Definition at line 4654 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 void collect_data_at_tracepoint | ( | struct tracepoint_hit_ctx * | ctx, |
CORE_ADDR | stop_pc, | ||
struct tracepoint * | tpoint | ||
) | [static] |
Definition at line 4606 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 void compile_tracepoint_condition | ( | struct tracepoint * | tpoint, |
CORE_ADDR * | jump_entry | ||
) | [static] |
Definition at line 5845 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 int condition_true_at_tracepoint | ( | struct tracepoint_hit_ctx * | ctx, |
struct tracepoint * | tpoint | ||
) | [static] |
Definition at line 4868 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 struct trace_state_variable* create_trace_state_variable | ( | int | num, |
int | gdb | ||
) | [static, read] |
Definition at line 2085 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 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] |
Definition at line 4751 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 CORE_ADDR download_agent_expr | ( | struct agent_expr * | expr | ) | [static] |
Definition at line 5934 of file tracepoint.c.
References target_malloc(), write_inferior_data_ptr(), and write_inferior_memory().
Referenced by download_tracepoint_1(), and x_tracepoint_action_download().
static void download_trace_state_variables | ( | void | ) | [static] |
Definition at line 6165 of file tracepoint.c.
References ipa_sym_addresses::addr_trace_state_variables, fatal(), 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 void download_tracepoint | ( | struct tracepoint * | tpoint | ) | [static] |
Definition at line 6118 of file tracepoint.c.
References ipa_sym_addresses::addr_tracepoints, download_tracepoint_1(), fast_tracepoint, fatal(), 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 void download_tracepoint_1 | ( | struct tracepoint * | tpoint | ) | [static] |
Definition at line 5956 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 5550 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(), fatal(), ipa_sym_addrs, tracepoint::jump_pad, tracepoint::jump_pad_end, tracepoint::number, paddress(), read_inferior_data_pointer(), read_inferior_memory(), 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 struct tracepoint * fast_tracepoint_from_ipa_tpoint_address | ( | CORE_ADDR | ipa_tpoint_obj | ) | [static, read] |
Definition at line 5499 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 struct tracepoint* fast_tracepoint_from_jump_pad_address | ( | CORE_ADDR | pc | ) | [static, read] |
Definition at line 5465 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 struct tracepoint* fast_tracepoint_from_trampoline_address | ( | CORE_ADDR | pc | ) | [static, read] |
Definition at line 5480 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 5164 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 struct traceframe* find_next_traceframe_by_tracepoint | ( | int | num, |
int * | tfnump | ||
) | [static, read] |
Definition at line 2330 of file tracepoint.c.
References find_traceframe(), NEXT_TRACEFRAME, and traceframe::tpnum.
Referenced by cmd_qtframe().
static struct traceframe* find_next_traceframe_in_range | ( | CORE_ADDR | lo, |
CORE_ADDR | hi, | ||
int | inside_p, | ||
int * | tfnump | ||
) | [static, read] |
Definition at line 2296 of file tracepoint.c.
References find_traceframe(), get_traceframe_address(), NEXT_TRACEFRAME, and traceframe::tpnum.
Referenced by cmd_qtframe().
static struct tracepoint* find_next_tracepoint_by_number | ( | struct tracepoint * | prev_tp, |
int | num | ||
) | [static, read] |
Definition at line 1903 of file tracepoint.c.
References tracepoint::next, and tracepoint::number.
Referenced by fetch_traceframe_registers(), get_traceframe_address(), and upload_fast_traceframes().
static struct traceframe* find_traceframe | ( | int | num | ) | [static, read] |
Definition at line 2258 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 struct tracepoint* find_tracepoint | ( | int | id, |
CORE_ADDR | addr | ||
) | [static, read] |
Definition at line 1864 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 void finish_traceframe | ( | struct traceframe * | tframe | ) | [static] |
Definition at line 2246 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 int flush_trace_buffer_handler | ( | CORE_ADDR | addr | ) | [static] |
void force_unlock_trace_buffer | ( | void | ) |
Definition at line 5534 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 int free_space | ( | void | ) | [static] |
Definition at line 1787 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 3933 of file tracepoint.c.
References all_threads, current_inferior, inferior_list::head, inferior_list_entry::id, IPA_CMD_BUF_SIZE, maybe_write_ipa_not_loaded(), inferior_list_entry::next, ptid_get_pid(), and run_inferior_command().
Referenced by kill_inferior().
static struct regcache* get_context_regcache | ( | struct tracepoint_hit_ctx * | ctx | ) | [static, read] |
Definition at line 4699 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 5833 of file tracepoint.c.
References ipa_sym_addresses::addr_get_trace_state_variable_value, and ipa_sym_addrs.
Referenced by compile_bytecodes().
static CORE_ADDR get_jump_space_head | ( | void | ) | [static] |
Definition at line 2924 of file tracepoint.c.
References ipa_sym_addresses::addr_gdb_jump_pad_buffer, fatal(), gdb_jump_pad_head, 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 5827 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 5839 of file tracepoint.c.
References ipa_sym_addresses::addr_set_trace_state_variable_value, and ipa_sym_addrs.
Referenced by compile_bytecodes().
static LONGEST get_timestamp | ( | void | ) | [static] |
Definition at line 7298 of file tracepoint.c.
Referenced by cmd_qtstart(), initialize_tracepoint(), and stop_tracing().
static struct trace_state_variable* get_trace_state_variable | ( | int | num | ) | [static, read] |
Definition at line 2063 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 LONGEST get_trace_state_variable_value | ( | int | num | ) |
Definition at line 2116 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 CORE_ADDR get_traceframe_address | ( | struct traceframe * | tframe | ) | [static] |
Definition at line 2276 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 4455 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 4138 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(), and cmd_qtstop().
Referenced by handle_general_set().
int handle_tracepoint_query | ( | char * | packet | ) |
Definition at line 4216 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(), and cmd_qtv().
Referenced by handle_query().
int have_fast_tracepoint_trampoline_buffer | ( | char * | buf | ) |
Definition at line 2997 of file tracepoint.c.
References ipa_sym_addresses::addr_gdb_trampoline_buffer_end, ipa_sym_addresses::addr_gdb_trampoline_buffer_error, fatal(), ipa_sym_addrs, read_inferior_data_pointer(), and read_inferior_memory().
Referenced by x86_get_min_fast_tracepoint_insn_len().
static int in_process_agent_supports_ust | ( | void | ) | [static] |
Definition at line 236 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().
int in_readonly_region | ( | CORE_ADDR | addr, |
ULONGEST | length | ||
) |
Definition at line 2905 of file tracepoint.c.
References readonly_region::end, readonly_region::next, and readonly_region::start.
Referenced by gdb_read_memory().
static void init_trace_buffer | ( | LONGEST | bufsize | ) | [static] |
Definition at line 1493 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 7309 of file tracepoint.c.
References create_trace_state_variable(), DEFAULT_TRACE_BUFFER_SIZE, errno, fatal(), get_timestamp(), init_trace_buffer(), initialize_low_tracepoint(), IPA_BUFSIZ, set_trace_state_variable_getter(), set_trace_state_variable_name(), strerror, and xmalloc().
Referenced by main().
static int install_fast_tracepoint | ( | struct tracepoint * | tpoint, |
char * | errbuf | ||
) | [static] |
Definition at line 3073 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 void install_tracepoint | ( | struct tracepoint * | tpoint, |
char * | own_buf | ||
) | [static] |
Definition at line 3135 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 CORE_ADDR l_tracepoint_action_download | ( | const struct tracepoint_action * | action | ) | [static] |
Definition at line 653 of file tracepoint.c.
References target_malloc(), tracepoint_action::type, and write_inferior_memory().
static char* l_tracepoint_action_send | ( | char * | buffer, |
const struct tracepoint_action * | action | ||
) | [static] |
Definition at line 666 of file tracepoint.c.
static CORE_ADDR m_tracepoint_action_download | ( | const struct tracepoint_action * | action | ) | [static] |
Definition at line 539 of file tracepoint.c.
References target_malloc(), tracepoint_action::type, and write_inferior_memory().
static char* m_tracepoint_action_send | ( | char * | buffer, |
const struct tracepoint_action * | action | ||
) | [static] |
Definition at line 551 of file tracepoint.c.
References collect_memory_action::addr, collect_memory_action::basereg, and COPY_FIELD_TO_BUF.
static int match_blocktype | ( | char | blocktype, |
unsigned char * | dataptr, | ||
void * | data | ||
) | [static] |
Definition at line 5048 of file tracepoint.c.
Referenced by traceframe_find_block_type().
static int maybe_write_ipa_not_loaded | ( | char * | buffer | ) | [static] |
Definition at line 289 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 int maybe_write_ipa_ust_not_loaded | ( | char * | buffer | ) | [static] |
Definition at line 304 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 int probe_marker_at | ( | CORE_ADDR | address, |
char * | errout | ||
) | [static] |
Definition at line 3032 of file tracepoint.c.
References IPA_CMD_BUF_SIZE, paddress(), and run_inferior_command().
Referenced by cmd_qtstart(), and install_tracepoint().
static CORE_ADDR r_tracepoint_action_download | ( | const struct tracepoint_action * | action | ) | [static] |
Definition at line 570 of file tracepoint.c.
References target_malloc(), tracepoint_action::type, and write_inferior_memory().
static char* r_tracepoint_action_send | ( | char * | buffer, |
const struct tracepoint_action * | action | ||
) | [static] |
Definition at line 583 of file tracepoint.c.
static int read_inferior_data_pointer | ( | CORE_ADDR | symaddr, |
CORE_ADDR * | val | ||
) | [static] |
Definition at line 439 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 int read_inferior_integer | ( | CORE_ADDR | symaddr, |
int * | val | ||
) | [static] |
Definition at line 422 of file tracepoint.c.
References read_inferior_memory().
Referenced by handle_tracepoint_bkpts(), and in_process_agent_supports_ust().
static int read_inferior_uinteger | ( | CORE_ADDR | symaddr, |
unsigned int * | val | ||
) | [static] |
Definition at line 432 of file tracepoint.c.
References read_inferior_memory().
Referenced by upload_fast_traceframes().
static void record_tracepoint_error | ( | struct tracepoint * | tpoint, |
const char * | which, | ||
enum eval_result_type | rtype | ||
) | [static] |
Definition at line 1417 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 void release_while_stepping_state | ( | struct wstep_state * | wstep | ) | [static] |
Definition at line 4323 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 4332 of file tracepoint.c.
References wstep_state::next, release_while_stepping_state(), and thread_info::while_stepping.
Referenced by linux_resume_one_lwp(), and tracepoint_finished_step().
static void remove_tracepoint | ( | struct tracepoint * | tpoint | ) | [static] |
Definition at line 1878 of file tracepoint.c.
References tracepoint::next, and xfree().
Referenced by cmd_qtdp().
static void response_action | ( | char * | packet, |
struct tracepoint * | tpoint, | ||
char * | taction, | ||
int | step | ||
) | [static] |
Definition at line 3749 of file tracepoint.c.
References tracepoint::address, tracepoint::number, and paddress().
Referenced by cmd_qtsp().
static void response_source | ( | char * | packet, |
struct tracepoint * | tpoint, | ||
struct source_string * | src | ||
) | [static] |
Definition at line 3761 of file tracepoint.c.
References tracepoint::address, convert_int_to_ascii(), tracepoint::number, paddress(), source_string::str, and source_string::type.
Referenced by cmd_qtsp().
static void response_tracepoint | ( | char * | packet, |
struct tracepoint * | tpoint | ||
) | [static] |
Definition at line 3720 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 void response_tsv | ( | char * | packet, |
struct trace_state_variable * | tsv | ||
) | [static] |
Definition at line 3849 of file tracepoint.c.
References convert_int_to_ascii(), 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 int run_inferior_command | ( | char * | cmd, |
int | len | ||
) | [static] |
Definition at line 6760 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 void set_trace_state_variable_getter | ( | int | num, |
LONGEST(*)(void) | getter | ||
) | [static] |
Definition at line 2186 of file tracepoint.c.
References get_trace_state_variable(), trace_state_variable::getter, and trace_debug.
Referenced by initialize_tracepoint().
static void set_trace_state_variable_name | ( | int | num, |
const char * | name | ||
) | [static] |
Definition at line 2170 of file tracepoint.c.
References get_trace_state_variable(), trace_state_variable::name, and trace_debug.
Referenced by initialize_tracepoint().
IP_AGENT_EXPORT void set_trace_state_variable_value | ( | int | num, |
LONGEST | val | ||
) |
Definition at line 2142 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 3388 of file tracepoint.c.
References ipa_sym_addresses::addr_tracing, agent_loaded_p(), cancel_breakpoints, clear_installed_tracepoints(), delete_breakpoint(), expr_eval_no_error, expr_eval_result, fatal(), gdb_connected(), get_timestamp(), ipa_sym_addrs, tracepoint::number, tracepoint::pass_count, pause_all, trace_debug, unpause_all, upload_fast_traceframes(), and write_inferior_integer().
Referenced by cmd_qtinit(), cmd_qtstop(), handle_tracepoint_bkpts(), main(), process_serial_event(), tracepoint_finished_step(), tracepoint_was_hit(), and upload_fast_traceframes().
static int stop_tracing_handler | ( | CORE_ADDR | addr | ) | [static] |
static CORE_ADDR target_malloc | ( | ULONGEST | size | ) | [static] |
Definition at line 5912 of file tracepoint.c.
References ipa_sym_addresses::addr_gdb_tp_heap_buffer, fatal(), 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 void* trace_buffer_alloc | ( | size_t | amt | ) | [static] |
Definition at line 1526 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 void trace_vdebug | ( | const char * | , |
... | |||
) | [static] |
Definition at line 64 of file tracepoint.c.
References PROG.
static unsigned char* traceframe_find_block_type | ( | unsigned char * | database, |
unsigned int | datasize, | ||
int | tfnum, | ||
char | type_wanted | ||
) | [static] |
Definition at line 5139 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 unsigned char* traceframe_find_regblock | ( | struct traceframe * | tframe, |
int | tfnum | ||
) | [static] |
Definition at line 5147 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 CORE_ADDR traceframe_get_pc | ( | struct traceframe * | tframe | ) | [static] |
Definition at line 5198 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 5441 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 5215 of file tracepoint.c.
References traceframe::data, traceframe::data_size, find_traceframe(), memcpy(), 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 5340 of file tracepoint.c.
References traceframe::data, traceframe::data_size, find_traceframe(), memcpy(), offset, trace_debug, and traceframe_find_block_type().
Referenced by handle_qxfer_statictrace().
static int traceframe_read_tsv | ( | int | num, |
LONGEST * | val | ||
) | [static] |
Definition at line 5277 of file tracepoint.c.
References current_traceframe, traceframe::data, traceframe::data_size, find_traceframe(), memcpy(), trace_debug, and traceframe_find_block_type().
Referenced by cmd_qtv().
static unsigned char* traceframe_walk_blocks | ( | unsigned char * | database, |
unsigned int | datasize, | ||
int | tfnum, | ||
int(*)(char blocktype, unsigned char *dataptr, void *data) | callback, | ||
void * | data | ||
) | [static] |
Definition at line 5066 of file tracepoint.c.
References current_target_desc(), memcpy(), 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 4350 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 int tracepoint_handler | ( | CORE_ADDR | address | ) | [static] |
Definition at line 401 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 326 of file tracepoint.c.
References agent_loaded_p(), agent_look_up_symbols(), debug_threads, ipa_sym_addrs, look_up_one_symbol(), name, and symbol_list.
Referenced by handle_query().
static int tracepoint_send_agent | ( | struct tracepoint * | tpoint | ) | [static] |
Definition at line 6041 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, memcpy(), tracepoint::numactions, tracepoint::obj_addr_on_target, tracepoint_action::ops, run_inferior_command(), tracepoint_action_ops::send, set_fast_tracepoint_jump(), 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 4537 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 void unprobe_marker_at | ( | CORE_ADDR | address | ) | [static] |
Definition at line 2412 of file tracepoint.c.
References IPA_CMD_BUF_SIZE, paddress(), and run_inferior_command().
Referenced by clear_installed_tracepoints().
static void upload_fast_traceframes | ( | void | ) | [static] |
Definition at line 6244 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, cancel_breakpoints, traceframe::data, debug_threads, delete_breakpoint(), error(), fatal(), find_next_tracepoint_by_number(), finish_traceframe(), GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT, 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(), stop_tracing(), trace_debug, unpause_all, write_inferior_integer(), write_inferior_memory(), and write_inferior_uinteger().
Referenced by cmd_qtstatus(), handle_tracepoint_bkpts(), stop_tracing(), and tracepoint_finished_step().
static void write_e_ipa_not_loaded | ( | char * | buffer | ) | [static] |
Definition at line 263 of file tracepoint.c.
Referenced by install_tracepoint(), maybe_write_ipa_not_loaded(), and maybe_write_ipa_ust_not_loaded().
static void write_e_ust_not_loaded | ( | char * | buffer | ) | [static] |
Definition at line 274 of file tracepoint.c.
Referenced by install_tracepoint(), and maybe_write_ipa_ust_not_loaded().
static int write_inferior_data_pointer | ( | CORE_ADDR | symaddr, |
CORE_ADDR | val | ||
) | [static] |
Definition at line 450 of file tracepoint.c.
References write_inferior_memory().
Referenced by cmd_qtstart(), force_unlock_trace_buffer(), and handle_tracepoint_bkpts().
static int write_inferior_data_ptr | ( | CORE_ADDR | where, |
CORE_ADDR | ptr | ||
) | [static] |
Definition at line 5895 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 int write_inferior_integer | ( | CORE_ADDR | symaddr, |
int | val | ||
) | [static] |
Definition at line 458 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 int write_inferior_uinteger | ( | CORE_ADDR | symaddr, |
unsigned int | val | ||
) | [static] |
Definition at line 464 of file tracepoint.c.
References write_inferior_memory().
Referenced by clear_inferior_trace_buffer(), and upload_fast_traceframes().
static CORE_ADDR x_tracepoint_action_download | ( | const struct tracepoint_action * | action | ) | [static] |
Definition at line 597 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 char* x_tracepoint_action_send | ( | char * | buffer, |
const struct tracepoint_action * | action | ||
) | [static] |
Definition at line 639 of file tracepoint.c.
References agent_expr_send(), and eval_expr_action::expr.
struct traceframe ATTR_PACKED |
IP_AGENT_EXPORT struct tracepoint* tracepoints ATTR_USED |
Definition at line 852 of file tracepoint.c.
int circular_trace_buffer [static] |
Definition at line 1000 of file tracepoint.c.
unsigned int cur_action [static] |
Definition at line 3711 of file tracepoint.c.
Referenced by cmd_qtsp().
struct source_string* cur_source_string [static] |
Definition at line 3713 of file tracepoint.c.
unsigned int cur_step_action [static] |
Definition at line 3712 of file tracepoint.c.
Referenced by cmd_qtsp().
struct tracepoint* cur_tpoint [static] |
Definition at line 3710 of file tracepoint.c.
struct trace_state_variable* cur_tsv [static] |
Definition at line 3714 of file tracepoint.c.
int current_traceframe = -1 |
Definition at line 993 of file tracepoint.c.
Referenced by gdb_read_memory(), gdb_write_memory(), handle_qxfer_statictrace(), handle_qxfer_traceframe_info(), main(), process_serial_event(), and traceframe_read_tsv().
Definition at line 1261 of file tracepoint.c.
Referenced by main(), and process_serial_event().
struct tracepoint* error_tracepoint [static] |
Definition at line 890 of file tracepoint.c.
const char* eval_result_names[] [static] |
{ "terror:in the attic", "terror:empty expression", "terror:empty stack", "terror:stack overflow", "terror:stack underflow", "terror:unhandled opcode", "terror:unrecognized opcode", "terror:divide by zero" }
Definition at line 874 of file tracepoint.c.
enum eval_result_type expr_eval_result = expr_eval_no_error [static] |
Definition at line 870 of file tracepoint.c.
Referenced by stop_tracing().
struct breakpoint* flush_trace_buffer_bkpt |
Definition at line 413 of file tracepoint.c.
CORE_ADDR gdb_jump_pad_head [static] |
Definition at line 2919 of file tracepoint.c.
Referenced by get_jump_space_head().
struct ipa_sym_addresses ipa_sym_addrs [static] |
Definition at line 227 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().
struct tracepoint_action_ops l_tracepoint_action_ops [static] |
Definition at line 671 of file tracepoint.c.
Referenced by add_tracepoint_action().
struct tracepoint* last_tracepoint [static] |
Definition at line 859 of file tracepoint.c.
struct tracepoint_action_ops m_tracepoint_action_ops [static] |
Definition at line 563 of file tracepoint.c.
Referenced by add_tracepoint_action().
const int max_jump_pad_size = 0x100 [static] |
Definition at line 2917 of file tracepoint.c.
const char* name |
Definition at line 192 of file tracepoint.c.
Referenced by agent_look_up_symbols(), download_trace_state_variables(), free_char_ptr_vec(), gdb_signal_to_name(), handle_qxfer_libraries(), linux_qxfer_libraries_svr4(), linux_xfer_osdata_modules(), and tracepoint_look_up_symbols().
int offset |
Definition at line 193 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_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_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().
struct tracepoint_action_ops r_tracepoint_action_ops [static] |
Definition at line 588 of file tracepoint.c.
Referenced by add_tracepoint_action().
struct readonly_region* readonly_regions [static] |
Definition at line 1249 of file tracepoint.c.
Referenced by clear_readonly_regions(), and cmd_qtro().
int required |
Definition at line 194 of file tracepoint.c.
int seen_step_action_flag [static] |
Definition at line 1799 of file tracepoint.c.
struct breakpoint* stop_tracing_bkpt |
Definition at line 409 of file tracepoint.c.
Definition at line 864 of file tracepoint.c.
struct { ... } symbol_list[] [static] |
Referenced by tracepoint_look_up_symbols().
CORE_ADDR target_tp_heap [static] |
Definition at line 5906 of file tracepoint.c.
Referenced by target_malloc().
struct trace_buffer_control trace_buffer_ctrl[1] |
Definition at line 1180 of file tracepoint.c.
Referenced by trace_buffer_alloc().
unsigned char* trace_buffer_hi [static] |
Definition at line 1014 of file tracepoint.c.
Referenced by clear_trace_buffer(), and trace_buffer_alloc().
Definition at line 868 of file tracepoint.c.
unsigned char* trace_buffer_lo [static] |
Definition at line 1009 of file tracepoint.c.
Referenced by clear_trace_buffer(), cmd_qtbuffer(), trace_buffer_alloc(), and traceframe_walk_blocks().
LONGEST trace_buffer_size [static] |
Definition at line 1005 of file tracepoint.c.
Referenced by init_trace_buffer().
Definition at line 924 of file tracepoint.c.
Referenced by cmd_qtfv(), cmd_qtinit(), and create_trace_state_variable().
IP_AGENT_EXPORT unsigned int traceframe_read_count |
Definition at line 1215 of file tracepoint.c.
IP_AGENT_EXPORT unsigned int traceframe_write_count |
Definition at line 1214 of file tracepoint.c.
Referenced by finish_traceframe(), and trace_buffer_alloc().
Definition at line 1225 of file tracepoint.c.
Referenced by finish_traceframe().
Definition at line 1255 of file tracepoint.c.
Referenced by main(), and process_serial_event().
char* tracing_notes |
Definition at line 1285 of file tracepoint.c.
Definition at line 1274 of file tracepoint.c.
char* tracing_stop_note |
Definition at line 1290 of file tracepoint.c.
const char* tracing_stop_reason = "tnotrun" [static] |
Definition at line 1267 of file tracepoint.c.
Definition at line 1275 of file tracepoint.c.
int tracing_stop_tpnum [static] |
Definition at line 1269 of file tracepoint.c.
char* tracing_user_name |
Definition at line 1280 of file tracepoint.c.
CORE_ADDR trampoline_buffer_head = 0 [static] |
Definition at line 2946 of file tracepoint.c.
Referenced by claim_trampoline_space().
CORE_ADDR trampoline_buffer_tail [static] |
Definition at line 2947 of file tracepoint.c.
struct tracepoint_action_ops x_tracepoint_action_ops [static] |
Definition at line 646 of file tracepoint.c.
Referenced by add_tracepoint_action().