GDBserver
Functions | Variables
target.c File Reference
#include "server.h"
#include "tracepoint.h"

Go to the source code of this file.

Functions

int set_desired_thread ()
 
int prepare_to_access_memory (void)
 
void done_accessing_memory (void)
 
int read_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
 
int target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
 
int target_read_uint32 (CORE_ADDR memaddr, uint32_t *result)
 
int write_inferior_memory (CORE_ADDR memaddr, const unsigned char *myaddr, int len)
 
int target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len)
 
ptid_t mywait (ptid_t ptid, struct target_waitstatus *ourstatus, int options, int connected_wait)
 
void target_stop_and_wait (ptid_t ptid)
 
ptid_t target_wait (ptid_t ptid, struct target_waitstatus *status, int options)
 
void target_mourn_inferior (ptid_t ptid)
 
void target_continue_no_signal (ptid_t ptid)
 
void target_continue (ptid_t ptid, enum gdb_signal signal)
 
int target_supports_multi_process (void)
 
int start_non_stop (int nonstop)
 
void set_target_ops (struct target_ops *target)
 
const char * target_pid_to_str (ptid_t ptid)
 
int kill_inferior (int pid)
 
int target_can_do_hardware_single_step (void)
 
int default_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
 

Variables

struct target_opsthe_target
 
static ptid_t prev_general_thread
 
enum target_terminal::terminal_state target_terminal
 

Function Documentation

◆ default_breakpoint_kind_from_pc()

int default_breakpoint_kind_from_pc ( CORE_ADDR pcptr)

Definition at line 351 of file target.c.

References gdb_assert, target_ops::sw_breakpoint_from_kind, and the_target.

Referenced by linux_breakpoint_kind_from_pc().

◆ done_accessing_memory()

void done_accessing_memory ( void  )

◆ kill_inferior()

int kill_inferior ( int  pid)

◆ mywait()

ptid_t mywait ( ptid_t  ptid,
struct target_waitstatus *  ourstatus,
int  options,
int  connected_wait 
)

◆ prepare_to_access_memory()

int prepare_to_access_memory ( void  )

◆ read_inferior_memory()

int read_inferior_memory ( CORE_ADDR  memaddr,
unsigned char *  myaddr,
int  len 
)

◆ set_desired_thread()

int set_desired_thread ( )

◆ set_target_ops()

void set_target_ops ( struct target_ops target)

Definition at line 299 of file target.c.

References the_target, and XNEW.

Referenced by initialize_low().

◆ start_non_stop()

int start_non_stop ( int  nonstop)

Definition at line 285 of file target.c.

References target_ops::start_non_stop, and the_target.

Referenced by captured_main(), handle_detach(), and handle_general_set().

◆ target_can_do_hardware_single_step()

int target_can_do_hardware_single_step ( void  )

Definition at line 340 of file target.c.

◆ target_continue()

void target_continue ( ptid_t  ptid,
enum gdb_signal  signal 
)

◆ target_continue_no_signal()

void target_continue_no_signal ( ptid_t  ptid)

◆ target_mourn_inferior()

void target_mourn_inferior ( ptid_t  ptid)

Definition at line 244 of file target.c.

References find_process_pid(), target_ops::mourn, ptid_get_pid(), and the_target.

Referenced by handle_target_event(), resume(), and startup_inferior().

◆ target_pid_to_str()

const char* target_pid_to_str ( ptid_t  ptid)

◆ target_read_memory()

int target_read_memory ( CORE_ADDR  memaddr,
gdb_byte myaddr,
ssize_t  len 
)

◆ target_read_uint32()

int target_read_uint32 ( CORE_ADDR  memaddr,
uint32_t *  result 
)

◆ target_stop_and_wait()

void target_stop_and_wait ( ptid_t  ptid)

◆ target_supports_multi_process()

int target_supports_multi_process ( void  )

Definition at line 278 of file target.c.

References target_ops::supports_multi_process, and the_target.

Referenced by handle_query(), and startup_inferior().

◆ target_wait()

ptid_t target_wait ( ptid_t  ptid,
struct target_waitstatus *  status,
int  options 
)

Definition at line 236 of file target.c.

References the_target, and target_ops::wait.

Referenced by mywait(), and startup_inferior().

◆ target_write_memory()

int target_write_memory ( CORE_ADDR  memaddr,
const gdb_byte myaddr,
ssize_t  len 
)

Definition at line 170 of file target.c.

References write_inferior_memory().

Referenced by agent_run_command().

◆ write_inferior_memory()

int write_inferior_memory ( CORE_ADDR  memaddr,
const unsigned char *  myaddr,
int  len 
)

Variable Documentation

◆ prev_general_thread

ptid_t prev_general_thread
static

Definition at line 38 of file target.c.

Referenced by done_accessing_memory(), and prepare_to_access_memory().

◆ target_terminal

enum target_terminal::terminal_state target_terminal

Definition at line 363 of file target.c.

◆ the_target

struct target_ops* the_target

Definition at line 24 of file target.c.

Referenced by aarch64_breakpoint_at(), arm_breakpoint_at(), arm_get_hwcap(), arm_get_syscall_trapinfo(), arm_sigreturn_next_pc(), bp_opcode(), bp_size(), cris_breakpoint_at(), default_breakpoint_kind_from_pc(), delete_raw_breakpoint(), done_accessing_memory(), getpkt(), handle_open(), handle_query(), handle_qxfer_auxv(), handle_qxfer_btrace(), handle_qxfer_btrace_conf(), handle_qxfer_exec_file(), handle_qxfer_fdpic(), handle_qxfer_libraries_svr4(), handle_qxfer_osdata(), handle_qxfer_siginfo(), handle_qxfer_spu(), handle_readlink(), handle_setfs(), handle_unlink(), handle_v_requests(), hostio_error(), input_interrupt(), insert_memory_breakpoint(), kill_inferior(), linux_detach(), linux_kill(), linux_wait_1(), lynx_detach(), lynx_kill(), m32r_breakpoint_at(), mips_breakpoint_at(), nios2_breakpoint_at(), parse_spufs_run(), ppc_breakpoint_at(), ppc_get_auxv(), ppc_get_pc(), ppc_set_pc(), prepare_resume_reply(), prepare_to_access_memory(), putpkt_binary_1(), queue_stop_reply_callback(), read_inferior_memory(), regcache_read_pc(), regcache_write_pc(), reinsert_raw_breakpoint(), resume(), s390_get_hwcap(), set_raw_breakpoint_at(), set_target_ops(), sh_breakpoint_at(), sparc_breakpoint_at(), sparc_fill_gregset_to_stack(), sparc_store_gregset_from_stack(), start_non_stop(), target_continue(), target_continue_no_signal(), target_mourn_inferior(), target_stop_and_wait(), target_supports_multi_process(), target_wait(), tic6x_breakpoint_at(), tile_breakpoint_at(), uninsert_raw_breakpoint(), validate_inserted_breakpoint(), write_inferior_memory(), x86_breakpoint_at(), xtensa_breakpoint_at(), and z_type_supported().