54#include "gdbsupport/filestuff.h"
55#include "gdbsupport/rsp-low.h"
61#include "gdbsupport/buildargv.h"
73#define MAX_AGENT_EXPR_LEN 184
158static char *
mem2hex (gdb_byte *,
char *,
int);
212 struct symbol *traceframe_fun;
216 if (trace_frame != NULL
225 traceframe_sal.
line);
229 traceframe_fun = NULL;
235 if (traceframe_fun == NULL
244 if (traceframe_sal.
symtab == NULL)
266 if (tsv.name ==
name)
289 if (it->name ==
name)
296 warning (_(
"No trace variable named \"$%s\", not deleting"),
name);
308 error (_(
"Must supply a non-empty variable name"));
312 for (p =
name; isdigit (*p); p++)
315 error (_(
"$%s is not a valid trace state variable name"),
name);
317 for (p =
name; isalnum (*p) || *p ==
'_'; p++)
320 error (_(
"$%s is not a valid trace state variable name"),
name);
331 const char *name_start, *p;
337 p = skip_spaces (args);
340 error (_(
"Name of trace variable should start with '$'"));
343 while (isalnum (*p) || *p ==
'_')
345 std::string
name (name_start, p - name_start);
348 if (*p !=
'=' && *p !=
'\0')
349 error (_(
"Syntax must be $NAME [ = EXPR ]"));
366 "now has initial value %s.\n"),
378 "created, with initial value %s.\n"),
387 if (
query (_(
"Delete all trace state variables? ")))
394 gdb_argv argv (args);
396 for (
char *arg : argv)
401 warning (_(
"Name \"%s\" not prefixed with '$', ignoring"), arg);
432 uiout->
field_string (
"name", std::string (
"$") + tsv.name);
433 uiout->
field_string (
"initial", plongest (tsv.initial_value));
437 c = plongest (tsv.value);
462 uiout->
text (_(
"No trace state variables.\n"));
480 gdb_printf (fp,
"tvariable $%s", tsv.name.c_str ());
481 if (tsv.initial_value)
482 gdb_printf (fp,
" = %s", plongest (tsv.initial_value));
501 error (_(
"This command cannot be used at the top level."));
507 error (_(
"This command can only be used in a tracepoint actions list."));
513 error (_(
"This command can only be used in a tracepoint actions list."));
519 error (_(
"This command can only be used in a tracepoint actions list."));
546 *trace_string = opts.print_max;
548 if (*exp >=
'0' && *exp <=
'9')
549 *trace_string = atoi (exp);
550 while (*exp >=
'0' && *exp <=
'9')
554 error (_(
"Target does not support \"/s\" option for string tracing."));
557 error (_(
"Undefined collection format \"%c\"."), *exp);
559 exp = skip_spaces (exp);
574 string_printf (
"Enter actions for tracepoint %d, one per line.",
579 [=] (
const char *line)
581 validate_actionline (line, t);
597 internal_error (_(
"expression is malformed"));
602 internal_error (_(
"expression has min height < 0"));
611 error (_(
"Expression is too complicated."));
622 error (_(
"Expression is too complicated."));
640 p = skip_spaces (line);
651 error (_(
"`%s' is not a tracepoint action, or is ambiguous."), p);
655 int trace_string = 0;
667 if (0 == strncasecmp (
"reg", p + 1, 3)
668 || 0 == strncasecmp (
"arg", p + 1, 3)
669 || 0 == strncasecmp (
"loc", p + 1, 3)
670 || 0 == strncasecmp (
"_ret", p + 1, 4)
671 || 0 == strncasecmp (
"_sdata", p + 1, 6))
685 if (exp->first_opcode () == OP_VAR_VALUE)
689 = (gdb::checked_static_cast<expr::var_value_operation *>
695 error (_(
"constant `%s' (value %s) "
696 "will not be collected."),
702 error (_(
"`%s' is optimized away "
703 "and cannot be collected."),
718 while (p && *p++ ==
',');
745 while (p && *p++ ==
',');
755 error (_(
"while-stepping step count `%s' is malformed."), line);
763 error (_(
"`%s' is not a supported tracepoint action."), line);
793 if (!memranges.empty ())
797 std::sort (memranges.begin (), memranges.end (),
memrange_comp);
799 for (a = 0, b = 1; b < memranges.size (); b++)
803 if (memranges[a].
type == memranges[b].
type
804 && memranges[b].start <= memranges[a].end)
806 if (memranges[b].end > memranges[a].end)
807 memranges[a].end = memranges[b].end;
812 memranges[a] = memranges[b];
814 memranges.resize (a + 1);
844 for (
int ndx2 = 0; ndx2 < 8; ndx2++)
845 if (aexpr->
reg_mask[ndx1] & (1 << ndx2))
867 if (remote_regno < 0)
868 error (_(
"Can't collect register %d"), regno);
895 int type, bfd_signed_vma base,
896 unsigned long len, CORE_ADDR scope)
915 long frame_regno,
long frame_offset,
921 bfd_signed_vma offset;
922 int treat_as_expr = 0;
928 gdb_printf (
"%s: don't know symbol class %d\n",
932 gdb_printf (
"constant %s (value %s) will not be collected.\n",
939 gdb_printf (
"LOC_STATIC %s: collect %ld bytes at %s.\n",
945 if (sym->
type ()->
code () == TYPE_CODE_STRUCT)
957 if (sym->
type ()->
code () == TYPE_CODE_FLT &&
962 gdb_printf (
"Sorry, don't know how to do LOC_REF_ARG yet.\n");
970 gdb_printf (
"LOC_LOCAL %s: Collect %ld bytes at offset %s"
971 " from frame ptr reg %d\n", sym->
print_name (), len,
981 gdb_printf (
"LOC_REGPARM_ADDR %s: Collect %ld bytes at offset %s"
992 gdb_printf (
"LOC_LOCAL %s: Collect %ld bytes at offset %s"
993 " from frame ptr reg %d\n", sym->
print_name (), len,
1004 gdb_printf (
"%s has been optimized out of existence.\n",
1024 gdb_printf (
"%s has been optimized out of existence.\n",
1048 long frame_regno,
long frame_offset,
int type,
1054 auto do_collect_symbol = [&] (
const char *print_name,
1058 frame_offset, pc, trace_string);
1068 warning (_(
"Can't collect locals; "
1069 "no symbol table info available.\n"));
1075 warning (_(
"No locals found in scope."));
1083 warning (_(
"Can't collect args; no symbol table info available."));
1089 warning (_(
"No args found in scope."));
1102 : m_strace_data (false)
1104 int max_remote_regno = 0;
1110 if (remote_regno >= 0 && remote_regno > max_remote_regno)
1111 max_remote_regno = remote_regno;
1122std::vector<std::string>
1125 gdb::char_vector temp_buf (2048);
1130 std::vector<std::string> str_list;
1135 gdb_printf (
"\nCollecting static trace data\n");
1136 end = temp_buf.data ();
1138 str_list.emplace_back (temp_buf.data (), end - temp_buf.data ());
1147 gdb_printf (
"\nCollecting registers (mask): 0x");
1151 std::size_t new_size = (i + 1) * 2 + 2;
1152 if (new_size > temp_buf.size ())
1153 temp_buf.resize (new_size);
1155 end = temp_buf.data ();
1167 str_list.emplace_back (temp_buf.data ());
1173 for (i = 0, count = 0, end = temp_buf.data ();
1188 str_list.emplace_back (temp_buf.data (), count);
1190 end = temp_buf.data ();
1194 bfd_signed_vma length
1202 sprintf (end,
"M-1,%s,%lX", phex_nz (
m_memranges[i].start, 0),
1206 phex_nz (
m_memranges[i].start, 0), (
long) length);
1209 count += strlen (end);
1210 end = temp_buf.data () + count;
1213 for (i = 0; i <
m_aexprs.size (); i++)
1218 str_list.emplace_back (temp_buf.data (), count);
1220 end = temp_buf.data ();
1222 sprintf (end,
"X%08X,",
m_aexprs[i]->len);
1232 str_list.emplace_back (temp_buf.data (), count);
1234 end = temp_buf.data ();
1258 LONGEST frame_offset,
1262 const char *action_exp;
1264 struct value *tempval;
1267 for (; action; action = action->
next)
1270 action_exp = action->
line;
1271 action_exp = skip_spaces (action_exp);
1275 error (_(
"Bad action list item: %s"), action_exp);
1279 int trace_string = 0;
1281 if (*action_exp ==
'/')
1287 action_exp = skip_spaces (action_exp);
1289 if (0 == strncasecmp (
"$reg", action_exp, 4))
1300 if (remote_regno >= 0)
1303 action_exp = strchr (action_exp,
',');
1305 else if (0 == strncasecmp (
"$arg", action_exp, 4))
1313 action_exp = strchr (action_exp,
',');
1315 else if (0 == strncasecmp (
"$loc", action_exp, 4))
1323 action_exp = strchr (action_exp,
',');
1325 else if (0 == strncasecmp (
"$_ret", action_exp, 5))
1338 action_exp = strchr (action_exp,
',');
1340 else if (0 == strncasecmp (
"$_sdata", action_exp, 7))
1343 action_exp = strchr (action_exp,
',');
1349 const char *exp_start = action_exp;
1354 switch (exp->first_opcode ())
1359 = (gdb::checked_static_cast<expr::register_operation *>
1366 internal_error (_(
"Register $%s not available"),
1381 = (gdb::checked_static_cast<expr::unop_memval_operation *>
1398 = (gdb::checked_static_cast<expr::var_value_operation *>
1430 while (action_exp && *action_exp++ ==
',');
1437 action_exp = skip_spaces (action_exp);
1454 while (action_exp && *action_exp++ ==
',');
1461 gdb_assert (stepping_list);
1464 frame_offset, stepping_list, NULL);
1467 error (_(
"Invalid tracepoint command '%s'"), action->
line);
1480 LONGEST frame_offset;
1483 tloc->
address, &frame_reg, &frame_offset);
1487 tracepoint_list, stepping_list);
1489 frame_reg, frame_offset, tracepoint_list, stepping_list);
1491 tracepoint_list->
finish ();
1492 stepping_list->
finish ();
1499 std::vector<std::string> *tdp_actions,
1500 std::vector<std::string> *stepping_actions)
1506 *tdp_actions = tracepoint_list.
stringify ();
1507 *stepping_actions = stepping_list.
stringify ();
1513 m_aexprs.push_back (std::move (aexpr));
1519 int has_pending_p = 0;
1534 if (loc1->shlib_disabled)
1547 warning (_(
"Pending tracepoints will not be resolved while"
1548 " GDB is disconnected\n"));
1565 int any_enabled = 0, num_to_download = 0;
1572 error (_(
"No tracepoints defined, not starting trace"));
1584 warning (_(
"May not insert %stracepoints, skipping tracepoint %d"),
1591 warning (_(
"No tracepoints enabled"));
1596 error (_(
"No tracepoints enabled, not starting trace"));
1600 if (num_to_download <= 0)
1601 error (_(
"No tracepoints that may be downloaded, not starting trace"));
1608 int bp_location_downloaded = 0;
1625 gdb_assert (!
loc->inserted);
1630 bp_location_downloaded = 1;
1636 if (
loc->probe.prob != NULL)
1637 loc->probe.prob->set_semaphore (
loc->probe.objfile,
1640 if (bp_location_downloaded)
1661 warning (_(
"Target does not support trace user/notes, info ignored"));
1685 && !
query (_(
"A trace is running already. Start a new run? ")))
1686 error (_(
"New trace run not started."));
1701 error (_(
"Trace is not running."));
1726 if (
loc->probe.prob != NULL)
1727 loc->probe.prob->clear_semaphore (
loc->probe.objfile,
1738 warning (_(
"Target does not support trace notes, note ignored"));
1759 gdb_printf (_(
"Trace can not be run on this target.\n"));
1766 gdb_printf (_(
"Run/stop status is unknown.\n"));
1770 gdb_printf (_(
"Trace is running on the target.\n"));
1777 gdb_printf (_(
"No trace has been run on the target.\n"));
1781 gdb_printf (_(
"Trace stopped by a tstop command (%s).\n"),
1784 gdb_printf (_(
"Trace stopped by a tstop command.\n"));
1787 gdb_printf (_(
"Trace stopped because the buffer was full.\n"));
1790 gdb_printf (_(
"Trace stopped because of disconnection.\n"));
1793 gdb_printf (_(
"Trace stopped by tracepoint %d.\n"),
1799 "error (%s, tracepoint %d).\n"),
1802 gdb_printf (_(
"Trace stopped by an error (%s).\n"),
1806 gdb_printf (_(
"Trace stopped for an unknown reason.\n"));
1809 gdb_printf (_(
"Trace stopped for some other reason (%d).\n"),
1819 "frames (of %d created total).\n"),
1824 gdb_printf (_(
"Collected %d trace frames.\n"),
1832 gdb_printf (_(
"Trace buffer has %d bytes of %d bytes free"),
1842 gdb_printf (_(
"Trace buffer has %d bytes free.\n"),
1847 gdb_printf (_(
"Trace will continue if GDB disconnects.\n"));
1849 gdb_printf (_(
"Trace will stop if GDB disconnects.\n"));
1852 gdb_printf (_(
"Trace buffer is circular.\n"));
1862 gdb_printf (_(
"Looking at trace frame %d, tracepoint %d.\n"),
1865 gdb_printf (_(
"Not looking at any trace frame.\n"));
1875 gdb_printf (_(
"Trace started at %ld.%06ld secs, stopped %ld.%06ld secs later.\n"),
1878 (
long int) (run_time / 1000000),
1879 (
long int) (run_time % 1000000));
1882 gdb_printf (_(
"Trace started at %ld.%06ld secs.\n"),
1887 gdb_printf (_(
"Trace stopped at %ld.%06ld secs.\n"),
2002 xsnprintf (buf,
sizeof buf,
"%ld.%06ld",
2006 xsnprintf (buf,
sizeof buf,
"%ld.%06ld",
2040 if (!
query (_(
"Trace is running and will "
2041 "continue after detach; detach anyway? ")))
2042 error (_(
"Not confirmed."));
2046 if (!
query (_(
"Trace is running but will "
2047 "stop on detach; detach anyway? ")))
2048 error (_(
"Not confirmed."));
2070 CORE_ADDR addr1, CORE_ADDR addr2,
2073 int target_frameno = -1, target_tracept = -1;
2093 && target_frameno == -1)
2097 else if (target_frameno == -1)
2121 error (_(
"Target failed to find requested trace frame."));
2146 if (target_frameno == -1)
2163 gdb_printf (_(
"Found trace frame %d, tracepoint %d\n"),
2172 gdb_printf (_(
"No longer looking at any trace frame\n"));
2207 error (_(
"May not look at trace frames while trace is running."));
2232 if (args == 0 || *args == 0)
2239 else if (0 == strcmp (args,
"-"))
2242 error (_(
"not debugging trace buffer"));
2244 error (_(
"already at start of trace buffer"));
2249 else if (0 == strcmp (args,
"-1"))
2255 error (_(
"invalid input (%d is less than zero)"), frameno);
2288 if (args == 0 || *args == 0)
2305 if (args == 0 || *args == 0)
2308 error (_(
"No current tracepoint -- please supply an argument."));
2339 if (args == 0 || *args == 0)
2345 std::vector<symtab_and_line> sals
2351 error (_(
"No line number information available."));
2353 CORE_ADDR start_pc, end_pc;
2356 if (start_pc == end_pc)
2369 && start_pc != end_pc)
2370 gdb_printf (
"Attempting to find line %d instead.\n",
2373 error (_(
"Cannot find a good line."));
2381 error (_(
"Line number %d is out of range for \"%s\"."),
2396 static CORE_ADDR start, stop;
2401 if (args == 0 || *args == 0)
2403 gdb_printf (
"Usage: tfind range STARTADDR, ENDADDR\n");
2407 if (0 != (tmp = strchr (args,
',')))
2409 std::string start_addr (args, tmp);
2411 tmp = skip_spaces (tmp);
2428 CORE_ADDR start, stop;
2433 error (_(
"May not look at trace frames while trace is running."));
2435 if (args == 0 || *args == 0)
2437 gdb_printf (
"Usage: tfind outside STARTADDR, ENDADDR\n");
2441 if (0 != (tmp = strchr (args,
',')))
2443 std::string start_addr (args, tmp);
2445 tmp = skip_spaces (tmp);
2465 const char *symname;
2466 const char *save_args = args_in;
2471 const char *args = args_in;
2473 if (args == 0 || *args == 0)
2474 error (_(
"requires an argument (function, "
2475 "line or *addr) to define a scope"));
2479 std::vector<symtab_and_line> sals
2503 if (symname == NULL || *symname ==
'\0')
2532 for (j = 0; j < sym->
type ()->length (); j++)
2536 gdb_printf (
"in static storage at address ");
2554 gdb_printf (
"a local variable in register $%s",
2558 gdb_printf (
"an argument at stack/frame offset %s",
2562 gdb_printf (
"a local variable at frame offset %s",
2566 gdb_printf (
"a reference argument at offset %s",
2573 gdb_printf (
"the address of an argument, in register $%s",
2605 gdb_assert_not_reached (
"LOC_COMPUTED variable missing a method");
2621 gdb_printf (
"Scope for %s contains no locals or arguments.\n",
2633 int stepping_actions,
int stepping_frame,
2636 const char *action_exp, *next_comma;
2638 for (; action != NULL; action = action->
next)
2643 action_exp = action->
line;
2644 action_exp = skip_spaces (action_exp);
2649 if (*action_exp ==
'#')
2654 error (_(
"Bad action list item: %s"), action_exp);
2660 1, stepping_frame, from_tty);
2670 if (stepping_frame == stepping_actions)
2672 int trace_string = 0;
2674 if (*action_exp ==
'/')
2680 if (*action_exp ==
',')
2682 action_exp = skip_spaces (action_exp);
2684 next_comma = strchr (action_exp,
',');
2686 if (0 == strncasecmp (action_exp,
"$reg", 4))
2688 else if (0 == strncasecmp (action_exp,
"$_ret", 5))
2690 else if (0 == strncasecmp (action_exp,
"$loc", 4))
2692 else if (0 == strncasecmp (action_exp,
"$arg", 4))
2696 std::string contents;
2697 const char *exp = action_exp;
2698 if (next_comma != NULL)
2700 size_t len = next_comma - action_exp;
2701 contents = std::string (action_exp, len);
2702 exp = contents.c_str ();
2709 action_exp = next_comma;
2711 while (action_exp && *action_exp ==
',');
2728 error (_(
"No current trace frame."));
2733 error (_(
"No known tracepoint matches 'current' tracepoint #%d."),
2748 *stepping_frame_p = 0;
2754 *stepping_frame_p = 1;
2772 gdb::unique_xmalloc_ptr<char> default_collect_line
2777 default_collect_line.release ()),
2789 int stepping_frame = 0;
2795 gdb_printf (
"Data collected at tracepoint %d, trace frame %d:\n",
2818 const char *srctype,
const char *src,
2819 char *buf,
int buf_size)
2821 if (80 + strlen (srctype) > buf_size)
2822 error (_(
"Buffer too small for source encoding"));
2823 sprintf (buf,
"%x:%s:%s:%x:%x:",
2824 tpnum, phex_nz (addr,
sizeof (addr)),
2825 srctype, 0, (
int) strlen (src));
2826 if (strlen (buf) + strlen (src) * 2 >= buf_size)
2827 error (_(
"Source string too long for buffer"));
2828 bin2hex ((gdb_byte *) src, buf + strlen (buf), strlen (src));
2865 warning (_(
"Target does not support trace notes, user ignored"));
2877 warning (_(
"Target does not support trace notes, note ignored"));
2889 warning (_(
"Target does not support trace notes, stop note ignored"));
2946 warning (_(
"could not change traceframe"));
2969 for (utp = *utpp; utp; utp = utp->
next)
2989 next_one = (*utpp)->
next;
3003 for (utsv = *utsvp; utsv; utsv = utsv->
next)
3009 utsv->
next = *utsvp;
3022 next_one = (*utsvp)->
next;
3035 if (str1 == NULL || str2 == NULL)
3036 return (str1 == str2);
3038 return (strcmp (str1, str2) == 0);
3055 if (b->type == utp->
type
3066 if (
loc->address == utp->
addr)
3083 std::vector<breakpoint *> modified_tp;
3086 for (utp = *uploaded_tps; utp; utp = utp->
next)
3099 gdb_printf (_(
"Assuming tracepoint %d is same "
3100 "as target's tracepoint %d at %s.\n"),
3110 if (b ==
loc->owner)
3116 modified_tp.push_back (
loc->owner);
3123 "target's tracepoint %d at %s.\n"),
3127 gdb_printf (_(
"Failed to create tracepoint for target's "
3128 "tracepoint %d at %s, skipping it.\n"),
3162 const char *namebase;
3169 namebase = utsv->
name;
3175 buf = string_printf (
"%s_%d", namebase, try_num++);
3181 buf = string_printf (
"%s_%d", namebase, try_num++);
3207 for (utsv = *uploaded_tsvs; utsv; utsv = utsv->
next)
3213 gdb_printf (_(
"Assuming trace state variable $%s "
3214 "is same as target's variable %d.\n"),
3221 gdb_printf (_(
"Created trace state variable "
3222 "$%s for target's variable %d.\n"),
3233 highest = std::max (tsv.number, highest);
3237 if (tsv.number == 0)
3238 tsv.number = highest++;
3249 const char *p = line, *p1, *p2, *p3, *p_temp;
3272 p1 = strchr (p,
':');
3274 error (_(
"Malformed trace status, at %s\n\
3275Status line: '%s'\n"), p, line);
3276 p3 = strchr (p,
';');
3278 p3 = p + strlen (p);
3281 p = unpack_varlen_hex (++p1, &val);
3286 p = unpack_varlen_hex (++p1, &val);
3292 p = unpack_varlen_hex (++p1, &val);
3298 p2 = strchr (++p1,
':');
3307 end = hex2bin (p1, (gdb_byte *) ts->
stop_desc, (p2 - p1) / 2);
3313 p = unpack_varlen_hex (++p2, &val);
3318 p = unpack_varlen_hex (++p1, &val);
3323 p2 = strchr (++p1,
':');
3327 end = hex2bin (p1, (gdb_byte *) ts->
stop_desc, (p2 - p1) / 2);
3333 p = unpack_varlen_hex (++p2, &val);
3337 else if (strncmp (p,
"tframes", p1 - p) == 0)
3339 p = unpack_varlen_hex (++p1, &val);
3342 else if (strncmp (p,
"tcreated", p1 - p) == 0)
3344 p = unpack_varlen_hex (++p1, &val);
3347 else if (strncmp (p,
"tfree", p1 - p) == 0)
3349 p = unpack_varlen_hex (++p1, &val);
3352 else if (strncmp (p,
"tsize", p1 - p) == 0)
3354 p = unpack_varlen_hex (++p1, &val);
3357 else if (strncmp (p,
"disconn", p1 - p) == 0)
3359 p = unpack_varlen_hex (++p1, &val);
3362 else if (strncmp (p,
"circular", p1 - p) == 0)
3364 p = unpack_varlen_hex (++p1, &val);
3367 else if (strncmp (p,
"starttime", p1 - p) == 0)
3369 p = unpack_varlen_hex (++p1, &val);
3372 else if (strncmp (p,
"stoptime", p1 - p) == 0)
3374 p = unpack_varlen_hex (++p1, &val);
3377 else if (strncmp (p,
"username", p1 - p) == 0)
3381 end = hex2bin (p1, (gdb_byte *) ts->
user_name, (p3 - p1) / 2);
3385 else if (strncmp (p,
"notes", p1 - p) == 0)
3389 end = hex2bin (p1, (gdb_byte *) ts->
notes, (p3 - p1) / 2);
3390 ts->
notes[end] =
'\0';
3396 p_temp = strchr (p1 + 1,
';');
3413 p = unpack_varlen_hex (p, &uval);
3418 p = unpack_varlen_hex (p + 1, &uval);
3434 ULONGEST num, addr, step, pass, orig_size, xlen, start;
3437 const char *srctype;
3445 p = unpack_varlen_hex (p, &num);
3447 p = unpack_varlen_hex (p, &
addr);
3451 gdb::unique_xmalloc_ptr<char[]>
cond;
3455 p = unpack_varlen_hex (p, &
step);
3457 p = unpack_varlen_hex (p, &
pass);
3477 p = unpack_varlen_hex (p, &xlen);
3480 strncpy (&
cond[0], p, 2 * xlen);
3481 cond[2 * xlen] =
'\0';
3485 warning (_(
"Unrecognized char '%c' in tracepoint "
3486 "definition, skipping rest"), *p);
3495 else if (piece ==
'A')
3498 utp->
actions.emplace_back (xstrdup (p));
3500 else if (piece ==
'S')
3505 else if (piece ==
'Z')
3510 p = strchr (p,
':');
3512 p = unpack_varlen_hex (p, &start);
3514 p = unpack_varlen_hex (p, &xlen);
3517 buf = (
char *) alloca (strlen (line));
3519 end = hex2bin (p, (gdb_byte *) buf, strlen (p) / 2);
3522 if (startswith (srctype,
"at:"))
3524 else if (startswith (srctype,
"cond:"))
3526 else if (startswith (srctype,
"cmd:"))
3529 else if (piece ==
'V')
3539 warning (_(
"Unrecognized tracepoint piece '%c', ignoring"), piece);
3551 ULONGEST num, initval, builtin;
3555 buf = (
char *) alloca (strlen (line));
3558 p = unpack_varlen_hex (p, &num);
3560 p = unpack_varlen_hex (p, &initval);
3562 p = unpack_varlen_hex (p, &
builtin);
3564 end = hex2bin (p, (gdb_byte *) buf, strlen (p) / 2);
3570 utsv->
name = xstrdup (buf);
3582 const char *p, *endp;
3586 p = unpack_varlen_hex (p, &addr);
3590 marker->
address = (CORE_ADDR) addr;
3592 endp = strchr (p,
':');
3594 error (_(
"bad marker definition: %s"), line);
3596 marker->
str_id = hex2str (p, (endp - p) / 2);
3603 endp = strchr (p,
',');
3604 if (endp !=
nullptr)
3607 hex_len = strlen (p);
3609 marker->
extra = hex2str (p, hex_len / 2);
3628 std::vector<breakpoint *> tracepoints
3640 !tracepoints.empty () ?
'y' :
'n');
3643 int wrap_indent = 35;
3649 const char *extra_field_indent =
" ";
3657 uiout->
text (
"in ");
3661 uiout->
text (
" at ");
3691 uiout->
text (extra_field_indent);
3692 uiout->
text (_(
"Data: \""));
3694 uiout->
text (
"\"\n");
3696 if (!tracepoints.empty ())
3703 uiout->
text (extra_field_indent);
3704 uiout->
text (_(
"Probed by static tracepoints: "));
3705 for (ix = 0; ix < tracepoints.size (); ix++)
3710 uiout->
field_signed (
"tracepoint-id", tracepoints[ix]->number);
3715 uiout->
field_signed (
"number-of-tracepoints", tracepoints.size ());
3725 std::vector<static_tracepoint_marker> markers
3735 "StaticTracepointMarkersTable");
3750 for (
int i = 0; i < markers.size (); i++)
3764static struct value *
3769 gdb::optional<gdb::byte_vector> buf
3788#if !defined(HAVE_LIBEXPAT)
3793 static int have_warned;
3798 warning (_(
"Can not parse XML trace frame info; XML support "
3799 "was disabled at compile time"));
3818 ULONGEST *start_p, *length_p;
3825 info->memory.emplace_back (*start_p, *length_p);
3837 const char *id_attrib
3841 info->tvars.push_back (
id);
3882 tframe_info, result.get ()) == 0)
3911 CORE_ADDR memaddr, ULONGEST len)
3922 ULONGEST lo1, hi1, lo2, hi2;
3925 hi1 = memaddr + len;
3930 CORE_ADDR start = std::max (lo1, lo2);
3931 int length = std::min (hi1, hi2) - start;
3933 result->emplace_back (start, length);
3971 _(
"List the variables local to a scope."));
3974 _(
"Tracing of program execution without stopping the program."),
3978 _(
"Print everything collected at the current tracepoint."));
3981Define a trace state variable.\n\
3982Argument is a $-prefixed name, optionally followed\n\
3983by '=' and an expression that sets the initial value\n\
3984at the start of tracing."));
3988Delete one or more trace state variables.\n\
3989Arguments are the names of the variables to delete.\n\
3990If no arguments are supplied, delete all variables."), &
deletelist);
3994Status of trace state variables and their values."));
3996 add_info (
"static-tracepoint-markers",
3998List target static tracepoints markers."));
4001Select a trace frame.\n\
4002No argument means forward by one frame; '-' means backward by one frame."),
4006Select a trace frame whose PC is outside the given range (exclusive).\n\
4007Usage: tfind outside ADDR1, ADDR2"),
4011Select a trace frame whose PC is in the given range (inclusive).\n\
4012Usage: tfind range ADDR1, ADDR2"),
4016Select a trace frame by source line.\n\
4017Argument can be a line number (with optional source file),\n\
4018a function name, or '*' followed by an address.\n\
4019Default argument is 'the next source line that was traced'."),
4023Select a trace frame by tracepoint number.\n\
4024Default is the tracepoint for the current trace frame."),
4028Select a trace frame by PC.\n\
4029Default is the current PC, or the PC of the current trace frame."),
4034De-select any trace frame and resume 'live' debugging."), &
tfindlist);
4039 _(
"Select the first trace frame in the trace buffer."),
4043 _(
"Display the status of the current trace data collection."));
4046Stop trace data collection.\n\
4047Usage: tstop [NOTES]...\n\
4048Any arguments supplied are recorded with the trace as a stop reason and\n\
4049reported by tstatus (if the target supports trace notes)."));
4052Start trace data collection.\n\
4053Usage: tstart [NOTES]...\n\
4054Any arguments supplied are recorded with the trace as a note and\n\
4055reported by tstatus (if the target supports trace notes)."));
4058Ends a list of commands or actions.\n\
4059Several GDB commands allow you to enter a list of commands or actions.\n\
4060Entering \"end\" on a line by itself is the normal way to terminate\n\
4062Note: the \"end\" command cannot be used at the gdb prompt."));
4066Specify single-stepping behavior at a tracepoint.\n\
4067Argument is number of instructions to trace in single-step mode\n\
4068following the tracepoint. This command is normally followed by\n\
4069one or more \"collect\" commands, to specify what to collect\n\
4070while single-stepping.\n\n\
4071Note: this command can only be used in a tracepoint \"actions\" list."));
4077Specify one or more data items to be collected at a tracepoint.\n\
4078Accepts a comma-separated list of (one or more) expressions. GDB will\n\
4079collect all data (variables, registers) referenced by that expression.\n\
4080Also accepts the following special arguments:\n\
4081 $regs -- all registers.\n\
4082 $args -- all function arguments.\n\
4083 $locals -- all variables local to the block/function scope.\n\
4084 $_sdata -- static tracepoint data (ignored for non-static tracepoints).\n\
4085Note: this command can only be used in a tracepoint \"actions\" list."));
4088Specify one or more expressions to be evaluated at a tracepoint.\n\
4089Accepts a comma-separated list of (one or more) expressions.\n\
4090The result of each evaluation will be discarded.\n\
4091Note: this command can only be used in a tracepoint \"actions\" list."));
4094Specify the actions to be taken at a tracepoint.\n\
4095Tracepoint actions may include collecting of specified data,\n\
4096single-stepping, or enabling/disabling other tracepoints,\n\
4097depending on target's capabilities."));
4101Set the list of expressions to collect by default."), _(
"\
4102Show the list of expressions to collect by default."), NULL,
4108Set whether tracing continues after GDB disconnects."), _(
"\
4109Show whether tracing continues after GDB disconnects."), _(
"\
4110Use this to continue a tracing run even if GDB disconnects\n\
4111or detaches from the target. You can reconnect later and look at\n\
4112trace data collected in the meantime."),
4120Set target's use of circular trace buffer."), _(
"\
4121Show target's use of circular trace buffer."), _(
"\
4122Use this to make the trace buffer into a circular buffer,\n\
4123which will discard traceframes (oldest first) instead of filling\n\
4124up and stopping the trace run."),
4132Set requested size of trace buffer."), _(
"\
4133Show requested size of trace buffer."), _(
"\
4134Use this to choose a size for the trace buffer. Some targets\n\
4135may have fixed or limited buffer sizes. Specifying \"unlimited\" or -1\n\
4136disables any attempt to set the buffer size and lets the target choose."),
4142Set the user name to use for current and future trace runs."), _(
"\
4143Show the user name to use for current and future trace runs."), NULL,
4149Set notes string to use for current and future trace runs."), _(
"\
4150Show the notes string to use for current and future trace runs."), NULL,
4156Set notes string to use for future tstop commands."), _(
"\
4157Show the notes string to use for future tstop commands."), NULL,
static struct @4 attributes[]
struct gdbarch * get_current_arch(void)
struct gdbarch * target_gdbarch(void)
agent_expr_up gen_eval_for_expr(CORE_ADDR scope, struct expression *expr)
agent_expr_up gen_trace_for_expr(CORE_ADDR scope, struct expression *expr, int trace_string)
agent_expr_up gen_trace_for_return_address(CORE_ADDR scope, struct gdbarch *gdbarch, int trace_string)
agent_expr_up gen_trace_for_var(CORE_ADDR scope, struct gdbarch *gdbarch, struct symbol *var, int trace_string)
void ax_reqs(struct agent_expr *ax)
void ax_reg_mask(struct agent_expr *ax, int reg)
std::unique_ptr< agent_expr > agent_expr_up
const struct block * block_for_pc(CORE_ADDR pc)
#define ALL_BLOCK_SYMBOLS(block, iter, sym)
struct symbol * find_pc_function(CORE_ADDR pc)
CORE_ADDR get_pc_function_start(CORE_ADDR pc)
struct symbol * find_pc_sect_function(CORE_ADDR pc, struct obj_section *section)
void resolve_sal_pc(struct symtab_and_line *sal)
struct tracepoint * get_tracepoint_by_number_on_target(int num)
struct command_line * breakpoint_commands(struct breakpoint *b)
void breakpoint_set_commands(struct breakpoint *b, counted_command_line &&commands)
struct tracepoint * create_tracepoint_from_upload(struct uploaded_tp *utp)
struct tracepoint * get_tracepoint(int num)
std::vector< breakpoint * > static_tracepoints_here(CORE_ADDR addr)
tracepoint_range all_tracepoints()
struct tracepoint * get_tracepoint_by_number(const char **arg, number_or_range_parser *parser)
iterator_range< tracepoint_iterator > tracepoint_range
ui_file_style style() const
std::vector< memrange > m_memranges
std::vector< std::string > stringify()
void collect_symbol(struct symbol *sym, struct gdbarch *gdbarch, long frame_regno, long frame_offset, CORE_ADDR scope, int trace_string)
void add_wholly_collected(const char *print_name)
std::vector< std::string > m_wholly_collected
std::vector< unsigned char > m_regs_mask
void add_remote_register(unsigned int regno)
void append_exp(std::string &&exp)
void add_local_symbols(struct gdbarch *gdbarch, CORE_ADDR pc, long frame_regno, long frame_offset, int type, int trace_string)
std::vector< std::string > m_computed
std::vector< agent_expr_up > m_aexprs
void add_ax_registers(struct agent_expr *aexpr)
void add_static_trace_data()
void add_local_register(struct gdbarch *gdbarch, unsigned int regno, CORE_ADDR scope)
void add_aexpr(agent_expr_up aexpr)
void add_memrange(struct gdbarch *gdbarch, int type, bfd_signed_vma base, unsigned long len, CORE_ADDR scope)
const char * get_name() const
struct type * get_type() const
symbol * get_symbol() const
void void void spaces(int numspaces)
void field_core_addr(const char *fldname, struct gdbarch *gdbarch, CORE_ADDR address)
void field_string(const char *fldname, const char *string, const ui_file_style &style=ui_file_style())
void field_fmt(const char *fldname, const char *format,...) ATTRIBUTE_PRINTF(3
void field_signed(const char *fldname, LONGEST value)
void field_skip(const char *fldname)
void text(const char *string)
void table_header(int width, ui_align align, const std::string &col_name, const std::string &col_hdr)
bool is_mi_like_p() const
void void void wrap_hint(int indent)
struct cmd_list_element * showlist
struct cmd_list_element * deletelist
void error_no_arg(const char *why)
struct cmd_list_element * cmdlist
struct cmd_list_element * setlist
struct cmd_list_element * add_alias_cmd(const char *name, cmd_list_element *target, enum command_class theclass, int abbrev_flag, struct cmd_list_element **list)
struct cmd_list_element * lookup_cmd(const char **line, struct cmd_list_element *list, const char *cmdtype, std::string *default_args, int allow_unknown, int ignore_help_classes)
struct cmd_list_element * add_cmd(const char *name, enum command_class theclass, const char *doc, struct cmd_list_element **list)
cmd_list_element * add_com_alias(const char *name, cmd_list_element *target, command_class theclass, int abbrev_flag)
set_show_commands add_setshow_string_cmd(const char *name, enum command_class theclass, std::string *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
void set_cmd_completer(struct cmd_list_element *cmd, completer_ftype *completer)
struct cmd_list_element * add_com(const char *name, enum command_class theclass, cmd_simple_func_ftype *fun, const char *doc)
set_show_commands add_setshow_zuinteger_unlimited_cmd(const char *name, enum command_class theclass, int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
struct cmd_list_element * add_prefix_cmd(const char *name, enum command_class theclass, cmd_simple_func_ftype *fun, const char *doc, struct cmd_list_element **subcommands, int allow_unknown, struct cmd_list_element **list)
set_show_commands add_setshow_boolean_cmd(const char *name, enum command_class theclass, bool *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
int cmd_simple_func_eq(struct cmd_list_element *cmd, cmd_simple_func_ftype *simple_func)
struct cmd_list_element * add_info(const char *name, cmd_simple_func_ftype *fun, const char *doc)
counted_command_line read_command_lines(const char *prompt_arg, int from_tty, int parse_commands, gdb::function_view< void(const char *)> validator)
std::shared_ptr< command_line > counted_command_line
cli_style_option function_name_style
cli_style_option file_name_style
cli_style_option metadata_style
void expression_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
void print_address(struct gdbarch *, CORE_ADDR, struct ui_file *)
struct value * evaluate_expression(struct expression *exp, struct type *expect_type)
LONGEST parse_and_eval_long(const char *exp)
CORE_ADDR parse_and_eval_address(const char *exp)
struct value * parse_and_eval(const char *exp)
std::unique_ptr< expression > expression_up
expression_up parse_exp_1(const char **, CORE_ADDR pc, const struct block *, int, innermost_block_tracker *=nullptr)
const struct frame_id null_frame_id
void select_frame(frame_info_ptr fi)
CORE_ADDR get_frame_pc(frame_info_ptr frame)
void reinit_frame_cache(void)
bool get_frame_pc_if_available(frame_info_ptr frame, CORE_ADDR *pc)
frame_info_ptr get_selected_frame(const char *message)
frame_info_ptr get_current_frame(void)
struct frame_id get_frame_id(frame_info_ptr fi)
void info_locals_command(const char *, int)
void info_args_command(const char *, int)
void print_stack_frame(frame_info_ptr, int print_level, enum print_what print_what, int set_current_sal)
const char * gdbarch_register_name(struct gdbarch *gdbarch, int regnr)
int gdbarch_addr_bit(struct gdbarch *gdbarch)
int gdbarch_num_regs(struct gdbarch *gdbarch)
int gdbarch_remote_register_number(struct gdbarch *gdbarch, int regno)
void gdbarch_virtual_frame_pointer(struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
struct type * init_vector_type(struct type *elt_type, int n)
struct type * check_typedef(struct type *type)
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t int status
void registers_info(const char *addr_exp, int fpregs)
struct inferior * current_inferior(void)
const struct language_defn * current_language
std::vector< symtab_and_line > decode_line_1(const location_spec *locspec, int flags, struct program_space *search_pspace, struct symtab *default_symtab, int default_line)
std::vector< symtab_and_line > decode_line_with_current_source(const char *string, int flags)
@ DECODE_LINE_FUNFIRSTLINE
location_spec_up string_to_location_spec(const char **stringp, const struct language_defn *language, symbol_name_match_type match_type)
std::unique_ptr< location_spec > location_spec_up
int mem_ranges_overlap(CORE_ADDR start1, int len1, CORE_ADDR start2, int len2)
void normalize_mem_ranges(std::vector< mem_range > *memory)
struct bound_minimal_symbol lookup_minimal_symbol(const char *name, const char *sfile, struct objfile *objf)
observable< const struct trace_state_variable * > tsv_created
observable< struct breakpoint * > breakpoint_modified
observable< const struct trace_state_variable * > tsv_modified
observable< const struct trace_state_variable * > tsv_deleted
observable< int, int > traceframe_changed
void output_command(const char *exp, int from_tty)
CORE_ADDR regcache_read_pc(struct regcache *regcache)
int register_size(struct gdbarch *gdbarch, int regnum)
struct regcache * get_current_regcache(void)
void registers_changed(void)
const char * symtab_to_fullname(struct symtab *s)
const char * symtab_to_filename_for_display(struct symtab *symtab)
void iterate_over_block_local_vars(const struct block *block, iterate_over_block_arg_local_vars_cb cb)
void iterate_over_block_arg_vars(const struct block *b, iterate_over_block_arg_local_vars_cb cb)
const block * superblock() const
CORE_ADDR entry_pc() const
symbol * function() const
CORE_ADDR value_address() const
struct minimal_symbol * minsym
bp_location_range locations() const
gdb::unique_xmalloc_ptr< char > cond_string
counted_command_line body_list_0
counted_command_line body_list_1
struct command_line * next
gdb::unique_xmalloc_ptr< void > value
const char * natural_name() const
const char * print_name() const
const char * linkage_name() const
scoped_restore_current_traceframe()
const block * value_block() const
address_class aclass() const
struct type * type() const
LONGEST value_longest() const
const gdb_byte * value_bytes() const
CORE_ADDR value_address() const
enum trace_stop_reason stop_reason
ULONGEST traceframe_usage
std::vector< gdb::unique_xmalloc_ptr< char[]> > cmd_strings
gdb::unique_xmalloc_ptr< char[]> cond_string
std::vector< gdb::unique_xmalloc_ptr< char[]> > step_actions
ULONGEST traceframe_usage
std::vector< gdb::unique_xmalloc_ptr< char[]> > actions
struct uploaded_tp * next
gdb::unique_xmalloc_ptr< char[]> at_string
gdb::unique_xmalloc_ptr< char[]> cond
struct uploaded_tsv * next
bool find_line_pc_range(struct symtab_and_line sal, CORE_ADDR *startptr, CORE_ADDR *endptr)
struct symtab_and_line find_pc_line(CORE_ADDR pc, int notcurrent)
#define SYMBOL_COMPUTED_OPS(symbol)
#define SYMBOL_REGISTER_OPS(symbol)
void target_dcache_invalidate(void)
std::vector< static_tracepoint_marker > target_static_tracepoint_markers_by_strid(const char *marker_id)
bool target_get_trace_state_variable_value(int tsv, LONGEST *val)
void target_set_circular_trace_buffer(int val)
void target_set_disconnected_tracing(int val)
int target_trace_find(trace_find_type type, int num, CORE_ADDR addr1, CORE_ADDR addr2, int *tpp)
void target_trace_start()
void target_get_tracepoint_status(breakpoint *tp, uploaded_tp *utp)
traceframe_info_up target_traceframe_info()
void target_trace_set_readonly_regions()
void target_download_tracepoint(bp_location *location)
void target_download_trace_state_variable(const trace_state_variable &tsv)
int target_get_trace_status(trace_status *ts)
gdb::optional< gdb::byte_vector > target_read_alloc(struct target_ops *ops, enum target_object object, const char *annex)
bool target_supports_string_tracing()
void target_set_trace_buffer_size(LONGEST val)
bool target_supports_enable_disable_tracepoint()
bool target_set_trace_notes(const char *user, const char *notes, const char *stopnotes)
bool may_insert_fast_tracepoints
@ TARGET_OBJECT_STATIC_TRACE_DATA
bool may_insert_tracepoints
static bool memrange_comp(const memrange &a, const memrange &b)
static const char hexchars[]
int get_tracepoint_number(void)
struct trace_state_variable * find_trace_state_variable(const char *name)
static int next_tsv_number
struct traceframe_info * get_traceframe_info(void)
struct trace_status * current_trace_status(void)
static void process_tracepoint_on_disconnect(void)
static void set_trace_user(const char *args, int from_tty, struct cmd_list_element *c)
static std::vector< trace_state_variable > tvariables
const char * stop_reason_names[]
static void finalize_tracepoint_aexpr(struct agent_expr *aexpr)
void parse_trace_status(const char *line, struct trace_status *ts)
void disconnect_tracing(void)
static void info_tvariables_command(const char *args, int from_tty)
static void actions_command(const char *args, int from_tty)
static void info_static_tracepoint_markers_command(const char *arg, int from_tty)
static void set_disconnected_tracing(const char *args, int from_tty, struct cmd_list_element *c)
static bool circular_trace_buffer
static const struct gdb_xml_attribute tvar_attributes[]
int get_traceframe_number(void)
static void tdump_command(const char *args, int from_tty)
static void while_stepping_pseudocommand(const char *args, int from_tty)
static void set_traceframe_context(frame_info_ptr trace_frame)
void save_trace_state_variables(struct ui_file *fp)
static std::string trace_notes
static void set_traceframe_num(int num)
struct trace_state_variable * find_trace_state_variable_by_number(int number)
cmd_list_element * while_stepping_cmd_element
void check_trace_running(struct trace_status *status)
static int trace_buffer_size
static void tfind_range_command(const char *args, int from_tty)
void encode_actions_rsp(struct bp_location *tloc, std::vector< std::string > *tdp_actions, std::vector< std::string > *stepping_actions)
static void tfind_command_1(const char *args, int from_tty)
struct uploaded_tp * get_uploaded_tp(int num, ULONGEST addr, struct uploaded_tp **utpp)
static void tstatus_command(const char *args, int from_tty)
static int traceframe_number
static const struct gdb_xml_element traceframe_info_elements[]
void query_if_trace_running(int from_tty)
static struct trace_state_variable * create_tsv_from_upload(struct uploaded_tsv *utsv)
void parse_tsv_definition(const char *line, struct uploaded_tsv **utsvp)
static void tfind_command(const char *args, int from_tty)
void validate_trace_state_variable_name(const char *name)
static void traceframe_info_start_memory(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, std::vector< gdb_xml_value > &attributes)
static void teval_pseudocommand(const char *args, int from_tty)
static void print_one_static_tracepoint_marker(int count, const static_tracepoint_marker &marker)
static std::string trace_stop_notes
static void delete_trace_state_variable(const char *name)
static const struct gdb_xml_element traceframe_info_children[]
static void delete_trace_variable_command(const char *args, int from_tty)
void stop_tracing(const char *note)
static void tfind_tracepoint_command(const char *args, int from_tty)
struct uploaded_tsv * get_uploaded_tsv(int num, struct uploaded_tsv **utsvp)
static void memrange_sortmerge(std::vector< memrange > &memranges)
void start_tracing(const char *notes)
static bool disconnected_tracing
static const struct gdb_xml_attribute memory_attributes[]
static void set_trace_notes(const char *args, int from_tty, struct cmd_list_element *c)
static int cond_string_is_same(char *str1, char *str2)
static int tracepoint_number
void tfind_1(enum trace_find_type type, int num, CORE_ADDR addr1, CORE_ADDR addr2, int from_tty)
struct trace_state_variable * create_trace_state_variable(const char *name)
static void set_tracepoint_num(int num)
static void encode_actions_1(struct command_line *action, struct bp_location *tloc, int frame_reg, LONGEST frame_offset, struct collection_list *collect, struct collection_list *stepping_list)
static void tfind_outside_command(const char *args, int from_tty)
static void set_circular_trace_buffer(const char *args, int from_tty, struct cmd_list_element *c)
static void tfind_line_command(const char *args, int from_tty)
void trace_reset_local_state(void)
static counted_command_line all_tracepoint_actions(struct breakpoint *)
void parse_static_tracepoint_marker_definition(const char *line, const char **pp, static_tracepoint_marker *marker)
static void set_trace_stop_notes(const char *args, int from_tty, struct cmd_list_element *c)
static const struct internalvar_funcs sdata_funcs
int traceframe_available_memory(std::vector< mem_range > *result, CORE_ADDR memaddr, ULONGEST len)
static void report_agent_reqs_errors(struct agent_expr *aexpr)
struct bp_location * get_traceframe_location(int *stepping_frame_p)
static void traceframe_info_start_tvar(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, std::vector< gdb_xml_value > &attributes)
void _initialize_tracepoint()
std::string default_collect
void tvariables_info_1(void)
void merge_uploaded_tracepoints(struct uploaded_tp **uploaded_tps)
int encode_source_string(int tpnum, ULONGEST addr, const char *srctype, const char *src, char *buf, int buf_size)
void trace_status_mi(int on_stop)
static void trace_variable_command(const char *args, int from_tty)
static void info_scope_command(const char *args_in, int from_tty)
traceframe_info_up parse_traceframe_info(const char *tframe_info)
static void end_actions_pseudocommand(const char *args, int from_tty)
static void tstop_command(const char *args, int from_tty)
void free_uploaded_tps(struct uploaded_tp **utpp)
static struct bp_location * find_matching_tracepoint_location(struct uploaded_tp *utp)
const char * decode_agent_options(const char *exp, int *trace_string)
static struct cmd_list_element * tfindlist
#define MAX_AGENT_EXPR_LEN
static char * mem2hex(gdb_byte *, char *, int)
void parse_tracepoint_status(const char *p, struct breakpoint *bp, struct uploaded_tp *utp)
void set_current_traceframe(int num)
static void tfind_pc_command(const char *args, int from_tty)
void parse_tracepoint_definition(const char *line, struct uploaded_tp **utpp)
static traceframe_info_up current_traceframe_info
static void tfind_start_command(const char *args, int from_tty)
void free_uploaded_tsvs(struct uploaded_tsv **utsvp)
static void set_trace_buffer_size(const char *args, int from_tty, struct cmd_list_element *c)
void encode_actions(struct bp_location *tloc, struct collection_list *tracepoint_list, struct collection_list *stepping_list)
void merge_uploaded_trace_state_variables(struct uploaded_tsv **uploaded_tsvs)
static void tstart_command(const char *args, int from_tty)
void validate_actionline(const char *line, struct breakpoint *b)
static std::string trace_user
static void clear_traceframe_info(void)
static struct trace_status trace_status
static void tfind_end_command(const char *args, int from_tty)
static void trace_dump_actions(struct command_line *action, int stepping_actions, int stepping_frame, int from_tty)
static void collect_pseudocommand(const char *args, int from_tty)
static struct trace_state_variable * find_matching_tsv(struct uploaded_tsv *utsv)
static struct value * sdata_make_value(struct gdbarch *gdbarch, struct internalvar *var, void *ignore)
std::unique_ptr< traceframe_info > traceframe_info_up
@ trace_stop_reason_unknown
int user_reg_map_name_to_regnum(struct gdbarch *gdbarch, const char *name, int len)
int query(const char *ctlstr,...)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
void gdb_printf(struct ui_file *stream, const char *format,...)
void get_user_print_options(struct value_print_options *opts)
void set_internalvar_string(struct internalvar *var, const char *string)
void clear_internalvar(struct internalvar *var)
struct value * allocate_value(struct type *type)
struct internalvar * create_internalvar_type_lazy(const char *name, const struct internalvar_funcs *funcs, void *data)
CORE_ADDR value_address(const struct value *value)
gdb::array_view< gdb_byte > value_contents_raw(struct value *value)
struct internalvar * lookup_internalvar(const char *name)
LONGEST value_as_long(struct value *val)
void set_internalvar_integer(struct internalvar *var, LONGEST l)
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 gdb_xml_value * xml_find_attribute(std::vector< gdb_xml_value > &attributes, const char *name)
ULONGEST gdb_xml_parse_ulongest(struct gdb_xml_parser *parser, const char *value)
gdb_xml_attribute_handler gdb_xml_parse_attr_ulongest