49 #include "splay-tree.h"
60 #if defined HAVE_SYS_RESOURCE_H
61 #include <sys/resource.h>
105 int skip_unavailable);
121 error (
_(
"Cannot change this setting while the inferior is running."));
133 _(
"Whether MI is in asynchronous mode is %s.\n"),
172 if (argc > 0 && strcmp(argv[0],
"--reverse") == 0)
182 if (argc > 0 && strcmp(argv[0],
"--reverse") == 0)
192 if (argc > 0 && strcmp(argv[0],
"--reverse") == 0)
202 if (argc > 0 && strcmp(argv[0],
"--reverse") == 0)
212 if (argc > 0 && strcmp(argv[0],
"--reverse") == 0)
261 int pid = *(
int *)arg;
285 if (!current_context->
all)
304 if (current_context->
all)
334 error (
_(
"Already in reverse mode."));
348 if (argc > 0 && strcmp (argv[0],
"--reverse") == 0)
357 int pid = *(
int *)arg;
386 if (current_context->
all)
416 int start_p = *(
int *) arg;
417 const char *run_cmd = start_p ?
"start" :
"run";
427 error (
_(
"Inferior has no threads."));
454 static const struct mi_opt opts[] =
456 {
"-start", START_OPT, 0},
465 int opt =
mi_getopt (
"-exec-run", argc, argv, opts, &oind, &oarg);
469 switch ((
enum opt) opt)
480 error (
_(
"Invalid argument: %s"), argv[oind]);
482 if (current_context->
all)
491 const char *run_cmd = start_p ?
"start" :
"run";
513 if (argc != 0 && argc != 1)
514 error (
_(
"Usage: -target-detach [pid | thread-group]"));
526 int id = strtoul (argv[0] + 1, &end, 0);
529 error (
_(
"Invalid syntax of thread-group id '%s'"), argv[0]);
533 error (
_(
"Non-existent thread-group id '%d'"),
id);
540 pid = strtol (argv[0], &end, 10);
543 error (
_(
"Invalid identifier '%s'"), argv[0]);
550 error (
_(
"Thread group is empty"));
562 char *mi_error_message;
565 error (
_(
"-thread-select: USAGE: threadnum."));
572 error (
"%s", mi_error_message);
580 char *mi_error_message;
583 error (
_(
"-thread-list-ids: No arguments required."));
590 error (
"%s", mi_error_message);
597 if (argc != 0 && argc != 1)
598 error (
_(
"Invalid MI command"));
640 VEC (
int) *inferiors;
650 || bsearch (&(inferior->
pid),
VEC_address (
int, top_data->inferiors),
651 VEC_length (
int, top_data->inferiors), sizeof (
int),
663 if (inferior->
pid != 0)
673 if (inferior->
pid != 0)
717 char *cores = xstrdup (xcores);
722 for (p = strtok (p,
","); p; p = strtok (NULL,
","))
731 VEC (
int) **vector = xvector;
763 splay_tree_delete (t);
779 splay_tree tree = NULL;
801 int pid_i = strtoul (pid, NULL, 0);
804 splay_tree_node n = splay_tree_lookup (tree, pid_i);
808 splay_tree_insert (tree, pid_i, (splay_tree_value)vec);
814 n->value = (splay_tree_value) vec;
826 struct cleanup *back_to;
833 int pid_i = strtoul (pid, NULL, 0);
838 if (ids && bsearch (&pid_i,
VEC_address (
int, ids),
857 splay_tree_node n = splay_tree_lookup (tree, pid_i);
870 struct cleanup *back_to_2 =
901 AVAILABLE_OPT, RECURSE_OPT
903 static const struct mi_opt opts[] =
905 {
"-available", AVAILABLE_OPT, 0},
906 {
"-recurse", RECURSE_OPT, 1},
915 int opt =
mi_getopt (
"-list-thread-groups", argc, argv, opts,
920 switch ((
enum opt) opt)
926 if (strcmp (oarg,
"0") == 0)
928 else if (strcmp (oarg,
"1") == 0)
931 error (
_(
"only '0' and '1' are valid values "
932 "for the '--recurse' option"));
937 for (; oind < argc; ++oind)
942 if (*(argv[oind]) !=
'i')
943 error (
_(
"invalid syntax of group id '%s'"), argv[oind]);
945 inf = strtoul (argv[oind] + 1, &end, 0);
948 error (
_(
"invalid syntax of group id '%s'"), argv[oind]);
969 error (
_(
"Non-existent thread group id '%d'"),
id);
978 data.inferiors = ids;
1029 for (i = 0; i < argc; i++)
1031 regnum = atoi (argv[i]);
1032 if (regnum < 0 || regnum >= numregs)
1033 error (
_(
"bad register number"));
1048 static struct regcache *this_regs = NULL;
1052 int regnum, numregs, changed;
1061 prev_regs = this_regs;
1089 error (
_(
"-data-list-changed-registers: "
1090 "Unable to read register contents."));
1097 for (i = 0; i < argc; i++)
1099 regnum = atoi (argv[i]);
1108 error (
_(
"-data-list-changed-registers: "
1109 "Unable to read register contents."));
1114 error (
_(
"bad register number"));
1138 if (this_status != prev_status)
1141 return memcmp (prev_buffer, this_buffer,
1162 int regnum, numregs, format;
1165 int skip_unavailable = 0;
1171 static const struct mi_opt opts[] =
1173 {
"-skip-unavailable", SKIP_UNAVAILABLE, 0},
1187 int opt =
mi_getopt (
"-data-list-register-values", argc, argv,
1188 opts, &oind, &oarg);
1192 switch ((
enum opt) opt)
1194 case SKIP_UNAVAILABLE:
1195 skip_unavailable = 1;
1200 if (argc - oind < 1)
1201 error (
_(
"-data-list-register-values: Usage: "
1202 "-data-list-register-values [--skip-unavailable] <format>"
1203 " [<regnum1>...<regnumN>]"));
1205 format = (
int) argv[oind][0];
1213 if (argc - oind == 1)
1229 for (i = 1 + oind; i < argc; i++)
1231 regnum = atoi (argv[i]);
1239 error (
_(
"bad register number"));
1250 int skip_unavailable)
1255 struct cleanup *tuple_cleanup;
1308 error (
_(
"-data-write-register-values: Usage: -data-write-register-"
1309 "values <format> [<regnum1> <value1>...<regnumN> <valueN>]"));
1312 error (
_(
"-data-write-register-values: No registers."));
1315 error (
_(
"-data-write-register-values: No regs and values specified."));
1318 error (
_(
"-data-write-register-values: "
1319 "Regs and vals are not in pairs."));
1321 for (i = 1; i < argc; i = i + 2)
1323 int regnum = atoi (argv[i]);
1325 if (regnum >= 0 && regnum < numregs
1338 error (
_(
"bad register number"));
1360 error (
_(
"-data-evaluate-expression: "
1361 "Usage: -data-evaluate-expression expression"));
1405 long total_bytes, nr_cols, nr_rows;
1407 struct type *word_type;
1420 static const struct mi_opt opts[] =
1422 {
"o", OFFSET_OPT, 1},
1428 int opt =
mi_getopt (
"-data-read-memory", argc, argv, opts,
1433 switch ((
enum opt) opt)
1436 offset = atol (oarg);
1443 if (argc < 5 || argc > 6)
1444 error (
_(
"-data-read-memory: Usage: "
1445 "ADDR WORD-FORMAT WORD-SIZE NR-ROWS NR-COLS [ASCHAR]."));
1453 word_format = argv[1][0];
1455 word_size = atol (argv[2]);
1479 nr_rows = atol (argv[3]);
1481 error (
_(
"-data-read-memory: invalid number of rows."));
1484 nr_cols = atol (argv[4]);
1486 error (
_(
"-data-read-memory: invalid number of columns."));
1495 total_bytes = word_size * nr_rows * nr_cols;
1496 mbuf =
xcalloc (total_bytes, 1);
1505 error (
_(
"Unable to read memory."));
1512 gdbarch, addr + word_size * nr_cols);
1514 gdbarch, addr - word_size * nr_cols);
1521 struct cleanup *cleanup_stream;
1529 for (row = 0, row_byte = 0;
1531 row++, row_byte += nr_cols * word_size)
1535 struct cleanup *cleanup_tuple;
1536 struct cleanup *cleanup_list_data;
1545 for (col = 0, col_byte = row_byte;
1547 col++, col_byte += word_size)
1549 if (col_byte + word_size > nr_bytes)
1557 word_asize, stream);
1567 for (byte = row_byte;
1568 byte < row_byte + word_size * nr_cols; byte++)
1570 if (byte >= nr_bytes)
1572 else if (mbuf[byte] < 32 || mbuf[byte] > 126)
1605 static const struct mi_opt opts[] =
1607 {
"o", OFFSET_OPT, 1},
1613 int opt =
mi_getopt (
"-data-read-memory-bytes", argc, argv, opts,
1617 switch ((
enum opt) opt)
1620 offset = atol (oarg);
1628 error (
_(
"Usage: [ -o OFFSET ] ADDR LENGTH."));
1631 length = atol (argv[1]);
1638 error (
_(
"Unable to read memory."));
1655 (read_result->
end - read_result->
begin) * 2 * unit_size + 1);
1657 for (i = 0, p = data;
1658 i < ((read_result->
end - read_result->
begin) * unit_size);
1661 sprintf (p,
"%02x", read_result->
data[i]);
1706 static const struct mi_opt opts[] =
1708 {
"o", OFFSET_OPT, 1},
1714 int opt =
mi_getopt (
"-data-write-memory", argc, argv, opts,
1719 switch ((
enum opt) opt)
1722 offset = atol (oarg);
1730 error (
_(
"-data-write-memory: Usage: "
1731 "[-o COLUMN_OFFSET] ADDR FORMAT WORD-SIZE VALUE."));
1737 word_size = atol (argv[2]);
1740 addr += (offset * word_size);
1767 size_t len_hex, len_bytes, len_units, i, steps, remaining_units;
1768 long int count_units;
1772 if (argc != 2 && argc != 3)
1773 error (
_(
"Usage: ADDR DATA [COUNT]."));
1777 len_hex = strlen (cdata);
1780 if (len_hex % (unit_size * 2) != 0)
1781 error (
_(
"Hex-encoded '%s' must represent an integral number of "
1782 "addressable memory units."),
1785 len_bytes = len_hex / 2;
1786 len_units = len_bytes / unit_size;
1789 count_units = strtoul (argv[2], NULL, 10);
1791 count_units = len_units;
1796 for (i = 0; i < len_bytes; ++i)
1799 if (sscanf (cdata + i * 2,
"%02x", &x) != 1)
1800 error (
_(
"Invalid argument"));
1804 if (len_units < count_units)
1808 data =
xmalloc (count_units * unit_size);
1812 steps = count_units / len_units;
1814 remaining_units = count_units % len_units;
1815 for (i = 0; i < steps; i++)
1816 memcpy (data + i * len_bytes, databuf, len_bytes);
1818 if (remaining_units > 0)
1819 memcpy (data + steps * len_bytes, databuf,
1820 remaining_units * unit_size);
1841 if (strcmp (argv[0],
"yes") == 0)
1843 else if (strcmp (argv[0],
"no") == 0)
1854 error (
_(
"-enable-timings: Usage: %s {yes|no}"), command);
1884 error (
_(
"-list-features should be passed no arguments"));
1904 error (
_(
"-list-target-features should be passed no arguments"));
1913 error (
_(
"-add-inferior should be passed no arguments"));
1939 error (
_(
"-remove-inferior should be passed a single argument"));
1941 if (sscanf (argv[0],
"i%d", &
id) != 1)
1942 error (
_(
"the thread group id is syntactically invalid"));
1946 error (
_(
"the specified thread group does not exist"));
1949 error (
_(
"cannot remove an active inferior"));
1957 if (new_inferior == NULL)
1958 error (
_(
"Cannot remove last inferior"));
1961 if (new_inferior->
pid != 0)
1985 current_command_ts = context->
cmd_start;
1987 current_token = xstrdup (context->
token);
1990 running_result_record_printed = 0;
1992 switch (context->
op)
2009 if (!running_result_record_printed)
2015 ?
"^connected" :
"^done", raw_stdout);
2038 argv[0] =
"console";
2048 if (!running_result_record_printed)
2074 if (exception.
message == NULL)
2080 switch (exception.
error)
2114 if (command != NULL)
2151 && strcmp (command->
command,
"thread-select") != 0)
2154 int report_change = 0;
2156 if (command->
thread == -1)
2166 report_change = (ti->
num != command->
thread);
2175 "thread-selected,id=\"%d\"",
2194 error (
_(
"Cannot specify --thread-group together with --all"));
2197 error (
_(
"Cannot specify --thread together with --all"));
2200 error (
_(
"Cannot specify --thread together with --thread-group"));
2203 error (
_(
"Cannot specify --frame without --thread"));
2211 error (
_(
"Invalid thread group for the --thread-group option"));
2233 error (
_(
"Thread id: %d has terminated"), parse->
thread);
2238 if (parse->
frame != -1)
2241 int frame = parse->
frame;
2248 error (
_(
"Invalid frame id: %d"), frame);
2257 current_context =
parse;
2309 run = xstrdup (cmd);
2328 run =
xstrprintf (
"%s %s&", cli_command, argc ? *argv :
"");
2330 run =
xstrprintf (
"%s %s", cli_command, argc ? *argv :
"");
2342 unsigned long sent_so_far,
2343 unsigned long total_section,
2344 unsigned long total_sent,
2345 unsigned long grand_total)
2347 struct timeval time_now, delta, update_threshold;
2348 static struct timeval last_update;
2349 static char *previous_sect_name = NULL;
2351 struct ui_out *saved_uiout;
2371 update_threshold.tv_sec = 0;
2372 update_threshold.tv_usec = 500000;
2373 gettimeofday (&time_now, NULL);
2375 delta.tv_usec = time_now.tv_usec - last_update.tv_usec;
2376 delta.tv_sec = time_now.tv_sec - last_update.tv_sec;
2378 if (delta.tv_usec < 0)
2381 delta.tv_usec += 1000000
L;
2384 new_section = (previous_sect_name ?
2385 strcmp (previous_sect_name, section_name) : 1);
2388 struct cleanup *cleanup_tuple;
2390 xfree (previous_sect_name);
2391 previous_sect_name = xstrdup (section_name);
2406 if (delta.tv_sec >= update_threshold.tv_sec &&
2407 delta.tv_usec >= update_threshold.tv_usec)
2409 struct cleanup *cleanup_tuple;
2411 last_update.tv_sec = time_now.tv_sec;
2412 last_update.tv_usec = time_now.tv_usec;
2436 #ifdef HAVE_GETRUSAGE
2437 getrusage (RUSAGE_SELF, &
rusage);
2444 long usec = get_run_time ();
2446 tv->
utime.tv_sec = usec/1000000
L;
2447 tv->
utime.tv_usec = usec - 1000000
L*tv->
utime.tv_sec;
2448 tv->
stime.tv_sec = 0;
2449 tv->
stime.tv_usec = 0;
2468 if (do_timings && current_command_ts)
2475 return ((end.tv_sec - start.tv_sec) * 1000000
L)
2476 + (end.tv_usec - start.tv_usec);
2484 ",time={wallclock=\"%0.5f\",user=\"%0.5f\",system=\"%0.5f\"}",
2498 if (argc != 1 && argc != 2)
2499 error (
_(
"Usage: -trace-define-variable VARIABLE [VALUE]"));
2503 error (
_(
"Name of trace variable should start with '$'"));
2521 error (
_(
"-trace-list-variables: no arguments allowed"));
2532 error (
_(
"trace selection mode is required"));
2536 if (strcmp (mode,
"none") == 0)
2544 if (strcmp (mode,
"frame-number") == 0)
2547 error (
_(
"frame number is required"));
2550 else if (strcmp (mode,
"tracepoint-number") == 0)
2553 error (
_(
"tracepoint number is required"));
2556 else if (strcmp (mode,
"pc") == 0)
2559 error (
_(
"PC is required"));
2562 else if (strcmp (mode,
"pc-inside-range") == 0)
2565 error (
_(
"Start and end PC are required"));
2569 else if (strcmp (mode,
"pc-outside-range") == 0)
2572 error (
_(
"Start and end PC are required"));
2576 else if (strcmp (mode,
"line") == 0)
2584 error (
_(
"Line is required"));
2593 error (
_(
"Could not find the specified line"));
2598 error (
_(
"Could not find the specified line"));
2603 error (
_(
"Invalid mode '%s'"), mode);
2612 int target_saves = 0;
2613 int generate_ctf = 0;
2620 TARGET_SAVE_OPT, CTF_OPT
2622 static const struct mi_opt opts[] =
2624 {
"r", TARGET_SAVE_OPT, 0},
2625 {
"ctf", CTF_OPT, 0},
2631 int opt =
mi_getopt (
"-trace-save", argc, argv, opts,
2636 switch ((
enum opt) opt)
2638 case TARGET_SAVE_OPT:
2646 filename = argv[oind];
2678 if (argc != 0 && argc != 1)
2679 error (
_(
"Invalid MI command"));
2689 struct expression *expr;
2760 int registers_format =
'x';
2761 int memory_contents = 0;
2770 static const struct mi_opt opts[] =
2772 {
"-var-print-values", VAR_PRINT_VALUES, 1},
2773 {
"-comp-print-values", COMP_PRINT_VALUES, 1},
2774 {
"-registers-format", REGISTERS_FORMAT, 1},
2775 {
"-memory-contents", MEMORY_CONTENTS, 0},
2782 int opt =
mi_getopt (
"-trace-frame-collected", argc, argv, opts,
2786 switch ((
enum opt) opt)
2788 case VAR_PRINT_VALUES:
2791 case COMP_PRINT_VALUES:
2794 case REGISTERS_FORMAT:
2795 registers_format = oarg[0];
2796 case MEMORY_CONTENTS:
2797 memory_contents = 1;
2803 error (
_(
"Usage: -trace-frame-collected "
2804 "[--var-print-values PRINT_VALUES] "
2805 "[--comp-print-values PRINT_VALUES] "
2806 "[--registers-format FORMAT]"
2807 "[--memory-contents]"));
2821 clist = &stepping_list;
2823 clist = &tracepoint_list;
2834 "explicit-variables");
2848 "computed-expressions");
2871 for (regnum = 0; regnum < numregs; regnum++)
2895 for (i = 0;
VEC_iterate (
int, tinfo->tvars, i, tvar); i++)
2897 struct cleanup *cleanup_child;
2908 strcpy (tsvname + 1, tsv->
name);
2941 struct cleanup *cleanup_child;
2953 if (memory_contents)
2963 for (m = 0, p = data_str; m < r->
length; ++
m, p += 2)
2964 sprintf (p,
"%02x", data[m]);
2986 Set whether MI asynchronous mode is enabled."),
_(
"\
2987 Show whether MI asynchronous mode is enabled."),
_(
"\
2988 Tells GDB whether MI should be in asynchronous mode."),
struct gdbarch * target_gdbarch(void)
#define target_can_async_p()
void mi_cmd_exec_interrupt(char *command, char **argv, int argc)
void mi_cmd_trace_save(char *command, char **argv, int argc)
void mi_cmd_exec_return(char *command, char **argv, int argc)
int have_live_inferiors(void)
void target_terminal_ours(void)
#define target_has_registers
struct traceframe_info * get_traceframe_info(void)
struct mi_timestamp * cmd_start
#define target_can_execute_reverse
struct thread_info * find_thread_id(int num)
void mi_cmd_data_list_changed_registers(char *command, char **argv, int argc)
static void print_diff(struct mi_timestamp *start, struct mi_timestamp *end)
static void list_available_thread_groups(VEC(int)*ids, int recurse)
struct frame_info * get_selected_frame(const char *message)
void target_stop(ptid_t ptid)
void mi_cmd_list_target_features(char *command, char **argv, int argc)
void ui_out_field_stream(struct ui_out *uiout, const char *fldname, struct ui_file *stream)
void ui_out_field_int(struct ui_out *uiout, const char *fldname, int value)
struct frame_info * get_current_frame(void)
int ptid_equal(ptid_t ptid1, ptid_t ptid2)
static void proceed_thread(struct thread_info *thread, int pid)
void mi_load_progress(const char *section_name, unsigned long sent_so_far, unsigned long total_section, unsigned long total_sent, unsigned long grand_total)
void fputs_unfiltered(const char *buf, struct ui_file *file)
static void exec_direction_forward(void *notused)
void interrupt_target_1(int all_threads)
void mi_cmd_exec_run(char *command, char **argv, int argc)
char * int_string(LONGEST val, int radix, int is_signed, int width, int use_c_format)
void store_signed_integer(gdb_byte *, int, enum bfd_endian, LONGEST)
static int parse(struct parser_state *ps)
struct gdbarch * get_regcache_arch(const struct regcache *regcache)
LONGEST value_as_long(struct value *val)
static struct mi_timestamp * current_command_ts
struct cmd_list_element * deprecate_cmd(struct cmd_list_element *cmd, const char *replacement)
const struct mi_cmd * cmd
enum language set_language(enum language lang)
struct osdata * get_osdata(const char *type)
void regcache_cooked_write_signed(struct regcache *regcache, int regnum, LONGEST val)
void get_formatted_print_options(struct value_print_options *opts, char format)
struct ui_file * gdb_stdout
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
void common_val_print(struct value *val, struct ui_file *stream, int recurse, const struct value_print_options *options, const struct language_defn *language)
void select_frame(struct frame_info *fi)
struct thread_info * inferior_thread(void)
struct ui_out * interp_ui_out(struct interp *interp)
void mi_cmd_data_list_register_values(char *command, char **argv, int argc)
int ui_out_is_mi_like_p(struct ui_out *uiout)
int traceframe_available_memory(VEC(mem_range_s)**result, CORE_ADDR memaddr, ULONGEST len)
void switch_to_thread(ptid_t ptid)
#define target_log_command(p)
static int proceed_thread_callback(struct thread_info *thread, void *arg)
struct regcache * frame_save_as_regcache(struct frame_info *this_frame)
void mi_cmd_trace_define_variable(char *command, char **argv, int argc)
void quit_force(char *args, int from_tty)
void trace_status_mi(int on_stop)
static int interrupt_thread_callback(struct thread_info *thread, void *arg)
void type_print(struct type *type, const char *varstring, struct ui_file *stream, int show)
static long timeval_diff(struct timeval start, struct timeval end)
static int find_thread_of_process(struct thread_info *ti, void *p)
struct bp_location * get_traceframe_location(int *stepping_frame_p)
#define VEC_safe_push(T, V, O)
void get_no_prettyformat_print_options(struct value_print_options *opts)
static void mi_cmd_execute(struct mi_parse *parse)
struct inferior * iterate_over_inferiors(int(*callback)(struct inferior *, void *), void *data)
int gdbarch_num_regs(struct gdbarch *gdbarch)
static int get_other_inferior(struct inferior *inf, void *arg)
const gdb_byte * value_contents_for_printing(struct value *value)
void execute_command(char *, int)
void ui_out_field_fmt(struct ui_out *uiout, const char *fldname, const char *format,...)
void mi_cmd_exec_jump(char *args, char **argv, int argc)
struct regcache * get_current_regcache(void)
struct type * builtin_int32
void mi_out_put(struct ui_out *uiout, struct ui_file *stream)
void mi_cmd_trace_stop(char *command, char **argv, int argc)
void set_current_program_space(struct program_space *pspace)
static struct mi_parse * current_context
struct trace_status * current_trace_status(void)
void mi_cmd_trace_frame_collected(char *command, char **argv, int argc)
int gdbarch_addressable_memory_unit_size(struct gdbarch *gdbarch)
int gdbarch_num_pseudo_regs(struct gdbarch *gdbarch)
void null_cleanup(void *arg)
#define target_get_trace_state_variable_value(tsv, val)
struct value * evaluate_expression(struct expression *exp)
struct thread_info * iterate_over_threads(thread_callback_func, void *)
static int collect_cores(struct thread_info *ti, void *xdata)
struct cmd_list_element * setlist
void trace_save_ctf(const char *dirname, int target_does_save)
void fputstr_unfiltered(const char *str, int quoter, struct ui_file *stream)
#define VEC_iterate(T, V, I, P)
void mi_print_timing_maybe(void)
int is_stopped(ptid_t ptid)
struct type * check_typedef(struct type *type)
int mi_getopt(const char *prefix, int argc, char **argv, const struct mi_opt *opts, int *oind, char **oarg)
#define CATCH(EXCEPTION, MASK)
struct cleanup * make_cleanup_restore_integer(int *variable)
void ui_out_field_skip(struct ui_out *uiout, const char *fldname)
struct ui_file * raw_stdout
int fputc_unfiltered(int c, struct ui_file *stream)
struct target_ops current_target
struct mi_parse * mi_parse(const char *cmd, char **token)
void print_ada_task_info(struct ui_out *uiout, char *taskno_str, struct inferior *inf)
struct cleanup * make_cleanup_ui_out_list_begin_end(struct ui_out *uiout, const char *id)
void mi_cmd_gdb_exit(char *command, char **argv, int argc)
struct cleanup * make_cleanup_ui_out_tuple_begin_end(struct ui_out *uiout, const char *id)
struct program_space * pspace
void fprintf_filtered(struct ui_file *stream, const char *format,...)
struct frame_info * find_relative_frame(struct frame_info *, int *)
static void exec_reverse_continue(char **argv, int argc)
int * suppress_notification
static void output_register(struct frame_info *, int regnum, int format, int skip_unavailable)
mi_cmd_argv_ftype mi_cmd_interpreter_exec
struct thread_info * any_live_thread_of_process(int pid)
void fprintf_unfiltered(struct ui_file *stream, const char *format,...)
struct cleanup * make_cleanup_osdata_free(struct osdata *data)
struct cmd_list_element * showlist
void mi_cmd_thread_list_ids(char *command, char **argv, int argc)
struct type * builtin_int16
void free_current_contents(void *ptr)
void mi_cmd_exec_finish(char *command, char **argv, int argc)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
int get_traceframe_number(void)
void mi_cmd_data_write_memory_bytes(char *command, char **argv, int argc)
struct cleanup * make_cleanup(make_cleanup_ftype *function, void *arg)
static void print_variable_or_computed(char *expression, enum print_values values)
static int register_changed_p(int regnum, struct regcache *, struct regcache *)
void mi_cmd_exec_next(char *command, char **argv, int argc)
struct gdbarch * get_current_arch(void)
void error_stream(struct ui_file *stream)
static void free_splay_tree(void *xt)
const char * gdbarch_register_name(struct gdbarch *gdbarch, int regnr)
static void do_nothing(splay_tree_key k)
void stop_tracing(char *note)
struct cleanup * encode_actions_and_make_cleanup(struct bp_location *tloc, struct collection_list *tracepoint_list, struct collection_list *stepping_list)
void mi_cmd_ada_task_info(char *command, char **argv, int argc)
void mi_out_rewind(struct ui_out *uiout)
void mi_cmd_list_thread_groups(char *command, char **argv, int argc)
struct cmd_list_element * add_alias_cmd(const char *name, const char *oldname, enum command_class theclass, int abbrev_flag, struct cmd_list_element **list)
int running_result_record_printed
static void timestamp(struct mi_timestamp *tv)
char * xstrprintf(const char *format,...)
void validate_trace_state_variable_name(const char *name)
void mi_cmd_data_write_memory(char *command, char **argv, int argc)
void check_trace_running(struct trace_status *status)
int compare_positive_ints(const void *ap, const void *bp)
struct ui_file * gdb_stdlog
struct ui_out * mi_out_new(int mi_version)
struct ui_file * mem_fileopen(void)
struct expression * parse_expression(const char *)
void mi_cmd_enable_timings(char *command, char **argv, int argc)
void mi_cmd_data_write_register_values(char *command, char **argv, int argc)
void start_tracing(char *notes)
void mi_cmd_trace_status(char *command, char **argv, int argc)
void print_thread_info(struct ui_out *uiout, char *threads, int pid)
const struct extension_language_defn * get_ext_lang_defn(enum extension_language lang)
void continue_1(int all_threads)
void mi_cmd_trace_list_variables(char *command, char **argv, int argc)
void print_scalar_formatted(const void *, struct type *, const struct value_print_options *, int, struct ui_file *)
int ptid_get_pid(ptid_t ptid)
static void exec_continue(char **argv, int argc)
PTR xrealloc(PTR ptr, size_t size)
void print_stack_frame(struct frame_info *, int print_level, enum print_what print_what, int set_current_sal)
const char const char int
int find_line_pc_range(struct symtab_and_line sal, CORE_ADDR *startptr, CORE_ADDR *endptr)
void mi_cmd_add_inferior(char *command, char **argv, int argc)
void mi_cmd_trace_find(char *command, char **argv, int argc)
int value_entirely_available(struct value *value)
static void set_mi_async_command(char *args, int from_tty, struct cmd_list_element *c)
void * top_level_interpreter_data(void)
const struct language_defn * current_language
void mi_parse_free(struct mi_parse *parse)
void free_memory_read_result_vector(void *x)
void tfind_1(enum trace_find_type type, int num, CORE_ADDR addr1, CORE_ADDR addr2, int from_tty)
struct cleanup * prepare_execute_command(void)
void proceed(CORE_ADDR addr, enum gdb_signal siggnal)
struct cleanup * make_cleanup_ui_file_delete(struct ui_file *arg)
void update_thread_list(void)
CORE_ADDR parse_and_eval_address(const char *exp)
#define TYPE_CODE(thistype)
struct value * value_of_register(int regnum, struct frame_info *frame)
void clear_proceed_status(int step)
int target_read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
void mi_cmd_data_list_register_names(char *command, char **argv, int argc)
struct cleanup * make_cleanup_restore_current_thread(void)
char * pspace_exec_filename
void get_user_print_options(struct value_print_options *opts)
void tvariables_info_1(void)
static void mi_execute_async_cli_command(char *cli_command, char **argv, int argc)
void _initialize_mi_main(void)
enum register_status regcache_cooked_read(struct regcache *regcache, int regnum, gdb_byte *buf)
void mi_cmd_target_detach(char *command, char **argv, int argc)
static void captured_mi_execute_command(struct ui_out *uiout, struct mi_parse *context)
struct trace_state_variable * create_trace_state_variable(const char *name)
#define VEC_address(T, V)
static void show_mi_async_command(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void mi_cmd_list_features(char *command, char **argv, int argc)
mi_cmd_argv_ftype * argv_func
struct cleanup * make_cleanup_regcache_xfree(struct regcache *regcache)
static int * unique(int *b, int *e)
struct inferior * add_inferior_with_spaces(void)
void mi_cmd_data_read_memory(char *command, char **argv, int argc)
struct inferior * find_inferior_id(int num)
int target_core_of_thread(ptid_t ptid)
void ui_file_rewind(struct ui_file *file)
struct inferior * current_inferior(void)
static void free_vector_of_osdata_items(splay_tree_value xvalue)
int is_exited(ptid_t ptid)
struct symtabs_and_lines decode_line_with_current_source(char *string, int flags)
void ui_out_field_core_addr(struct ui_out *uiout, const char *fldname, struct gdbarch *gdbarch, CORE_ADDR address)
struct value * parse_and_eval(const char *exp)
void trace_save_tfile(const char *filename, int target_does_save)
static void print_diff_now(struct mi_timestamp *start)
static PyObject * field_name(struct type *type, int field)
int value_embedded_offset(struct value *value)
int register_size(struct gdbarch *gdbarch, int regnum)
void mi_cmd_data_evaluate_expression(char *command, char **argv, int argc)
struct interp * top_level_interpreter(void)
struct cleanup * save_current_space_and_thread(void)
static int run_one_inferior(struct inferior *inf, void *arg)
struct trace_state_variable * find_trace_state_variable(const char *name)
struct type * value_type(const struct value *value)
struct type * builtin_int64
void mi_cmd_remove_inferior(char *command, char **argv, int argc)
const char * get_osdata_column(struct osdata_item *item, const char *name)
void bpstat_do_actions(void)
LONGEST target_read(struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *buf, ULONGEST offset, LONGEST len)
enum gdb_rc gdb_list_thread_ids(struct ui_out *uiout, char **error_message)
struct value * evaluate_type(struct expression *exp)
void ui_out_field_string(struct ui_out *uiout, const char *fldname, const char *string)
struct trace_state_variable * find_trace_state_variable_by_number(int number)
struct symtab_and_line * sals
static void mi_execute_cli_command(const char *cmd, int args_p, const char *args)
void mi_cmd_exec_continue(char *command, char **argv, int argc)
void gdb_flush(struct ui_file *file)
struct ui_out * current_uiout
static int splay_tree_int_comparator(splay_tree_key xa, splay_tree_key xb)
void write_memory_with_notification(CORE_ADDR memaddr, const bfd_byte *myaddr, ssize_t len)
int is_running(ptid_t ptid)
static void mi_print_exception(const char *token, struct gdb_exception exception)
struct type * builtin_int8
void mi_cmd_thread_info(char *command, char **argv, int argc)
PTR xcalloc(size_t number, size_t size)
void delete_inferior_1(struct inferior *todel, int silent)
enum bfd_endian byte_order
int current_interp_named_p(const char *interp_name)
int has_stack_frames(void)
void mi_cmd_trace_start(char *command, char **argv, int argc)
enum print_values mi_parse_print_values(const char *name)
void mi_execute_command(const char *cmd, int from_tty)
struct thread_info * any_thread_of_process(int pid)
struct cleanup * make_cleanup_restore_current_language(void)
void val_print(struct type *type, const gdb_byte *valaddr, int embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, const struct language_defn *language)
void error(const char *fmt,...)
static int print_one_inferior(struct inferior *inferior, void *xdata)
enum gdb_rc gdb_thread_select(struct ui_out *uiout, char *tidstr, char **error_message)
mach_port_t mach_port_t name mach_port_t mach_port_t name error_t int int rusage_t pid_t pid
void prepare_execution_command(struct target_ops *target, int background)
static void free_vector_of_ints(void *xvector)
struct gdbarch * get_frame_arch(struct frame_info *this_frame)
int ext_lang_initialized_p(const struct extension_language_defn *extlang)
void set_current_inferior(struct inferior *inf)
struct target_ops * beneath
void do_cleanups(struct cleanup *old_chain)
void add_setshow_boolean_cmd(const char *name, enum command_class theclass, int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
static void output_cores(struct ui_out *uiout, const char *field_name, const char *xcores)
void mi_cmd_exec_step_instruction(char *command, char **argv, int argc)
void detach_command(char *args, int from_tty)
void mi_cmd_exec_next_instruction(char *command, char **argv, int argc)
void mi_cmd_exec_step(char *command, char **argv, int argc)
void mi_cmd_data_read_memory_bytes(char *command, char **argv, int argc)
void mi_cmd_thread_select(char *command, char **argv, int argc)
void return_command(char *, int)
struct ui_file * event_channel