|
GDB (xrefs)
|
#include "defs.h"#include "btrace.h"#include "gdbthread.h"#include "inferior.h"#include "target.h"#include "record.h"#include "symtab.h"#include "disasm.h"#include "source.h"#include "filenames.h"#include "xml-support.h"#include "regcache.h"#include "rsp-low.h"#include "gdbcmd.h"#include "cli/cli-utils.h"#include <inttypes.h>#include <ctype.h>#include <algorithm>Go to the source code of this file.
Macros | |
| #define | DEBUG(msg, args...) |
| #define | DEBUG_FTRACE(msg, args...) DEBUG ("[ftrace] " msg, ##args) |
Functions | |
| static void | btrace_add_pc (struct thread_info *tp) |
| static const char * | ftrace_print_function_name (const struct btrace_function *bfun) |
| static const char * | ftrace_print_filename (const struct btrace_function *bfun) |
| static const char * | ftrace_print_insn_addr (const struct btrace_insn *insn) |
| static void | ftrace_debug (const struct btrace_function *bfun, const char *prefix) |
| static unsigned int | ftrace_call_num_insn (const struct btrace_function *bfun) |
| static struct btrace_function * | ftrace_find_call_by_number (struct btrace_thread_info *btinfo, unsigned int number) |
| static const struct btrace_function * | ftrace_find_call_by_number (const struct btrace_thread_info *btinfo, unsigned int number) |
| static int | ftrace_function_switched (const struct btrace_function *bfun, const struct minimal_symbol *mfun, const struct symbol *fun) |
| static struct btrace_function * | ftrace_new_function (struct btrace_thread_info *btinfo, struct minimal_symbol *mfun, struct symbol *fun) |
| static void | ftrace_update_caller (struct btrace_function *bfun, struct btrace_function *caller, enum btrace_function_flag flags) |
| static void | ftrace_fixup_caller (struct btrace_thread_info *btinfo, struct btrace_function *bfun, struct btrace_function *caller, enum btrace_function_flag flags) |
| static struct btrace_function * | ftrace_new_call (struct btrace_thread_info *btinfo, struct minimal_symbol *mfun, struct symbol *fun) |
| static struct btrace_function * | ftrace_new_tailcall (struct btrace_thread_info *btinfo, struct minimal_symbol *mfun, struct symbol *fun) |
| static struct btrace_function * | ftrace_get_caller (struct btrace_thread_info *btinfo, struct btrace_function *bfun) |
| static struct btrace_function * | ftrace_find_caller (struct btrace_thread_info *btinfo, struct btrace_function *bfun, struct minimal_symbol *mfun, struct symbol *fun) |
| static struct btrace_function * | ftrace_find_call (struct btrace_thread_info *btinfo, struct btrace_function *bfun) |
| static struct btrace_function * | ftrace_new_return (struct btrace_thread_info *btinfo, struct minimal_symbol *mfun, struct symbol *fun) |
| static struct btrace_function * | ftrace_new_switch (struct btrace_thread_info *btinfo, struct minimal_symbol *mfun, struct symbol *fun) |
| static struct btrace_function * | ftrace_new_gap (struct btrace_thread_info *btinfo, int errcode, std::vector< unsigned int > &gaps) |
| static struct btrace_function * | ftrace_update_function (struct btrace_thread_info *btinfo, CORE_ADDR pc) |
| static void | ftrace_update_insns (struct btrace_function *bfun, const btrace_insn &insn) |
| static enum btrace_insn_class | ftrace_classify_insn (struct gdbarch *gdbarch, CORE_ADDR pc) |
| static int | ftrace_match_backtrace (struct btrace_thread_info *btinfo, struct btrace_function *lhs, struct btrace_function *rhs) |
| static void | ftrace_fixup_level (struct btrace_thread_info *btinfo, struct btrace_function *bfun, int adjustment) |
| static void | ftrace_compute_global_level_offset (struct btrace_thread_info *btinfo) |
| static void | ftrace_connect_bfun (struct btrace_thread_info *btinfo, struct btrace_function *prev, struct btrace_function *next) |
| static void | ftrace_connect_backtrace (struct btrace_thread_info *btinfo, struct btrace_function *lhs, struct btrace_function *rhs) |
| static int | ftrace_bridge_gap (struct btrace_thread_info *btinfo, struct btrace_function *lhs, struct btrace_function *rhs, int min_matches) |
| static void | btrace_bridge_gaps (struct thread_info *tp, std::vector< unsigned int > &gaps) |
| static void | btrace_compute_ftrace_bts (struct thread_info *tp, const struct btrace_data_bts *btrace, std::vector< unsigned int > &gaps) |
| static void | btrace_compute_ftrace_pt (struct thread_info *tp, const struct btrace_data_pt *btrace, std::vector< unsigned int > &gaps) |
| static void | btrace_compute_ftrace_1 (struct thread_info *tp, struct btrace_data *btrace, std::vector< unsigned int > &gaps) |
| static void | btrace_finalize_ftrace (struct thread_info *tp, std::vector< unsigned int > &gaps) |
| static void | btrace_compute_ftrace (struct thread_info *tp, struct btrace_data *btrace) |
| void | btrace_enable (struct thread_info *tp, const struct btrace_config *conf) |
| const struct btrace_config * | btrace_conf (const struct btrace_thread_info *btinfo) |
| void | btrace_disable (struct thread_info *tp) |
| void | btrace_teardown (struct thread_info *tp) |
| static int | btrace_stitch_bts (struct btrace_data_bts *btrace, struct thread_info *tp) |
| static int | btrace_stitch_trace (struct btrace_data *btrace, struct thread_info *tp) |
| static void | btrace_clear_history (struct btrace_thread_info *btinfo) |
| static void | btrace_maint_clear (struct btrace_thread_info *btinfo) |
| const char * | btrace_decode_error (enum btrace_format format, int errcode) |
| void | btrace_fetch (struct thread_info *tp) |
| void | btrace_clear (struct thread_info *tp) |
| void | btrace_free_objfile (struct objfile *objfile) |
| static void | check_xml_btrace_version (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes) |
| static void | parse_xml_btrace_block (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes) |
| static void | parse_xml_raw (struct gdb_xml_parser *parser, const char *body_text, gdb_byte **pdata, size_t *psize) |
| static void | parse_xml_btrace_pt_config_cpu (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes) |
| static void | parse_xml_btrace_pt_raw (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, const char *body_text) |
| static void | parse_xml_btrace_pt (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes) |
| void | parse_xml_btrace (struct btrace_data *btrace, const char *buffer) |
| static void | parse_xml_btrace_conf_bts (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes) |
| static void | parse_xml_btrace_conf_pt (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes) |
| void | parse_xml_btrace_conf (struct btrace_config *conf, const char *xml) |
| const struct btrace_insn * | btrace_insn_get (const struct btrace_insn_iterator *it) |
| int | btrace_insn_get_error (const struct btrace_insn_iterator *it) |
| unsigned int | btrace_insn_number (const struct btrace_insn_iterator *it) |
| void | btrace_insn_begin (struct btrace_insn_iterator *it, const struct btrace_thread_info *btinfo) |
| void | btrace_insn_end (struct btrace_insn_iterator *it, const struct btrace_thread_info *btinfo) |
| unsigned int | btrace_insn_next (struct btrace_insn_iterator *it, unsigned int stride) |
| unsigned int | btrace_insn_prev (struct btrace_insn_iterator *it, unsigned int stride) |
| int | btrace_insn_cmp (const struct btrace_insn_iterator *lhs, const struct btrace_insn_iterator *rhs) |
| int | btrace_find_insn_by_number (struct btrace_insn_iterator *it, const struct btrace_thread_info *btinfo, unsigned int number) |
| static bool | btrace_ends_with_single_insn (const struct btrace_thread_info *btinfo) |
| const struct btrace_function * | btrace_call_get (const struct btrace_call_iterator *it) |
| unsigned int | btrace_call_number (const struct btrace_call_iterator *it) |
| void | btrace_call_begin (struct btrace_call_iterator *it, const struct btrace_thread_info *btinfo) |
| void | btrace_call_end (struct btrace_call_iterator *it, const struct btrace_thread_info *btinfo) |
| unsigned int | btrace_call_next (struct btrace_call_iterator *it, unsigned int stride) |
| unsigned int | btrace_call_prev (struct btrace_call_iterator *it, unsigned int stride) |
| int | btrace_call_cmp (const struct btrace_call_iterator *lhs, const struct btrace_call_iterator *rhs) |
| int | btrace_find_call_by_number (struct btrace_call_iterator *it, const struct btrace_thread_info *btinfo, unsigned int number) |
| void | btrace_set_insn_history (struct btrace_thread_info *btinfo, const struct btrace_insn_iterator *begin, const struct btrace_insn_iterator *end) |
| void | btrace_set_call_history (struct btrace_thread_info *btinfo, const struct btrace_call_iterator *begin, const struct btrace_call_iterator *end) |
| int | btrace_is_replaying (struct thread_info *tp) |
| int | btrace_is_empty (struct thread_info *tp) |
| static void | do_btrace_data_cleanup (void *arg) |
| struct cleanup * | make_cleanup_btrace_data (struct btrace_data *data) |
| static void | btrace_maint_update_packets (struct btrace_thread_info *btinfo, unsigned int *begin, unsigned int *end, unsigned int *from, unsigned int *to) |
| static void | btrace_maint_print_packets (struct btrace_thread_info *btinfo, unsigned int begin, unsigned int end) |
| static unsigned int | get_uint (const char **arg) |
| static int | get_context_size (const char **arg) |
| static void | no_chunk (const char *arg) |
| static void | maint_btrace_packet_history_cmd (const char *arg, int from_tty) |
| static void | maint_btrace_clear_packet_history_cmd (const char *args, int from_tty) |
| static void | maint_btrace_clear_cmd (const char *args, int from_tty) |
| static void | maint_btrace_cmd (const char *args, int from_tty) |
| static void | maint_btrace_set_cmd (const char *args, int from_tty) |
| static void | maint_btrace_show_cmd (const char *args, int from_tty) |
| static void | maint_btrace_pt_set_cmd (const char *args, int from_tty) |
| static void | maint_btrace_pt_show_cmd (const char *args, int from_tty) |
| static void | maint_info_btrace_cmd (const char *args, int from_tty) |
| static void | show_maint_btrace_pt_skip_pad (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) |
| void | _initialize_btrace (void) |
| #define DEBUG | ( | msg, | |
| args... | |||
| ) |
Definition at line 57 of file btrace.c.
Referenced by btrace_bridge_gaps(), btrace_clear(), btrace_compute_ftrace_1(), btrace_disable(), btrace_enable(), btrace_fetch(), btrace_free_objfile(), btrace_stitch_bts(), and btrace_teardown().
| #define DEBUG_FTRACE | ( | msg, | |
| args... | |||
| ) | DEBUG ("[ftrace] " msg, ##args) |
Definition at line 66 of file btrace.c.
Referenced by ftrace_bridge_gap(), ftrace_compute_global_level_offset(), ftrace_connect_bfun(), ftrace_debug(), ftrace_fixup_level(), and ftrace_update_function().
| void _initialize_btrace | ( | void | ) |
Definition at line 3485 of file btrace.c.
References _, add_cmd(), add_prefix_cmd(), add_setshow_boolean_cmd(), class_maintenance, maint_btrace_clear_cmd(), maint_btrace_clear_packet_history_cmd(), maint_btrace_cmd(), maint_btrace_cmdlist, maint_btrace_packet_history_cmd(), maint_btrace_pt_set_cmd(), maint_btrace_pt_set_cmdlist, maint_btrace_pt_show_cmd(), maint_btrace_pt_show_cmdlist, maint_btrace_pt_skip_pad, maint_btrace_set_cmd(), maint_btrace_set_cmdlist, maint_btrace_show_cmd(), maint_btrace_show_cmdlist, maint_info_btrace_cmd(), maintenance_set_cmdlist, maintenance_show_cmdlist, maintenanceinfolist, maintenancelist, and show_maint_btrace_pt_skip_pad().
|
static |
Definition at line 1546 of file btrace.c.
References btrace_compute_ftrace(), btrace_data_init(), BTRACE_FORMAT_BTS, btrace_data::bts, do_cleanups(), btrace_data::format, get_thread_regcache(), make_cleanup_btrace_data(), thread_info::ptid, regcache::regcache(), regcache_read_pc(), btrace_data::variant, and VEC_safe_push.
Referenced by btrace_enable().
|
static |
Definition at line 957 of file btrace.c.
References DEBUG, btrace_function::errcode, ftrace_bridge_gap(), ftrace_compute_global_level_offset(), ftrace_find_call_by_number(), and btrace_function::number.
Referenced by btrace_finalize_ftrace().
| void btrace_call_begin | ( | struct btrace_call_iterator * | it, |
| const struct btrace_thread_info * | btinfo | ||
| ) |
Definition at line 2645 of file btrace.c.
References _, btrace_call_iterator::btinfo, error(), btrace_thread_info::functions, and btrace_call_iterator::index.
Referenced by recpy_bt_function_call_history().
| int btrace_call_cmp | ( | const struct btrace_call_iterator * | lhs, |
| const struct btrace_call_iterator * | rhs | ||
| ) |
Definition at line 2741 of file btrace.c.
References btrace_call_iterator::btinfo, gdb_assert, and btrace_call_iterator::index.
Referenced by btrace_call_history().
| void btrace_call_end | ( | struct btrace_call_iterator * | it, |
| const struct btrace_thread_info * | btinfo | ||
| ) |
Definition at line 2658 of file btrace.c.
References _, btrace_call_iterator::btinfo, error(), btrace_thread_info::functions, and btrace_call_iterator::index.
Referenced by record_btrace_call_history(), record_btrace_call_history_range(), record_btrace_info(), and recpy_bt_function_call_history().
| const struct btrace_function* btrace_call_get | ( | const struct btrace_call_iterator * | it | ) |
Definition at line 2619 of file btrace.c.
References btrace_call_iterator::btinfo, btrace_thread_info::functions, and btrace_call_iterator::index.
Referenced by btrace_call_history(), btrace_func_from_recpy_func(), record_btrace_frame_prev_register(), record_btrace_frame_sniffer(), record_btrace_frame_this_id(), and record_btrace_tailcall_frame_sniffer().
| unsigned int btrace_call_next | ( | struct btrace_call_iterator * | it, |
| unsigned int | stride | ||
| ) |
Definition at line 2671 of file btrace.c.
References btrace_call_iterator::btinfo, btrace_ends_with_single_insn(), btrace_thread_info::functions, and btrace_call_iterator::index.
Referenced by btrace_call_history(), record_btrace_call_history(), and record_btrace_call_history_range().
| unsigned int btrace_call_number | ( | const struct btrace_call_iterator * | it | ) |
Definition at line 2630 of file btrace.c.
References btrace_call_iterator::btinfo, btrace_ends_with_single_insn(), btrace_thread_info::functions, and btrace_call_iterator::index.
Referenced by btrace_call_history(), record_btrace_call_history(), record_btrace_info(), and recpy_bt_function_call_history().
| unsigned int btrace_call_prev | ( | struct btrace_call_iterator * | it, |
| unsigned int | stride | ||
| ) |
Definition at line 2707 of file btrace.c.
References btrace_call_iterator::btinfo, btrace_ends_with_single_insn(), btrace_thread_info::functions, gdb_assert, and btrace_call_iterator::index.
Referenced by record_btrace_call_history(), and record_btrace_info().
| void btrace_clear | ( | struct thread_info * | tp | ) |
Definition at line 1963 of file btrace.c.
References btrace_clear_history(), btrace_data_clear(), btrace_maint_clear(), btrace_thread_info::data, DEBUG, btrace_thread_info::functions, btrace_thread_info::ngaps, print_thread_id(), thread_info::ptid, reinit_frame_cache(), and target_pid_to_str().
Referenced by btrace_disable(), btrace_fetch(), btrace_free_objfile(), btrace_stitch_bts(), btrace_teardown(), and maint_btrace_clear_cmd().
|
static |
Definition at line 1788 of file btrace.c.
References btrace_thread_info::call_history, btrace_thread_info::insn_history, btrace_thread_info::replay, and xfree().
Referenced by btrace_clear(), and btrace_fetch().
|
static |
Definition at line 1524 of file btrace.c.
References btrace_compute_ftrace_1(), btrace_finalize_ftrace(), CATCH, END_CATCH, error(), RETURN_MASK_ALL, throw_exception(), and TRY.
Referenced by btrace_add_pc(), and btrace_fetch().
|
static |
Definition at line 1491 of file btrace.c.
References _, btrace_compute_ftrace_bts(), btrace_compute_ftrace_pt(), BTRACE_FORMAT_BTS, BTRACE_FORMAT_NONE, BTRACE_FORMAT_PT, btrace_data::bts, DEBUG, btrace_data::format, internal_error(), btrace_data::pt, and btrace_data::variant.
Referenced by btrace_compute_ftrace().
|
static |
Definition at line 1034 of file btrace.c.
References _, BDE_BTS_INSN_SIZE, BDE_BTS_OVERFLOW, CATCH, core_addr_to_string_nz(), END_CATCH, error(), btrace_insn::flags, ftrace_classify_insn(), ftrace_new_gap(), ftrace_update_function(), ftrace_update_insns(), btrace_thread_info::functions, gdb_insn_length(), btrace_insn::iclass, btrace_function::insn_offset, INT_MAX, btrace_function::level, btrace_thread_info::level, btrace_insn::pc, RETURN_MASK_ERROR, btrace_insn::size, size, target_gdbarch(), TRY, VEC_index, VEC_length, and warning().
Referenced by btrace_compute_ftrace_1().
|
static |
Definition at line 1478 of file btrace.c.
References _, and internal_error().
Referenced by btrace_compute_ftrace_1().
| const struct btrace_config* btrace_conf | ( | const struct btrace_thread_info * | btinfo | ) |
Definition at line 1625 of file btrace.c.
References btrace_thread_info::target, and target_btrace_conf().
Referenced by btpy_insn_or_gap_new(), btrace_call_history(), btrace_insn_history(), maint_info_btrace_cmd(), record_btrace_info(), and recpy_bt_format().
| const char* btrace_decode_error | ( | enum btrace_format | format, |
| int | errcode | ||
| ) |
Definition at line 1829 of file btrace.c.
References _, BDE_BTS_INSN_SIZE, BDE_BTS_OVERFLOW, BDE_PT_DISABLED, BDE_PT_OVERFLOW, BDE_PT_USER_QUIT, BTRACE_FORMAT_BTS, BTRACE_FORMAT_PT, and btrace_function::errcode.
Referenced by btpy_insn_or_gap_new(), and btrace_ui_out_decode_error().
| void btrace_disable | ( | struct thread_info * | tp | ) |
Definition at line 1636 of file btrace.c.
References btrace_clear(), DEBUG, print_thread_id(), thread_info::ptid, btrace_thread_info::target, target_disable_btrace(), and target_pid_to_str().
Referenced by btrace_enable(), record_btrace_disable_callback(), and record_btrace_stop_recording().
| void btrace_enable | ( | struct thread_info * | tp, |
| const struct btrace_config * | conf | ||
| ) |
Definition at line 1575 of file btrace.c.
References _, btrace_add_pc(), btrace_disable(), BTRACE_FORMAT_PT, can_access_registers_ptid(), CATCH, DEBUG, END_CATCH, error(), btrace_config::format, print_thread_id(), thread_info::ptid, RETURN_MASK_ALL, target_enable_btrace(), target_pid_to_str(), target_supports_btrace(), throw_exception(), and TRY.
Referenced by record_btrace_enable_warn(), and record_btrace_open().
|
static |
Definition at line 2602 of file btrace.c.
References btrace_function::errcode, ftrace_call_num_insn(), and btrace_thread_info::functions.
Referenced by btrace_call_next(), btrace_call_number(), and btrace_call_prev().
| void btrace_fetch | ( | struct thread_info * | tp | ) |
Definition at line 1878 of file btrace.c.
References _, btrace_clear(), btrace_clear_history(), btrace_compute_ftrace(), btrace_data_append(), btrace_data_empty(), btrace_data_init(), btrace_maint_clear(), BTRACE_READ_ALL, BTRACE_READ_DELTA, BTRACE_READ_NEW, btrace_stitch_trace(), can_access_registers_ptid(), btrace_thread_info::data, DEBUG, do_cleanups(), error(), btrace_thread_info::functions, gdb_assert, inferior_ptid, make_cleanup_btrace_data(), make_scoped_restore(), print_thread_id(), thread_info::ptid, btrace_thread_info::replay, btrace_thread_info::target, target_pid_to_str(), and target_read_btrace().
Referenced by record_btrace_info(), record_btrace_resume_thread(), recpy_bt_begin(), recpy_bt_end(), recpy_bt_function_call_history(), recpy_bt_instruction_history(), and require_btrace_thread().
|
static |
Definition at line 1514 of file btrace.c.
References btrace_bridge_gaps().
Referenced by btrace_compute_ftrace().
| int btrace_find_call_by_number | ( | struct btrace_call_iterator * | it, |
| const struct btrace_thread_info * | btinfo, | ||
| unsigned int | number | ||
| ) |
Definition at line 2751 of file btrace.c.
References btrace_call_iterator::btinfo, btrace_thread_info::functions, btrace_call_iterator::index, and btrace_function::number.
Referenced by btrace_func_from_recpy_func(), record_btrace_call_history_range(), record_btrace_frame_prev_register(), record_btrace_frame_sniffer(), record_btrace_frame_this_id(), and record_btrace_tailcall_frame_sniffer().
| int btrace_find_insn_by_number | ( | struct btrace_insn_iterator * | it, |
| const struct btrace_thread_info * | btinfo, | ||
| unsigned int | number | ||
| ) |
Definition at line 2550 of file btrace.c.
References btrace_insn_iterator::btinfo, btrace_insn_iterator::call_index, ftrace_call_num_insn(), btrace_thread_info::functions, btrace_insn_iterator::insn_index, btrace_function::insn_offset, and btrace_function::number.
Referenced by btpy_insn_or_gap_new(), btrace_insn_from_recpy_insn(), record_btrace_goto(), and record_btrace_insn_history_range().
| void btrace_free_objfile | ( | struct objfile * | objfile | ) |
Definition at line 1988 of file btrace.c.
References ALL_NON_EXITED_THREADS, btrace_clear(), and DEBUG.
Referenced by objfile::~objfile().
| void btrace_insn_begin | ( | struct btrace_insn_iterator * | it, |
| const struct btrace_thread_info * | btinfo | ||
| ) |
Definition at line 2356 of file btrace.c.
References _, btrace_insn_iterator::btinfo, btrace_insn_iterator::call_index, error(), btrace_thread_info::functions, and btrace_insn_iterator::insn_index.
Referenced by btrace_is_empty(), record_btrace_goto_begin(), recpy_bt_begin(), and recpy_bt_instruction_history().
| int btrace_insn_cmp | ( | const struct btrace_insn_iterator * | lhs, |
| const struct btrace_insn_iterator * | rhs | ||
| ) |
Definition at line 2536 of file btrace.c.
References btrace_insn_iterator::btinfo, btrace_insn_iterator::call_index, gdb_assert, and btrace_insn_iterator::insn_index.
Referenced by btrace_insn_history(), btrace_is_empty(), record_btrace_set_replay(), record_btrace_single_step_forward(), and record_btrace_stop_replaying_at_end().
| void btrace_insn_end | ( | struct btrace_insn_iterator * | it, |
| const struct btrace_thread_info * | btinfo | ||
| ) |
Definition at line 2370 of file btrace.c.
References _, btrace_insn_iterator::btinfo, btrace_insn_iterator::call_index, error(), btrace_thread_info::functions, btrace_function::insn, btrace_insn_iterator::insn_index, and btrace_function::number.
Referenced by btrace_is_empty(), record_btrace_info(), record_btrace_insn_history(), record_btrace_insn_history_range(), record_btrace_single_step_forward(), record_btrace_start_replaying(), record_btrace_stop_replaying_at_end(), recpy_bt_end(), recpy_bt_goto(), and recpy_bt_instruction_history().
| const struct btrace_insn* btrace_insn_get | ( | const struct btrace_insn_iterator * | it | ) |
Definition at line 2317 of file btrace.c.
References btrace_insn_iterator::btinfo, btrace_insn_iterator::call_index, btrace_function::errcode, btrace_thread_info::functions, gdb_assert, btrace_function::insn, and btrace_insn_iterator::insn_index.
Referenced by btrace_insn_from_recpy_insn(), btrace_insn_history(), record_btrace_fetch_registers(), record_btrace_goto(), record_btrace_goto_begin(), record_btrace_info(), record_btrace_replay_at_breakpoint(), record_btrace_single_step_backward(), record_btrace_single_step_forward(), and record_btrace_start_replaying().
| int btrace_insn_get_error | ( | const struct btrace_insn_iterator * | it | ) |
Definition at line 2340 of file btrace.c.
References btrace_insn_iterator::btinfo, btrace_insn_iterator::call_index, and btrace_thread_info::functions.
Referenced by btpy_insn_or_gap_new(), and btrace_insn_history().
| unsigned int btrace_insn_next | ( | struct btrace_insn_iterator * | it, |
| unsigned int | stride | ||
| ) |
Definition at line 2396 of file btrace.c.
References btrace_insn_iterator::btinfo, btrace_insn_iterator::call_index, ftrace_find_call_by_number(), btrace_thread_info::functions, gdb_assert, btrace_function::insn, btrace_insn_iterator::insn_index, btrace_function::next, and btrace_function::number.
Referenced by btrace_insn_history(), record_btrace_goto_begin(), record_btrace_insn_history(), record_btrace_insn_history_range(), and record_btrace_single_step_forward().
| unsigned int btrace_insn_number | ( | const struct btrace_insn_iterator * | it | ) |
Definition at line 2348 of file btrace.c.
References btrace_insn_iterator::btinfo, btrace_insn_iterator::call_index, btrace_thread_info::functions, and btrace_insn_iterator::insn_index.
Referenced by btrace_insn_history(), record_btrace_info(), record_btrace_insn_history(), recpy_bt_begin(), recpy_bt_end(), recpy_bt_goto(), recpy_bt_instruction_history(), and recpy_bt_replay_position().
| unsigned int btrace_insn_prev | ( | struct btrace_insn_iterator * | it, |
| unsigned int | stride | ||
| ) |
Definition at line 2478 of file btrace.c.
References btrace_insn_iterator::btinfo, btrace_insn_iterator::call_index, ftrace_find_call_by_number(), btrace_thread_info::functions, gdb_assert, btrace_function::insn, btrace_insn_iterator::insn_index, btrace_function::number, and btrace_function::prev.
Referenced by record_btrace_insn_history(), record_btrace_single_step_backward(), and record_btrace_start_replaying().
| int btrace_is_empty | ( | struct thread_info * | tp | ) |
Definition at line 2806 of file btrace.c.
References btrace_insn_begin(), btrace_insn_cmp(), btrace_insn_end(), and btrace_thread_info::functions.
Referenced by btrace_func_from_recpy_func(), btrace_insn_from_recpy_insn(), record_btrace_info(), record_btrace_step_thread(), recpy_bt_begin(), recpy_bt_end(), recpy_bt_function_call_history(), recpy_bt_goto(), recpy_bt_instruction_history(), and require_btrace_thread().
| int btrace_is_replaying | ( | struct thread_info * | tp | ) |
Definition at line 2798 of file btrace.c.
Referenced by record_btrace_info(), and record_btrace_is_replaying().
|
static |
Definition at line 1802 of file btrace.c.
References btrace_maint_packet_history::begin, BTRACE_FORMAT_BTS, BTRACE_FORMAT_PT, btrace_maint_info::bts, btrace_thread_info::data, btrace_maint_packet_history::end, btrace_data::format, btrace_thread_info::maint, btrace_maint_info::packet_history, btrace_maint_info::variant, and xfree().
Referenced by btrace_clear(), btrace_fetch(), and maint_btrace_clear_packet_history_cmd().
|
static |
Definition at line 3115 of file btrace.c.
References btrace_maint_packet_history::begin, BTRACE_FORMAT_BTS, BTRACE_FORMAT_PT, btrace_data::bts, btrace_maint_info::bts, core_addr_to_string_nz(), btrace_thread_info::data, btrace_maint_packet_history::end, btrace_data::format, btrace_thread_info::maint, btrace_maint_info::packet_history, printf_unfiltered(), btrace_data::variant, btrace_maint_info::variant, VEC, and VEC_index.
Referenced by maint_btrace_packet_history_cmd().
|
static |
Definition at line 3076 of file btrace.c.
References btrace_maint_packet_history::begin, BTRACE_FORMAT_BTS, BTRACE_FORMAT_PT, btrace_data::bts, btrace_maint_info::bts, btrace_thread_info::data, btrace_maint_packet_history::end, btrace_data::format, btrace_thread_info::maint, btrace_maint_info::packet_history, btrace_data::variant, btrace_maint_info::variant, VEC_empty, and VEC_length.
Referenced by maint_btrace_packet_history_cmd().
| void btrace_set_call_history | ( | struct btrace_thread_info * | btinfo, |
| const struct btrace_call_iterator * | begin, | ||
| const struct btrace_call_iterator * | end | ||
| ) |
Definition at line 2782 of file btrace.c.
References btrace_call_history::begin, btrace_call_iterator::btinfo, btrace_thread_info::call_history, btrace_call_history::end, gdb_assert, and XCNEW.
Referenced by record_btrace_call_history(), and record_btrace_call_history_range().
| void btrace_set_insn_history | ( | struct btrace_thread_info * | btinfo, |
| const struct btrace_insn_iterator * | begin, | ||
| const struct btrace_insn_iterator * | end | ||
| ) |
Definition at line 2768 of file btrace.c.
References btrace_insn_history::begin, btrace_insn_history::end, btrace_thread_info::insn_history, and XCNEW.
Referenced by record_btrace_insn_history(), and record_btrace_insn_history_range().
|
static |
Definition at line 1674 of file btrace.c.
References _, btrace_block::begin, btrace_clear(), core_addr_to_string_nz(), DEBUG, btrace_block::end, ftrace_print_insn_addr(), btrace_thread_info::functions, gdb_assert, btrace_function::insn, btrace_function::number, btrace_insn::pc, VEC_empty, VEC_last, VEC_length, VEC_pop, and warning().
Referenced by btrace_stitch_trace().
|
static |
Definition at line 1763 of file btrace.c.
References _, btrace_data_empty(), BTRACE_FORMAT_BTS, BTRACE_FORMAT_NONE, BTRACE_FORMAT_PT, btrace_stitch_bts(), btrace_data::bts, btrace_data::format, internal_error(), and btrace_data::variant.
Referenced by btrace_fetch().
| void btrace_teardown | ( | struct thread_info * | tp | ) |
Definition at line 1655 of file btrace.c.
References btrace_clear(), DEBUG, print_thread_id(), thread_info::ptid, btrace_thread_info::target, target_pid_to_str(), and target_teardown_btrace().
Referenced by clear_thread_inferior_resources(), and record_btrace_close().
|
static |
Definition at line 2003 of file btrace.c.
References _, gdb_xml_error(), gdb_xml_value::value, version, and xml_find_attribute().
|
static |
Definition at line 2825 of file btrace.c.
References btrace_data_fini().
Referenced by make_cleanup_btrace_data().
|
static |
Definition at line 897 of file btrace.c.
References DEBUG_FTRACE, ftrace_connect_backtrace(), ftrace_fixup_level(), ftrace_get_caller(), ftrace_match_backtrace(), gdb_assert, btrace_function::insn_offset, and btrace_function::level.
Referenced by btrace_bridge_gaps().
|
static |
Definition at line 143 of file btrace.c.
References btrace_function::errcode, and btrace_function::insn.
Referenced by btrace_ends_with_single_insn(), btrace_find_insn_by_number(), and ftrace_new_function().
|
static |
Definition at line 659 of file btrace.c.
References BTRACE_INSN_CALL, BTRACE_INSN_JUMP, BTRACE_INSN_OTHER, BTRACE_INSN_RETURN, CATCH, END_CATCH, error(), gdbarch_insn_is_call(), gdbarch_insn_is_jump(), gdbarch_insn_is_ret(), RETURN_MASK_ERROR, and TRY.
Referenced by btrace_compute_ftrace_bts().
|
static |
Definition at line 728 of file btrace.c.
References DEBUG_FTRACE, btrace_thread_info::functions, btrace_function::insn, INT_MAX, btrace_function::level, and btrace_thread_info::level.
Referenced by btrace_bridge_gaps().
|
static |
Definition at line 869 of file btrace.c.
References ftrace_connect_bfun(), ftrace_function_switched(), ftrace_get_caller(), gdb_assert, btrace_function::msym, btrace_function::next, btrace_function::prev, and btrace_function::sym.
Referenced by ftrace_bridge_gap().
|
static |
Definition at line 758 of file btrace.c.
References BFUN_UP_LINKS_TO_TAILCALL, DEBUG_FTRACE, flags, ftrace_debug(), ftrace_find_call_by_number(), ftrace_fixup_caller(), ftrace_fixup_level(), gdb_assert, btrace_function::level, btrace_function::next, and btrace_function::prev.
Referenced by ftrace_connect_backtrace().
|
static |
Definition at line 123 of file btrace.c.
References DEBUG_FTRACE, ftrace_print_filename(), ftrace_print_function_name(), btrace_function::insn, btrace_function::insn_offset, and btrace_function::level.
Referenced by ftrace_connect_bfun(), ftrace_fixup_level(), ftrace_new_call(), ftrace_new_gap(), ftrace_new_return(), ftrace_new_switch(), ftrace_new_tailcall(), ftrace_update_caller(), and ftrace_update_insns().
|
static |
Definition at line 388 of file btrace.c.
References BTRACE_INSN_CALL, btrace_function::errcode, ftrace_find_call_by_number(), btrace_insn::iclass, btrace_function::insn, and btrace_function::up.
Referenced by ftrace_new_return().
|
static |
Definition at line 159 of file btrace.c.
References btrace_thread_info::functions, and btrace_function::number.
Referenced by btrace_bridge_gaps(), btrace_insn_next(), btrace_insn_prev(), ftrace_connect_bfun(), ftrace_find_call(), ftrace_find_caller(), ftrace_fixup_caller(), ftrace_fixup_level(), ftrace_get_caller(), ftrace_new_return(), and ftrace_new_switch().
|
static |
Definition at line 171 of file btrace.c.
References btrace_thread_info::functions, and btrace_function::number.
|
static |
Definition at line 364 of file btrace.c.
References ftrace_find_call_by_number(), ftrace_function_switched(), and btrace_function::up.
Referenced by ftrace_new_return().
|
static |
Definition at line 279 of file btrace.c.
References flags, ftrace_find_call_by_number(), ftrace_update_caller(), btrace_function::next, and btrace_function::prev.
Referenced by ftrace_connect_bfun(), and ftrace_new_return().
|
static |
Definition at line 708 of file btrace.c.
References DEBUG_FTRACE, ftrace_debug(), ftrace_find_call_by_number(), btrace_function::level, and btrace_function::number.
Referenced by ftrace_bridge_gap(), and ftrace_connect_bfun().
|
static |
Definition at line 184 of file btrace.c.
References btrace_function::msym, MSYMBOL_LINKAGE_NAME, btrace_function::sym, SYMBOL_LINKAGE_NAME, symbol_symtab(), and symtab_to_fullname().
Referenced by ftrace_connect_backtrace(), ftrace_find_caller(), ftrace_match_backtrace(), and ftrace_update_function().
|
static |
Definition at line 349 of file btrace.c.
References BFUN_UP_LINKS_TO_TAILCALL, btrace_function::flags, ftrace_find_call_by_number(), and btrace_function::up.
Referenced by ftrace_bridge_gap(), ftrace_connect_backtrace(), and ftrace_match_backtrace().
|
static |
Definition at line 686 of file btrace.c.
References ftrace_function_switched(), ftrace_get_caller(), btrace_function::msym, and btrace_function::sym.
Referenced by ftrace_bridge_gap().
|
static |
Definition at line 309 of file btrace.c.
References ftrace_debug(), ftrace_new_function(), btrace_thread_info::functions, btrace_function::level, and btrace_function::up.
Referenced by ftrace_update_function().
|
static |
Definition at line 233 of file btrace.c.
References ftrace_call_num_insn(), btrace_thread_info::functions, btrace_function::insn_offset, btrace_function::level, btrace_function::number, and btrace_function::prev.
Referenced by ftrace_new_call(), ftrace_new_gap(), ftrace_new_return(), ftrace_new_switch(), ftrace_new_tailcall(), and ftrace_update_function().
|
static |
Definition at line 518 of file btrace.c.
References btrace_function::errcode, ftrace_debug(), ftrace_new_function(), btrace_thread_info::functions, btrace_function::insn, and btrace_function::number.
Referenced by btrace_compute_ftrace_bts().
|
static |
Definition at line 412 of file btrace.c.
References BFUN_UP_LINKS_TO_RET, btrace_function::flags, ftrace_debug(), ftrace_find_call(), ftrace_find_call_by_number(), ftrace_find_caller(), ftrace_fixup_caller(), ftrace_new_function(), gdb_assert, btrace_function::level, btrace_function::next, btrace_function::number, btrace_function::prev, and btrace_function::up.
Referenced by ftrace_update_function().
|
static |
Definition at line 494 of file btrace.c.
References btrace_function::flags, ftrace_debug(), ftrace_find_call_by_number(), ftrace_new_function(), btrace_function::number, btrace_function::prev, and btrace_function::up.
Referenced by ftrace_update_function().
|
static |
Definition at line 329 of file btrace.c.
References BFUN_UP_LINKS_TO_TAILCALL, btrace_function::flags, ftrace_debug(), ftrace_new_function(), btrace_thread_info::functions, btrace_function::level, and btrace_function::up.
Referenced by ftrace_update_function().
|
static |
Definition at line 93 of file btrace.c.
References btrace_function::sym, symbol_symtab(), and symtab_to_filename_for_display().
Referenced by ftrace_debug(), and ftrace_update_function().
|
static |
Definition at line 72 of file btrace.c.
References btrace_function::msym, MSYMBOL_PRINT_NAME, btrace_function::sym, and SYMBOL_PRINT_NAME.
Referenced by ftrace_debug(), and ftrace_update_function().
|
static |
Definition at line 112 of file btrace.c.
References core_addr_to_string_nz(), and btrace_insn::pc.
Referenced by btrace_stitch_bts(), and ftrace_update_function().
|
static |
Definition at line 262 of file btrace.c.
References btrace_function::flags, flags, ftrace_debug(), btrace_function::number, and btrace_function::up.
Referenced by ftrace_fixup_caller().
|
static |
Definition at line 546 of file btrace.c.
References BTRACE_INSN_CALL, BTRACE_INSN_JUMP, BTRACE_INSN_RETURN, core_addr_to_string_nz(), DEBUG_FTRACE, btrace_function::errcode, find_pc_function(), ftrace_function_switched(), ftrace_new_call(), ftrace_new_function(), ftrace_new_return(), ftrace_new_switch(), ftrace_new_tailcall(), ftrace_print_filename(), ftrace_print_function_name(), ftrace_print_insn_addr(), btrace_thread_info::functions, get_pc_function_start(), btrace_insn::iclass, btrace_function::insn, lookup_minimal_symbol_by_pc(), bound_minimal_symbol::minsym, btrace_insn::pc, and btrace_insn::size.
Referenced by btrace_compute_ftrace_bts().
|
static |
Definition at line 648 of file btrace.c.
References ftrace_debug(), btrace_function::insn, and record_debug.
Referenced by btrace_compute_ftrace_bts().
|
static |
Definition at line 3204 of file btrace.c.
References _, error(), and skip_spaces().
Referenced by maint_btrace_packet_history_cmd().
|
static |
Definition at line 3180 of file btrace.c.
References _, error(), skip_spaces(), and UINT_MAX.
Referenced by maint_btrace_packet_history_cmd().
|
static |
Definition at line 3356 of file btrace.c.
References _, btrace_clear(), error(), find_thread_ptid(), and inferior_ptid.
Referenced by _initialize_btrace().
|
static |
Definition at line 3334 of file btrace.c.
References _, btrace_data_clear(), btrace_maint_clear(), btrace_thread_info::data, error(), find_thread_ptid(), and inferior_ptid.
Referenced by _initialize_btrace().
|
static |
Definition at line 3373 of file btrace.c.
References all_commands, gdb_stdout, help_list(), and maint_btrace_cmdlist.
Referenced by _initialize_btrace().
|
static |
Definition at line 3229 of file btrace.c.
References _, btrace_maint_print_packets(), btrace_maint_update_packets(), dont_repeat(), error(), find_thread_ptid(), get_context_size(), get_uint(), inferior_ptid, no_chunk(), printf_unfiltered(), size, and skip_spaces().
Referenced by _initialize_btrace().
|
static |
Definition at line 3400 of file btrace.c.
References all_commands, gdb_stdout, help_list(), and maint_btrace_pt_set_cmdlist.
Referenced by _initialize_btrace().
|
static |
Definition at line 3409 of file btrace.c.
References all_commands, gdb_stdout, help_list(), and maint_btrace_pt_show_cmdlist.
Referenced by _initialize_btrace().
|
static |
Definition at line 3382 of file btrace.c.
References all_commands, gdb_stdout, help_list(), and maint_btrace_set_cmdlist.
Referenced by _initialize_btrace().
|
static |
Definition at line 3391 of file btrace.c.
References all_commands, gdb_stdout, help_list(), and maint_btrace_show_cmdlist.
Referenced by _initialize_btrace().
|
static |
Definition at line 3418 of file btrace.c.
References _, btrace_conf(), BTRACE_FORMAT_BTS, BTRACE_FORMAT_PT, btrace_format_string(), btrace_data::bts, btrace_thread_info::data, error(), find_thread_ptid(), btrace_config::format, inferior_ptid, btrace_thread_info::maint, printf_unfiltered(), btrace_data::variant, btrace_maint_info::variant, VEC_length, and version.
Referenced by _initialize_btrace().
| struct cleanup* make_cleanup_btrace_data | ( | struct btrace_data * | data | ) |
Definition at line 2833 of file btrace.c.
References do_btrace_data_cleanup(), and make_cleanup().
Referenced by btrace_add_pc(), btrace_fetch(), and parse_xml_btrace().
|
static |
Definition at line 3220 of file btrace.c.
Referenced by maint_btrace_packet_history_cmd().
| void parse_xml_btrace | ( | struct btrace_data * | btrace, |
| const char * | buffer | ||
| ) |
Definition at line 2197 of file btrace.c.
References _, btrace_elements, BTRACE_FORMAT_NONE, discard_cleanups(), error(), btrace_data::format, gdb_xml_parse_quick(), and make_cleanup_btrace_data().
Referenced by remote_read_btrace().
|
static |
Definition at line 2017 of file btrace.c.
References _, btrace_block::begin, BTRACE_FORMAT_BTS, BTRACE_FORMAT_NONE, btrace_data::bts, btrace_block::end, btrace_data::format, gdb_xml_error(), gdb_xml_value::value, btrace_data::variant, VEC_safe_push, and xml_find_attribute().
| void parse_xml_btrace_conf | ( | struct btrace_config * | conf, |
| const char * | xml | ||
| ) |
Definition at line 2296 of file btrace.c.
References _, btrace_conf_elements, error(), and gdb_xml_parse_quick().
Referenced by btrace_read_config().
|
static |
Definition at line 2227 of file btrace.c.
References BTRACE_FORMAT_BTS, btrace_config::bts, btrace_config::format, btrace_config_bts::size, size, and xml_find_attribute().
|
static |
Definition at line 2246 of file btrace.c.
References BTRACE_FORMAT_PT, btrace_config::format, btrace_config::pt, btrace_config_pt::size, size, and xml_find_attribute().
|
static |
Definition at line 2133 of file btrace.c.
References BTRACE_FORMAT_PT, btrace_data_pt::config, btrace_data_pt_config::cpu, CV_UNKNOWN, btrace_data_pt::data, btrace_data::format, btrace_data::pt, btrace_data_pt::size, btrace_data::variant, and btrace_cpu::vendor.
|
static |
Definition at line 2092 of file btrace.c.
References btrace_data_pt::config, btrace_data_pt_config::cpu, CV_INTEL, btrace_cpu::family, btrace_cpu::model, btrace_data::pt, btrace_cpu::stepping, gdb_xml_value::value, btrace_data::variant, btrace_cpu::vendor, and xml_find_attribute().
|
static |
Definition at line 2119 of file btrace.c.
References btrace_data_pt::data, parse_xml_raw(), btrace_data::pt, btrace_data_pt::size, and btrace_data::variant.
|
static |
Definition at line 2052 of file btrace.c.
References _, discard_cleanups(), fromhex(), gdb_xml_error(), make_cleanup(), size, xfree(), and xmalloc().
Referenced by parse_xml_btrace_pt_raw().
|
static |
Definition at line 3474 of file btrace.c.
References _, and fprintf_filtered().
Referenced by _initialize_btrace().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 2285 of file btrace.c.
Referenced by parse_xml_btrace_conf().
|
static |
|
static |
Definition at line 2186 of file btrace.c.
Referenced by parse_xml_btrace().
|
static |
|
static |
|
static |
|
static |
Definition at line 43 of file btrace.c.
Referenced by _initialize_btrace(), and maint_btrace_cmd().
|
static |
Definition at line 46 of file btrace.c.
Referenced by _initialize_btrace(), and maint_btrace_pt_set_cmd().
|
static |
Definition at line 47 of file btrace.c.
Referenced by _initialize_btrace(), and maint_btrace_pt_show_cmd().
|
static |
Definition at line 50 of file btrace.c.
Referenced by _initialize_btrace().
|
static |
Definition at line 44 of file btrace.c.
Referenced by _initialize_btrace(), and maint_btrace_set_cmd().
|
static |
Definition at line 45 of file btrace.c.
Referenced by _initialize_btrace(), and maint_btrace_show_cmd().
1.8.14