54#include "gdbsupport/filestuff.h"
55#include "gdbsupport/rsp-low.h"
61#include "gdbsupport/buildargv.h"
74#define MAX_AGENT_EXPR_LEN 184
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."));
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."));
639 p = skip_spaces (line);
650 error (_(
"`%s' is not a tracepoint action, or is ambiguous."), p);
654 int trace_string = 0;
666 if (0 == strncasecmp (
"reg", p + 1, 3)
667 || 0 == strncasecmp (
"arg", p + 1, 3)
668 || 0 == strncasecmp (
"loc", p + 1, 3)
669 || 0 == strncasecmp (
"_ret", p + 1, 4)
670 || 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++ ==
',');
746 while (p && *p++ ==
',');
756 error (_(
"while-stepping step count `%s' is malformed."), line);
764 error (_(
"`%s' is not a supported tracepoint action."), line);
794 if (!memranges.empty ())
798 std::sort (memranges.begin (), memranges.end (),
memrange_comp);
800 for (a = 0, b = 1; b < memranges.size (); b++)
804 if (memranges[a].
type == memranges[b].
type
805 && memranges[b].start <= memranges[a].end)
807 if (memranges[b].end > memranges[a].end)
808 memranges[a].end = memranges[b].end;
813 memranges[a] = memranges[b];
815 memranges.resize (a + 1);
837 for (
int ndx1 = 0; ndx1 < aexpr->
reg_mask.size (); ndx1++)
862 if (remote_regno < 0)
863 error (_(
"Can't collect register %d"), regno);
881 if (aexpr->buf.size () > 0)
890 int type, bfd_signed_vma base,
891 unsigned long len, CORE_ADDR scope)
910 long frame_regno,
long frame_offset,
916 bfd_signed_vma offset;
917 int treat_as_expr = 0;
923 gdb_printf (
"%s: don't know symbol class %d\n",
927 gdb_printf (
"constant %s (value %s) will not be collected.\n",
934 gdb_printf (
"LOC_STATIC %s: collect %ld bytes at %s.\n",
940 if (sym->
type ()->
code () == TYPE_CODE_STRUCT)
952 if (sym->
type ()->
code () == TYPE_CODE_FLT &&
957 gdb_printf (
"Sorry, don't know how to do LOC_REF_ARG yet.\n");
965 gdb_printf (
"LOC_LOCAL %s: Collect %ld bytes at offset %s"
966 " from frame ptr reg %d\n", sym->
print_name (), len,
976 gdb_printf (
"LOC_REGPARM_ADDR %s: Collect %ld bytes at offset %s"
987 gdb_printf (
"LOC_LOCAL %s: Collect %ld bytes at offset %s"
988 " from frame ptr reg %d\n", sym->
print_name (), len,
999 gdb_printf (
"%s has been optimized out of existence.\n",
1019 gdb_printf (
"%s has been optimized out of existence.\n",
1043 long frame_regno,
long frame_offset,
int type,
1049 auto do_collect_symbol = [&] (
const char *print_name,
1053 frame_offset, pc, trace_string);
1063 warning (_(
"Can't collect locals; "
1064 "no symbol table info available.\n"));
1070 warning (_(
"No locals found in scope."));
1078 warning (_(
"Can't collect args; no symbol table info available."));
1084 warning (_(
"No args found in scope."));
1097 : m_strace_data (false)
1099 int max_remote_regno = 0;
1105 if (remote_regno >= 0 && remote_regno > max_remote_regno)
1106 max_remote_regno = remote_regno;
1117std::vector<std::string>
1120 gdb::char_vector temp_buf (2048);
1125 std::vector<std::string> str_list;
1130 gdb_printf (
"\nCollecting static trace data\n");
1131 end = temp_buf.data ();
1133 str_list.emplace_back (temp_buf.data (), end - temp_buf.data ());
1142 gdb_printf (
"\nCollecting registers (mask): 0x");
1146 std::size_t new_size = (i + 1) * 2 + 2;
1147 if (new_size > temp_buf.size ())
1148 temp_buf.resize (new_size);
1150 end = temp_buf.data ();
1162 str_list.emplace_back (temp_buf.data ());
1168 for (i = 0, count = 0, end = temp_buf.data ();
1183 str_list.emplace_back (temp_buf.data (), count);
1185 end = temp_buf.data ();
1189 bfd_signed_vma length
1197 sprintf (end,
"M-1,%s,%lX", phex_nz (
m_memranges[i].start, 0),
1201 phex_nz (
m_memranges[i].start, 0), (
long) length);
1204 count += strlen (end);
1205 end = temp_buf.data () + count;
1208 for (i = 0; i <
m_aexprs.size (); i++)
1213 str_list.emplace_back (temp_buf.data (), count);
1215 end = temp_buf.data ();
1217 sprintf (end,
"X%08X,", (
int)
m_aexprs[i]->buf.size ());
1221 end += 2 * bin2hex (
m_aexprs[i]->buf.data (), end,
1223 count += 2 *
m_aexprs[i]->buf.size ();
1228 str_list.emplace_back (temp_buf.data (), count);
1230 end = temp_buf.data ();
1254 LONGEST frame_offset,
1258 const char *action_exp;
1260 struct value *tempval;
1263 for (; action; action = action->
next)
1266 action_exp = action->
line;
1267 action_exp = skip_spaces (action_exp);
1271 error (_(
"Bad action list item: %s"), action_exp);
1275 int trace_string = 0;
1277 if (*action_exp ==
'/')
1283 action_exp = skip_spaces (action_exp);
1285 if (0 == strncasecmp (
"$reg", action_exp, 4))
1296 if (remote_regno >= 0)
1299 action_exp = strchr (action_exp,
',');
1301 else if (0 == strncasecmp (
"$arg", action_exp, 4))
1309 action_exp = strchr (action_exp,
',');
1311 else if (0 == strncasecmp (
"$loc", action_exp, 4))
1319 action_exp = strchr (action_exp,
',');
1321 else if (0 == strncasecmp (
"$_ret", action_exp, 5))
1334 action_exp = strchr (action_exp,
',');
1336 else if (0 == strncasecmp (
"$_sdata", action_exp, 7))
1339 action_exp = strchr (action_exp,
',');
1345 const char *exp_start = action_exp;
1350 switch (exp->first_opcode ())
1355 = (gdb::checked_static_cast<expr::register_operation *>
1362 internal_error (_(
"Register $%s not available"),
1374 tempval = exp->evaluate ();
1377 = (gdb::checked_static_cast<expr::unop_memval_operation *>
1394 = (gdb::checked_static_cast<expr::var_value_operation *>
1426 while (action_exp && *action_exp++ ==
',');
1433 action_exp = skip_spaces (action_exp);
1450 while (action_exp && *action_exp++ ==
',');
1457 gdb_assert (stepping_list);
1460 frame_offset, stepping_list, NULL);
1463 error (_(
"Invalid tracepoint command '%s'"), action->
line);
1476 LONGEST frame_offset;
1479 tloc->
address, &frame_reg, &frame_offset);
1484 tracepoint_list, stepping_list);
1486 frame_reg, frame_offset, tracepoint_list, stepping_list);
1488 tracepoint_list->
finish ();
1489 stepping_list->
finish ();
1496 std::vector<std::string> *tdp_actions,
1497 std::vector<std::string> *stepping_actions)
1503 *tdp_actions = tracepoint_list.
stringify ();
1504 *stepping_actions = stepping_list.
stringify ();
1510 m_aexprs.push_back (std::move (aexpr));
1516 int has_pending_p = 0;
1522 if (!b.has_locations ())
1531 if (loc1.shlib_disabled)
1544 warning (_(
"Pending tracepoints will not be resolved while"
1545 " GDB is disconnected\n"));
1562 int any_enabled = 0, num_to_download = 0;
1569 error (_(
"No tracepoints defined, not starting trace"));
1581 warning (_(
"May not insert %stracepoints, skipping tracepoint %d"),
1588 warning (_(
"No tracepoints enabled"));
1593 error (_(
"No tracepoints enabled, not starting trace"));
1597 if (num_to_download <= 0)
1598 error (_(
"No tracepoints that may be downloaded, not starting trace"));
1604 tracepoint &t = gdb::checked_static_cast<tracepoint &> (b);
1605 int bp_location_downloaded = 0;
1622 gdb_assert (!
loc.inserted);
1627 bp_location_downloaded = 1;
1633 if (
loc.probe.prob != NULL)
1634 loc.probe.prob->set_semaphore (
loc.probe.objfile,
loc.gdbarch);
1636 if (bp_location_downloaded)
1657 warning (_(
"Target does not support trace user/notes, info ignored"));
1681 && !
query (_(
"A trace is running already. Start a new run? ")))
1682 error (_(
"New trace run not started."));
1697 error (_(
"Trace is not running."));
1722 if (
loc.probe.prob != NULL)
1723 loc.probe.prob->clear_semaphore (
loc.probe.objfile,
loc.gdbarch);
1733 warning (_(
"Target does not support trace notes, note ignored"));
1754 gdb_printf (_(
"Trace can not be run on this target.\n"));
1761 gdb_printf (_(
"Run/stop status is unknown.\n"));
1765 gdb_printf (_(
"Trace is running on the target.\n"));
1772 gdb_printf (_(
"No trace has been run on the target.\n"));
1776 gdb_printf (_(
"Trace stopped by a tstop command (%s).\n"),
1779 gdb_printf (_(
"Trace stopped by a tstop command.\n"));
1782 gdb_printf (_(
"Trace stopped because the buffer was full.\n"));
1785 gdb_printf (_(
"Trace stopped because of disconnection.\n"));
1788 gdb_printf (_(
"Trace stopped by tracepoint %d.\n"),
1794 "error (%s, tracepoint %d).\n"),
1797 gdb_printf (_(
"Trace stopped by an error (%s).\n"),
1801 gdb_printf (_(
"Trace stopped for an unknown reason.\n"));
1804 gdb_printf (_(
"Trace stopped for some other reason (%d).\n"),
1814 "frames (of %d created total).\n"),
1819 gdb_printf (_(
"Collected %d trace frames.\n"),
1827 gdb_printf (_(
"Trace buffer has %d bytes of %d bytes free"),
1837 gdb_printf (_(
"Trace buffer has %d bytes free.\n"),
1842 gdb_printf (_(
"Trace will continue if GDB disconnects.\n"));
1844 gdb_printf (_(
"Trace will stop if GDB disconnects.\n"));
1847 gdb_printf (_(
"Trace buffer is circular.\n"));
1857 gdb_printf (_(
"Looking at trace frame %d, tracepoint %d.\n"),
1860 gdb_printf (_(
"Not looking at any trace frame.\n"));
1870 gdb_printf (_(
"Trace started at %ld.%06ld secs, stopped %ld.%06ld secs later.\n"),
1873 (
long int) (run_time / 1000000),
1874 (
long int) (run_time % 1000000));
1877 gdb_printf (_(
"Trace started at %ld.%06ld secs.\n"),
1882 gdb_printf (_(
"Trace stopped at %ld.%06ld secs.\n"),
1889 tracepoint *t = gdb::checked_static_cast<tracepoint *> (&b);
2000 xsnprintf (buf,
sizeof buf,
"%ld.%06ld",
2004 xsnprintf (buf,
sizeof buf,
"%ld.%06ld",
2038 if (!
query (_(
"Trace is running and will "
2039 "continue after detach; detach anyway? ")))
2040 error (_(
"Not confirmed."));
2044 if (!
query (_(
"Trace is running but will "
2045 "stop on detach; detach anyway? ")))
2046 error (_(
"Not confirmed."));
2068 CORE_ADDR addr1, CORE_ADDR addr2,
2071 int target_frameno = -1, target_tracept = -1;
2091 && target_frameno == -1)
2095 else if (target_frameno == -1)
2119 error (_(
"Target failed to find requested trace frame."));
2144 if (target_frameno == -1)
2161 gdb_printf (_(
"Found trace frame %d, tracepoint %d\n"),
2170 gdb_printf (_(
"No longer looking at any trace frame\n"));
2205 error (_(
"May not look at trace frames while trace is running."));
2230 if (args == 0 || *args == 0)
2237 else if (0 == strcmp (args,
"-"))
2240 error (_(
"not debugging trace buffer"));
2242 error (_(
"already at start of trace buffer"));
2247 else if (0 == strcmp (args,
"-1"))
2253 error (_(
"invalid input (%d is less than zero)"), frameno);
2286 if (args == 0 || *args == 0)
2303 if (args == 0 || *args == 0)
2306 error (_(
"No current tracepoint -- please supply an argument."));
2337 if (args == 0 || *args == 0)
2343 std::vector<symtab_and_line> sals
2349 error (_(
"No line number information available."));
2351 CORE_ADDR start_pc, end_pc;
2354 if (start_pc == end_pc)
2367 && start_pc != end_pc)
2368 gdb_printf (
"Attempting to find line %d instead.\n",
2371 error (_(
"Cannot find a good line."));
2379 error (_(
"Line number %d is out of range for \"%s\"."),
2394 static CORE_ADDR start, stop;
2399 if (args == 0 || *args == 0)
2401 gdb_printf (
"Usage: tfind range STARTADDR, ENDADDR\n");
2405 if (0 != (tmp = strchr (args,
',')))
2407 std::string start_addr (args, tmp);
2409 tmp = skip_spaces (tmp);
2426 CORE_ADDR start, stop;
2431 error (_(
"May not look at trace frames while trace is running."));
2433 if (args == 0 || *args == 0)
2435 gdb_printf (
"Usage: tfind outside STARTADDR, ENDADDR\n");
2439 if (0 != (tmp = strchr (args,
',')))
2441 std::string start_addr (args, tmp);
2443 tmp = skip_spaces (tmp);
2462 const char *symname;
2463 const char *save_args = args_in;
2467 const char *args = args_in;
2469 if (args == 0 || *args == 0)
2470 error (_(
"requires an argument (function, "
2471 "line or *addr) to define a scope"));
2475 std::vector<symtab_and_line> sals
2498 symname = sym->print_name ();
2499 if (symname == NULL || *symname ==
'\0')
2512 switch (sym->aclass ())
2522 plongest (sym->value_longest ()),
2523 hex_string (sym->value_longest ()));
2528 for (j = 0; j < sym->type ()->length (); j++)
2529 gdb_printf (
" %02x", (
unsigned) sym->value_bytes ()[j]);
2532 gdb_printf (
"in static storage at address ");
2546 if (sym->is_argument ())
2550 gdb_printf (
"a local variable in register $%s",
2554 gdb_printf (
"an argument at stack/frame offset %s",
2555 plongest (sym->value_longest ()));
2558 gdb_printf (
"a local variable at frame offset %s",
2559 plongest (sym->value_longest ()));
2562 gdb_printf (
"a reference argument at offset %s",
2563 plongest (sym->value_longest ()));
2569 gdb_printf (
"the address of an argument, in register $%s",
2583 sym->value_block ()->entry_pc ()));
2601 gdb_assert_not_reached (
"LOC_COMPUTED variable missing a method");
2617 gdb_printf (
"Scope for %s contains no locals or arguments.\n",
2629 int stepping_actions,
int stepping_frame,
2632 const char *action_exp, *next_comma;
2634 for (; action != NULL; action = action->
next)
2639 action_exp = action->
line;
2640 action_exp = skip_spaces (action_exp);
2645 if (*action_exp ==
'#')
2650 error (_(
"Bad action list item: %s"), action_exp);
2656 1, stepping_frame, from_tty);
2666 if (stepping_frame == stepping_actions)
2668 int trace_string = 0;
2670 if (*action_exp ==
'/')
2676 if (*action_exp ==
',')
2678 action_exp = skip_spaces (action_exp);
2680 next_comma = strchr (action_exp,
',');
2682 if (0 == strncasecmp (action_exp,
"$reg", 4))
2684 else if (0 == strncasecmp (action_exp,
"$_ret", 5))
2686 else if (0 == strncasecmp (action_exp,
"$loc", 4))
2688 else if (0 == strncasecmp (action_exp,
"$arg", 4))
2692 std::string contents;
2693 const char *exp = action_exp;
2694 if (next_comma != NULL)
2696 size_t len = next_comma - action_exp;
2697 contents = std::string (action_exp, len);
2698 exp = contents.c_str ();
2705 action_exp = next_comma;
2707 while (action_exp && *action_exp ==
',');
2724 error (_(
"No current trace frame."));
2729 error (_(
"No known tracepoint matches 'current' tracepoint #%d."),
2744 *stepping_frame_p = 0;
2750 *stepping_frame_p = 1;
2768 gdb::unique_xmalloc_ptr<char> default_collect_line
2773 default_collect_line.release ()),
2785 int stepping_frame = 0;
2791 gdb_printf (
"Data collected at tracepoint %d, trace frame %d:\n",
2800 tracepoint *t = gdb::checked_static_cast<tracepoint *> (
loc->owner);
2815 const char *srctype,
const char *src,
2816 char *buf,
int buf_size)
2818 if (80 + strlen (srctype) > buf_size)
2819 error (_(
"Buffer too small for source encoding"));
2820 sprintf (buf,
"%x:%s:%s:%x:%x:",
2821 tpnum, phex_nz (addr,
sizeof (addr)),
2822 srctype, 0, (
int) strlen (src));
2823 if (strlen (buf) + strlen (src) * 2 >= buf_size)
2824 error (_(
"Source string too long for buffer"));
2825 bin2hex ((gdb_byte *) src, buf + strlen (buf), strlen (src));
2862 warning (_(
"Target does not support trace notes, user ignored"));
2874 warning (_(
"Target does not support trace notes, note ignored"));
2886 warning (_(
"Target does not support trace notes, stop note ignored"));
2918 warning (_(
"could not change traceframe"));
2941 for (utp = *utpp; utp; utp = utp->
next)
2961 next_one = (*utpp)->
next;
2975 for (utsv = *utsvp; utsv; utsv = utsv->
next)
2981 utsv->
next = *utsvp;
2994 next_one = (*utsvp)->
next;
3007 if (str1 == NULL || str2 == NULL)
3008 return (str1 == str2);
3010 return (strcmp (str1, str2) == 0);
3023 tracepoint &t = gdb::checked_static_cast<tracepoint &> (b);
3025 if (b.type == utp->
type
3051 std::vector<breakpoint *> modified_tp;
3054 for (utp = *uploaded_tps; utp; utp = utp->
next)
3066 t = gdb::checked_static_cast<tracepoint *> (
loc->owner);
3067 gdb_printf (_(
"Assuming tracepoint %d is same "
3068 "as target's tracepoint %d at %s.\n"),
3078 if (b ==
loc->owner)
3084 modified_tp.push_back (
loc->owner);
3091 "target's tracepoint %d at %s.\n"),
3095 gdb_printf (_(
"Failed to create tracepoint for target's "
3096 "tracepoint %d at %s, skipping it.\n"),
3130 const char *namebase;
3137 namebase = utsv->
name;
3143 buf = string_printf (
"%s_%d", namebase, try_num++);
3149 buf = string_printf (
"%s_%d", namebase, try_num++);
3175 for (utsv = *uploaded_tsvs; utsv; utsv = utsv->
next)
3181 gdb_printf (_(
"Assuming trace state variable $%s "
3182 "is same as target's variable %d.\n"),
3189 gdb_printf (_(
"Created trace state variable "
3190 "$%s for target's variable %d.\n"),
3201 highest = std::max (tsv.number, highest);
3205 if (tsv.number == 0)
3206 tsv.number = highest++;
3217 const char *p = line, *p1, *p2, *p3, *p_temp;
3240 p1 = strchr (p,
':');
3242 error (_(
"Malformed trace status, at %s\n\
3243Status line: '%s'\n"), p, line);
3244 p3 = strchr (p,
';');
3246 p3 = p + strlen (p);
3249 p = unpack_varlen_hex (++p1, &val);
3254 p = unpack_varlen_hex (++p1, &val);
3260 p = unpack_varlen_hex (++p1, &val);
3266 p2 = strchr (++p1,
':');
3275 end = hex2bin (p1, (gdb_byte *) ts->
stop_desc, (p2 - p1) / 2);
3281 p = unpack_varlen_hex (++p2, &val);
3286 p = unpack_varlen_hex (++p1, &val);
3291 p2 = strchr (++p1,
':');
3295 end = hex2bin (p1, (gdb_byte *) ts->
stop_desc, (p2 - p1) / 2);
3301 p = unpack_varlen_hex (++p2, &val);
3305 else if (strncmp (p,
"tframes", p1 - p) == 0)
3307 p = unpack_varlen_hex (++p1, &val);
3310 else if (strncmp (p,
"tcreated", p1 - p) == 0)
3312 p = unpack_varlen_hex (++p1, &val);
3315 else if (strncmp (p,
"tfree", p1 - p) == 0)
3317 p = unpack_varlen_hex (++p1, &val);
3320 else if (strncmp (p,
"tsize", p1 - p) == 0)
3322 p = unpack_varlen_hex (++p1, &val);
3325 else if (strncmp (p,
"disconn", p1 - p) == 0)
3327 p = unpack_varlen_hex (++p1, &val);
3330 else if (strncmp (p,
"circular", p1 - p) == 0)
3332 p = unpack_varlen_hex (++p1, &val);
3335 else if (strncmp (p,
"starttime", p1 - p) == 0)
3337 p = unpack_varlen_hex (++p1, &val);
3340 else if (strncmp (p,
"stoptime", p1 - p) == 0)
3342 p = unpack_varlen_hex (++p1, &val);
3345 else if (strncmp (p,
"username", p1 - p) == 0)
3349 end = hex2bin (p1, (gdb_byte *) ts->
user_name, (p3 - p1) / 2);
3353 else if (strncmp (p,
"notes", p1 - p) == 0)
3357 end = hex2bin (p1, (gdb_byte *) ts->
notes, (p3 - p1) / 2);
3358 ts->
notes[end] =
'\0';
3364 p_temp = strchr (p1 + 1,
';');
3380 p = unpack_varlen_hex (p, &uval);
3385 p = unpack_varlen_hex (p + 1, &uval);
3401 ULONGEST num, addr, step, pass, orig_size, xlen, start;
3404 const char *srctype;
3412 p = unpack_varlen_hex (p, &num);
3414 p = unpack_varlen_hex (p, &
addr);
3418 gdb::unique_xmalloc_ptr<char[]>
cond;
3422 p = unpack_varlen_hex (p, &
step);
3424 p = unpack_varlen_hex (p, &
pass);
3444 p = unpack_varlen_hex (p, &xlen);
3447 strncpy (&
cond[0], p, 2 * xlen);
3448 cond[2 * xlen] =
'\0';
3452 warning (_(
"Unrecognized char '%c' in tracepoint "
3453 "definition, skipping rest"), *p);
3462 else if (piece ==
'A')
3465 utp->
actions.emplace_back (xstrdup (p));
3467 else if (piece ==
'S')
3472 else if (piece ==
'Z')
3477 p = strchr (p,
':');
3479 p = unpack_varlen_hex (p, &start);
3481 p = unpack_varlen_hex (p, &xlen);
3484 buf = (
char *) alloca (strlen (line));
3486 end = hex2bin (p, (gdb_byte *) buf, strlen (p) / 2);
3489 if (startswith (srctype,
"at:"))
3491 else if (startswith (srctype,
"cond:"))
3493 else if (startswith (srctype,
"cmd:"))
3496 else if (piece ==
'V')
3506 warning (_(
"Unrecognized tracepoint piece '%c', ignoring"), piece);
3518 ULONGEST num, initval, builtin;
3522 buf = (
char *) alloca (strlen (line));
3525 p = unpack_varlen_hex (p, &num);
3527 p = unpack_varlen_hex (p, &initval);
3529 p = unpack_varlen_hex (p, &
builtin);
3531 end = hex2bin (p, (gdb_byte *) buf, strlen (p) / 2);
3537 utsv->
name = xstrdup (buf);
3549 const char *p, *endp;
3553 p = unpack_varlen_hex (p, &addr);
3557 marker->
address = (CORE_ADDR) addr;
3559 endp = strchr (p,
':');
3561 error (_(
"bad marker definition: %s"), line);
3563 marker->
str_id = hex2str (p, (endp - p) / 2);
3570 endp = strchr (p,
',');
3571 if (endp !=
nullptr)
3574 hex_len = strlen (p);
3576 marker->
extra = hex2str (p, hex_len / 2);
3595 std::vector<breakpoint *> tracepoints
3607 !tracepoints.empty () ?
'y' :
'n');
3610 int wrap_indent = 35;
3616 const char *extra_field_indent =
" ";
3624 uiout->
text (
"in ");
3628 uiout->
text (
" at ");
3658 uiout->
text (extra_field_indent);
3659 uiout->
text (_(
"Data: \""));
3661 uiout->
text (
"\"\n");
3663 if (!tracepoints.empty ())
3670 uiout->
text (extra_field_indent);
3671 uiout->
text (_(
"Probed by static tracepoints: "));
3672 for (ix = 0; ix < tracepoints.size (); ix++)
3677 uiout->
field_signed (
"tracepoint-id", tracepoints[ix]->number);
3682 uiout->
field_signed (
"number-of-tracepoints", tracepoints.size ());
3692 std::vector<static_tracepoint_marker> markers
3702 "StaticTracepointMarkersTable");
3717 for (
int i = 0; i < markers.size (); i++)
3731static struct value *
3736 gdb::optional<gdb::byte_vector> buf
3748 memcpy (v->
contents_raw ().data (), buf->data (), buf->size ());
3755#if !defined(HAVE_LIBEXPAT)
3760 static int have_warned;
3765 warning (_(
"Can not parse XML trace frame info; XML support "
3766 "was disabled at compile time"));
3779traceframe_info_start_memory (
struct gdb_xml_parser *parser,
3785 ULONGEST *start_p, *length_p;
3792 info->memory.emplace_back (*start_p, *length_p);
3798traceframe_info_start_tvar (
struct gdb_xml_parser *parser,
3804 const char *id_attrib
3808 info->tvars.push_back (
id);
3825 {
"memory", memory_attributes, NULL,
3827 traceframe_info_start_memory, NULL },
3828 {
"tvar", tvar_attributes, NULL,
3830 traceframe_info_start_tvar, NULL },
3848 "traceframe-info.dtd", traceframe_info_elements,
3849 tframe_info, result.get ()) == 0)
3878 CORE_ADDR memaddr, ULONGEST len)
3889 ULONGEST lo1, hi1, lo2, hi2;
3892 hi1 = memaddr + len;
3895 hi2 = r.start + r.length;
3897 CORE_ADDR start = std::max (lo1, lo2);
3898 int length = std::min (hi1, hi2) - start;
3900 result->emplace_back (start, length);
3938 _(
"List the variables local to a scope."));
3941 _(
"Tracing of program execution without stopping the program."),
3945 _(
"Print everything collected at the current tracepoint."));
3948Define a trace state variable.\n\
3949Argument is a $-prefixed name, optionally followed\n\
3950by '=' and an expression that sets the initial value\n\
3951at the start of tracing."));
3955Delete one or more trace state variables.\n\
3956Arguments are the names of the variables to delete.\n\
3957If no arguments are supplied, delete all variables."), &
deletelist);
3961Status of trace state variables and their values."));
3963 add_info (
"static-tracepoint-markers",
3965List target static tracepoints markers."));
3968Select a trace frame.\n\
3969No argument means forward by one frame; '-' means backward by one frame."),
3973Select a trace frame whose PC is outside the given range (exclusive).\n\
3974Usage: tfind outside ADDR1, ADDR2"),
3978Select a trace frame whose PC is in the given range (inclusive).\n\
3979Usage: tfind range ADDR1, ADDR2"),
3983Select a trace frame by source line.\n\
3984Argument can be a line number (with optional source file),\n\
3985a function name, or '*' followed by an address.\n\
3986Default argument is 'the next source line that was traced'."),
3990Select a trace frame by tracepoint number.\n\
3991Default is the tracepoint for the current trace frame."),
3995Select a trace frame by PC.\n\
3996Default is the current PC, or the PC of the current trace frame."),
4001De-select any trace frame and resume 'live' debugging."), &
tfindlist);
4006 _(
"Select the first trace frame in the trace buffer."),
4010 _(
"Display the status of the current trace data collection."));
4013Stop trace data collection.\n\
4014Usage: tstop [NOTES]...\n\
4015Any arguments supplied are recorded with the trace as a stop reason and\n\
4016reported by tstatus (if the target supports trace notes)."));
4019Start trace data collection.\n\
4020Usage: tstart [NOTES]...\n\
4021Any arguments supplied are recorded with the trace as a note and\n\
4022reported by tstatus (if the target supports trace notes)."));
4025Ends a list of commands or actions.\n\
4026Several GDB commands allow you to enter a list of commands or actions.\n\
4027Entering \"end\" on a line by itself is the normal way to terminate\n\
4029Note: the \"end\" command cannot be used at the gdb prompt."));
4033Specify single-stepping behavior at a tracepoint.\n\
4034Argument is number of instructions to trace in single-step mode\n\
4035following the tracepoint. This command is normally followed by\n\
4036one or more \"collect\" commands, to specify what to collect\n\
4037while single-stepping.\n\n\
4038Note: this command can only be used in a tracepoint \"actions\" list."));
4044Specify one or more data items to be collected at a tracepoint.\n\
4045Accepts a comma-separated list of (one or more) expressions. GDB will\n\
4046collect all data (variables, registers) referenced by that expression.\n\
4047Also accepts the following special arguments:\n\
4048 $regs -- all registers.\n\
4049 $args -- all function arguments.\n\
4050 $locals -- all variables local to the block/function scope.\n\
4051 $_sdata -- static tracepoint data (ignored for non-static tracepoints).\n\
4052Note: this command can only be used in a tracepoint \"actions\" list."));
4055Specify one or more expressions to be evaluated at a tracepoint.\n\
4056Accepts a comma-separated list of (one or more) expressions.\n\
4057The result of each evaluation will be discarded.\n\
4058Note: this command can only be used in a tracepoint \"actions\" list."));
4061Specify the actions to be taken at a tracepoint.\n\
4062Tracepoint actions may include collecting of specified data,\n\
4063single-stepping, or enabling/disabling other tracepoints,\n\
4064depending on target's capabilities."));
4068Set the list of expressions to collect by default."), _(
"\
4069Show the list of expressions to collect by default."), NULL,
4075Set whether tracing continues after GDB disconnects."), _(
"\
4076Show whether tracing continues after GDB disconnects."), _(
"\
4077Use this to continue a tracing run even if GDB disconnects\n\
4078or detaches from the target. You can reconnect later and look at\n\
4079trace data collected in the meantime."),
4087Set target's use of circular trace buffer."), _(
"\
4088Show target's use of circular trace buffer."), _(
"\
4089Use this to make the trace buffer into a circular buffer,\n\
4090which will discard traceframes (oldest first) instead of filling\n\
4091up and stopping the trace run."),
4099Set requested size of trace buffer."), _(
"\
4100Show requested size of trace buffer."), _(
"\
4101Use this to choose a size for the trace buffer. Some targets\n\
4102may have fixed or limited buffer sizes. Specifying \"unlimited\" or -1\n\
4103disables any attempt to set the buffer size and lets the target choose."),
4109Set the user name to use for current and future trace runs."), _(
"\
4110Show the user name to use for current and future trace runs."), NULL,
4116Set notes string to use for current and future trace runs."), _(
"\
4117Show the notes string to use for current and future trace runs."), NULL,
4123Set notes string to use for future tstop commands."), _(
"\
4124Show the notes string to use for future tstop commands."), NULL,
static struct @5 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)
iterator_range< block_iterator_wrapper > block_iterator_range
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)
void notify_breakpoint_modified(breakpoint *b)
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 * parse_and_eval(const char *exp, parser_flags flags)
LONGEST parse_and_eval_long(const char *exp)
CORE_ADDR parse_and_eval_address(const char *exp)
std::unique_ptr< expression > expression_up
@ PARSER_COMMA_TERMINATES
expression_up parse_exp_1(const char **, CORE_ADDR pc, const struct block *, parser_flags flags, 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)
void interps_notify_tsv_deleted(const trace_state_variable *tsv)
void interps_notify_traceframe_changed(int tfnum, int tpnum)
void interps_notify_tsv_created(const trace_state_variable *tsv)
void interps_notify_tsv_modified(const trace_state_variable *tsv)
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)
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)
std::vector< bool > reg_mask
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
bp_location & first_loc()
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()
address_class aclass() const
struct type * type() const
LONGEST value_longest() 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
static struct value * allocate(struct type *type)
gdb::array_view< gdb_byte > contents_raw()
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()
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)
void target_get_tracepoint_status(tracepoint *tp, uploaded_tp *utp)
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)
int get_tracepoint_number(void)
struct trace_state_variable * find_trace_state_variable(const char *name)
static int next_tsv_number
static counted_command_line all_tracepoint_actions(tracepoint *)
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)
void parse_tracepoint_status(const char *p, tracepoint *tp, struct uploaded_tp *utp)
static bool circular_trace_buffer
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
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)
void validate_actionline(const char *line, tracepoint *t)
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 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 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)
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)
void _initialize_tracepoint()
std::string default_collect
void tvariables_info_1(void)
void merge_uploaded_tracepoints(struct uploaded_tp **uploaded_tps)
struct std::unique_ptr< traceframe_info > parse_traceframe_info(const char *tframe_info)
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)
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
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)
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)
static unsigned int get_print_max_chars(const struct value_print_options *options)
void set_internalvar_string(struct internalvar *var, const char *string)
void clear_internalvar(struct internalvar *var)
struct internalvar * create_internalvar_type_lazy(const char *name, const struct internalvar_funcs *funcs, void *data)
struct internalvar * lookup_internalvar(const char *name)
LONGEST value_as_long(struct value *val)
void set_internalvar_integer(struct internalvar *var, LONGEST l)
void void struct gdb_xml_value * xml_find_attribute(std::vector< gdb_xml_value > &attributes, const char *name)
int gdb_xml_parse_quick(const char *name, const char *dtd_name, const struct gdb_xml_element *elements, const char *document, void *user_data)
gdb_xml_attribute_handler gdb_xml_parse_attr_ulongest
ULONGEST gdb_xml_parse_ulongest(struct gdb_xml_parser *parser, const char *value)