GDBserver
Classes | Macros | Functions | Variables
target.h File Reference
#include "target/target.h"
#include "target/resume.h"
#include "target/wait.h"
#include "target/waitstatus.h"
#include "mem-break.h"
#include "btrace-common.h"

Go to the source code of this file.

Classes

struct  thread_resume
 
struct  target_ops
 

Macros

#define create_inferior(program, args)   (*the_target->create_inferior) (program, args)
 
#define myattach(pid)   (*the_target->attach) (pid)
 
#define target_supports_fork_events()
 
#define target_supports_vfork_events()
 
#define target_handle_new_gdb_connection()
 
#define detach_inferior(pid)   (*the_target->detach) (pid)
 
#define mourn_inferior(PROC)   (*the_target->mourn) (PROC)
 
#define mythread_alive(pid)   (*the_target->thread_alive) (pid)
 
#define fetch_inferior_registers(regcache, regno)   (*the_target->fetch_registers) (regcache, regno)
 
#define store_inferior_registers(regcache, regno)   (*the_target->store_registers) (regcache, regno)
 
#define join_inferior(pid)   (*the_target->join) (pid)
 
#define target_supports_non_stop()   (the_target->supports_non_stop ? (*the_target->supports_non_stop ) () : 0)
 
#define target_async(enable)   (the_target->async ? (*the_target->async) (enable) : 0)
 
#define target_supports_multi_process()
 
#define target_process_qsupported(query)
 
#define target_supports_tracepoints()
 
#define target_supports_fast_tracepoints()   (the_target->install_fast_tracepoint_jump_pad != NULL)
 
#define target_get_min_fast_tracepoint_insn_len()
 
#define thread_stopped(thread)   (*the_target->thread_stopped) (thread)
 
#define pause_all(freeze)
 
#define unpause_all(unfreeze)
 
#define stabilize_threads()
 
#define install_fast_tracepoint_jump_pad(tpoint, tpaddr, collector, lockaddr, orig_size, jump_entry, trampoline, trampoline_size, jjump_pad_insn, jjump_pad_insn_size, adjusted_insn_addr, adjusted_insn_addr_end, err)
 
#define target_emit_ops()   (the_target->emit_ops ? (*the_target->emit_ops) () : NULL)
 
#define target_supports_disable_randomization()
 
#define target_supports_agent()
 
#define target_supports_btrace(format)
 
#define target_enable_btrace(ptid, conf)   (*the_target->enable_btrace) (ptid, conf)
 
#define target_disable_btrace(tinfo)   (*the_target->disable_btrace) (tinfo)
 
#define target_read_btrace(tinfo, buffer, type)   (*the_target->read_btrace) (tinfo, buffer, type)
 
#define target_read_btrace_conf(tinfo, buffer)   (*the_target->read_btrace_conf) (tinfo, buffer)
 
#define target_supports_range_stepping()
 
#define target_supports_stopped_by_sw_breakpoint()
 
#define target_stopped_by_sw_breakpoint()
 
#define target_supports_stopped_by_hw_breakpoint()
 
#define target_supports_conditional_breakpoints()
 
#define target_stopped_by_hw_breakpoint()
 
#define prepare_to_access_memory()
 
#define done_accessing_memory()
 
#define target_core_of_thread(ptid)
 

Functions

void set_target_ops (struct target_ops *)
 
int kill_inferior (int)
 
int start_non_stop (int nonstop)
 
ptid_t mywait (ptid_t ptid, struct target_waitstatus *ourstatus, int options, int connected_wait)
 
int read_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
 
int write_inferior_memory (CORE_ADDR memaddr, const unsigned char *myaddr, int len)
 
void set_desired_thread (int id)
 
const char * target_pid_to_str (ptid_t)
 

Variables

struct target_opsthe_target
 

Macro Definition Documentation

#define create_inferior (   program,
  args 
)    (*the_target->create_inferior) (program, args)

Definition at line 445 of file target.h.

Referenced by start_inferior().

#define detach_inferior (   pid)    (*the_target->detach) (pid)

Definition at line 468 of file target.h.

Referenced by detach_or_kill_inferior_callback(), and process_serial_event().

#define done_accessing_memory ( )
Value:
do \
{ \
} while (0)
struct target_ops * the_target
Definition: target.c:24
void(* done_accessing_memory)(void)
Definition: target.h:151

Definition at line 622 of file target.h.

Referenced by cmd_qtenable_disable(), delete_gdb_breakpoint(), gdb_read_memory(), gdb_write_memory(), and set_gdb_breakpoint().

#define fetch_inferior_registers (   regcache,
  regno 
)    (*the_target->fetch_registers) (regcache, regno)

Definition at line 477 of file target.h.

Referenced by get_thread_regcache(), ppc_arch_setup(), and s390_arch_setup().

#define install_fast_tracepoint_jump_pad (   tpoint,
  tpaddr,
  collector,
  lockaddr,
  orig_size,
  jump_entry,
  trampoline,
  trampoline_size,
  jjump_pad_insn,
  jjump_pad_insn_size,
  adjusted_insn_addr,
  adjusted_insn_addr_end,
  err 
)
Value:
collector,lockaddr, \
orig_size, jump_entry, \
trampoline, \
trampoline_size, \
jjump_pad_insn, \
jjump_pad_insn_size, \
adjusted_insn_addr, \
adjusted_insn_addr_end, \
err)
struct target_ops * the_target
Definition: target.c:24
int(* install_fast_tracepoint_jump_pad)(CORE_ADDR tpoint, CORE_ADDR tpaddr, CORE_ADDR collector, CORE_ADDR lockaddr, ULONGEST orig_size, CORE_ADDR *jump_entry, CORE_ADDR *trampoline, ULONGEST *trampoline_size, unsigned char *jjump_pad_insn, ULONGEST *jjump_pad_insn_size, CORE_ADDR *adjusted_insn_addr, CORE_ADDR *adjusted_insn_addr_end, char *err)
Definition: target.h:353

Definition at line 538 of file target.h.

Referenced by install_fast_tracepoint().

#define join_inferior (   pid)    (*the_target->join) (pid)

Definition at line 483 of file target.h.

Referenced by process_serial_event().

#define mourn_inferior (   PROC)    (*the_target->mourn) (PROC)

Definition at line 471 of file target.h.

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

#define myattach (   pid)    (*the_target->attach) (pid)

Definition at line 448 of file target.h.

Referenced by attach_inferior().

#define mythread_alive (   pid)    (*the_target->thread_alive) (pid)

Definition at line 474 of file target.h.

Referenced by process_serial_event().

#define pause_all (   freeze)
Value:
do \
{ \
(*the_target->pause_all) (freeze); \
} while (0)
struct target_ops * the_target
Definition: target.c:24
void(* pause_all)(int freeze)
Definition: target.h:327

Definition at line 517 of file target.h.

Referenced by clear_installed_tracepoints(), cmd_qtdp(), cmd_qtstart(), cmd_qtstatus(), handle_status(), run_inferior_command(), stop_tracing(), and upload_fast_traceframes().

#define prepare_to_access_memory ( )
Value:
: 0)
int(* prepare_to_access_memory)(void)
Definition: target.h:147
struct target_ops * the_target
Definition: target.c:24

Definition at line 617 of file target.h.

Referenced by cmd_qtenable_disable(), delete_gdb_breakpoint(), gdb_read_memory(), gdb_write_memory(), and set_gdb_breakpoint().

#define stabilize_threads ( )
Value:
do \
{ \
} while (0)
struct target_ops * the_target
Definition: target.c:24
void(* stabilize_threads)(void)
Definition: target.h:336

Definition at line 531 of file target.h.

Referenced by cmd_qtdp(), cmd_qtstart(), handle_status(), linux_detach(), and linux_wait_1().

#define store_inferior_registers (   regcache,
  regno 
)    (*the_target->store_registers) (regcache, regno)

Definition at line 480 of file target.h.

Referenced by regcache_invalidate_thread().

#define target_async (   enable)    (the_target->async ? (*the_target->async) (enable) : 0)

Definition at line 489 of file target.h.

Referenced by handle_accept_event().

#define target_core_of_thread (   ptid)
Value:
: -1)
struct target_ops * the_target
Definition: target.c:24
Definition: ptid.h:35
int(* core_of_thread)(ptid_t)
Definition: target.h:298

Definition at line 629 of file target.h.

Referenced by handle_qxfer_threads_worker(), and prepare_resume_reply().

#define target_disable_btrace (   tinfo)    (*the_target->disable_btrace) (tinfo)

Definition at line 577 of file target.h.

Referenced by handle_btrace_disable(), and remove_thread().

#define target_emit_ops ( )    (the_target->emit_ops ? (*the_target->emit_ops) () : NULL)
#define target_enable_btrace (   ptid,
  conf 
)    (*the_target->enable_btrace) (ptid, conf)

Definition at line 574 of file target.h.

Referenced by handle_btrace_enable_bts(), and handle_btrace_enable_pt().

#define target_get_min_fast_tracepoint_insn_len ( )
Value:
struct target_ops * the_target
Definition: target.c:24
int(* get_min_fast_tracepoint_insn_len)(void)
Definition: target.h:375

Definition at line 510 of file target.h.

Referenced by cmd_qtminftpilen(), and install_fast_tracepoint().

#define target_handle_new_gdb_connection ( )
Value:
do \
{ \
} while (0)
struct target_ops * the_target
Definition: target.c:24
void(* handle_new_gdb_connection)(void)
Definition: target.h:291

Definition at line 461 of file target.h.

Referenced by handle_query().

#define target_process_qsupported (   query)
Value:
do \
{ \
} while (0)
struct target_ops * the_target
Definition: target.c:24
void(* process_qsupported)(const char *)
Definition: target.h:305

Definition at line 496 of file target.h.

Referenced by handle_query().

#define target_read_btrace (   tinfo,
  buffer,
  type 
)    (*the_target->read_btrace) (tinfo, buffer, type)

Definition at line 580 of file target.h.

Referenced by handle_qxfer_btrace().

#define target_read_btrace_conf (   tinfo,
  buffer 
)    (*the_target->read_btrace_conf) (tinfo, buffer)

Definition at line 583 of file target.h.

Referenced by handle_qxfer_btrace_conf().

#define target_stopped_by_hw_breakpoint ( )
Value:
struct target_ops * the_target
Definition: target.c:24
int(* stopped_by_hw_breakpoint)(void)
Definition: target.h:219

Definition at line 606 of file target.h.

Referenced by prepare_resume_reply().

#define target_stopped_by_sw_breakpoint ( )
Value:
struct target_ops * the_target
Definition: target.c:24
int(* stopped_by_sw_breakpoint)(void)
Definition: target.h:212

Definition at line 594 of file target.h.

Referenced by prepare_resume_reply().

#define target_supports_agent ( )
Value:
struct target_ops * the_target
Definition: target.c:24
int(* supports_agent)(void)
Definition: target.h:383

Definition at line 566 of file target.h.

Referenced by handle_query().

#define target_supports_btrace (   format)
Value:
? (*the_target->supports_btrace) (the_target, format) : 0)
int(* supports_btrace)(struct target_ops *, enum btrace_format)
Definition: target.h:386
struct target_ops * the_target
Definition: target.c:24

Definition at line 570 of file target.h.

Referenced by supported_btrace_packets().

#define target_supports_conditional_breakpoints ( )
Value:
struct target_ops * the_target
Definition: target.c:24
int(* supports_conditional_breakpoints)(void)
Definition: target.h:227

Definition at line 602 of file target.h.

Referenced by handle_query().

#define target_supports_disable_randomization ( )
Value:
struct target_ops * the_target
Definition: target.c:24
int(* supports_disable_randomization)(void)
Definition: target.h:371

Definition at line 562 of file target.h.

Referenced by handle_query().

#define target_supports_fast_tracepoints ( )    (the_target->install_fast_tracepoint_jump_pad != NULL)

Definition at line 507 of file target.h.

Referenced by handle_query().

#define target_supports_fork_events ( )
Value:
struct target_ops * the_target
Definition: target.c:24
int(* supports_fork_events)(void)
Definition: target.h:285

Definition at line 453 of file target.h.

Referenced by handle_query().

#define target_supports_multi_process ( )
Value:
struct target_ops * the_target
Definition: target.c:24
int(* supports_multi_process)(void)
Definition: target.h:282

Definition at line 492 of file target.h.

Referenced by handle_query().

#define target_supports_non_stop ( )    (the_target->supports_non_stop ? (*the_target->supports_non_stop ) () : 0)

Definition at line 486 of file target.h.

Referenced by handle_query().

#define target_supports_range_stepping ( )
Value:
struct target_ops * the_target
Definition: target.c:24
int(* supports_range_stepping)(void)
Definition: target.h:409

Definition at line 586 of file target.h.

Referenced by handle_v_requests().

#define target_supports_stopped_by_hw_breakpoint ( )
Value:
struct target_ops * the_target
Definition: target.c:24
int(* supports_stopped_by_hw_breakpoint)(void)
Definition: target.h:223

Definition at line 598 of file target.h.

Referenced by handle_query().

#define target_supports_stopped_by_sw_breakpoint ( )
Value:
struct target_ops * the_target
Definition: target.c:24
int(* supports_stopped_by_sw_breakpoint)(void)
Definition: target.h:216

Definition at line 590 of file target.h.

Referenced by handle_query().

#define target_supports_tracepoints ( )
Value:
struct target_ops * the_target
Definition: target.c:24
int(* supports_tracepoints)(void)
Definition: target.h:309

Definition at line 503 of file target.h.

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

#define target_supports_vfork_events ( )
Value:
struct target_ops * the_target
Definition: target.c:24
int(* supports_vfork_events)(void)
Definition: target.h:288

Definition at line 457 of file target.h.

Referenced by handle_query().

#define thread_stopped (   thread)    (*the_target->thread_stopped) (thread)

Definition at line 514 of file target.h.

Referenced by queue_stop_reply_callback().

#define unpause_all (   unfreeze)
Value:
do \
{ \
(*the_target->unpause_all) (unfreeze); \
} while (0)
struct target_ops * the_target
Definition: target.c:24
void(* unpause_all)(int unfreeze)
Definition: target.h:333

Definition at line 524 of file target.h.

Referenced by clear_installed_tracepoints(), cmd_qtdp(), cmd_qtstart(), cmd_qtstatus(), run_inferior_command(), stop_tracing(), and upload_fast_traceframes().

Function Documentation

int kill_inferior ( int  )
ptid_t mywait ( ptid_t  ptid,
struct target_waitstatus *  ourstatus,
int  options,
int  connected_wait 
)
int read_inferior_memory ( CORE_ADDR  memaddr,
unsigned char *  myaddr,
int  len 
)
void set_desired_thread ( int  id)
void set_target_ops ( struct target_ops )

Definition at line 184 of file target.c.

References xmalloc().

Referenced by initialize_low().

int start_non_stop ( int  nonstop)

Definition at line 170 of file target.c.

References target_ops::start_non_stop.

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

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

Variable Documentation

struct target_ops* the_target