GDB (xrefs)
|
#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 "process-stratum-target.h"
#include "gdbcore.h"
#include "sim/callback.h"
#include "sim/sim.h"
#include "command.h"
#include "regcache.h"
#include "sim-regno.h"
#include "arch-utils.h"
#include "readline/readline.h"
#include "gdbthread.h"
#include "gdbsupport/byte-vector.h"
#include "memory-map.h"
#include "remote.h"
#include "gdbsupport/buildargv.h"
Go to the source code of this file.
Classes | |
struct | gdbsim_target |
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 struct sim_inferior_data * | get_sim_inferior_data (struct inferior *inf, int sim_instance_needed) |
static void | dump_mem (const gdb_byte *buf, int len) |
static void | ATTRIBUTE_PRINTF (2, 3) |
static void | ATTRIBUTE_PRINTF (2, 0) |
int | one2one_register_sim_regno (struct gdbarch *gdbarch, int regnum) |
static void | gdbsim_target_open (const char *args, int from_tty) |
static void | gdbsim_cntrl_c (int signo) |
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 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) |
void | _initialize_remote_sim () |
Variables | |
static const target_info | gdbsim_target_info |
static struct gdbsim_target | gdbsim_ops |
static const registry< inferior >::key< sim_inferior_data > | sim_inferior_data_key |
static bool | gdbsim_is_open = false |
static char ** | sim_argv = NULL |
static host_callback | gdb_callback |
static int | callbacks_initialized = 0 |
#define INITIAL_PID 42000 |
anonymous enum |
Enumerator | |
---|---|
SIM_INSTANCE_NOT_NEEDED | |
SIM_INSTANCE_NEEDED |
Definition at line 200 of file remote-sim.c.
void _initialize_remote_sim | ( | ) |
Definition at line 1289 of file remote-sim.c.
References add_com(), add_target(), class_obscure, gdbsim_target_info, gdbsim_target_open(), set_cmd_completer(), sim_command_completer(), and simulator_command().
|
static |
Definition at line 410 of file remote-sim.c.
References gdb_stdout, and gdb_vprintf().
|
static |
Definition at line 398 of file remote-sim.c.
References inferior::args(), gdb_stdout, and gdb_vprintf().
|
static |
Definition at line 295 of file remote-sim.c.
References gdb_printf(), gdb_puts(), and gdb_stdlog.
Referenced by gdbsim_target::fetch_registers(), gdbsim_xfer_memory(), and gdbsim_target::store_registers().
|
static |
Definition at line 345 of file remote-sim.c.
References callbacks_initialized, and gdb_callback.
Referenced by gdbsim_target::close().
|
static |
|
static |
Referenced by init_callbacks().
|
static |
Definition at line 391 of file remote-sim.c.
References ui_file::flush(), and gdb_stdtargerr.
Referenced by init_callbacks().
|
static |
Definition at line 366 of file remote-sim.c.
References ui_file::flush(), and gdb_stdtarg.
Referenced by init_callbacks().
|
static |
Definition at line 913 of file remote-sim.c.
References check_quit_flag(), and deprecated_ui_loop_hook.
Referenced by init_callbacks().
|
static |
Referenced by init_callbacks().
|
static |
Referenced by init_callbacks().
|
static |
Definition at line 374 of file remote-sim.c.
References gdb_stdtargerr, and ui_file::puts().
Referenced by init_callbacks().
|
static |
Definition at line 357 of file remote-sim.c.
References gdb_stdtarg, and ui_file::write().
Referenced by init_callbacks().
|
static |
Definition at line 928 of file remote-sim.c.
References gdbsim_ops, and gdbsim_target::interrupt().
Referenced by gdbsim_target::wait().
|
static |
Definition at line 677 of file remote-sim.c.
References current_inferior(), current_program_space, program_space::exec_bfd(), gdb_callback, gdb_printf(), gdb_stdlog, gdb_sysroot, gdbsim_is_open, gdbsim_ops, get_sim_inferior_data(), init_callbacks(), INITIAL_PID, is_target_filename(), inferior::push_target(), remote_debug, selected_architecture_name(), selected_byte_order(), sim_argv, SIM_INSTANCE_NOT_NEEDED, switch_to_no_thread(), TARGET_SYSROOT_PREFIX, and inferior::unpush_target().
Referenced by _initialize_remote_sim().
|
static |
Definition at line 1025 of file remote-sim.c.
References current_inferior(), dump_mem(), gdb_printf(), gdb_stdlog, get_sim_inferior_data(), target_ops::has_memory(), paddress(), remote_debug, SIM_INSTANCE_NOT_NEEDED, target_gdbarch(), TARGET_XFER_E_IO, TARGET_XFER_EOF, and TARGET_XFER_OK.
Referenced by gdbsim_target::xfer_partial().
|
static |
Definition at line 206 of file remote-sim.c.
References all_inferiors(), current_program_space, program_space::exec_bfd(), gdb_callback, registry< T >::get(), sim_argv, sim_inferior_data_key, and SIM_INSTANCE_NEEDED.
Referenced by gdbsim_target::create_inferior(), gdbsim_target::fetch_registers(), gdbsim_target::files_info(), gdbsim_target_open(), gdbsim_xfer_memory(), gdbsim_target::get_inferior_data_by_ptid(), gdbsim_target::has_all_memory(), gdbsim_target::has_memory(), gdbsim_target::interrupt(), gdbsim_target::load(), gdbsim_target::memory_map(), gdbsim_target::resume_one_inferior(), gdbsim_target::store_registers(), and gdbsim_target::wait().
|
static |
Definition at line 322 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_target_open().
int one2one_register_sim_regno | ( | struct gdbarch * | gdbarch, |
int | regnum ) |
Definition at line 437 of file remote-sim.c.
References gdbarch_num_regs(), and regnum.
|
static |
Definition at line 1177 of file remote-sim.c.
References completion_tracker::add_completion(), current_inferior(), registry< T >::get(), sim_inferior_data_key, and xfree().
Referenced by _initialize_remote_sim().
|
static |
Definition at line 1138 of file remote-sim.c.
References current_inferior(), registry< T >::get(), registers_changed(), and sim_inferior_data_key.
Referenced by _initialize_remote_sim().
|
static |
Definition at line 195 of file remote-sim.c.
Referenced by end_callbacks(), and init_callbacks().
|
static |
Definition at line 194 of file remote-sim.c.
Referenced by end_callbacks(), gdbsim_target_open(), get_sim_inferior_data(), and init_callbacks().
|
static |
Definition at line 185 of file remote-sim.c.
Referenced by gdbsim_target::close(), and gdbsim_target_open().
|
static |
Definition at line 179 of file remote-sim.c.
Referenced by gdbsim_cntrl_c(), and gdbsim_target_open().
|
static |
Definition at line 118 of file remote-sim.c.
Referenced by _initialize_remote_sim(), and gdbsim_target::info().
|
static |
Definition at line 191 of file remote-sim.c.
Referenced by gdbsim_target::close(), gdbsim_target_open(), and get_sim_inferior_data().
Definition at line 181 of file remote-sim.c.
Referenced by gdbsim_target::close_one_inferior(), get_sim_inferior_data(), sim_command_completer(), and simulator_command().