GDB (xrefs)

Classes | Enumerations | Functions | Variables
mi-main.c File Reference
`#include "defs.h"`
`#include "arch-utils.h"`
`#include "target.h"`
`#include "inferior.h"`
`#include "infrun.h"`
`#include "top.h"`
`#include "gdbthread.h"`
`#include "mi-cmds.h"`
`#include "mi-parse.h"`
`#include "mi-getopt.h"`
`#include "mi-console.h"`
`#include "ui-out.h"`
`#include "mi-out.h"`
`#include "interps.h"`
`#include "event-loop.h"`
`#include "event-top.h"`
`#include "gdbcore.h"`
`#include "value.h"`
`#include "regcache.h"`
`#include "frame.h"`
`#include "mi-main.h"`
`#include "mi-common.h"`
`#include "language.h"`
`#include "valprint.h"`
`#include "osdata.h"`
`#include "common/gdb_splay_tree.h"`
`#include "tracepoint.h"`
`#include "ctf.h"`
`#include "ada-lang.h"`
`#include "linespec.h"`
`#include "extension.h"`
`#include "gdbcmd.h"`
`#include "observer.h"`
`#include "common/gdb_optional.h"`
`#include "common/byte-vector.h"`
`#include <ctype.h>`
`#include "run-time-clock.h"`
`#include <chrono>`
`#include "progspace-and-thread.h"`
`#include "common/rsp-low.h"`
`#include <algorithm>`
`#include <set>`
`#include <map>`

Go to the source code of this file.

## Classes
struct | collect_cores_data
struct | print_one_inferior_data

## Enumerations
enum | { FROM_TTY = 0 }

## Functions
static void | mi_cmd_execute (struct mi_parse *parse)
static void | mi_execute_cli_command (const char *cmd, int args_p, const char *args)
static void | mi_execute_async_cli_command (const char *cli_command, char **argv, int argc)
static bool | register_changed_p (int regnum, regcache *, regcache *)
static void | output_register (struct frame_info *, int regnum, int format, int skip_unavailable)
static void | set_mi_async_command (const char *args, int from_tty, struct cmd_list_element *c)
static void | show_mi_async_command (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
int | mi_async_p (void)
static void | timestamp (struct mi_timestamp *tv)
static void | print_diff (struct ui_file *file, struct mi_timestamp *start, struct mi_timestamp *end)
void | mi_cmd_gdb_exit (const char *command, char **argv, int argc)
void | mi_cmd_exec_next (const char *command, char **argv, int argc)
void | mi_cmd_exec_next_instruction (const char *command, char **argv, int argc)
void | mi_cmd_exec_step (const char *command, char **argv, int argc)
void | mi_cmd_exec_step_instruction (const char *command, char **argv, int argc)
void | mi_cmd_exec_finish (const char *command, char **argv, int argc)
void | mi_cmd_exec_return (const char *command, char **argv, int argc)
void | mi_cmd_exec_jump (const char *args, char **argv, int argc)
static void | proceed_thread (struct thread_info *thread, int pid)
static int | proceed_thread_callback (struct thread_info *thread, void *arg)
static void | exec_continue (char **argv, int argc)
static void | exec_reverse_continue (char **argv, int argc)
void | mi_cmd_exec_continue (const char *command, char **argv, int argc)
static int | interrupt_thread_callback (struct thread_info *thread, void *arg)
void | mi_cmd_exec_interrupt (const char *command, char **argv, int argc)
static int | run_one_inferior (struct inferior *inf, void *arg)
void | mi_cmd_exec_run (const char *command, char **argv, int argc)
static int | find_thread_of_process (struct thread_info *ti, void *p)
void | mi_cmd_target_detach (const char *command, char **argv, int argc)
void | mi_cmd_target_flash_erase (const char *command, char **argv, int argc)
void | mi_cmd_thread_select (const char *command, char **argv, int argc)
void | mi_cmd_thread_list_ids (const char *command, char **argv, int argc)
void | mi_cmd_thread_info (const char *command, char **argv, int argc)
static int | collect_cores (struct thread_info *ti, void *xdata)
static int | print_one_inferior (struct inferior *inferior, void *xdata)
static void | output_cores (struct ui_out *uiout, const char *field_name, const char *xcores)
static void | list_available_thread_groups (const std::set< int > &ids, int recurse)
void | mi_cmd_list_thread_groups (const char *command, char **argv, int argc)
void | mi_cmd_data_list_register_names (const char *command, char **argv, int argc)
void | mi_cmd_data_list_changed_registers (const char *command, char **argv, int argc)
void | mi_cmd_data_list_register_values (const char *command, char **argv, int argc)
void | mi_cmd_data_write_register_values (const char *command, char **argv, int argc)
void | mi_cmd_data_evaluate_expression (const char *command, char **argv, int argc)
void | mi_cmd_data_read_memory (const char *command, char **argv, int argc)
void | mi_cmd_data_read_memory_bytes (const char *command, char **argv, int argc)
void | mi_cmd_data_write_memory (const char *command, char **argv, int argc)
void | mi_cmd_data_write_memory_bytes (const char *command, char **argv, int argc)
void | mi_cmd_enable_timings (const char *command, char **argv, int argc)
void | mi_cmd_list_features (const char *command, char **argv, int argc)
void | mi_cmd_list_target_features (const char *command, char **argv, int argc)
void | mi_cmd_add_inferior (const char *command, char **argv, int argc)
static int | get_other_inferior (struct inferior *inf, void *arg)
void | mi_cmd_remove_inferior (const char *command, char **argv, int argc)
static void | captured_mi_execute_command (struct ui_out *uiout, struct mi_parse *context)
static void | mi_print_exception (const char *token, struct gdb_exception exception)
static int | command_notifies_uscc_observer (struct mi_parse *command)
void | mi_execute_command (const char *cmd, int from_tty)
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)
static void | print_diff_now (struct ui_file *file, struct mi_timestamp *start)
void | mi_print_timing_maybe (struct ui_file *file)
void | mi_cmd_trace_define_variable (const char *command, char **argv, int argc)
void | mi_cmd_trace_list_variables (const char *command, char **argv, int argc)
void | mi_cmd_trace_find (const char *command, char **argv, int argc)
void | mi_cmd_trace_save (const char *command, char **argv, int argc)
void | mi_cmd_trace_start (const char *command, char **argv, int argc)
void | mi_cmd_trace_status (const char *command, char **argv, int argc)
void | mi_cmd_trace_stop (const char *command, char **argv, int argc)
void | mi_cmd_ada_task_info (const char *command, char **argv, int argc)
static void | print_variable_or_computed (const char *expression, enum print_values values)
void | mi_cmd_trace_frame_collected (const char *command, char **argv, int argc)
void | _initialize_mi_main (void)

## Variables
int | mi_debug_p
static struct mi_timestamp * | current_command_ts
static int | do_timings = 0
char * | current_token
static struct mi_parse * | current_context
int | running_result_record_printed = 1
int | mi_proceeded
static int | mi_async = 0
static int | mi_async_1 = 0

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

Enumerator
FROM_TTY |

Definition at line 68 of file mi-main.c.

## Function Documentation

## ◆ _initialize_mi_main()

void _initialize_mi_main | ( | void |  | ) |

Definition at line 2718 of file mi-main.c.

References _, add_alias_cmd(), add_setshow_boolean_cmd(), class_run, deprecate_cmd(), mi_async_1, set_mi_async_command(), setlist, show_mi_async_command(), and showlist.

## ◆ captured_mi_execute_command()

static void captured_mi_execute_command | ( | struct ui_out * | uiout,
|  | struct mi_parse * | context
| ) |  |
| static

Definition at line 1797 of file mi-main.c.

References mi_parse::args, gdb::argv, CLI_COMMAND, mi_parse::cmd_start, mi_parse::command, command_interp(), current_command_ts, current_interp_named_p(), current_token, do_timings, fprintf_unfiltered(), fputs_unfiltered(), gdb_stdlog, INTERP_CONSOLE, INTERP_MI, INTERP_MI1, INTERP_MI2, INTERP_MI3, make_scoped_restore(), mi_cmd_execute(), mi_cmd_interpreter_exec, MI_COMMAND, mi_debug_p, mi_out_put(), mi_out_rewind(), mi_print_timing_maybe(), mi_proceeded, mi_parse::op, mi_interp::raw_stdout, running_result_record_printed, and mi_parse::token.

Referenced by mi_execute_command().

## ◆ collect_cores()

static int collect_cores | ( | struct thread_info * | ti,
|  | void * | xdata
| ) |  |
| static

Definition at line 627 of file mi-main.c.

References collect_cores_data::cores, collect_cores_data::pid, thread_info::ptid, ptid_get_pid(), and target_core_of_thread().

Referenced by print_one_inferior().

## ◆ command_notifies_uscc_observer()

static int command_notifies_uscc_observer | ( | struct mi_parse * | command | ) |
| static

Definition at line 1912 of file mi-main.c.

References mi_parse::argc, mi_parse::argv, CLI_COMMAND, mi_parse::command, and mi_parse::op.

Referenced by mi_execute_command().

## ◆ exec_continue()

static void exec_continue | ( | char ** | argv,
|  | int | argc
| ) |  |
| static

Definition at line 267 of file mi-main.c.

References mi_parse::all, continue_1(), current_context, current_target, find_inferior_id(), iterate_over_threads(), make_scoped_restore(), mi_async_p(), non_stop, inf::pid, pid, prepare_execution_command(), proceed_thread_callback(), sched_multi, and mi_parse::thread_group.

Referenced by exec_reverse_continue(), and mi_cmd_exec_continue().

## ◆ exec_reverse_continue()

static void exec_reverse_continue | ( | char ** | argv,
|  | int | argc
| ) |  |
| static

Definition at line 319 of file mi-main.c.

References _, inferior::argc, gdb::argv, error(), exec_continue(), EXEC_REVERSE, execution_direction, make_scoped_restore(), target_can_execute_reverse, and target_shortname.

Referenced by mi_cmd_exec_continue().

## ◆ find_thread_of_process()

static int find_thread_of_process | ( | struct thread_info * | ti,
|  | void * | p
| ) |  |
| static

Definition at line 491 of file mi-main.c.

References is_exited(), pid, thread_info::ptid, and ptid_get_pid().

Referenced by mi_cmd_target_detach().

## ◆ get_other_inferior()

static int get_other_inferior | ( | struct inferior * | inf,
|  | void * | arg
| ) |  |
| static

Definition at line 1741 of file mi-main.c.

References current_inferior().

Referenced by mi_cmd_remove_inferior().

## ◆ interrupt_thread_callback()

static int interrupt_thread_callback | ( | struct thread_info * | thread,
|  | void * | arg
| ) |  |
| static

Definition at line 344 of file mi-main.c.

References is_running(), pid, thread_info::ptid, ptid_get_pid(), and target_stop().

Referenced by mi_cmd_exec_interrupt().

## ◆ list_available_thread_groups()

static void list_available_thread_groups | ( | const std::set< int > & | ids,
|  | int | recurse
| ) |  |
| static

Definition at line 713 of file mi-main.c.

References current_uiout, ui_out::field_fmt(), ui_out::field_string(), get_osdata(), get_osdata_column(), output_cores(), pid, string, and selftests::ptid::tid.

Referenced by mi_cmd_list_thread_groups().

## ◆ mi_async_p()

int mi_async_p | ( | void |  | ) |

Definition at line 138 of file mi-main.c.

References mi_async, and target_can_async_p.

Referenced by exec_continue(), mi_cmd_list_target_features(), mi_execute_async_cli_command(), and mi_on_sync_execution_done().

## ◆ mi_cmd_ada_task_info()

void mi_cmd_ada_task_info | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 2465 of file mi-main.c.

References _, gdb::argv, current_inferior(), current_uiout, error(), and print_ada_task_info().

## ◆ mi_cmd_add_inferior()

void mi_cmd_add_inferior | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 1725 of file mi-main.c.

References _, add_inferior_with_spaces(), inferior::argc, current_uiout, error(), and arm-linux::inf.

## ◆ mi_cmd_data_evaluate_expression()

void mi_cmd_data_evaluate_expression | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 1216 of file mi-main.c.

References _, gdb::argv, common_val_print(), current_language, current_uiout, value_print_options::deref_ref, error(), evaluate_expression(), ui_out::field_stream(), get_user_print_options(), and parse_expression().

## ◆ mi_cmd_data_list_changed_registers()

void mi_cmd_data_list_changed_registers | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 932 of file mi-main.c.

References _, gdb::argv, current_uiout, error(), ui_out::field_int(), frame_save_as_regcache(), gdbarch_num_pseudo_regs(), gdbarch_num_regs(), gdbarch_register_name(), get_selected_frame(), register_changed_p(), and regnum.

## ◆ mi_cmd_data_list_register_names()

void mi_cmd_data_list_register_names | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 883 of file mi-main.c.

References _, gdb::argv, current_uiout, error(), ui_out::field_string(), gdbarch_num_pseudo_regs(), gdbarch_num_regs(), gdbarch_register_name(), get_current_arch(), and regnum.

## ◆ mi_cmd_data_list_register_values()

void mi_cmd_data_list_register_values | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 1035 of file mi-main.c.

References _, gdb::argv, current_uiout, error(), gdbarch_num_pseudo_regs(), gdbarch_num_regs(), gdbarch_register_name(), get_frame_arch(), get_selected_frame(), mi_getopt(), output_register(), and regnum.

## ◆ mi_cmd_data_read_memory()

void mi_cmd_data_read_memory | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 1260 of file mi-main.c.

References _, gdb::argv, target_ops::beneath, builtin_type::builtin_int16, builtin_type::builtin_int32, builtin_type::builtin_int64, builtin_type::builtin_int8, builtin_type(), string_file::clear(), current_target, current_uiout, error(), ui_out::field_core_addr(), ui_out::field_int(), ui_out::field_stream(), ui_out::field_string(), get_current_arch(), get_formatted_print_options(), mi_getopt(), offset, parse_and_eval_address(), print_scalar_formatted(), ui_file::putc(), TARGET_OBJECT_MEMORY, and target_read().

## ◆ mi_cmd_data_read_memory_bytes()

void mi_cmd_data_read_memory_bytes | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 1438 of file mi-main.c.

References _, gdb::argv, target_ops::beneath, bin2hex(), current_target, current_uiout, error(), ui_out::field_core_addr(), ui_out::field_string(), gdbarch_addressable_memory_unit_size(), get_current_arch(), mi_getopt(), offset, parse_and_eval_address(), read_memory_robust(), and string.

## ◆ mi_cmd_data_write_memory()

void mi_cmd_data_write_memory | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 1520 of file mi-main.c.

References _, gdb::argv, gdbarch::byte_order, error(), gdbarch_byte_order(), get_current_arch(), mi_getopt(), offset, parse_and_eval_address(), store_signed_integer(), and write_memory_with_notification().

## ◆ mi_cmd_data_write_memory_bytes()

void mi_cmd_data_write_memory_bytes | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 1588 of file mi-main.c.

References _, gdb::argv, error(), gdbarch_addressable_memory_unit_size(), get_current_arch(), parse_and_eval_address(), and write_memory_with_notification().

## ◆ mi_cmd_data_write_register_values()

void mi_cmd_data_write_register_values | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 1159 of file mi-main.c.

References _, regcache::arch(), gdb::argv, error(), gdbarch_num_pseudo_regs(), gdbarch_num_regs(), gdbarch_register_name(), get_current_regcache(), parse_and_eval_address(), regcache::regcache(), regcache_cooked_write_signed(), regnum, and target_has_registers.

## ◆ mi_cmd_enable_timings()

void mi_cmd_enable_timings | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 1656 of file mi-main.c.

References _, gdb::argv, do_timings, and error().

## ◆ mi_cmd_exec_continue()

void mi_cmd_exec_continue | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 335 of file mi-main.c.

References inferior::argc, gdb::argv, exec_continue(), and exec_reverse_continue().

## ◆ mi_cmd_exec_finish()

void mi_cmd_exec_finish | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 208 of file mi-main.c.

References gdb::argv, and mi_execute_async_cli_command().

## ◆ mi_cmd_exec_interrupt()

void mi_cmd_exec_interrupt | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 365 of file mi-main.c.

References mi_parse::all, current_context, find_inferior_id(), interrupt_target_1(), interrupt_thread_callback(), iterate_over_threads(), non_stop, inf::pid, and mi_parse::thread_group.

## ◆ mi_cmd_exec_jump()

void mi_cmd_exec_jump | ( | const char * | args,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 237 of file mi-main.c.

References gdb::argv, and mi_execute_async_cli_command().

## ◆ mi_cmd_exec_next()

void mi_cmd_exec_next | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 168 of file mi-main.c.

References gdb::argv, and mi_execute_async_cli_command().

## ◆ mi_cmd_exec_next_instruction()

void mi_cmd_exec_next_instruction | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 178 of file mi-main.c.

References gdb::argv, and mi_execute_async_cli_command().

## ◆ mi_cmd_exec_return()

void mi_cmd_exec_return | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 218 of file mi-main.c.

References gdb::argv, get_selected_frame(), LOC_AND_ADDRESS, print_stack_frame(), and return_command().

## ◆ mi_cmd_exec_run()

void mi_cmd_exec_run | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 435 of file mi-main.c.

References _, mi_parse::all, gdb::argv, current_context, error(), find_run_target(), iterate_over_inferiors(), mi_async, mi_execute_cli_command(), mi_getopt(), run_one_inferior(), and target_ops::to_can_async_p.

## ◆ mi_cmd_exec_step()

void mi_cmd_exec_step | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 188 of file mi-main.c.

References gdb::argv, and mi_execute_async_cli_command().

## ◆ mi_cmd_exec_step_instruction()

void mi_cmd_exec_step_instruction | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 198 of file mi-main.c.

References gdb::argv, and mi_execute_async_cli_command().

## ◆ mi_cmd_execute()

static void mi_cmd_execute | ( | struct mi_parse * | parse | ) |
| static

Definition at line 2035 of file mi-main.c.

References _, any_live_thread_of_process(), current_context, gdb::optional< T >::emplace(), error(), error_stream(), find_inferior_id(), find_relative_frame(), find_thread_global_id(), get_current_frame(), is_exited(), language_unknown, mi_execute_cli_command(), null_ptid, parse(), inf::pid, prepare_execute_command(), thread_info::ptid, ui_file::puts(), ui_file::putstr(), select_frame(), set_current_inferior(), set_current_program_space(), set_language(), and switch_to_thread().

Referenced by captured_mi_execute_command().

## ◆ mi_cmd_gdb_exit()

void mi_cmd_gdb_exit | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 153 of file mi-main.c.

References current_interpreter(), current_token, current_uiout, fputs_unfiltered(), FROM_TTY, gdb_flush(), mi_out_put(), quit_force(), and mi_interp::raw_stdout.

## ◆ mi_cmd_list_features()

void mi_cmd_list_features | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 1679 of file mi-main.c.

References _, current_uiout, error(), ext_lang_initialized_p(), EXT_LANG_PYTHON, ui_out::field_string(), and get_ext_lang_defn().

## ◆ mi_cmd_list_target_features()

void mi_cmd_list_target_features | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 1707 of file mi-main.c.

References _, current_uiout, error(), ui_out::field_string(), mi_async_p(), and target_can_execute_reverse.

## ◆ mi_cmd_list_thread_groups()

void mi_cmd_list_thread_groups | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 790 of file mi-main.c.

References _, gdb::argv, available, current_uiout, error(), find_inferior_id(), arm-linux::inf, print_one_inferior_data::inferiors, iterate_over_inferiors(), list_available_thread_groups(), mi_getopt(), inf::pid, print_one_inferior(), print_thread_info(), print_one_inferior_data::recurse, and update_thread_list().

## ◆ mi_cmd_remove_inferior()

void mi_cmd_remove_inferior | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 1750 of file mi-main.c.

References _, any_thread_of_process(), inferior::argc, gdb::argv, current_inferior(), delete_inferior(), error(), find_inferior_id(), get_other_inferior(), arm-linux::inf, iterate_over_inferiors(), null_ptid, inf::pid, inferior::pid, inferior::pspace, thread_info::ptid, set_current_inferior(), set_current_program_space(), and switch_to_thread().

## ◆ mi_cmd_target_detach()

void mi_cmd_target_detach | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 502 of file mi-main.c.

References _, gdb::argv, detach_command(), error(), find_inferior_id(), find_thread_of_process(), arm-linux::inf, iterate_over_threads(), inf::pid, pid, thread_info::ptid, and switch_to_thread().

## ◆ mi_cmd_target_flash_erase()

void mi_cmd_target_flash_erase | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 550 of file mi-main.c.

References flash_erase_command().

## ◆ mi_cmd_thread_info()

void mi_cmd_thread_info | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 612 of file mi-main.c.

References _, gdb::argv, current_uiout, error(), and print_thread_info().

## ◆ mi_cmd_thread_list_ids()

void mi_cmd_thread_list_ids | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 582 of file mi-main.c.

References _, ALL_NON_EXITED_THREADS, inferior::argc, current_thread, current_uiout, error(), thread_info::global_num, inferior_ptid, inferior::num, thread_info::ptid, and update_thread_list().

## ◆ mi_cmd_thread_select()

void mi_cmd_thread_select | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 556 of file mi-main.c.

References _, inferior::argc, gdb::argv, current_uiout, error(), find_thread_global_id(), inferior_ptid, inferior::num, observer_notify_user_selected_context_changed(), parse_and_eval(), print_selected_thread_frame(), ptid_equal(), thread_select(), USER_SELECTED_FRAME, USER_SELECTED_THREAD, and value_as_long().

## ◆ mi_cmd_trace_define_variable()

void mi_cmd_trace_define_variable | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 2283 of file mi-main.c.

References _, gdb::argv, create_trace_state_variable(), error(), find_trace_state_variable(), trace_state_variable::initial_value, name, parse_and_eval(), validate_trace_state_variable_name(), and value_as_long().

## ◆ mi_cmd_trace_find()

void mi_cmd_trace_find | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 2318 of file mi-main.c.

References _, gdb::argv, check_trace_running(), current_trace_status(), DECODE_LINE_FUNFIRSTLINE, decode_line_with_current_source(), error(), find_line_pc_range(), get_selected_frame(), get_traceframe_number(), has_stack_frames(), symtab_and_line::line, LOC_AND_ADDRESS, parse_and_eval_address(), print_stack_frame(), symtab_and_line::symtab, tfind_1(), tfind_number, tfind_outside, tfind_pc, tfind_range, and tfind_tp.

## ◆ mi_cmd_trace_frame_collected()

void mi_cmd_trace_frame_collected | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 2530 of file mi-main.c.

References _, gdb::argv, bin2hex(), collection_list::computed(), current_uiout, gdbarch::data, encode_actions(), error(), ui_out::field_core_addr(), ui_out::field_fmt(), ui_out::field_int(), ui_out::field_skip(), ui_out::field_string(), find_trace_state_variable_by_number(), gdbarch_num_pseudo_regs(), gdbarch_num_regs(), gdbarch_register_name(), get_current_frame(), get_frame_arch(), get_selected_frame(), get_traceframe_info(), get_traceframe_location(), mi_getopt(), mi_parse_print_values(), trace_state_variable::name, trace_state_variable::number, output_register(), PRINT_ALL_VALUES, print_variable_or_computed(), regnum, select_frame(), string, target_gdbarch(), target_get_trace_state_variable_value, target_read_memory(), traceframe_available_memory(), traceframe_info::tvars, ULONGEST_MAX, trace_state_variable::value, trace_state_variable::value_known, and collection_list::wholly_collected().

## ◆ mi_cmd_trace_list_variables()

void mi_cmd_trace_list_variables | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 2309 of file mi-main.c.

References _, error(), and tvariables_info_1().

## ◆ mi_cmd_trace_save()

void mi_cmd_trace_save | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 2394 of file mi-main.c.

References _, gdb::argv, error(), mi_getopt(), trace_save_ctf(), and trace_save_tfile().

## ◆ mi_cmd_trace_start()

void mi_cmd_trace_start | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 2444 of file mi-main.c.

References start_tracing().

## ◆ mi_cmd_trace_status()

void mi_cmd_trace_status | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 2450 of file mi-main.c.

References trace_status_mi().

## ◆ mi_cmd_trace_stop()

void mi_cmd_trace_stop | ( | const char * | command,
|  | char ** | argv,
|  | int | argc
| ) |  |

Definition at line 2456 of file mi-main.c.

References stop_tracing(), and trace_status_mi().

## ◆ mi_execute_async_cli_command()

void mi_execute_async_cli_command | ( | const char * | cli_command,
|  | char ** | argv,
|  | int | argc
| ) |  |
| static

Definition at line 2153 of file mi-main.c.

References gdb::argv, execute_command(), mi_async_p(), run, and string.

Referenced by mi_cmd_exec_finish(), mi_cmd_exec_jump(), mi_cmd_exec_next(), mi_cmd_exec_next_instruction(), mi_cmd_exec_step(), and mi_cmd_exec_step_instruction().

## ◆ mi_execute_cli_command()

void mi_execute_cli_command | ( | const char * | cmd,
|  | int | args_p,
|  | const char * | args
| ) |  |
| static

Definition at line 2136 of file mi-main.c.

References execute_command(), fprintf_unfiltered(), gdb_stdout, mi_debug_p, run, and string.

Referenced by mi_cmd_exec_run(), mi_cmd_execute(), and run_one_inferior().

## ◆ mi_execute_command()

void mi_execute_command | ( | const char * | cmd,
|  | int | from_tty
| ) |  |

Definition at line 1937 of file mi-main.c.

References async_enable_stdin(), bpstat_do_actions(), captured_mi_execute_command(), CATCH, command_notifies_uscc_observer(), current_ui, current_uiout, do_timings, gdb::optional< T >::emplace(), END_CATCH, thread_info::global_num, inferior_ptid, inferior_thread(), interp_ui_out(), mi_out_rewind(), mi_parse(), mi_print_exception(), null_ptid, observer_notify_user_selected_context_changed(), PROMPT_NEEDED, ui::prompt_state, ptid_equal(), quit_force(), RETURN_MASK_ALL, target_log_command, thread_count(), timestamp(), token, top_level_interpreter(), TRY, USER_SELECTED_FRAME, USER_SELECTED_THREAD, and xfree().

Referenced by mi_execute_command_wrapper().

## ◆ mi_load_progress()

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
| ) |  |

Definition at line 2166 of file mi-main.c.

References current_interp_named_p(), current_interpreter(), current_token, current_uiout, fputs_unfiltered(), gdb_flush(), INTERP_MI, INTERP_MI1, INTERP_MI2, INTERP_MI3, make_scoped_restore(), mi_out_new(), mi_out_put(), mi_interp::raw_stdout, and xfree().

Referenced by mi_interp::resume().

## ◆ mi_print_exception()

static void mi_print_exception | ( | const char * | token,
|  | struct gdb_exception | exception
| ) |  |
| static

Definition at line 1886 of file mi-main.c.

References current_interpreter(), gdb_exception::error, fputs_unfiltered(), fputstr_unfiltered(), gdb_exception::message, mi_interp::raw_stdout, and UNDEFINED_COMMAND_ERROR.

Referenced by mi_execute_command().

## ◆ mi_print_timing_maybe()

void mi_print_timing_maybe | ( | struct ui_file * | file | ) |

Definition at line 2258 of file mi-main.c.

References current_command_ts, do_timings, and print_diff_now().

Referenced by captured_mi_execute_command(), and mi_on_normal_stop_1().

## ◆ output_cores()

static void output_cores | ( | struct ui_out * | uiout,
|  | const char * | field_name,
|  | const char * | xcores
| ) |  |
| static

Definition at line 702 of file mi-main.c.

References collect_cores_data::cores, field_name(), and ui_out::field_string().

Referenced by list_available_thread_groups().

## ◆ output_register()

static void output_register | ( | struct frame_info * | frame,
|  | int | regnum,
|  | int | format,
|  | int | skip_unavailable
| ) |  |
| static

Definition at line 1125 of file mi-main.c.

References current_language, current_uiout, value_print_options::deref_ref, ui_out::field_int(), ui_out::field_stream(), value_print_options::format, get_formatted_print_options(), regnum, val_print(), value_embedded_offset(), value_entirely_available(), value_of_register(), and value_type().

Referenced by mi_cmd_data_list_register_values(), and mi_cmd_trace_frame_collected().

## ◆ print_diff()

static void print_diff | ( | struct ui_file * | file,
|  | struct mi_timestamp * | start,
|  | struct mi_timestamp * | end
| ) |  |
| static

Definition at line 2267 of file mi-main.c.

References fprintf_unfiltered(), mi_timestamp::stime, mi_timestamp::utime, and mi_timestamp::wallclock.

Referenced by print_diff_now().

## ◆ print_diff_now()

static void print_diff_now | ( | struct ui_file * | file,
|  | struct mi_timestamp * | start
| ) |  |
| static

Definition at line 2249 of file mi-main.c.

References print_diff(), and timestamp().

Referenced by mi_print_timing_maybe().

## ◆ print_one_inferior()

static int print_one_inferior | ( | struct inferior * | inferior,
|  | void * | xdata
| ) |  |
| static

Definition at line 649 of file mi-main.c.

References collect_cores(), collect_cores_data::cores, current_uiout, inferior::exit_code, ui_out::field_fmt(), ui_out::field_int(), ui_out::field_string(), inferior::has_exit_code, print_one_inferior_data::inferiors, int_string(), iterate_over_threads(), inferior::num, inferior::pid, collect_cores_data::pid, print_thread_info(), inferior::pspace, program_space::pspace_exec_filename, and print_one_inferior_data::recurse.

Referenced by mi_cmd_list_thread_groups().

## ◆ print_variable_or_computed()

static void print_variable_or_computed | ( | const char * | expression,
|  | enum print_values | values
| ) |  |
| static

Definition at line 2476 of file mi-main.c.

References check_typedef(), common_val_print(), current_language, current_uiout, value_print_options::deref_ref, gdb::optional< T >::emplace(), evaluate_expression(), evaluate_type(), ui_out::field_stream(), ui_out::field_string(), get_no_prettyformat_print_options(), parse_expression(), PRINT_ALL_VALUES, PRINT_NO_VALUES, PRINT_SIMPLE_VALUES, type, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_STRUCT, TYPE_CODE_UNION, type_print(), and value_type().

Referenced by mi_cmd_trace_frame_collected().

## ◆ proceed_thread()

static void proceed_thread | ( | struct thread_info * | thread,
|  | int | pid
| ) |  |
| static

Definition at line 244 of file mi-main.c.

References clear_proceed_status(), is_stopped(), pid, proceed(), thread_info::ptid, ptid_get_pid(), and switch_to_thread().

Referenced by proceed_thread_callback().

## ◆ proceed_thread_callback()

static int proceed_thread_callback | ( | struct thread_info * | thread,
|  | void * | arg
| ) |  |
| static

Definition at line 258 of file mi-main.c.

References pid, and proceed_thread().

Referenced by exec_continue().

## ◆ register_changed_p()

static bool register_changed_p | ( | int | regnum,
|  | regcache * | prev_regs,
|  | regcache * | this_regs
| ) |  |
| static

Definition at line 998 of file mi-main.c.

References regcache::arch(), regcache::cooked_read_value(), gdb_assert, register_size(), regnum, release_value(), value_contents_eq(), and value_free().

Referenced by mi_cmd_data_list_changed_registers().

## ◆ run_one_inferior()

static int run_one_inferior | ( | struct inferior * | inf,
|  | void * | arg
| ) |  |
| static

Definition at line 403 of file mi-main.c.

References _, any_thread_of_process(), error(), find_run_target(), inferior_ptid, mi_async, mi_execute_cli_command(), null_ptid, inf::pid, thread_info::ptid, ptid_get_pid(), set_current_inferior(), set_current_program_space(), switch_to_thread(), and target_ops::to_can_async_p.

Referenced by mi_cmd_exec_run().

## ◆ set_mi_async_command()

static void set_mi_async_command | ( | const char * | args,
|  | int | from_tty,
|  | struct cmd_list_element * | c
| ) |  |
| static

Definition at line 112 of file mi-main.c.

References _, error(), have_live_inferiors(), mi_async, and mi_async_1.

Referenced by _initialize_mi_main().

## ◆ show_mi_async_command()

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

Definition at line 125 of file mi-main.c.

References _, and fprintf_filtered().

Referenced by _initialize_mi_main().

## ◆ timestamp()

static void timestamp | ( | struct mi_timestamp * | tv | ) |
| static

Definition at line 2240 of file mi-main.c.

References run_time_clock::now(), mi_timestamp::stime, mi_timestamp::utime, and mi_timestamp::wallclock.

Referenced by mi_execute_command(), print_diff_now(), and vfprintf_unfiltered().

## Variable Documentation

## ◆ current_command_ts

struct mi_timestamp* current_command_ts
| static

Definition at line 77 of file mi-main.c.

Referenced by captured_mi_execute_command(), and mi_print_timing_maybe().

## ◆ current_context

struct mi_parse* current_context
| static

Definition at line 85 of file mi-main.c.

Referenced by exec_continue(), mi_cmd_exec_interrupt(), mi_cmd_exec_run(), and mi_cmd_execute().

## ◆ current_token

char* current_token

Definition at line 81 of file mi-main.c.

Referenced by captured_mi_execute_command(), mi_cmd_gdb_exit(), mi_load_progress(), and mi_on_resume_1().

## ◆ do_timings

int do_timings = 0
| static

Definition at line 79 of file mi-main.c.

Referenced by captured_mi_execute_command(), mi_cmd_enable_timings(), mi_execute_command(), and mi_print_timing_maybe().

## ◆ mi_async

int mi_async = 0
| static

Definition at line 105 of file mi-main.c.

Referenced by mi_async_p(), mi_cmd_exec_run(), run_one_inferior(), and set_mi_async_command().

## ◆ mi_async_1

int mi_async_1 = 0
| static

Definition at line 109 of file mi-main.c.

Referenced by _initialize_mi_main(), and set_mi_async_command().

## ◆ mi_debug_p

int mi_debug_p

Definition at line 73 of file mi-main.c.

Referenced by captured_mi_execute_command(), and mi_execute_cli_command().

## ◆ mi_proceeded

int mi_proceeded

Definition at line 91 of file mi-main.c.

Referenced by captured_mi_execute_command(), mi_about_to_proceed(), and mi_on_resume_1().

## ◆ running_result_record_printed

int running_result_record_printed = 1

Definition at line 87 of file mi-main.c.

Referenced by captured_mi_execute_command(), and mi_on_resume_1().