GDB (xrefs)

Classes | Macros | Enumerations | Functions | Variables
/tmp/gdb-8.1/gdb/remote-sim.c File Reference
`#include "defs.h"`
`#include "gdb_bfd.h"`
`#include "inferior.h"`
`#include "infrun.h"`
`#include "value.h"`
`#include <ctype.h>`
`#include <fcntl.h>`
`#include <signal.h>`
`#include <setjmp.h>`
`#include "terminal.h"`
`#include "target.h"`
`#include "gdbcore.h"`
`#include "gdb/callback.h"`
`#include "gdb/remote-sim.h"`
`#include "command.h"`
`#include "regcache.h"`
`#include "sim-regno.h"`
`#include "arch-utils.h"`
`#include "readline/readline.h"`
`#include "gdbthread.h"`
`#include "common/byte-vector.h"`

Go to the source code of this file.

## Classes
struct | resume_data

## Macros
#define | INITIAL_PID 42000

## Enumerations
enum | { SIM_INSTANCE_NOT_NEEDED = 0, SIM_INSTANCE_NEEDED = 1 }

## Functions
static void | init_callbacks (void)
static void | end_callbacks (void)
static int | gdb_os_write_stdout (host_callback *, const char *, int)
static void | gdb_os_flush_stdout (host_callback *)
static int | gdb_os_write_stderr (host_callback *, const char *, int)
static void | gdb_os_flush_stderr (host_callback *)
static int | gdb_os_poll_quit (host_callback *)
static void | gdb_os_printf_filtered (host_callback *, const char *,...)
static void | gdb_os_vprintf_filtered (host_callback *, const char *, va_list)
static void | gdb_os_evprintf_filtered (host_callback *, const char *, va_list)
static void | gdb_os_error (host_callback *, const char *,...)
static int | check_for_duplicate_sim_descriptor (struct inferior *inf, void *arg)
static struct sim_inferior_data * | get_sim_inferior_data (struct inferior *inf, int sim_instance_needed)
static struct sim_inferior_data * | get_sim_inferior_data_by_ptid (ptid_t ptid, int sim_instance_needed)
static void | sim_inferior_data_cleanup (struct inferior *inf, void *data)
static void | dump_mem (const gdb_byte *buf, int len)
int | one2one_register_sim_regno (struct gdbarch *gdbarch, int regnum)
static void | gdbsim_fetch_register (struct target_ops *ops, struct regcache *regcache, int regno)
static void | gdbsim_store_register (struct target_ops *ops, struct regcache *regcache, int regno)
static void | gdbsim_kill (struct target_ops *ops)
static void | gdbsim_load (struct target_ops *self, const char *args, int fromtty)
static void | gdbsim_create_inferior (struct target_ops *target, const char *exec_file, const std::string &allargs, char **env, int from_tty)
static void | gdbsim_open (const char *args, int from_tty)
static int | gdbsim_close_inferior (struct inferior *inf, void *arg)
static void | gdbsim_close (struct target_ops *self)
static void | gdbsim_detach (struct target_ops *ops, const char *args, int from_tty)
static int | gdbsim_resume_inferior (struct inferior *inf, void *arg)
static void | gdbsim_resume (struct target_ops *ops, ptid_t ptid, int step, enum gdb_signal siggnal)
static int | gdbsim_interrupt_inferior (struct inferior *inf, void *arg)
static void | gdbsim_interrupt (struct target_ops *self, ptid_t ptid)
static void | gdbsim_cntrl_c (int signo)
static ptid_t | gdbsim_wait (struct target_ops *ops, ptid_t ptid, struct target_waitstatus *status, int options)
static void | gdbsim_prepare_to_store (struct target_ops *self, struct regcache *regcache)
static enum target_xfer_status | gdbsim_xfer_memory (struct target_ops *target, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST memaddr, ULONGEST len, ULONGEST *xfered_len)
static enum target_xfer_status | gdbsim_xfer_partial (struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len)
static void | gdbsim_files_info (struct target_ops *target)
static void | gdbsim_mourn_inferior (struct target_ops *target)
void | simulator_command (const char *args, int from_tty)
static void | sim_command_completer (struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
static int | gdbsim_thread_alive (struct target_ops *ops, ptid_t ptid)
static const char * | gdbsim_pid_to_str (struct target_ops *ops, ptid_t ptid)
static int | gdbsim_has_all_memory (struct target_ops *ops)
static int | gdbsim_has_memory (struct target_ops *ops)
static void | init_gdbsim_ops (void)
void | _initialize_remote_sim (void)

## Variables
static int | gdbsim_is_open = 0
static int | next_pid
static char ** | sim_argv = NULL
static host_callback | gdb_callback
static int | callbacks_initialized = 0
struct target_ops | gdbsim_ops

## Macro Definition Documentation

## ◆ INITIAL_PID

#define INITIAL_PID 42000

Definition at line 134 of file remote-sim.c.

Referenced by gdbsim_open().

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

Enumerator
SIM_INSTANCE_NOT_NEEDED |
SIM_INSTANCE_NEEDED |

Definition at line 165 of file remote-sim.c.

## Function Documentation

## ◆ _initialize_remote_sim()

void _initialize_remote_sim | ( | void |  | ) |

Definition at line 1357 of file remote-sim.c.

References _, add_com(), add_target(), class_obscure, gdbsim_ops, init_gdbsim_ops(), set_cmd_completer(), sim_command_completer(), sim_inferior_data_cleanup(), and simulator_command().

## ◆ check_for_duplicate_sim_descriptor()

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

Definition at line 151 of file remote-sim.c.

Referenced by get_sim_inferior_data().

## ◆ dump_mem()

static void dump_mem | ( | const gdb_byte * | buf,
|  | int | len
| ) |  |
| static

Definition at line 274 of file remote-sim.c.

References fprintf_unfiltered(), fputs_unfiltered(), and gdb_stdlog.

Referenced by gdbsim_fetch_register(), gdbsim_store_register(), and gdbsim_xfer_memory().

## ◆ end_callbacks()

static void end_callbacks | ( | void |  | ) |
| static

Definition at line 324 of file remote-sim.c.

References callbacks_initialized, and gdb_callback.

Referenced by gdbsim_close().

## ◆ gdb_os_error()

static void gdb_os_error | ( | host_callback * | p,
|  | const char * | format,
|  |  | ...
| ) |  |
| static

Definition at line 68 of file remote-sim.c.

References resume_step.

Referenced by init_callbacks().

## ◆ gdb_os_evprintf_filtered()

static void gdb_os_evprintf_filtered | ( | host_callback * | p,
|  | const char * | format,
|  | va_list | ap
| ) |  |
| static

Definition at line 401 of file remote-sim.c.

References gdb_stderr, and vfprintf_filtered().

Referenced by init_callbacks().

## ◆ gdb_os_flush_stderr()

static void gdb_os_flush_stderr | ( | host_callback * | p | ) |
| static

Definition at line 373 of file remote-sim.c.

References gdb_flush(), and gdb_stdtargerr.

Referenced by init_callbacks().

## ◆ gdb_os_flush_stdout()

static void gdb_os_flush_stdout | ( | host_callback * | p | ) |
| static

Definition at line 348 of file remote-sim.c.

References gdb_flush(), and gdb_stdtarg.

Referenced by init_callbacks().

## ◆ gdb_os_poll_quit()

static int gdb_os_poll_quit | ( | host_callback * | p | ) |
| static

Definition at line 949 of file remote-sim.c.

References check_quit_flag(), and deprecated_ui_loop_hook.

Referenced by init_callbacks().

## ◆ gdb_os_printf_filtered()

static void gdb_os_printf_filtered | ( | host_callback * | p,
|  | const char * | format,
|  |  | ...
| ) |  |
| static

Definition at line 381 of file remote-sim.c.

References gdb_stdout, and vfprintf_filtered().

Referenced by init_callbacks().

## ◆ gdb_os_vprintf_filtered()

static void gdb_os_vprintf_filtered | ( | host_callback * | p,
|  | const char * | format,
|  | va_list | ap
| ) |  |
| static

Definition at line 393 of file remote-sim.c.

References gdb_stdout, and vfprintf_filtered().

Referenced by init_callbacks().

## ◆ gdb_os_write_stderr()

static int gdb_os_write_stderr | ( | host_callback * | p,
|  | const char * | buf,
|  | int | len
| ) |  |
| static

Definition at line 356 of file remote-sim.c.

References fputs_unfiltered(), and gdb_stdtargerr.

Referenced by init_callbacks().

## ◆ gdb_os_write_stdout()

static int gdb_os_write_stdout | ( | host_callback * | p,
|  | const char * | buf,
|  | int | len
| ) |  |
| static

Definition at line 336 of file remote-sim.c.

References gdb_stdtarg, and ui_file_write().

Referenced by init_callbacks().

## ◆ gdbsim_close()

static void gdbsim_close | ( | struct target_ops * | self | ) |
| static

Definition at line 794 of file remote-sim.c.

References current_inferior(), end_callbacks(), fprintf_unfiltered(), gdb_stdlog, gdbsim_close_inferior(), gdbsim_is_open, get_sim_inferior_data(), iterate_over_inferiors(), remote_debug, sim_argv, and SIM_INSTANCE_NOT_NEEDED.

Referenced by init_gdbsim_ops().

## ◆ gdbsim_close_inferior()

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

Definition at line 765 of file remote-sim.c.

References find_inferior_ptid(), generic_mourn_inferior(), sim_inferior_data_cleanup(), and switch_to_thread().

Referenced by gdbsim_close().

## ◆ gdbsim_cntrl_c()

static void gdbsim_cntrl_c | ( | int | signo | ) |
| static

Definition at line 964 of file remote-sim.c.

References gdbsim_interrupt(), and minus_one_ptid.

Referenced by gdbsim_wait().

## ◆ gdbsim_create_inferior()

static void gdbsim_create_inferior | ( | struct target_ops * | target,
|  | const char * | exec_file,
|  | const std::string & | allargs,
|  | char ** | env,
|  | int | from_tty
| ) |  |
| static

Definition at line 602 of file remote-sim.c.

References _, add_thread_silent(), clear_proceed_status(), current_inferior(), error(), exec_bfd, fprintf_unfiltered(), gdb_stdlog, gdbsim_kill(), gdb_argv::get(), get_sim_inferior_data(), have_inferiors(), inferior_appeared(), inferior_ptid, init_thread_list(), init_wait_for_inferior(), insert_breakpoints(), ptid_equal(), ptid_get_pid(), remote_debug, remove_breakpoints(), gdb_argv::reset(), SIM_INSTANCE_NEEDED, and warning().

Referenced by init_gdbsim_ops().

## ◆ gdbsim_detach()

static void gdbsim_detach | ( | struct target_ops * | ops,
|  | const char * | args,
|  | int | from_tty
| ) |  |
| static

Definition at line 825 of file remote-sim.c.

References fprintf_unfiltered(), gdb_stdlog, printf_filtered(), remote_debug, target_shortname, and unpush_target().

Referenced by init_gdbsim_ops().

## ◆ gdbsim_fetch_register()

static void gdbsim_fetch_register | ( | struct target_ops * | ops,
|  | struct regcache * | regcache,
|  | int | regno
| ) |  |
| static

Definition at line 427 of file remote-sim.c.

References regcache::arch(), dump_mem(), find_inferior_ptid(), fprintf_unfiltered(), gdb_assert, gdb_stderr, gdb_stdlog, gdbarch_num_regs(), gdbarch_register_name(), gdbarch_register_sim_regno(), get_sim_inferior_data(), LEGACY_SIM_REGNO_IGNORE, regcache::raw_supply(), regcache::raw_supply_zeroed(), regcache_get_ptid(), register_size(), remote_debug, SIM_INSTANCE_NEEDED, and SIM_REGNO_DOES_NOT_EXIST.

Referenced by init_gdbsim_ops().

## ◆ gdbsim_files_info()

static void gdbsim_files_info | ( | struct target_ops * | target | ) |
| static

Definition at line 1142 of file remote-sim.c.

References current_inferior(), exec_bfd, fprintf_unfiltered(), gdb_stdlog, get_sim_inferior_data(), remote_debug, SIM_INSTANCE_NEEDED, and target_shortname.

Referenced by init_gdbsim_ops().

## ◆ gdbsim_has_all_memory()

static int gdbsim_has_all_memory | ( | struct target_ops * | ops | ) |
| static

Definition at line 1295 of file remote-sim.c.

References current_inferior(), get_sim_inferior_data(), and SIM_INSTANCE_NOT_NEEDED.

Referenced by init_gdbsim_ops().

## ◆ gdbsim_has_memory()

static int gdbsim_has_memory | ( | struct target_ops * | ops | ) |
| static

Definition at line 1307 of file remote-sim.c.

References current_inferior(), get_sim_inferior_data(), and SIM_INSTANCE_NOT_NEEDED.

Referenced by init_gdbsim_ops().

## ◆ gdbsim_interrupt()

static void gdbsim_interrupt | ( | struct target_ops * | self,
|  | ptid_t | ptid
| ) |  |
| static

Definition at line 925 of file remote-sim.c.

References _, error(), find_inferior_ptid(), gdbsim_interrupt_inferior(), iterate_over_inferiors(), minus_one_ptid, ptid_equal(), and ptid_get_pid().

Referenced by gdbsim_cntrl_c(), and init_gdbsim_ops().

## ◆ gdbsim_interrupt_inferior()

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

Definition at line 905 of file remote-sim.c.

References get_sim_inferior_data(), quit(), and SIM_INSTANCE_NEEDED.

Referenced by gdbsim_interrupt().

## ◆ gdbsim_kill()

static void gdbsim_kill | ( | struct target_ops * | ops | ) |
| static

Definition at line 546 of file remote-sim.c.

References fprintf_unfiltered(), gdb_stdlog, inferior_ptid, remote_debug, and target_mourn_inferior().

Referenced by gdbsim_create_inferior(), and init_gdbsim_ops().

## ◆ gdbsim_load()

static void gdbsim_load | ( | struct target_ops * | self,
|  | const char * | args,
|  | int | fromtty
| ) |  |
| static

Definition at line 561 of file remote-sim.c.

References _, gdb::argv, current_inferior(), error(), error_no_arg(), fprintf_unfiltered(), gdb_stdlog, get_sim_inferior_data(), remote_debug, and SIM_INSTANCE_NEEDED.

Referenced by init_gdbsim_ops().

## ◆ gdbsim_mourn_inferior()

static void gdbsim_mourn_inferior | ( | struct target_ops * | target | ) |
| static

Definition at line 1165 of file remote-sim.c.

References current_inferior(), delete_thread_silent(), fprintf_unfiltered(), gdb_stdlog, generic_mourn_inferior(), get_sim_inferior_data(), remote_debug, remove_breakpoints(), and SIM_INSTANCE_NOT_NEEDED.

Referenced by init_gdbsim_ops().

## ◆ gdbsim_open()

static void gdbsim_open | ( | const char * | args,
|  | int | from_tty
| ) |  |
| static

Definition at line 663 of file remote-sim.c.

References _, gdb::argv, current_inferior(), error(), exec_bfd, fprintf_unfiltered(), gdb_callback, gdb_stdlog, gdb_sysroot, gdbsim_is_open, gdbsim_ops, get_sim_inferior_data(), inferior_ptid, init_callbacks(), INITIAL_PID, is_target_filename(), next_pid, null_ptid, printf_filtered(), push_target(), remote_debug, selected_architecture_name(), selected_byte_order(), sim_argv, SIM_INSTANCE_NOT_NEEDED, TARGET_SYSROOT_PREFIX, and unpush_target().

Referenced by init_gdbsim_ops().

## ◆ gdbsim_pid_to_str()

static const char* gdbsim_pid_to_str | ( | struct target_ops * | ops,
|  | ptid_t | ptid
| ) |  |
| static

Definition at line 1287 of file remote-sim.c.

References normal_pid_to_str().

Referenced by init_gdbsim_ops().

## ◆ gdbsim_prepare_to_store()

static void gdbsim_prepare_to_store | ( | struct target_ops * | self,
|  | struct regcache * | regcache
| ) |  |
| static

Definition at line 1056 of file remote-sim.c.

Referenced by init_gdbsim_ops().

## ◆ gdbsim_resume()

static void gdbsim_resume | ( | struct target_ops * | ops,
|  | ptid_t | ptid,
|  | int | step,
|  | enum gdb_signal | siggnal
| ) |  |
| static

Definition at line 870 of file remote-sim.c.

References _, error(), find_inferior_ptid(), gdbsim_resume_inferior(), get_sim_inferior_data_by_ptid(), iterate_over_inferiors(), minus_one_ptid, ptid_equal(), resume_data::siggnal, SIM_INSTANCE_NOT_NEEDED, and resume_data::step.

Referenced by init_gdbsim_ops().

## ◆ gdbsim_resume_inferior()

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

Definition at line 846 of file remote-sim.c.

References _, fprintf_unfiltered(), gdb_stdlog, get_sim_inferior_data(), inf::pid, remote_debug, resume_data::siggnal, SIM_INSTANCE_NOT_NEEDED, and resume_data::step.

Referenced by gdbsim_resume().

## ◆ gdbsim_store_register()

static void gdbsim_store_register | ( | struct target_ops * | ops,
|  | struct regcache * | regcache,
|  | int | regno
| ) |  |
| static

Definition at line 497 of file remote-sim.c.

References _, regcache::arch(), regcache::cooked_read(), dump_mem(), find_inferior_ptid(), fprintf_unfiltered(), gdb_stdlog, gdbarch_num_regs(), gdbarch_register_name(), gdbarch_register_sim_regno(), get_sim_inferior_data(), internal_error(), regcache_get_ptid(), register_size(), remote_debug, SIM_INSTANCE_NEEDED, and warning().

Referenced by init_gdbsim_ops().

## ◆ gdbsim_thread_alive()

static int gdbsim_thread_alive | ( | struct target_ops * | ops,
|  | ptid_t | ptid
| ) |  |
| static

Definition at line 1268 of file remote-sim.c.

References get_sim_inferior_data_by_ptid(), ptid_equal(), and SIM_INSTANCE_NOT_NEEDED.

Referenced by init_gdbsim_ops().

## ◆ gdbsim_wait()

static ptid_t gdbsim_wait | ( | struct target_ops * | ops,
|  | ptid_t | ptid,
|  | struct target_waitstatus * | status,
|  | int | options
| ) |  |
| static

Definition at line 970 of file remote-sim.c.

References _, current_inferior(), error(), fprintf_unfiltered(), gdb_stdlog, gdbsim_cntrl_c(), get_sim_inferior_data(), get_sim_inferior_data_by_ptid(), inferior_ptid, minus_one_ptid, ptid_equal(), ptid_get_pid(), quit(), remote_debug, SIM_INSTANCE_NEEDED, status, TARGET_WAITKIND_EXITED, TARGET_WAITKIND_SIGNALLED, and TARGET_WAITKIND_STOPPED.

Referenced by init_gdbsim_ops().

## ◆ gdbsim_xfer_memory()

static enum target_xfer_status gdbsim_xfer_memory | ( | struct target_ops * | target,
|  | gdb_byte * | readbuf,
|  | const gdb_byte * | writebuf,
|  | ULONGEST | memaddr,
|  | ULONGEST | len,
|  | ULONGEST * | xfered_len
| ) |  |
| static

Definition at line 1065 of file remote-sim.c.

References _, current_inferior(), dump_mem(), error(), fprintf_unfiltered(), gdb_assert, gdb_stdlog, get_sim_inferior_data(), host_address_to_string, paddress(), pulongest(), remote_debug, SIM_INSTANCE_NOT_NEEDED, target_gdbarch(), TARGET_XFER_E_IO, TARGET_XFER_EOF, TARGET_XFER_OK, and target_ops::to_has_memory.

Referenced by gdbsim_xfer_partial().

## ◆ gdbsim_xfer_partial()

static enum target_xfer_status gdbsim_xfer_partial | ( | struct target_ops * | ops,
|  | enum target_object | object,
|  | const char * | annex,
|  | gdb_byte * | readbuf,
|  | const gdb_byte * | writebuf,
|  | ULONGEST | offset,
|  | ULONGEST | len,
|  | ULONGEST * | xfered_len
| ) |  |
| static

Definition at line 1125 of file remote-sim.c.

References gdbsim_xfer_memory(), offset, TARGET_OBJECT_MEMORY, and TARGET_XFER_E_IO.

Referenced by init_gdbsim_ops().

## ◆ get_sim_inferior_data()

static struct sim_inferior_data* get_sim_inferior_data | ( | struct inferior * | inf,
|  | int | sim_instance_needed
| ) |  |
| static

Definition at line 171 of file remote-sim.c.

References _, check_for_duplicate_sim_descriptor(), error(), exec_bfd, gdb_callback, iterate_over_inferiors(), next_pid, inferior::num, ptid_build(), sim_argv, SIM_INSTANCE_NEEDED, and XCNEW.

Referenced by gdbsim_close(), gdbsim_create_inferior(), gdbsim_fetch_register(), gdbsim_files_info(), gdbsim_has_all_memory(), gdbsim_has_memory(), gdbsim_interrupt_inferior(), gdbsim_load(), gdbsim_mourn_inferior(), gdbsim_open(), gdbsim_resume_inferior(), gdbsim_store_register(), gdbsim_wait(), gdbsim_xfer_memory(), and get_sim_inferior_data_by_ptid().

## ◆ get_sim_inferior_data_by_ptid()

static struct sim_inferior_data* get_sim_inferior_data_by_ptid | ( | ptid_t | ptid,
|  | int | sim_instance_needed
| ) |  |
| static

Definition at line 239 of file remote-sim.c.

References find_inferior_pid(), get_sim_inferior_data(), arm-linux::inf, pid, and ptid_get_pid().

Referenced by gdbsim_resume(), gdbsim_thread_alive(), and gdbsim_wait().

## ◆ init_callbacks()

static void init_callbacks | ( | void |  | ) |
| static

Definition at line 301 of file remote-sim.c.

References callbacks_initialized, gdb_callback, gdb_os_error(), gdb_os_evprintf_filtered(), gdb_os_flush_stderr(), gdb_os_flush_stdout(), gdb_os_poll_quit(), gdb_os_printf_filtered(), gdb_os_vprintf_filtered(), gdb_os_write_stderr(), and gdb_os_write_stdout().

Referenced by gdbsim_open().

## ◆ init_gdbsim_ops()

static void init_gdbsim_ops | ( | void |  | ) |
| static

Definition at line 1323 of file remote-sim.c.

References default_child_has_execution(), default_child_has_registers(), default_child_has_stack(), gdbsim_close(), gdbsim_create_inferior(), gdbsim_detach(), gdbsim_fetch_register(), gdbsim_files_info(), gdbsim_has_all_memory(), gdbsim_has_memory(), gdbsim_interrupt(), gdbsim_kill(), gdbsim_load(), gdbsim_mourn_inferior(), gdbsim_open(), gdbsim_ops, gdbsim_pid_to_str(), gdbsim_prepare_to_store(), gdbsim_resume(), gdbsim_store_register(), gdbsim_thread_alive(), gdbsim_wait(), gdbsim_xfer_partial(), memory_insert_breakpoint(), memory_remove_breakpoint(), OPS_MAGIC, process_stratum, target_ops::to_close, target_ops::to_create_inferior, target_ops::to_detach, target_ops::to_doc, target_ops::to_fetch_registers, target_ops::to_files_info, target_ops::to_has_all_memory, target_ops::to_has_execution, target_ops::to_has_memory, target_ops::to_has_registers, target_ops::to_has_stack, target_ops::to_insert_breakpoint, target_ops::to_interrupt, target_ops::to_kill, target_ops::to_load, target_ops::to_longname, target_ops::to_magic, target_ops::to_mourn_inferior, target_ops::to_open, target_ops::to_pid_to_str, target_ops::to_prepare_to_store, target_ops::to_remove_breakpoint, target_ops::to_resume, target_ops::to_shortname, target_ops::to_store_registers, target_ops::to_stratum, target_ops::to_thread_alive, target_ops::to_wait, and target_ops::to_xfer_partial.

Referenced by _initialize_remote_sim().

## ◆ one2one_register_sim_regno()

int one2one_register_sim_regno | ( | struct gdbarch * | gdbarch,
|  | int | regnum
| ) |  |

Definition at line 419 of file remote-sim.c.

References gdb_assert, gdbarch_num_regs(), and regnum.

## ◆ sim_command_completer()

static void sim_command_completer | ( | struct cmd_list_element * | ignore,
|  | completion_tracker & | tracker,
|  | const char * | text,
|  | const char * | word
| ) |  |
| static

Definition at line 1222 of file remote-sim.c.

References completion_tracker::add_completion(), current_inferior(), and xfree().

Referenced by _initialize_remote_sim().

## ◆ sim_inferior_data_cleanup()

static void sim_inferior_data_cleanup | ( | struct inferior * | inf,
|  | void * | data
| ) |  |
| static

Definition at line 258 of file remote-sim.c.

References xfree().

Referenced by _initialize_remote_sim(), and gdbsim_close_inferior().

## ◆ simulator_command()

void simulator_command | ( | const char * | args,
|  | int | from_tty
| ) |  |

Definition at line 1182 of file remote-sim.c.

References _, current_inferior(), error(), and registers_changed().

Referenced by _initialize_remote_sim().

## Variable Documentation

## ◆ callbacks_initialized

int callbacks_initialized = 0
| static

Definition at line 144 of file remote-sim.c.

Referenced by end_callbacks(), and init_callbacks().

## ◆ gdb_callback

host_callback gdb_callback
| static

Definition at line 143 of file remote-sim.c.

Referenced by end_callbacks(), gdbsim_open(), get_sim_inferior_data(), and init_callbacks().

## ◆ gdbsim_is_open

int gdbsim_is_open = 0
| static

Definition at line 128 of file remote-sim.c.

Referenced by gdbsim_close(), and gdbsim_open().

## ◆ gdbsim_ops

struct target_ops gdbsim_ops

Definition at line 1320 of file remote-sim.c.

Referenced by _initialize_remote_sim(), gdbsim_open(), and init_gdbsim_ops().

## ◆ next_pid

int next_pid
| static

Definition at line 133 of file remote-sim.c.

Referenced by gdbsim_open(), and get_sim_inferior_data().

## ◆ sim_argv

char** sim_argv = NULL
| static

Definition at line 140 of file remote-sim.c.

Referenced by gdbsim_close(), gdbsim_open(), and get_sim_inferior_data().