31 #include "filenames.h"
56 #define DEBUG(msg, args...) \
59 if (record_debug != 0) \
60 fprintf_unfiltered (gdb_stdlog, \
61 "[btrace] " msg "\n", ##args); \
65 #define DEBUG_FTRACE(msg, args...) DEBUG ("[ftrace] " msg, ##args)
102 filename =
"<unknown>";
124 const char *fun, *file;
125 unsigned int ibegin, iend;
135 DEBUG_FTRACE (
"%s: fun = %s, file = %s, level = %d, insn = [%u; %u)",
136 prefix, fun, file, level, ibegin, iend);
154 if (mfun != NULL && msym != NULL
159 if (fun != NULL && sym != NULL)
161 const char *bfname, *fname;
170 if (filename_cmp (fname, bfname) != 0)
175 if (!(msym == NULL && sym == NULL) && mfun == NULL && fun == NULL)
179 if (msym == NULL && sym == NULL && !(mfun == NULL && fun == NULL))
196 bfun =
xzalloc (
sizeof (*bfun));
229 if (bfun->
up != NULL)
306 for (; bfun != NULL; bfun = bfun->
up)
326 for (; bfun != NULL; bfun = bfun->
up)
372 bfun->
up = caller->
up;
390 while (prev->
up != NULL)
448 if (prev != NULL && prev->
errcode == 0
480 if (fun == NULL && mfun == NULL)
484 if (bfun == NULL || bfun->
errcode != 0)
512 if (strcmp (fname,
"_dl_runtime_resolve") == 0)
520 if (last->
pc + last->
size == pc)
533 if (start == 0 || start == pc)
599 unsigned int blk, ngaps;
604 begin = btinfo->
begin;
606 ngaps = btinfo->
ngaps;
632 warning (
_(
"Recorded trace may be corrupted around %s."),
667 if (block->
end == pc)
673 warning (
_(
"Recorded trace may be incomplete around %s."),
697 btinfo->
begin = begin;
699 btinfo->
ngaps = ngaps;
704 btinfo->
level = -level;
707 #if defined (HAVE_LIBIPT)
710 pt_reclassify_insn (
enum pt_insn_class iclass)
731 ftrace_add_pt (
struct pt_insn_decoder *decoder,
748 errcode = pt_insn_sync_forward (decoder);
751 if (errcode != -pte_eos)
752 warning (
_(
"Failed to synchronize onto the Intel(R) Processor "
753 "Trace stream: %s."), pt_errstr (pt_errcode (errcode)));
757 memset (&btinsn, 0,
sizeof (btinsn));
760 errcode = pt_insn_next (decoder, &insn,
sizeof(insn));
786 *pbegin = begin = upd;
790 *plevel =
min (*plevel, end->
level);
794 btinsn.iclass = pt_reclassify_insn (insn.iclass);
799 if (errcode == -pte_eos)
807 pt_insn_get_offset (decoder, &offset);
809 warning (
_(
"Failed to decode Intel(R) Processor Trace near trace "
810 "offset 0x%" PRIx64
" near recorded PC 0x%" PRIx64
": %s."),
811 offset, insn.ip, pt_errstr (pt_errcode (errcode)));
819 warning (
_(
"The recorded execution trace may have gaps."));
826 btrace_pt_readmem_callback (
gdb_byte *buffer,
size_t size,
827 const struct pt_asid *asid, uint64_t pc,
849 static enum pt_cpu_vendor
864 static void btrace_finalize_ftrace_pt (
struct pt_insn_decoder *decoder,
867 pt_insn_free_decoder (decoder);
888 struct pt_insn_decoder *decoder;
889 struct pt_config config;
892 if (btrace->
size == 0)
898 pt_config_init(&config);
899 config.begin = btrace->
data;
900 config.end = btrace->
data + btrace->
size;
902 config.cpu.vendor = pt_translate_cpu_vendor (btrace->
config.
cpu.
vendor);
907 errcode = pt_cpu_errata (&config.errata, &config.cpu);
909 error (
_(
"Failed to configure the Intel(R) Processor Trace decoder: %s."),
910 pt_errstr (pt_errcode (errcode)));
912 decoder = pt_insn_alloc_decoder (&config);
914 error (
_(
"Failed to allocate the Intel(R) Processor Trace decoder."));
918 struct pt_image *image;
920 image = pt_insn_get_image(decoder);
922 error (
_(
"Failed to configure the Intel(R) Processor Trace decoder."));
924 errcode = pt_image_set_callback(image, btrace_pt_readmem_callback, NULL);
926 error (
_(
"Failed to configure the Intel(R) Processor Trace decoder: "
927 "%s."), pt_errstr (pt_errcode (errcode)));
929 ftrace_add_pt (decoder, &btinfo->
begin, &btinfo->
end, &level,
941 btrace_finalize_ftrace_pt (decoder, tp, level);
947 btrace_finalize_ftrace_pt (decoder, tp, level);
956 internal_error (__FILE__, __LINE__,
_(
"Unexpected branch trace format."));
967 DEBUG (
"compute ftrace");
1024 error (
_(
"Target does not support branch tracing."));
1041 if (btinfo->
target == NULL)
1096 last_bfun = btinfo->
end;
1123 if (first_new_block->
end == last_insn->
pc
1135 if (first_new_block->
end < last_insn->
pc)
1137 warning (
_(
"Error while trying to read delta trace. Falling back to "
1144 first_new_block->
begin = last_insn->
pc;
1150 DEBUG (
"pruning insn at %s for stitching",
1196 internal_error (__FILE__, __LINE__,
_(
"Unkown branch trace format."));
1228 #if defined (HAVE_LIBIPT)
1261 if (btinfo->
replay != NULL)
1268 if (btinfo->
end != NULL)
1298 error (
_(
"Failed to read branch trace."));
1340 btinfo->
begin = NULL;
1357 DEBUG (
"free objfile");
1363 #if defined (HAVE_LIBEXPAT)
1374 if (strcmp (version,
"1.0") != 0)
1375 gdb_xml_error (parser,
_(
"Unsupported btrace version: \"%s\""), version);
1417 gdb_byte **pdata,
unsigned long *psize)
1424 len = strlen (body_text);
1427 if ((
size_t) size * 2 != len)
1441 if (hi == 0 || lo == 0)
1464 ULONGEST *family, *model, *stepping;
1473 if (strcmp (vendor,
"GenuineIntel") == 0)
1486 void *user_data,
const char *body_text)
1567 #if defined (HAVE_LIBEXPAT)
1575 error (
_(
"Error parsing branch trace."));
1582 error (
_(
"Cannot process branch trace. XML parsing is not supported."));
1587 #if defined (HAVE_LIBEXPAT)
1665 #if defined (HAVE_LIBEXPAT)
1668 btrace_conf_elements, xml, conf);
1670 error (
_(
"Error parsing branch trace configuration."));
1674 error (
_(
"XML parsing is not supported."));
1685 unsigned int index, end;
1726 bfun = btinfo->
begin;
1741 unsigned int length;
1765 unsigned int index, steps;
1773 unsigned int end, space, adv;
1800 space = end - index;
1803 adv =
min (space, stride);
1847 unsigned int index, steps;
1882 adv =
min (index, stride);
1905 unsigned int lnum, rnum;
1921 if (lnum == 0 && rnum == 0)
1941 return (
int) (lnum - rnum);
1952 unsigned int end, length;
1954 for (bfun = btinfo->
end; bfun != NULL; bfun = bfun->
flow.
prev)
2025 bfun = btinfo->
begin;
2059 while (bfun != NULL)
2074 if (stride == steps)
2118 while (steps < stride)
2140 unsigned int lnum, rnum;
2145 return (
int) (lnum - rnum);
2157 for (bfun = btinfo->
end; bfun != NULL; bfun = bfun->
flow.
prev)
2225 if (btinfo->
begin == NULL)
2250 #if defined (HAVE_LIBIPT)
2255 pt_print_packet (
const struct pt_packet *packet)
2257 switch (packet->type)
2277 packet->payload.ip.ipc,
2278 packet->payload.ip.ip);
2283 packet->payload.ip.ipc,
2284 packet->payload.ip.ip);
2289 packet->payload.ip.ipc,
2290 packet->payload.ip.ip);
2295 packet->payload.ip.ipc,
2296 packet->payload.ip.ip);
2301 packet->payload.tnt.bit_size,
2302 packet->payload.tnt.payload);
2307 packet->payload.tnt.bit_size,
2308 packet->payload.tnt.payload);
2324 switch (packet->payload.mode.leaf)
2332 packet->payload.mode.bits.exec.csl
2334 packet->payload.mode.bits.exec.csd
2335 ? (
" cs.d") : (
""));
2340 packet->payload.mode.bits.tsx.intx
2342 packet->payload.mode.bits.tsx.abrt
2343 ? (
" abrt") : (
""));
2359 struct pt_packet_decoder *decoder)
2365 struct btrace_pt_packet packet;
2367 errcode = pt_pkt_sync_forward (decoder);
2373 pt_pkt_get_offset (decoder, &packet.offset);
2375 errcode = pt_pkt_next (decoder, &packet.packet,
2376 sizeof(packet.packet));
2380 if (maint_btrace_pt_skip_pad == 0 || packet.packet.type != ppt_pad)
2382 packet.errcode = pt_errcode (errcode);
2388 if (errcode == -pte_eos)
2391 packet.errcode = pt_errcode (errcode);
2395 warning (
_(
"Error at trace offset 0x%" PRIx64
": %s."),
2396 packet.offset, pt_errstr (packet.errcode));
2399 if (errcode != -pte_eos)
2400 warning (
_(
"Failed to synchronize onto the Intel(R) Processor Trace "
2401 "stream: %s."), pt_errstr (pt_errcode (errcode)));
2410 struct pt_packet_decoder *decoder;
2412 struct pt_config config;
2421 memset (&config, 0,
sizeof(config));
2423 config.size =
sizeof (config);
2424 config.begin = pt->
data;
2432 errcode = pt_cpu_errata (&config.errata, &config.cpu);
2434 error (
_(
"Failed to configure the Intel(R) Processor Trace decoder: %s."),
2435 pt_errstr (pt_errcode (errcode)));
2437 decoder = pt_pkt_alloc_decoder (&config);
2438 if (decoder == NULL)
2439 error (
_(
"Failed to allocate the Intel(R) Processor Trace decoder."));
2443 btrace_maint_decode_pt (&btinfo->
maint, decoder);
2447 pt_pkt_free_decoder (decoder);
2449 if (except.reason < 0)
2454 pt_pkt_free_decoder (decoder);
2465 unsigned int *begin,
unsigned int *end,
2466 unsigned int *
from,
unsigned int *
to)
2485 #if defined (HAVE_LIBIPT)
2488 btrace_maint_update_pt_packets (btinfo);
2504 unsigned int begin,
unsigned int end)
2517 for (blk = begin; blk < end; ++blk)
2533 #if defined (HAVE_LIBIPT)
2536 VEC (btrace_pt_packet_s) *packets;
2540 for (pkt = begin; pkt < end; ++pkt)
2542 const struct btrace_pt_packet *packet;
2544 packet =
VEC_index (btrace_pt_packet_s, packets, pkt);
2549 if (packet->errcode == pte_ok)
2550 pt_print_packet (&packet->packet);
2570 char *begin, *end, *pos;
2571 unsigned long number;
2576 if (!isdigit (*pos))
2577 error (
_(
"Expected positive number, got: %s."), pos);
2579 number = strtoul (pos, &end, 10);
2581 error (
_(
"Number too big."));
2583 *arg += (end - begin);
2585 return (
unsigned int) number;
2598 if (!isdigit (*pos))
2599 error (
_(
"Expected positive number, got: %s."), pos);
2601 return strtol (pos, arg, 10);
2610 error (
_(
"Junk after argument: %s."), arg);
2636 if (arg == NULL || *arg == 0 || strcmp (arg,
"+") == 0)
2640 if (end - from < size)
2644 else if (strcmp (arg,
"-") == 0)
2648 if (to - begin < size)
2656 error (
_(
"'%u' is out of range."), from);
2670 if (end - from < size)
2674 else if (*arg ==
'-')
2685 if (to - begin < size)
2707 if (end - from < size)
2726 if (args != NULL && *args != 0)
2727 error (
_(
"Invalid argument."));
2748 if (args != NULL && *args != 0)
2749 error (
_(
"Invalid argument."));
2781 help_list (maint_btrace_show_cmdlist,
"maintenance show btrace ",
2790 help_list (maint_btrace_pt_set_cmdlist,
"maintenance set btrace pt ",
2799 help_list (maint_btrace_pt_show_cmdlist,
"maintenance show btrace pt ",
2812 if (args != NULL && *args != 0)
2813 error (
_(
"Invalid argument."));
2823 error (
_(
"No btrace configuration."));
2839 #if defined (HAVE_LIBIPT)
2842 struct pt_version version;
2844 version = pt_library_version ();
2846 version.minor, version.build,
2847 version.ext != NULL ? version.ext :
"");
2849 btrace_maint_update_pt_packets (btinfo);
2880 _(
"Branch tracing maintenance commands."),
2881 &maint_btrace_cmdlist,
"maintenance btrace ",
2885 Set branch tracing specific variables."),
2886 &maint_btrace_set_cmdlist,
"maintenance set btrace ",
2890 Set Intel(R) Processor Trace specific variables."),
2891 &maint_btrace_pt_set_cmdlist,
"maintenance set btrace pt ",
2892 0, &maint_btrace_set_cmdlist);
2895 Show branch tracing specific variables."),
2896 &maint_btrace_show_cmdlist,
"maintenance show btrace ",
2900 Show Intel(R) Processor Trace specific variables."),
2901 &maint_btrace_pt_show_cmdlist,
"maintenance show btrace pt ",
2902 0, &maint_btrace_show_cmdlist);
2905 &maint_btrace_pt_skip_pad,
_(
"\
2906 Set whether PAD packets should be skipped in the btrace packet history."),
_(
"\
2907 Show whether PAD packets should be skipped in the btrace packet history."),
_(
"\
2908 When enabled, PAD packets are ignored in the btrace packet history."),
2910 &maint_btrace_pt_set_cmdlist,
2911 &maint_btrace_pt_show_cmdlist);
2914 _(
"Print the raw branch tracing data.\n\
2915 With no argument, print ten more packets after the previous ten-line print.\n\
2916 With '-' as argument print ten packets before a previous ten-line print.\n\
2917 One argument specifies the starting packet of a ten-line print.\n\
2918 Two arguments with comma between specify starting and ending packets to \
2920 Preceded with '+'/'-' the second argument specifies the distance from the \
2922 &maint_btrace_cmdlist);
2926 _(
"Clears the branch tracing packet history.\n\
2927 Discards the raw branch tracing data but not the execution history data.\n\
2929 &maint_btrace_cmdlist);
2932 _(
"Clears the branch tracing data.\n\
2933 Discards the raw branch tracing data and the execution history data.\n\
2934 The next 'record' command will fetch the branch tracing data anew.\n\
2936 &maint_btrace_cmdlist);
static const char * ftrace_print_function_name(const struct btrace_function *bfun)
struct gdbarch * target_gdbarch(void)
static struct cmd_list_element * maint_btrace_cmdlist
static const char * ftrace_print_insn_addr(const struct btrace_insn *insn)
static void no_chunk(char *arg)
struct btrace_config_bts bts
struct cmd_list_element * add_prefix_cmd(const char *name, enum command_class theclass, cmd_cfunc_ftype *fun, const char *doc, struct cmd_list_element **prefixlist, const char *prefixname, int allow_unknown, struct cmd_list_element **list)
unsigned int btrace_insn_prev(struct btrace_insn_iterator *it, unsigned int stride)
const char * symtab_to_filename_for_display(struct symtab *symtab)
void target_disable_btrace(struct btrace_target_info *btinfo)
static const struct gdb_xml_attribute btrace_conf_bts_attributes[]
static const struct gdb_xml_attribute btrace_pt_config_cpu_attributes[]
struct thread_info * find_thread_ptid(ptid_t ptid)
struct btrace_function * next
static struct cmd_list_element * maint_btrace_set_cmdlist
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)
static struct cmd_list_element * maint_btrace_show_cmdlist
void target_teardown_btrace(struct btrace_target_info *btinfo)
#define SYMBOL_PRINT_NAME(symbol)
void parse_xml_btrace(struct btrace_data *btrace, const char *buffer)
#define MSYMBOL_LINKAGE_NAME(symbol)
struct regcache * get_thread_regcache(ptid_t ptid)
static void maint_btrace_clear_cmd(char *args, int from_tty)
struct btrace_target_info * target_enable_btrace(ptid_t ptid, const struct btrace_config *conf)
struct btrace_function * end
void warning(const char *fmt,...)
static int btrace_stitch_bts(struct btrace_data_bts *btrace, struct thread_info *tp)
int target_supports_btrace(enum btrace_format format)
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 btrace_clear_history(struct btrace_thread_info *btinfo)
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)
void btrace_data_fini(struct btrace_data *data)
static const struct gdb_xml_attribute block_attributes[]
struct btrace_insn_iterator * replay
struct cmd_list_element * maintenanceinfolist
struct btrace_call_history * call_history
static int ftrace_function_switched(const struct btrace_function *bfun, const struct minimal_symbol *mfun, const struct symbol *fun)
int gdb_insn_length(struct gdbarch *gdbarch, CORE_ADDR addr)
struct ui_file * gdb_stdout
static int btrace_stitch_trace(struct btrace_data *btrace, struct thread_info *tp)
struct btrace_data_bts bts
void btrace_clear(struct thread_info *tp)
void internal_error(const char *file, int line, const char *fmt,...)
unsigned int record_debug
static struct cmd_list_element * maint_btrace_pt_set_cmdlist
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)
unsigned int btrace_call_number(const struct btrace_call_iterator *it)
enum btrace_function_flag flags
static struct btrace_function * ftrace_new_gap(struct btrace_function *prev, int errcode)
struct btrace_maint_info::@32::@33 bts
const struct btrace_thread_info * btinfo
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)
static struct btrace_function * ftrace_new_call(struct btrace_function *caller, struct minimal_symbol *mfun, struct symbol *fun)
static void maint_btrace_clear_packet_history_cmd(char *args, int from_tty)
#define VEC_safe_push(T, V, O)
const struct btrace_function * function
static void btrace_maint_print_packets(struct btrace_thread_info *btinfo, unsigned int begin, unsigned int end)
char * target_pid_to_str(ptid_t ptid)
char * skip_spaces(char *chp)
struct btrace_call_iterator begin
#define DEBUG_FTRACE(msg, args...)
struct btrace_insn_history * insn_history
int btrace_call_cmp(const struct btrace_call_iterator *lhs, const struct btrace_call_iterator *rhs)
int gdbarch_insn_is_jump(struct gdbarch *gdbarch, CORE_ADDR addr)
void btrace_insn_begin(struct btrace_insn_iterator *it, const struct btrace_thread_info *btinfo)
void btrace_set_call_history(struct btrace_thread_info *btinfo, const struct btrace_call_iterator *begin, const struct btrace_call_iterator *end)
union btrace_data::@40 variant
struct btrace_func_link flow
void btrace_disable(struct thread_info *tp)
static void maint_btrace_cmd(char *args, int from_tty)
struct cmd_list_element * maintenance_set_cmdlist
static void parse_xml_raw(struct gdb_xml_parser *parser, const char *body_text, gdb_byte **pdata, unsigned long *psize)
static void maint_btrace_set_cmd(char *args, int from_tty)
struct btrace_insn_iterator end
static struct btrace_function * ftrace_find_call(struct btrace_function *bfun)
const char * symtab_to_fullname(struct symtab *s)
int target_read_code(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
unsigned int btrace_insn_number(const struct btrace_insn_iterator *it)
mach_port_t kern_return_t mach_port_t msgports mach_port_t kern_return_t pid_t pid mach_port_t kern_return_t mach_port_t task mach_port_t kern_return_t int flags
enum btrace_cpu_vendor vendor
static enum btrace_insn_class ftrace_classify_insn(struct gdbarch *gdbarch, CORE_ADDR pc)
#define MSYMBOL_PRINT_NAME(symbol)
static const char * ftrace_print_filename(const struct btrace_function *bfun)
static void btrace_compute_ftrace(struct thread_info *tp, struct btrace_data *btrace)
static void maint_btrace_show_cmd(char *args, int from_tty)
#define CATCH(EXCEPTION, MASK)
void btrace_teardown(struct thread_info *tp)
int gdb_xml_parse_quick(const char *name, const char *dtd_name, const struct gdb_xml_element *elements, const char *document, void *user_data)
struct cleanup * make_cleanup_btrace_data(struct btrace_data *data)
void btrace_data_clear(struct btrace_data *data)
const char * btrace_format_string(enum btrace_format format)
struct btrace_function * begin
void btrace_insn_end(struct btrace_insn_iterator *it, const struct btrace_thread_info *btinfo)
void fprintf_filtered(struct ui_file *stream, const char *format,...)
void * xzalloc(size_t size)
static struct btrace_function * ftrace_update_function(struct btrace_function *bfun, CORE_ADDR pc)
struct symbol * find_pc_function(CORE_ADDR pc)
enum btrace_format format
unsigned int btrace_call_prev(struct btrace_call_iterator *it, unsigned int stride)
struct btrace_maint_packet_history packet_history
struct cmd_list_element * add_cmd(const char *name, enum command_class theclass, cmd_cfunc_ftype *fun, const char *doc, struct cmd_list_element **list)
struct btrace_maint_info maint
static struct btrace_function * ftrace_new_function(struct btrace_function *prev, struct minimal_symbol *mfun, struct symbol *fun)
struct cleanup * make_cleanup(make_cleanup_ftype *function, void *arg)
static void btrace_maint_clear(struct btrace_thread_info *btinfo)
static void do_btrace_data_cleanup(void *arg)
static void ftrace_update_caller(struct btrace_function *bfun, struct btrace_function *caller, enum btrace_function_flag flags)
static const struct gdb_xml_element btrace_children[]
struct btrace_target_info * target
void btrace_call_end(struct btrace_call_iterator *it, const struct btrace_thread_info *btinfo)
#define VEC_index(T, V, I)
static struct cmd_list_element * maint_btrace_pt_show_cmdlist
struct btrace_func_link segment
struct btrace_function * up
static int get_context_size(char **arg)
static void ftrace_update_insns(struct btrace_function *bfun, const struct btrace_insn *insn)
#define SYMBOL_LINKAGE_NAME(symbol)
static void btrace_add_pc(struct thread_info *tp)
const struct btrace_config * btrace_conf(const struct btrace_thread_info *btinfo)
const struct btrace_insn * btrace_insn_get(const struct btrace_insn_iterator *it)
struct btrace_function * prev
static const struct gdb_xml_element btrace_pt_config_children[]
struct minimal_symbol * msym
void printf_unfiltered(const char *format,...)
static void show_maint_btrace_pt_skip_pad(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
enum btrace_error target_read_btrace(struct btrace_data *btrace, struct btrace_target_info *btinfo, enum btrace_read_type type)
int btrace_data_empty(struct btrace_data *data)
static struct btrace_function * ftrace_new_switch(struct btrace_function *prev, struct minimal_symbol *mfun, struct symbol *fun)
static unsigned int get_uint(char **arg)
void gdb_xml_error(struct gdb_xml_parser *parser, const char *format,...)
static int maint_btrace_pt_skip_pad
int btrace_is_empty(struct thread_info *tp)
unsigned int btrace_insn_next(struct btrace_insn_iterator *it, unsigned int stride)
enum btrace_insn_class iclass
struct btrace_insn_iterator begin
static const struct gdb_xml_attribute btrace_attributes[]
struct btrace_config_pt pt
static struct btrace_function * ftrace_new_return(struct btrace_function *prev, struct minimal_symbol *mfun, struct symbol *fun)
const struct btrace_function * function
void throw_exception(struct gdb_exception exception)
void _initialize_btrace(void)
static void maint_btrace_pt_set_cmd(char *args, int from_tty)
const char const char int
void btrace_fetch(struct thread_info *tp)
unsigned int btrace_call_next(struct btrace_call_iterator *it, unsigned int stride)
void help_list(struct cmd_list_element *list, const char *cmdtype, enum command_class theclass, struct ui_file *stream)
struct gdb_xml_value * xml_find_attribute(VEC(gdb_xml_value_s)*attributes, const char *name)
void discard_cleanups(struct cleanup *old_chain)
void btrace_enable(struct thread_info *tp, const struct btrace_config *conf)
struct bound_minimal_symbol lookup_minimal_symbol_by_pc(CORE_ADDR pc)
#define ALL_NON_EXITED_THREADS(T)
int btrace_insn_cmp(const struct btrace_insn_iterator *lhs, const struct btrace_insn_iterator *rhs)
void btrace_call_begin(struct btrace_call_iterator *it, const struct btrace_thread_info *btinfo)
int gdbarch_insn_is_call(struct gdbarch *gdbarch, CORE_ADDR addr)
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 const struct gdb_xml_element btrace_pt_children[]
static const struct gdb_xml_attribute btrace_conf_attributes[]
void btrace_free_objfile(struct objfile *objfile)
CORE_ADDR regcache_read_pc(struct regcache *regcache)
struct btrace_thread_info btrace
static struct btrace_function * ftrace_find_caller(struct btrace_function *bfun, struct minimal_symbol *mfun, struct symbol *fun)
struct btrace_data_pt_config config
struct minimal_symbol * minsym
static void ftrace_fixup_caller(struct btrace_function *bfun, struct btrace_function *caller, enum btrace_function_flag flags)
static void maint_btrace_packet_history_cmd(char *arg, int from_tty)
const struct btrace_function * btrace_call_get(const struct btrace_call_iterator *it)
union btrace_maint_info::@32 variant
void parse_xml_btrace_conf(struct btrace_config *conf, const char *xml)
int btrace_is_replaying(struct thread_info *tp)
static struct btrace_function * ftrace_new_tailcall(struct btrace_function *caller, struct minimal_symbol *mfun, struct symbol *fun)
gdb_xml_attribute_handler gdb_xml_parse_attr_ulongest
unsigned long long ULONGEST
static void maint_info_btrace_cmd(char *args, int from_tty)
struct cmd_list_element * maintenancelist
void btrace_set_insn_history(struct btrace_thread_info *btinfo, const struct btrace_insn_iterator *begin, const struct btrace_insn_iterator *end)
int btrace_find_insn_by_number(struct btrace_insn_iterator *it, const struct btrace_thread_info *btinfo, unsigned int number)
enum btrace_format format
static void btrace_compute_ftrace_pt(struct thread_info *tp, const struct btrace_data_pt *btrace)
void reinit_frame_cache(void)
static void btrace_compute_ftrace_bts(struct thread_info *tp, const struct btrace_data_bts *btrace)
CORE_ADDR get_pc_function_start(CORE_ADDR pc)
void btrace_data_init(struct btrace_data *data)
static void ftrace_debug(const struct btrace_function *bfun, const char *prefix)
static void maint_btrace_pt_show_cmd(char *args, int from_tty)
static void btrace_maint_update_packets(struct btrace_thread_info *btinfo, unsigned int *begin, unsigned int *end, unsigned int *from, unsigned int *to)
struct btrace_call_iterator end
struct symtab * symbol_symtab(const struct symbol *symbol)
int btrace_find_call_by_number(struct btrace_call_iterator *it, const struct btrace_thread_info *btinfo, unsigned int number)
const char * core_addr_to_string_nz(const CORE_ADDR addr)
struct cmd_list_element * maintenance_show_cmdlist
static const struct gdb_xml_element btrace_conf_children[]
const struct btrace_config * target_btrace_conf(const struct btrace_target_info *btinfo)
#define DEBUG(msg, args...)
void error(const char *fmt,...)
void do_cleanups(struct cleanup *old_chain)
void add_setshow_boolean_cmd(const char *name, enum command_class theclass, int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
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)
int gdbarch_insn_is_ret(struct gdbarch *gdbarch, CORE_ADDR addr)
int btrace_data_append(struct btrace_data *dst, const struct btrace_data *src)
static const struct gdb_xml_attribute btrace_conf_pt_attributes[]
const ULONGEST const LONGEST len