GDBserver

Classes | Macros | Functions | Variables
target.h File Reference
`#include <sys/types.h>`
`#include "target/target.h"`
`#include "target/resume.h"`
`#include "target/wait.h"`
`#include "target/waitstatus.h"`
`#include "mem-break.h"`
`#include "btrace-common.h"`
`#include <vector>`

Go to the source code of this file.

## Classes
struct | thread_resume
struct | target_ops

## Macros
#define | create_inferior(program, program_args) (*the_target->create_inferior) (program, program_args)
#define | target_post_create_inferior()
#define | myattach(pid) (*the_target->attach) (pid)
#define | target_supports_fork_events()
#define | target_supports_vfork_events()
#define | target_supports_exec_events()
#define | target_handle_new_gdb_connection()
#define | detach_inferior(pid) (*the_target->detach) (pid)
#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_process_qsupported(features, count)
#define | target_supports_catch_syscall()
#define | target_get_ipa_tdesc_idx()
#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_hardware_single_step()
#define | target_stopped_by_hw_breakpoint()
#define | target_breakpoint_kind_from_pc(pcptr)
#define | target_breakpoint_kind_from_current_state(pcptr)
#define | target_supports_software_single_step()
#define | target_core_of_thread(ptid)
#define | target_thread_name(ptid)
#define | target_thread_handle(ptid, handle, handle_len)

## 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 | prepare_to_access_memory (void)
void | done_accessing_memory (void)
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)
int | set_desired_thread ()
const char * | target_pid_to_str (ptid_t)
int | target_can_do_hardware_single_step (void)
int | default_breakpoint_kind_from_pc (CORE_ADDR *pcptr)

## Variables
struct target_ops * | the_target

## Macro Definition Documentation

## ◆ create_inferior

#define create_inferior | ( |  | program,
|  |  | program_args
| ) |  | (*the_target->create_inferior) (program, program_args)

Definition at line 489 of file target.h.

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

## ◆ detach_inferior

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

Definition at line 523 of file target.h.

Referenced by detach_or_kill_for_exit(), and handle_detach().

## ◆ fetch_inferior_registers

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

Definition at line 529 of file target.h.

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

## ◆ install_fast_tracepoint_jump_pad

#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:
(*the_target->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)
the_target
struct target_ops * the_target
Definition: target.c:24
target_ops::install_fast_tracepoint_jump_pad
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:362

Definition at line 594 of file target.h.

Referenced by install_fast_tracepoint().

## ◆ join_inferior

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

Definition at line 535 of file target.h.

Referenced by handle_detach().

## ◆ myattach

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

Definition at line 499 of file target.h.

Referenced by attach_inferior().

## ◆ mythread_alive

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

Definition at line 526 of file target.h.

Referenced by prepare_to_access_memory(), and process_serial_event().

## ◆ pause_all

#define pause_all | ( |  | freeze | ) |

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

Definition at line 573 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().

## ◆ stabilize_threads

#define stabilize_threads | ( |  | ) |

Value:
do \
{ \
if (the_target->stabilize_threads) \
(*the_target->stabilize_threads) (); \
} while (0)
the_target
struct target_ops * the_target
Definition: target.c:24
target_ops::stabilize_threads
void(* stabilize_threads)(void)
Definition: target.h:345

Definition at line 587 of file target.h.

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

## ◆ store_inferior_registers

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

Definition at line 532 of file target.h.

Referenced by regcache_invalidate_thread().

## ◆ target_async

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

Definition at line 541 of file target.h.

Referenced by handle_accept_event().

## ◆ target_breakpoint_kind_from_current_state

#define target_breakpoint_kind_from_current_state | ( |  | pcptr | ) |

Value:
(the_target->breakpoint_kind_from_current_state \
? (*the_target->breakpoint_kind_from_current_state) (pcptr) \
: target_breakpoint_kind_from_pc (pcptr))
target_breakpoint_kind_from_pc
#define target_breakpoint_kind_from_pc(pcptr)
Definition: target.h:666
the_target
struct target_ops * the_target
Definition: target.c:24
target_ops::breakpoint_kind_from_current_state
int(* breakpoint_kind_from_current_state)(CORE_ADDR *pcptr)
Definition: target.h:467

Definition at line 671 of file target.h.

## ◆ target_breakpoint_kind_from_pc

#define target_breakpoint_kind_from_pc | ( |  | pcptr | ) |

Value:
(the_target->breakpoint_kind_from_pc \
? (*the_target->breakpoint_kind_from_pc) (pcptr) \
: default_breakpoint_kind_from_pc (pcptr))
the_target
struct target_ops * the_target
Definition: target.c:24
target_ops::breakpoint_kind_from_pc
int(* breakpoint_kind_from_pc)(CORE_ADDR *pcptr)
Definition: target.h:452
default_breakpoint_kind_from_pc
int default_breakpoint_kind_from_pc(CORE_ADDR *pcptr)
Definition: target.c:351

Definition at line 666 of file target.h.

Referenced by set_breakpoint_type_at().

## ◆ target_core_of_thread

#define target_core_of_thread | ( |  | ptid | ) |

Value:
(the_target->core_of_thread ? (*the_target->core_of_thread) (ptid) \
: -1)
the_target
struct target_ops * the_target
Definition: target.c:24
target_ops::core_of_thread
int(* core_of_thread)(ptid_t)
Definition: target.h:306

Definition at line 693 of file target.h.

Referenced by handle_qxfer_threads_worker(), and prepare_resume_reply().

## ◆ target_disable_btrace

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

Definition at line 633 of file target.h.

Referenced by handle_btrace_disable(), and remove_thread().

## ◆ target_emit_ops

#define target_emit_ops | ( |  | ) | (the_target->emit_ops ? (*the_target->emit_ops) () : NULL)

Definition at line 615 of file target.h.

Referenced by compile_bytecodes(), download_tracepoint_1(), emit_add(), emit_bit_and(), emit_bit_not(), emit_bit_or(), emit_bit_xor(), emit_const(), emit_epilogue(), emit_eq_goto(), emit_equal(), emit_ext(), emit_ge_goto(), emit_goto(), emit_gt_goto(), emit_if_goto(), emit_int_call_1(), emit_le_goto(), emit_less_signed(), emit_less_unsigned(), emit_log_not(), emit_lsh(), emit_lt_goto(), emit_mul(), emit_ne_goto(), emit_pop(), emit_prologue(), emit_ref(), emit_reg(), emit_rsh_signed(), emit_rsh_unsigned(), emit_stack_adjust(), emit_stack_flush(), emit_sub(), emit_swap(), emit_void_call_2(), emit_zero_ext(), and write_goto_address().

## ◆ target_enable_btrace

#define target_enable_btrace | ( |  | ptid,
|  |  | conf
| ) |  | (*the_target->enable_btrace) (ptid, conf)

Definition at line 630 of file target.h.

Referenced by handle_btrace_enable_bts(), and handle_btrace_enable_pt().

## ◆ target_get_ipa_tdesc_idx

#define target_get_ipa_tdesc_idx | ( |  | ) |

Value:
(the_target->get_ipa_tdesc_idx \
? (*the_target->get_ipa_tdesc_idx) () : 0)
target_ops::get_ipa_tdesc_idx
int(* get_ipa_tdesc_idx)(void)
Definition: target.h:477
the_target
struct target_ops * the_target
Definition: target.c:24

Definition at line 555 of file target.h.

Referenced by cmd_qtstart().

## ◆ target_get_min_fast_tracepoint_insn_len

#define target_get_min_fast_tracepoint_insn_len | ( |  | ) |

Value:
(the_target->get_min_fast_tracepoint_insn_len \
? (*the_target->get_min_fast_tracepoint_insn_len) () : 0)
the_target
struct target_ops * the_target
Definition: target.c:24
target_ops::get_min_fast_tracepoint_insn_len
int(* get_min_fast_tracepoint_insn_len)(void)
Definition: target.h:384

Definition at line 566 of file target.h.

Referenced by cmd_qtminftpilen(), and install_fast_tracepoint().

## ◆ target_handle_new_gdb_connection

#define target_handle_new_gdb_connection | ( |  | ) |

Value:
do \
{ \
if (the_target->handle_new_gdb_connection != NULL) \
(*the_target->handle_new_gdb_connection) (); \
} while (0)
the_target
struct target_ops * the_target
Definition: target.c:24
target_ops::handle_new_gdb_connection
void(* handle_new_gdb_connection)(void)
Definition: target.h:299

Definition at line 516 of file target.h.

Referenced by handle_query().

## ◆ target_post_create_inferior

#define target_post_create_inferior | ( |  | ) |

Value:
do \
{ \
if (the_target->post_create_inferior != NULL) \
(*the_target->post_create_inferior) (); \
} while (0)
target_ops::post_create_inferior
void(* post_create_inferior)(void)
Definition: target.h:81
the_target
struct target_ops * the_target
Definition: target.c:24

Definition at line 492 of file target.h.

Referenced by post_fork_inferior().

## ◆ target_process_qsupported

#define target_process_qsupported | ( |  | features,
|  |  | count
| ) |  |

Value:
do \
{ \
if (the_target->process_qsupported) \
the_target->process_qsupported (features, count); \
} while (0)
the_target
struct target_ops * the_target
Definition: target.c:24
target_ops::process_qsupported
void(* process_qsupported)(char **features, int count)
Definition: target.h:314

Definition at line 544 of file target.h.

Referenced by handle_query().

## ◆ target_read_btrace

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

Definition at line 636 of file target.h.

Referenced by handle_qxfer_btrace().

## ◆ target_read_btrace_conf

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

Definition at line 639 of file target.h.

Referenced by handle_qxfer_btrace_conf().

## ◆ target_stopped_by_hw_breakpoint

#define target_stopped_by_hw_breakpoint | ( |  | ) |

Value:
(the_target->stopped_by_hw_breakpoint ? \
(*the_target->stopped_by_hw_breakpoint) () : 0)
the_target
struct target_ops * the_target
Definition: target.c:24
target_ops::stopped_by_hw_breakpoint
int(* stopped_by_hw_breakpoint)(void)
Definition: target.h:225

Definition at line 662 of file target.h.

Referenced by prepare_resume_reply().

## ◆ target_stopped_by_sw_breakpoint

#define target_stopped_by_sw_breakpoint | ( |  | ) |

Value:
(the_target->stopped_by_sw_breakpoint ? \
(*the_target->stopped_by_sw_breakpoint) () : 0)
the_target
struct target_ops * the_target
Definition: target.c:24
target_ops::stopped_by_sw_breakpoint
int(* stopped_by_sw_breakpoint)(void)
Definition: target.h:218

Definition at line 650 of file target.h.

Referenced by prepare_resume_reply().

## ◆ target_supports_agent

#define target_supports_agent | ( |  | ) |

Value:
(the_target->supports_agent ? \
(*the_target->supports_agent) () : 0)
the_target
struct target_ops * the_target
Definition: target.c:24
target_ops::supports_agent
int(* supports_agent)(void)
Definition: target.h:392

Definition at line 622 of file target.h.

Referenced by handle_query().

## ◆ target_supports_btrace

#define target_supports_btrace | ( |  | format | ) |

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

Definition at line 626 of file target.h.

Referenced by supported_btrace_packets().

## ◆ target_supports_catch_syscall

#define target_supports_catch_syscall | ( |  | ) |

Value:
(the_target->supports_catch_syscall ? \
(*the_target->supports_catch_syscall) () : 0)
the_target
struct target_ops * the_target
Definition: target.c:24
target_ops::supports_catch_syscall
int(* supports_catch_syscall)(void)
Definition: target.h:474

Definition at line 551 of file target.h.

Referenced by handle_general_set(), and handle_query().

## ◆ target_supports_disable_randomization

#define target_supports_disable_randomization | ( |  | ) |

Value:
(the_target->supports_disable_randomization ? \
(*the_target->supports_disable_randomization) () : 0)
the_target
struct target_ops * the_target
Definition: target.c:24
target_ops::supports_disable_randomization
int(* supports_disable_randomization)(void)
Definition: target.h:380

Definition at line 618 of file target.h.

Referenced by handle_query().

## ◆ target_supports_exec_events

#define target_supports_exec_events | ( |  | ) |

Value:
(the_target->supports_exec_events ? \
(*the_target->supports_exec_events) () : 0)
the_target
struct target_ops * the_target
Definition: target.c:24
target_ops::supports_exec_events
int(* supports_exec_events)(void)
Definition: target.h:296

Definition at line 512 of file target.h.

Referenced by handle_query().

## ◆ target_supports_fast_tracepoints

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

Definition at line 563 of file target.h.

Referenced by handle_query().

## ◆ target_supports_fork_events

#define target_supports_fork_events | ( |  | ) |

Value:
(the_target->supports_fork_events ? \
(*the_target->supports_fork_events) () : 0)
the_target
struct target_ops * the_target
Definition: target.c:24
target_ops::supports_fork_events
int(* supports_fork_events)(void)
Definition: target.h:290

Definition at line 504 of file target.h.

Referenced by handle_query().

## ◆ target_supports_hardware_single_step

#define target_supports_hardware_single_step | ( |  | ) |

Value:
(the_target->supports_hardware_single_step ? \
(*the_target->supports_hardware_single_step) () : 0)
the_target
struct target_ops * the_target
Definition: target.c:24
target_ops::supports_hardware_single_step
int(* supports_hardware_single_step)(void)
Definition: target.h:232

Definition at line 658 of file target.h.

Referenced by handle_query(), and handle_v_requests().

## ◆ target_supports_non_stop

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

Definition at line 538 of file target.h.

Referenced by handle_query().

## ◆ target_supports_range_stepping

#define target_supports_range_stepping | ( |  | ) |

Value:
(the_target->supports_range_stepping ? \
(*the_target->supports_range_stepping) () : 0)
the_target
struct target_ops * the_target
Definition: target.c:24
target_ops::supports_range_stepping
int(* supports_range_stepping)(void)
Definition: target.h:418

Definition at line 642 of file target.h.

Referenced by handle_v_requests().

## ◆ target_supports_software_single_step

#define target_supports_software_single_step | ( |  | ) |

Value:
(the_target->supports_software_single_step ? \
(*the_target->supports_software_single_step) () : 0)
the_target
struct target_ops * the_target
Definition: target.c:24
target_ops::supports_software_single_step
int(* supports_software_single_step)(void)
Definition: target.h:470

Definition at line 676 of file target.h.

Referenced by handle_query(), and handle_v_requests().

## ◆ target_supports_stopped_by_hw_breakpoint

#define target_supports_stopped_by_hw_breakpoint | ( |  | ) |

Value:
(the_target->supports_stopped_by_hw_breakpoint ? \
(*the_target->supports_stopped_by_hw_breakpoint) () : 0)
the_target
struct target_ops * the_target
Definition: target.c:24
target_ops::supports_stopped_by_hw_breakpoint
int(* supports_stopped_by_hw_breakpoint)(void)
Definition: target.h:229

Definition at line 654 of file target.h.

Referenced by handle_query().

## ◆ target_supports_stopped_by_sw_breakpoint

#define target_supports_stopped_by_sw_breakpoint | ( |  | ) |

Value:
(the_target->supports_stopped_by_sw_breakpoint ? \
(*the_target->supports_stopped_by_sw_breakpoint) () : 0)
the_target
struct target_ops * the_target
Definition: target.c:24
target_ops::supports_stopped_by_sw_breakpoint
int(* supports_stopped_by_sw_breakpoint)(void)
Definition: target.h:222

Definition at line 646 of file target.h.

Referenced by handle_query().

## ◆ target_supports_tracepoints

#define target_supports_tracepoints | ( |  | ) |

Value:
(the_target->supports_tracepoints \
? (*the_target->supports_tracepoints) () : 0)
the_target
struct target_ops * the_target
Definition: target.c:24
target_ops::supports_tracepoints
int(* supports_tracepoints)(void)
Definition: target.h:318

Definition at line 559 of file target.h.

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

## ◆ target_supports_vfork_events

#define target_supports_vfork_events | ( |  | ) |

Value:
(the_target->supports_vfork_events ? \
(*the_target->supports_vfork_events) () : 0)
the_target
struct target_ops * the_target
Definition: target.c:24
target_ops::supports_vfork_events
int(* supports_vfork_events)(void)
Definition: target.h:293

Definition at line 508 of file target.h.

Referenced by handle_query().

## ◆ target_thread_handle

#define target_thread_handle | ( |  | ptid,
|  |  | handle,
|  |  | handle_len
| ) |  |

Value:
(the_target->thread_handle ? (*the_target->thread_handle) \
(ptid, handle, handle_len) \
: false)
the_target
struct target_ops * the_target
Definition: target.c:24
target_ops::thread_handle
bool(* thread_handle)(ptid_t ptid, gdb_byte **handle, int *handle_len)
Definition: target.h:482

Definition at line 701 of file target.h.

Referenced by handle_qxfer_threads_worker().

## ◆ target_thread_name

#define target_thread_name | ( |  | ptid | ) |

Value:
(the_target->thread_name ? (*the_target->thread_name) (ptid) \
: NULL)
target_ops::thread_name
const char *(* thread_name)(ptid_t thread)
Definition: target.h:461
the_target
struct target_ops * the_target
Definition: target.c:24

Definition at line 697 of file target.h.

Referenced by handle_qxfer_threads_worker().

## ◆ thread_stopped

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

Definition at line 570 of file target.h.

Referenced by prepare_to_access_memory(), and queue_stop_reply_callback().

## ◆ unpause_all

#define unpause_all | ( |  | unfreeze | ) |

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

Definition at line 580 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

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

Definition at line 109 of file target.c.

References target_ops::done_accessing_memory, general_thread, prev_general_thread, switch_to_thread(), and the_target.

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

## ◆ kill_inferior()

int kill_inferior | ( | int |  | ) |

Definition at line 330 of file target.c.

References gdb_agent_about_to_close(), target_ops::kill, and the_target.

Referenced by detach_or_kill_for_exit(), handle_v_kill(), and kill_inferior_callback().

## ◆ mywait()

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

Definition at line 176 of file target.c.

References gdb_signal_to_host(), gdb_signal_to_name(), remote_connection_is_stdio(), server_waiting, and target_wait().

Referenced by attach_inferior(), handle_target_event(), resume(), and target_stop_and_wait().

## ◆ prepare_to_access_memory()

int prepare_to_access_memory | ( | void |  | ) |

Definition at line 43 of file target.c.

References current_thread, done_accessing_memory(), first, for_each_thread(), general_thread, mythread_alive, ptid_t::pid(), target_ops::prepare_to_access_memory, prev_general_thread, ptid_of(), the_target, target_ops::thread_stopped, and thread_stopped.

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

## ◆ read_inferior_memory()

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

Definition at line 120 of file target.c.

References check_mem_read(), target_ops::read_memory, and the_target.

Referenced by agent_mem_read(), agent_mem_read_string(), ax_printf(), bfin_breakpoint_at(), crc32(), fast_tracepoint_collecting(), gdb_read_memory(), handle_output_debug_string(), have_fast_tracepoint_trampoline_buffer(), insert_memory_breakpoint(), look_up_one_symbol(), m68k_breakpoint_at(), ppc_relocate_instruction(), ppc_write_goto_address(), ps_pdread(), read_inferior_data_pointer(), read_inferior_integer(), read_inferior_uinteger(), relocate_instruction(), s390_breakpoint_at(), s390_relocate_instruction(), set_fast_tracepoint_jump(), target_read_memory(), target_read_uint32(), and upload_fast_traceframes().

## ◆ set_desired_thread()

int set_desired_thread | ( |  | ) |

Definition at line 27 of file target.c.

References current_thread, find_thread_ptid(), and general_thread.

Referenced by gdb_read_memory(), gdb_write_memory(), handle_serial_event(), handle_status(), handle_target_event(), and process_serial_event().

## ◆ set_target_ops()

void set_target_ops | ( | struct target_ops * |  | ) |

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

const char* target_pid_to_str | ( | ptid_t |  | ) |

Definition at line 308 of file target.c.

References minus_one_ptid, null_ptid, ptid_equal(), ptid_get_lwp(), ptid_get_pid(), ptid_get_tid(), and xsnprintf().

Referenced by get_detach_signal(), handle_target_event(), kill_one_lwp_callback(), linux_detach_one_lwp(), linux_kill_one_lwp(), linux_low_filter_event(), linux_wait_1(), prepare_resume_reply(), queue_stop_reply_callback(), resume_stopped_resumed_lwps(), save_stop_reason(), select_event_lwp(), stop_all_lwps(), tracepoint_finished_step(), and tracepoint_was_hit().

## ◆ write_inferior_memory()

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

Definition at line 145 of file target.c.

References check_mem_write(), free(), the_target, target_ops::write_memory, and xmalloc().

Referenced by append_insns(), clear_inferior_trace_buffer(), delete_fast_tracepoint_jump(), download_agent_expr(), download_trace_state_variables(), download_tracepoint_1(), emit_insns(), gdb_write_memory(), i386_install_fast_tracepoint_jump_pad(), i386_write_goto_address(), l_tracepoint_action_download(), m_tracepoint_action_download(), ppc_install_fast_tracepoint_jump_pad(), ppc_relocate_instruction(), ppc_write_goto_address(), ps_pdwrite(), r_tracepoint_action_download(), reinsert_fast_tracepoint_jumps_at(), relocate_instruction(), remove_memory_breakpoint(), s390_write_goto_address(), set_fast_tracepoint_jump(), target_write_memory(), uninsert_fast_tracepoint_jumps_at(), upload_fast_traceframes(), write_inferior_data_pointer(), write_inferior_int8(), write_inferior_integer(), write_inferior_uinteger(), and x_tracepoint_action_download().

## Variable Documentation

## ◆ 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().