GDB (xrefs)
Loading...
Searching...
No Matches
Macros | Functions | Variables
/tmp/gdb-13.1/gdb/btrace.c File Reference
#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 "gdbsupport/rsp-low.h"
#include "gdbcmd.h"
#include "cli/cli-utils.h"
#include "gdbarch.h"
#include "record-btrace.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_functionftrace_find_call_by_number (struct btrace_thread_info *btinfo, unsigned int number)
 
static const struct btrace_functionftrace_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_functionftrace_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, btrace_function_flags flags)
 
static void ftrace_fixup_caller (struct btrace_thread_info *btinfo, struct btrace_function *bfun, struct btrace_function *caller, btrace_function_flags flags)
 
static struct btrace_functionftrace_new_call (struct btrace_thread_info *btinfo, struct minimal_symbol *mfun, struct symbol *fun)
 
static struct btrace_functionftrace_new_tailcall (struct btrace_thread_info *btinfo, struct minimal_symbol *mfun, struct symbol *fun)
 
static struct btrace_functionftrace_get_caller (struct btrace_thread_info *btinfo, struct btrace_function *bfun)
 
static struct btrace_functionftrace_find_caller (struct btrace_thread_info *btinfo, struct btrace_function *bfun, struct minimal_symbol *mfun, struct symbol *fun)
 
static struct btrace_functionftrace_find_call (struct btrace_thread_info *btinfo, struct btrace_function *bfun)
 
static struct btrace_functionftrace_new_return (struct btrace_thread_info *btinfo, struct minimal_symbol *mfun, struct symbol *fun)
 
static struct btrace_functionftrace_new_switch (struct btrace_thread_info *btinfo, struct minimal_symbol *mfun, struct symbol *fun)
 
static struct btrace_functionftrace_new_gap (struct btrace_thread_info *btinfo, int errcode, std::vector< unsigned int > &gaps)
 
static struct btrace_functionftrace_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, const struct btrace_cpu *cpu, 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, const struct btrace_cpu *cpu)
 
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, const struct btrace_cpu *cpu)
 
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, std::vector< gdb_xml_value > &attributes)
 
static void parse_xml_btrace_block (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, std::vector< gdb_xml_value > &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, std::vector< gdb_xml_value > &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, std::vector< gdb_xml_value > &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, std::vector< gdb_xml_value > &attributes)
 
static void parse_xml_btrace_conf_pt (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, std::vector< gdb_xml_value > &attributes)
 
void parse_xml_btrace_conf (struct btrace_config *conf, const char *xml)
 
const struct btrace_insnbtrace_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_functionbtrace_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 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_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 ()
 

Variables

static struct cmd_list_elementmaint_btrace_cmdlist
 
static struct cmd_list_elementmaint_btrace_set_cmdlist
 
static struct cmd_list_elementmaint_btrace_show_cmdlist
 
static struct cmd_list_elementmaint_btrace_pt_set_cmdlist
 
static struct cmd_list_elementmaint_btrace_pt_show_cmdlist
 
static bool maint_btrace_pt_skip_pad = true
 
static const struct gdb_xml_attribute block_attributes []
 
static const struct gdb_xml_attribute btrace_pt_config_cpu_attributes []
 
static const struct gdb_xml_element btrace_pt_config_children []
 
static const struct gdb_xml_element btrace_pt_children []
 
static const struct gdb_xml_attribute btrace_attributes []
 
static const struct gdb_xml_element btrace_children []
 
static const struct gdb_xml_element btrace_elements []
 
static const struct gdb_xml_attribute btrace_conf_pt_attributes []
 
static const struct gdb_xml_attribute btrace_conf_bts_attributes []
 
static const struct gdb_xml_element btrace_conf_children []
 
static const struct gdb_xml_attribute btrace_conf_attributes []
 
static const struct gdb_xml_element btrace_conf_elements []
 

Macro Definition Documentation

◆ DEBUG

#define DEBUG (   msg,
  args... 
)
Value:
do \
{ \
if (record_debug != 0) \
gdb_printf (gdb_stdlog, \
"[btrace] " msg "\n", ##args); \
} \
while (0)
unsigned int record_debug
Definition: record.c:33
#define gdb_stdlog
Definition: utils.h:196

Definition at line 61 of file btrace.c.

◆ DEBUG_FTRACE

#define DEBUG_FTRACE (   msg,
  args... 
)    DEBUG ("[ftrace] " msg, ##args)

Definition at line 70 of file btrace.c.

Function Documentation

◆ _initialize_btrace()

void _initialize_btrace ( )

Definition at line 3449 of file btrace.c.

Referenced by initialize_all_files().

◆ btrace_add_pc()

static void btrace_add_pc ( struct thread_info tp)
static

Definition at line 1587 of file btrace.c.

References btrace_compute_ftrace(), get_thread_regcache(), and regcache_read_pc().

Referenced by btrace_enable().

◆ btrace_bridge_gaps()

static void btrace_bridge_gaps ( struct thread_info tp,
std::vector< unsigned int > &  gaps 
)
static

◆ btrace_call_begin()

void btrace_call_begin ( struct btrace_call_iterator it,
const struct btrace_thread_info btinfo 
)

◆ btrace_call_cmp()

int btrace_call_cmp ( const struct btrace_call_iterator lhs,
const struct btrace_call_iterator rhs 
)

Definition at line 2764 of file btrace.c.

References btrace_call_iterator::btinfo, and btrace_call_iterator::index.

Referenced by btrace_call_history().

◆ btrace_call_end()

void btrace_call_end ( struct btrace_call_iterator it,
const struct btrace_thread_info btinfo 
)

◆ btrace_call_get()

const struct btrace_function * btrace_call_get ( const struct btrace_call_iterator it)

◆ btrace_call_next()

unsigned int btrace_call_next ( struct btrace_call_iterator it,
unsigned int  stride 
)

◆ btrace_call_number()

unsigned int btrace_call_number ( const struct btrace_call_iterator it)

◆ btrace_call_prev()

unsigned int btrace_call_prev ( struct btrace_call_iterator it,
unsigned int  stride 
)

◆ btrace_clear()

void btrace_clear ( struct thread_info tp)

◆ btrace_clear_history()

static void btrace_clear_history ( struct btrace_thread_info btinfo)
static

◆ btrace_compute_ftrace()

static void btrace_compute_ftrace ( struct thread_info tp,
struct btrace_data *  btrace,
const struct btrace_cpu *  cpu 
)
static

Definition at line 1565 of file btrace.c.

References btrace_compute_ftrace_1(), and btrace_finalize_ftrace().

Referenced by btrace_add_pc(), and btrace_fetch().

◆ btrace_compute_ftrace_1()

static void btrace_compute_ftrace_1 ( struct thread_info tp,
struct btrace_data *  btrace,
const struct btrace_cpu *  cpu,
std::vector< unsigned int > &  gaps 
)
static

Definition at line 1526 of file btrace.c.

References btrace_compute_ftrace_bts(), btrace_compute_ftrace_pt(), and DEBUG.

Referenced by btrace_compute_ftrace().

◆ btrace_compute_ftrace_bts()

static void btrace_compute_ftrace_bts ( struct thread_info tp,
const struct btrace_data_bts *  btrace,
std::vector< unsigned int > &  gaps 
)
static

◆ btrace_compute_ftrace_pt()

static void btrace_compute_ftrace_pt ( struct thread_info tp,
const struct btrace_data_pt *  btrace,
std::vector< unsigned int > &  gaps 
)
static

Definition at line 1511 of file btrace.c.

Referenced by btrace_compute_ftrace_1().

◆ btrace_conf()

const struct btrace_config * btrace_conf ( const struct btrace_thread_info btinfo)

◆ btrace_decode_error()

const char * btrace_decode_error ( enum btrace_format  format,
int  errcode 
)

◆ btrace_disable()

void btrace_disable ( struct thread_info tp)

◆ btrace_enable()

void btrace_enable ( struct thread_info tp,
const struct btrace_config *  conf 
)

◆ btrace_ends_with_single_insn()

static bool btrace_ends_with_single_insn ( const struct btrace_thread_info btinfo)
static

◆ btrace_fetch()

void btrace_fetch ( struct thread_info tp,
const struct btrace_cpu *  cpu 
)

◆ btrace_finalize_ftrace()

static void btrace_finalize_ftrace ( struct thread_info tp,
std::vector< unsigned int > &  gaps 
)
static

Definition at line 1555 of file btrace.c.

References btrace_bridge_gaps().

Referenced by btrace_compute_ftrace().

◆ btrace_find_call_by_number()

int btrace_find_call_by_number ( struct btrace_call_iterator it,
const struct btrace_thread_info btinfo,
unsigned int  number 
)

◆ btrace_find_insn_by_number()

int btrace_find_insn_by_number ( struct btrace_insn_iterator it,
const struct btrace_thread_info btinfo,
unsigned int  number 
)

◆ btrace_free_objfile()

void btrace_free_objfile ( struct objfile objfile)

Definition at line 2012 of file btrace.c.

References all_non_exited_threads(), btrace_clear(), and DEBUG.

Referenced by objfile::~objfile().

◆ btrace_insn_begin()

void btrace_insn_begin ( struct btrace_insn_iterator it,
const struct btrace_thread_info btinfo 
)

◆ btrace_insn_cmp()

int btrace_insn_cmp ( const struct btrace_insn_iterator lhs,
const struct btrace_insn_iterator rhs 
)

◆ btrace_insn_end()

void btrace_insn_end ( struct btrace_insn_iterator it,
const struct btrace_thread_info btinfo 
)

◆ btrace_insn_get()

const struct btrace_insn * btrace_insn_get ( const struct btrace_insn_iterator it)

◆ btrace_insn_get_error()

int btrace_insn_get_error ( const struct btrace_insn_iterator it)

◆ btrace_insn_next()

unsigned int btrace_insn_next ( struct btrace_insn_iterator it,
unsigned int  stride 
)

◆ btrace_insn_number()

unsigned int btrace_insn_number ( const struct btrace_insn_iterator it)

◆ btrace_insn_prev()

unsigned int btrace_insn_prev ( struct btrace_insn_iterator it,
unsigned int  stride 
)

◆ btrace_is_empty()

int btrace_is_empty ( struct thread_info tp)

◆ btrace_is_replaying()

int btrace_is_replaying ( struct thread_info tp)

◆ btrace_maint_clear()

static void btrace_maint_clear ( struct btrace_thread_info btinfo)
static

◆ btrace_maint_print_packets()

static void btrace_maint_print_packets ( struct btrace_thread_info btinfo,
unsigned int  begin,
unsigned int  end 
)
static

◆ btrace_maint_update_packets()

static void btrace_maint_update_packets ( struct btrace_thread_info btinfo,
unsigned int *  begin,
unsigned int *  end,
unsigned int *  from,
unsigned int *  to 
)
static

◆ btrace_set_call_history()

void btrace_set_call_history ( struct btrace_thread_info btinfo,
const struct btrace_call_iterator begin,
const struct btrace_call_iterator end 
)

◆ btrace_set_insn_history()

void btrace_set_insn_history ( struct btrace_thread_info btinfo,
const struct btrace_insn_iterator begin,
const struct btrace_insn_iterator end 
)

◆ btrace_stitch_bts()

static int btrace_stitch_bts ( struct btrace_data_bts *  btrace,
struct thread_info tp 
)
static

◆ btrace_stitch_trace()

static int btrace_stitch_trace ( struct btrace_data *  btrace,
struct thread_info tp 
)
static

Definition at line 1792 of file btrace.c.

References btrace_stitch_bts().

Referenced by btrace_fetch().

◆ btrace_teardown()

void btrace_teardown ( struct thread_info tp)

◆ check_xml_btrace_version()

static void check_xml_btrace_version ( struct gdb_xml_parser parser,
const struct gdb_xml_element element,
void *  user_data,
std::vector< gdb_xml_value > &  attributes 
)
static

Definition at line 2025 of file btrace.c.

References attributes, gdb_xml_error(), gdb_xml_value::value, version, and xml_find_attribute().

◆ ftrace_bridge_gap()

static int ftrace_bridge_gap ( struct btrace_thread_info btinfo,
struct btrace_function lhs,
struct btrace_function rhs,
int  min_matches 
)
static

◆ ftrace_call_num_insn()

static unsigned int ftrace_call_num_insn ( const struct btrace_function bfun)
static

◆ ftrace_classify_insn()

static enum btrace_insn_class ftrace_classify_insn ( struct gdbarch gdbarch,
CORE_ADDR  pc 
)
static

◆ ftrace_compute_global_level_offset()

static void ftrace_compute_global_level_offset ( struct btrace_thread_info btinfo)
static

◆ ftrace_connect_backtrace()

static void ftrace_connect_backtrace ( struct btrace_thread_info btinfo,
struct btrace_function lhs,
struct btrace_function rhs 
)
static

◆ ftrace_connect_bfun()

static void ftrace_connect_bfun ( struct btrace_thread_info btinfo,
struct btrace_function prev,
struct btrace_function next 
)
static

◆ ftrace_debug()

static void ftrace_debug ( const struct btrace_function bfun,
const char *  prefix 
)
static

◆ ftrace_find_call()

static struct btrace_function * ftrace_find_call ( struct btrace_thread_info btinfo,
struct btrace_function bfun 
)
static

◆ ftrace_find_call_by_number() [1/2]

static const struct btrace_function * ftrace_find_call_by_number ( const struct btrace_thread_info btinfo,
unsigned int  number 
)
static

Definition at line 175 of file btrace.c.

References btrace_thread_info::functions, and btrace_function::number.

◆ ftrace_find_call_by_number() [2/2]

static struct btrace_function * ftrace_find_call_by_number ( struct btrace_thread_info btinfo,
unsigned int  number 
)
static

◆ ftrace_find_caller()

static struct btrace_function * ftrace_find_caller ( struct btrace_thread_info btinfo,
struct btrace_function bfun,
struct minimal_symbol mfun,
struct symbol fun 
)
static

◆ ftrace_fixup_caller()

static void ftrace_fixup_caller ( struct btrace_thread_info btinfo,
struct btrace_function bfun,
struct btrace_function caller,
btrace_function_flags  flags 
)
static

◆ ftrace_fixup_level()

static void ftrace_fixup_level ( struct btrace_thread_info btinfo,
struct btrace_function bfun,
int  adjustment 
)
static

◆ ftrace_function_switched()

static int ftrace_function_switched ( const struct btrace_function bfun,
const struct minimal_symbol mfun,
const struct symbol fun 
)
static

◆ ftrace_get_caller()

static struct btrace_function * ftrace_get_caller ( struct btrace_thread_info btinfo,
struct btrace_function bfun 
)
static

◆ ftrace_match_backtrace()

static int ftrace_match_backtrace ( struct btrace_thread_info btinfo,
struct btrace_function lhs,
struct btrace_function rhs 
)
static

◆ ftrace_new_call()

static struct btrace_function * ftrace_new_call ( struct btrace_thread_info btinfo,
struct minimal_symbol mfun,
struct symbol fun 
)
static

◆ ftrace_new_function()

static struct btrace_function * ftrace_new_function ( struct btrace_thread_info btinfo,
struct minimal_symbol mfun,
struct symbol fun 
)
static

◆ ftrace_new_gap()

static struct btrace_function * ftrace_new_gap ( struct btrace_thread_info btinfo,
int  errcode,
std::vector< unsigned int > &  gaps 
)
static

◆ ftrace_new_return()

static struct btrace_function * ftrace_new_return ( struct btrace_thread_info btinfo,
struct minimal_symbol mfun,
struct symbol fun 
)
static

◆ ftrace_new_switch()

static struct btrace_function * ftrace_new_switch ( struct btrace_thread_info btinfo,
struct minimal_symbol mfun,
struct symbol fun 
)
static

◆ ftrace_new_tailcall()

static struct btrace_function * ftrace_new_tailcall ( struct btrace_thread_info btinfo,
struct minimal_symbol mfun,
struct symbol fun 
)
static

◆ ftrace_print_filename()

static const char * ftrace_print_filename ( const struct btrace_function bfun)
static

◆ ftrace_print_function_name()

static const char * ftrace_print_function_name ( const struct btrace_function bfun)
static

◆ ftrace_print_insn_addr()

static const char * ftrace_print_insn_addr ( const struct btrace_insn insn)
static

Definition at line 116 of file btrace.c.

References btrace_insn::pc.

Referenced by btrace_stitch_bts(), and ftrace_update_function().

◆ ftrace_update_caller()

static void ftrace_update_caller ( struct btrace_function bfun,
struct btrace_function caller,
btrace_function_flags  flags 
)
static

◆ ftrace_update_function()

static struct btrace_function * ftrace_update_function ( struct btrace_thread_info btinfo,
CORE_ADDR  pc 
)
static

◆ ftrace_update_insns()

static void ftrace_update_insns ( struct btrace_function bfun,
const btrace_insn insn 
)
static

Definition at line 666 of file btrace.c.

References ftrace_debug(), btrace_function::insn, and record_debug.

Referenced by btrace_compute_ftrace_bts().

◆ get_context_size()

static int get_context_size ( const char **  arg)
static

Definition at line 3219 of file btrace.c.

Referenced by maint_btrace_packet_history_cmd().

◆ get_uint()

static unsigned int get_uint ( const char **  arg)
static

Definition at line 3195 of file btrace.c.

References UINT_MAX.

Referenced by maint_btrace_packet_history_cmd().

◆ maint_btrace_clear_cmd()

static void maint_btrace_clear_cmd ( const char *  args,
int  from_tty 
)
static

Definition at line 3367 of file btrace.c.

References btrace_clear(), inferior_ptid, and inferior_thread().

◆ maint_btrace_clear_packet_history_cmd()

static void maint_btrace_clear_packet_history_cmd ( const char *  args,
int  from_tty 
)
static

◆ maint_btrace_packet_history_cmd()

static void maint_btrace_packet_history_cmd ( const char *  arg,
int  from_tty 
)
static

◆ maint_info_btrace_cmd()

static void maint_info_btrace_cmd ( const char *  args,
int  from_tty 
)
static

◆ no_chunk()

static void no_chunk ( const char *  arg)
static

Definition at line 3235 of file btrace.c.

Referenced by maint_btrace_packet_history_cmd().

◆ parse_xml_btrace()

void parse_xml_btrace ( struct btrace_data *  btrace,
const char *  buffer 
)

Definition at line 2219 of file btrace.c.

References btrace_elements, and gdb_xml_parse_quick().

Referenced by remote_target::read_btrace().

◆ parse_xml_btrace_block()

static void parse_xml_btrace_block ( struct gdb_xml_parser parser,
const struct gdb_xml_element element,
void *  user_data,
std::vector< gdb_xml_value > &  attributes 
)
static

Definition at line 2040 of file btrace.c.

References attributes, gdb_xml_error(), gdb_xml_value::value, and xml_find_attribute().

◆ parse_xml_btrace_conf()

void parse_xml_btrace_conf ( struct btrace_config *  conf,
const char *  xml 
)

Definition at line 2319 of file btrace.c.

References btrace_conf_elements, and gdb_xml_parse_quick().

Referenced by btrace_read_config().

◆ parse_xml_btrace_conf_bts()

static void parse_xml_btrace_conf_bts ( struct gdb_xml_parser parser,
const struct gdb_xml_element element,
void *  user_data,
std::vector< gdb_xml_value > &  attributes 
)
static

Definition at line 2248 of file btrace.c.

References attributes, size, and xml_find_attribute().

◆ parse_xml_btrace_conf_pt()

static void parse_xml_btrace_conf_pt ( struct gdb_xml_parser parser,
const struct gdb_xml_element element,
void *  user_data,
std::vector< gdb_xml_value > &  attributes 
)
static

Definition at line 2268 of file btrace.c.

References attributes, size, and xml_find_attribute().

◆ parse_xml_btrace_pt()

static void parse_xml_btrace_pt ( struct gdb_xml_parser parser,
const struct gdb_xml_element element,
void *  user_data,
std::vector< gdb_xml_value > &  attributes 
)
static

Definition at line 2154 of file btrace.c.

◆ parse_xml_btrace_pt_config_cpu()

static void parse_xml_btrace_pt_config_cpu ( struct gdb_xml_parser parser,
const struct gdb_xml_element element,
void *  user_data,
std::vector< gdb_xml_value > &  attributes 
)
static

Definition at line 2109 of file btrace.c.

References attributes, gdb_xml_value::value, and xml_find_attribute().

◆ parse_xml_btrace_pt_raw()

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

Definition at line 2140 of file btrace.c.

References parse_xml_raw().

◆ parse_xml_raw()

static void parse_xml_raw ( struct gdb_xml_parser parser,
const char *  body_text,
gdb_byte **  pdata,
size_t *  psize 
)
static

Definition at line 2072 of file btrace.c.

References gdb_xml_error(), size, and xmalloc().

Referenced by parse_xml_btrace_pt_raw().

◆ show_maint_btrace_pt_skip_pad()

static void show_maint_btrace_pt_skip_pad ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
)
static

Definition at line 3437 of file btrace.c.

References gdb_printf().

Variable Documentation

◆ block_attributes

const struct gdb_xml_attribute block_attributes[]
static
Initial value:
= {
{ NULL, GDB_XML_AF_NONE, NULL, NULL }
}
gdb_xml_attribute_handler gdb_xml_parse_attr_ulongest
@ GDB_XML_AF_NONE
Definition: xml-support.h:104

Definition at line 2168 of file btrace.c.

◆ btrace_attributes

const struct gdb_xml_attribute btrace_attributes[]
static
Initial value:
= {
{ "version", GDB_XML_AF_NONE, NULL, NULL },
{ NULL, GDB_XML_AF_NONE, NULL, NULL }
}

Definition at line 2195 of file btrace.c.

◆ btrace_children

const struct gdb_xml_element btrace_children[]
static
Initial value:
= {
{ "block", block_attributes, NULL,
NULL },
{ NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
}
static void parse_xml_btrace_pt(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, std::vector< gdb_xml_value > &attributes)
Definition: btrace.c:2154
static void parse_xml_btrace_block(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, std::vector< gdb_xml_value > &attributes)
Definition: btrace.c:2040
static const struct gdb_xml_element btrace_pt_children[]
Definition: btrace.c:2188
static const struct gdb_xml_attribute block_attributes[]
Definition: btrace.c:2168
@ GDB_XML_EF_NONE
Definition: xml-support.h:125
@ GDB_XML_EF_REPEATABLE
Definition: xml-support.h:127
@ GDB_XML_EF_OPTIONAL
Definition: xml-support.h:126

Definition at line 2200 of file btrace.c.

◆ btrace_conf_attributes

const struct gdb_xml_attribute btrace_conf_attributes[]
static
Initial value:
= {
{ "version", GDB_XML_AF_NONE, NULL, NULL },
{ NULL, GDB_XML_AF_NONE, NULL, NULL }
}

Definition at line 2303 of file btrace.c.

◆ btrace_conf_bts_attributes

const struct gdb_xml_attribute btrace_conf_bts_attributes[]
static
Initial value:
= {
{ NULL, GDB_XML_AF_NONE, NULL, NULL }
}
@ GDB_XML_AF_OPTIONAL
Definition: xml-support.h:105

Definition at line 2290 of file btrace.c.

◆ btrace_conf_children

const struct gdb_xml_element btrace_conf_children[]
static
Initial value:
= {
{ NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
}
static const struct gdb_xml_attribute btrace_conf_pt_attributes[]
Definition: btrace.c:2285
static void parse_xml_btrace_conf_pt(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, std::vector< gdb_xml_value > &attributes)
Definition: btrace.c:2268
static void parse_xml_btrace_conf_bts(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, std::vector< gdb_xml_value > &attributes)
Definition: btrace.c:2248
static const struct gdb_xml_attribute btrace_conf_bts_attributes[]
Definition: btrace.c:2290

Definition at line 2295 of file btrace.c.

◆ btrace_conf_elements

const struct gdb_xml_element btrace_conf_elements[]
static
Initial value:
= {
GDB_XML_EF_NONE, NULL, NULL },
{ NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
}
static const struct gdb_xml_element btrace_conf_children[]
Definition: btrace.c:2295
static const struct gdb_xml_attribute btrace_conf_attributes[]
Definition: btrace.c:2303

Definition at line 2308 of file btrace.c.

Referenced by parse_xml_btrace_conf().

◆ btrace_conf_pt_attributes

const struct gdb_xml_attribute btrace_conf_pt_attributes[]
static
Initial value:
= {
{ NULL, GDB_XML_AF_NONE, NULL, NULL }
}

Definition at line 2285 of file btrace.c.

◆ btrace_elements

const struct gdb_xml_element btrace_elements[]
static
Initial value:
= {
{ NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
}
static void check_xml_btrace_version(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, std::vector< gdb_xml_value > &attributes)
Definition: btrace.c:2025
static const struct gdb_xml_attribute btrace_attributes[]
Definition: btrace.c:2195
static const struct gdb_xml_element btrace_children[]
Definition: btrace.c:2200

Definition at line 2208 of file btrace.c.

Referenced by parse_xml_btrace().

◆ btrace_pt_children

const struct gdb_xml_element btrace_pt_children[]
static
Initial value:
= {
{ "pt-config", NULL, btrace_pt_config_children, GDB_XML_EF_OPTIONAL, NULL,
NULL },
{ "raw", NULL, NULL, GDB_XML_EF_OPTIONAL, NULL, parse_xml_btrace_pt_raw },
{ NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
}
static const struct gdb_xml_element btrace_pt_config_children[]
Definition: btrace.c:2182
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)
Definition: btrace.c:2140

Definition at line 2188 of file btrace.c.

◆ btrace_pt_config_children

const struct gdb_xml_element btrace_pt_config_children[]
static
Initial value:
= {
{ NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
}
static const struct gdb_xml_attribute btrace_pt_config_cpu_attributes[]
Definition: btrace.c:2174
static void parse_xml_btrace_pt_config_cpu(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, std::vector< gdb_xml_value > &attributes)
Definition: btrace.c:2109

Definition at line 2182 of file btrace.c.

◆ btrace_pt_config_cpu_attributes

const struct gdb_xml_attribute btrace_pt_config_cpu_attributes[]
static
Initial value:
= {
{ "vendor", GDB_XML_AF_NONE, NULL, NULL },
{ NULL, GDB_XML_AF_NONE, NULL, NULL }
}

Definition at line 2174 of file btrace.c.

◆ maint_btrace_cmdlist

struct cmd_list_element* maint_btrace_cmdlist
static

Definition at line 47 of file btrace.c.

◆ maint_btrace_pt_set_cmdlist

struct cmd_list_element* maint_btrace_pt_set_cmdlist
static

Definition at line 50 of file btrace.c.

◆ maint_btrace_pt_show_cmdlist

struct cmd_list_element* maint_btrace_pt_show_cmdlist
static

Definition at line 51 of file btrace.c.

◆ maint_btrace_pt_skip_pad

bool maint_btrace_pt_skip_pad = true
static

Definition at line 54 of file btrace.c.

◆ maint_btrace_set_cmdlist

struct cmd_list_element* maint_btrace_set_cmdlist
static

Definition at line 48 of file btrace.c.

◆ maint_btrace_show_cmdlist

struct cmd_list_element* maint_btrace_show_cmdlist
static

Definition at line 49 of file btrace.c.