GDB (xrefs)
Classes | Macros | Typedefs | Enumerations | Functions | Variables
/tmp/gdb-7.10/gdb/remote.c File Reference
#include "defs.h"
#include <ctype.h>
#include <fcntl.h>
#include "inferior.h"
#include "infrun.h"
#include "bfd.h"
#include "symfile.h"
#include "target.h"
#include "gdbcmd.h"
#include "objfiles.h"
#include "gdb-stabs.h"
#include "gdbthread.h"
#include "remote.h"
#include "remote-notif.h"
#include "regcache.h"
#include "value.h"
#include "observer.h"
#include "solib.h"
#include "cli/cli-decode.h"
#include "cli/cli-setshow.h"
#include "target-descriptions.h"
#include "gdb_bfd.h"
#include "filestuff.h"
#include "rsp-low.h"
#include <sys/time.h>
#include "event-loop.h"
#include "event-top.h"
#include "inf-loop.h"
#include <signal.h>
#include "serial.h"
#include "gdbcore.h"
#include "remote-fileio.h"
#include "gdb/fileio.h"
#include <sys/stat.h>
#include "xml-support.h"
#include "memory-map.h"
#include "tracepoint.h"
#include "ax.h"
#include "ax-gdb.h"
#include "agent.h"
#include "btrace.h"

Go to the source code of this file.

Classes

struct  vCont_action_support
 
struct  readahead_cache
 
struct  remote_state
 
struct  private_thread_info
 
struct  packet_reg
 
struct  remote_arch_state
 
struct  memory_packet_config
 
struct  packet_config
 
struct  gdb_ext_thread_info
 
struct  thread_item
 
struct  threads_listing_context
 
struct  protocol_feature
 
struct  cached_reg
 
struct  stop_reply
 
struct  queue_iter_param
 
struct  remote_g_packet_guess
 
struct  remote_g_packet_data
 
struct  btrace_target_info
 

Macros

#define OPAQUETHREADBYTES   8
 
#define MAXTHREADLISTRESULTS   32
 
#define MAX_REMOTE_PACKET_SIZE   16384
 
#define MIN_REMOTE_PACKET_SIZE   20
 
#define TAG_THREADID   1
 
#define TAG_EXISTS   2
 
#define TAG_DISPLAY   4
 
#define TAG_THREADNAME   8
 
#define TAG_MOREDISPLAY   16
 
#define BUF_THREAD_ID_SIZE   (OPAQUETHREADBYTES * 2)
 
#define TAG_THREADID   1 /* Echo the thread identifier. */
 
#define TAG_EXISTS
 
#define TAG_DISPLAY   4 /* A short thing maybe to put on a window */
 
#define TAG_THREADNAME   8 /* string, maps 1-to-1 with a thread is. */
 
#define TAG_MOREDISPLAY
 
#define CRAZY_MAX_THREADS   1000
 
#define MAX_TRIES   3
 
#define BUF_SIZE   2048
 

Typedefs

typedef unsigned char threadref[OPAQUETHREADBYTES]
 
typedef int gdb_threadref
 
typedef int(* rmt_thread_action) (threadref *ref, void *context)
 
typedef struct thread_item thread_item_t
 
typedef struct cached_reg cached_reg_t
 
typedef struct stop_replystop_reply_p
 
typedef struct remote_g_packet_guess remote_g_packet_guess_s
 

Enumerations

enum  { REMOTE_ALIGN_WRITES = 16 }
 
enum  packet_support { PACKET_SUPPORT_UNKNOWN = 0, PACKET_ENABLE, PACKET_DISABLE }
 
enum  packet_result { PACKET_ERROR, PACKET_OK, PACKET_UNKNOWN }
 
enum  {
  PACKET_vCont = 0, PACKET_X, PACKET_qSymbol, PACKET_P,
  PACKET_p, PACKET_Z0, PACKET_Z1, PACKET_Z2,
  PACKET_Z3, PACKET_Z4, PACKET_vFile_setfs, PACKET_vFile_open,
  PACKET_vFile_pread, PACKET_vFile_pwrite, PACKET_vFile_close, PACKET_vFile_unlink,
  PACKET_vFile_readlink, PACKET_vFile_fstat, PACKET_qXfer_auxv, PACKET_qXfer_features,
  PACKET_qXfer_exec_file, PACKET_qXfer_libraries, PACKET_qXfer_libraries_svr4, PACKET_qXfer_memory_map,
  PACKET_qXfer_spu_read, PACKET_qXfer_spu_write, PACKET_qXfer_osdata, PACKET_qXfer_threads,
  PACKET_qXfer_statictrace_read, PACKET_qXfer_traceframe_info, PACKET_qXfer_uib, PACKET_qGetTIBAddr,
  PACKET_qGetTLSAddr, PACKET_qSupported, PACKET_qTStatus, PACKET_QPassSignals,
  PACKET_QProgramSignals, PACKET_qCRC, PACKET_qSearch_memory, PACKET_vAttach,
  PACKET_vRun, PACKET_QStartNoAckMode, PACKET_vKill, PACKET_qXfer_siginfo_read,
  PACKET_qXfer_siginfo_write, PACKET_qAttached, PACKET_ConditionalTracepoints, PACKET_ConditionalBreakpoints,
  PACKET_BreakpointCommands, PACKET_FastTracepoints, PACKET_StaticTracepoints, PACKET_InstallInTrace,
  PACKET_bc, PACKET_bs, PACKET_TracepointSource, PACKET_QAllow,
  PACKET_qXfer_fdpic, PACKET_QDisableRandomization, PACKET_QAgent, PACKET_QTBuffer_size,
  PACKET_Qbtrace_off, PACKET_Qbtrace_bts, PACKET_Qbtrace_pt, PACKET_qXfer_btrace,
  PACKET_QNonStop, PACKET_multiprocess_feature, PACKET_EnableDisableTracepoints_feature, PACKET_tracenz_feature,
  PACKET_DisconnectedTracing_feature, PACKET_augmented_libraries_svr4_read_feature, PACKET_qXfer_btrace_conf, PACKET_Qbtrace_conf_bts_size,
  PACKET_swbreak_feature, PACKET_hwbreak_feature, PACKET_fork_event_feature, PACKET_vfork_event_feature,
  PACKET_Qbtrace_conf_pt_size, PACKET_MAX
}
 
enum  Z_packet_type {
  Z_PACKET_SOFTWARE_BP, Z_PACKET_HARDWARE_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP,
  Z_PACKET_ACCESS_WP, NR_Z_PACKET_TYPES
}
 

Functions

static void async_cleanup_sigint_signal_handler (void *dummy)
 
static int getpkt_sane (char **buf, long *sizeof_buf, int forever)
 
static int getpkt_or_notif_sane (char **buf, long *sizeof_buf, int forever, int *is_notif)
 
static void async_handle_remote_sigint (int)
 
static void async_handle_remote_sigint_twice (int)
 
static void remote_files_info (struct target_ops *ignore)
 
static void remote_prepare_to_store (struct target_ops *self, struct regcache *regcache)
 
static void remote_open_1 (const char *, int, struct target_ops *, int extended_p)
 
static void remote_close (struct target_ops *self)
 
static int remote_vkill (int pid, struct remote_state *rs)
 
static void remote_mourn (struct target_ops *ops)
 
static void extended_remote_restart (void)
 
static void extended_remote_mourn (struct target_ops *)
 
static void remote_send (char **buf, long *sizeof_buf_p)
 
static int readchar (int timeout)
 
static void remote_serial_write (const char *str, int len)
 
static void remote_kill (struct target_ops *ops)
 
static int remote_can_async_p (struct target_ops *)
 
static int remote_is_async_p (struct target_ops *)
 
static void remote_async (struct target_ops *ops, int enable)
 
static void sync_remote_interrupt_twice (int signo)
 
static void interrupt_query (void)
 
static void set_general_thread (struct ptid ptid)
 
static void set_continue_thread (struct ptid ptid)
 
static void get_offsets (void)
 
static void skip_frame (void)
 
static long read_frame (char **buf_p, long *sizeof_buf)
 
static int hexnumlen (ULONGEST num)
 
static void init_remote_ops (void)
 
static void init_extended_remote_ops (void)
 
static void remote_stop (struct target_ops *self, ptid_t)
 
static int stubhex (int ch)
 
static int hexnumstr (char *, ULONGEST)
 
static int hexnumnstr (char *, ULONGEST, int)
 
static CORE_ADDR remote_address_masked (CORE_ADDR)
 
static void print_packet (const char *)
 
static void compare_sections_command (char *, int)
 
static void packet_command (char *, int)
 
static int stub_unpack_int (char *buff, int fieldlength)
 
static ptid_t remote_current_thread (ptid_t oldptid)
 
static int putpkt_binary (const char *buf, int cnt)
 
static void check_binary_download (CORE_ADDR addr)
 
static void show_packet_config_cmd (struct packet_config *config)
 
static void show_remote_protocol_packet_cmd (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static char * write_ptid (char *buf, const char *endbuf, ptid_t ptid)
 
static ptid_t read_ptid (char *buf, char **obuf)
 
static void remote_set_permissions (struct target_ops *self)
 
static int remote_get_trace_status (struct target_ops *self, struct trace_status *ts)
 
static int remote_upload_tracepoints (struct target_ops *self, struct uploaded_tp **utpp)
 
static int remote_upload_trace_state_variables (struct target_ops *self, struct uploaded_tsv **utsvp)
 
static void remote_query_supported (void)
 
static void remote_check_symbols (void)
 
void _initialize_remote (void)
 
static void stop_reply_xfree (struct stop_reply *)
 
static void remote_parse_stop_reply (char *, struct stop_reply *)
 
static void push_stop_reply (struct stop_reply *)
 
static void discard_pending_stop_replies_in_queue (struct remote_state *)
 
static int peek_stop_reply (ptid_t ptid)
 
static void remove_new_fork_children (struct threads_listing_context *)
 
static void remote_async_inferior_event_handler (gdb_client_data)
 
static void remote_terminal_ours (struct target_ops *self)
 
static int remote_read_description_p (struct target_ops *target)
 
static void remote_console_output (char *msg)
 
static int remote_supports_cond_breakpoints (struct target_ops *self)
 
static int remote_can_run_breakpoint_commands (struct target_ops *self)
 
static void remote_btrace_reset (void)
 
static void readahead_cache_invalidate (void)
 
static void free_private_thread_info (struct private_thread_info *info)
 
static struct remote_stateget_remote_state_raw (void)
 
static struct remote_statenew_remote_state (void)
 
static void trace_error (char *buf)
 
static char * remote_get_noisy_reply (char **buf_p, long *sizeof_buf)
 
static struct remote_arch_stateget_remote_arch_state (void)
 
static struct remote_stateget_remote_state (void)
 
static int compare_pnums (const void *lhs_, const void *rhs_)
 
static int map_regcache_remote_table (struct gdbarch *gdbarch, struct packet_reg *regs)
 
int remote_register_number_and_offset (struct gdbarch *gdbarch, int regnum, int *pnum, int *poffset)
 
static void * init_remote_state (struct gdbarch *gdbarch)
 
static long get_remote_packet_size (void)
 
static struct packet_regpacket_reg_from_regnum (struct remote_arch_state *rsa, long regnum)
 
static struct packet_regpacket_reg_from_pnum (struct remote_arch_state *rsa, LONGEST pnum)
 
static void show_interrupt_sequence (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void set_remotebreak (char *args, int from_tty, struct cmd_list_element *c)
 
static void show_remotebreak (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static long get_memory_packet_size (struct memory_packet_config *config)
 
static void set_memory_packet_size (char *args, struct memory_packet_config *config)
 
static void show_memory_packet_size (struct memory_packet_config *config)
 
static void set_memory_write_packet_size (char *args, int from_tty)
 
static void show_memory_write_packet_size (char *args, int from_tty)
 
static long get_memory_write_packet_size (void)
 
static void set_memory_read_packet_size (char *args, int from_tty)
 
static void show_memory_read_packet_size (char *args, int from_tty)
 
static long get_memory_read_packet_size (void)
 
static enum packet_support packet_config_support (struct packet_config *config)
 
static enum packet_support packet_support (int packet)
 
static void add_packet_config_cmd (struct packet_config *config, const char *name, const char *title, int legacy)
 
static enum packet_result packet_check_result (const char *buf)
 
static enum packet_result packet_ok (const char *buf, struct packet_config *config)
 
static enum auto_boolean packet_set_cmd_state (int packet)
 
static void set_remote_protocol_Z_packet_cmd (char *args, int from_tty, struct cmd_list_element *c)
 
static void show_remote_protocol_Z_packet_cmd (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static int remote_multi_process_p (struct remote_state *rs)
 
static int remote_fork_event_p (struct remote_state *rs)
 
static int remote_vfork_event_p (struct remote_state *rs)
 
static int remote_insert_fork_catchpoint (struct target_ops *ops, int pid)
 
static int remote_remove_fork_catchpoint (struct target_ops *ops, int pid)
 
static int remote_insert_vfork_catchpoint (struct target_ops *ops, int pid)
 
static int remote_remove_vfork_catchpoint (struct target_ops *ops, int pid)
 
static int remote_query_attached (int pid)
 
static struct inferiorremote_add_inferior (int fake_pid_p, int pid, int attached, int try_open_exec)
 
static void remote_add_thread (ptid_t ptid, int running)
 
static void remote_notice_new_inferior (ptid_t currthread, int running)
 
static struct private_thread_infodemand_private_info (ptid_t ptid)
 
static void record_currthread (struct remote_state *rs, ptid_t currthread)
 
static void remote_pass_signals (struct target_ops *self, int numsigs, unsigned char *pass_signals)
 
static void remote_program_signals (struct target_ops *self, int numsigs, unsigned char *signals)
 
static void set_thread (struct ptid ptid, int gen)
 
static void set_general_thread (struct ptid ptid)
 
static void set_continue_thread (struct ptid ptid)
 
static void set_general_process (void)
 
static int remote_thread_always_alive (struct target_ops *ops, ptid_t ptid)
 
static int remote_thread_alive (struct target_ops *ops, ptid_t ptid)
 
static char * unpack_nibble (char *buf, int *val)
 
static char * unpack_byte (char *buf, int *value)
 
static char * pack_int (char *buf, int value)
 
static char * unpack_int (char *buf, int *value)
 
static char * unpack_string (char *src, char *dest, int length)
 
static char * pack_threadid (char *pkt, threadref *id)
 
static char * unpack_threadid (char *inbuf, threadref *id)
 
void int_to_threadref (threadref *id, int value)
 
static int threadref_to_int (threadref *ref)
 
static void copy_threadref (threadref *dest, threadref *src)
 
static int threadmatch (threadref *dest, threadref *src)
 
static char * pack_threadinfo_request (char *pkt, int mode, threadref *id)
 
static int remote_unpack_thread_info_response (char *pkt, threadref *expectedref, struct gdb_ext_thread_info *info)
 
static int remote_get_threadinfo (threadref *threadid, int fieldset, struct gdb_ext_thread_info *info)
 
static char * pack_threadlist_request (char *pkt, int startflag, int threadcount, threadref *nextthread)
 
static int parse_threadlist_response (char *pkt, int result_limit, threadref *original_echo, threadref *resultlist, int *doneflag)
 
static int remote_get_threadlist (int startflag, threadref *nextthread, int result_limit, int *done, int *result_count, threadref *threadlist)
 
static int remote_threadlist_iterator (rmt_thread_action stepfunction, void *context, int looplimit)
 
static int remote_newthread_step (threadref *ref, void *context)
 
 DEF_VEC_O (thread_item_t)
 
static void clear_threads_listing_context (void *p)
 
static void threads_listing_context_remove (struct target_waitstatus *ws, struct threads_listing_context *context)
 
static int remote_get_threads_with_ql (struct target_ops *ops, struct threads_listing_context *context)
 
static void start_thread (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s)*attributes)
 
static void end_thread (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, const char *body_text)
 
static int remote_get_threads_with_qxfer (struct target_ops *ops, struct threads_listing_context *context)
 
static int remote_get_threads_with_qthreadinfo (struct target_ops *ops, struct threads_listing_context *context)
 
static void remote_update_thread_list (struct target_ops *ops)
 
static char * remote_threads_extra_info (struct target_ops *self, struct thread_info *tp)
 
static int remote_static_tracepoint_marker_at (struct target_ops *self, CORE_ADDR addr, struct static_tracepoint_marker *marker)
 
static VEC (static_tracepoint_marker_p)
 
static ptid_t remote_get_ada_task_ptid (struct target_ops *self, long lwp, long thread)
 
static int set_stop_requested_callback (struct thread_info *thread, void *data)
 
static void send_interrupt_sequence (void)
 
static ptid_t stop_reply_extract_thread (char *stop_reply)
 
static ptid_t get_current_thread (char *wait_status)
 
static void add_current_inferior_and_thread (char *wait_status)
 
static void remote_start_remote (int from_tty, struct target_ops *target, int extended_p)
 
static void remote_open (const char *name, int from_tty)
 
static void extended_remote_open (const char *name, int from_tty)
 
static void reset_all_packet_configs_support (void)
 
static void init_all_packet_configs (void)
 
static struct serialremote_serial_open (const char *name)
 
static void remote_supported_packet (const struct protocol_feature *feature, enum packet_support support, const char *argument)
 
static void remote_packet_size (const struct protocol_feature *feature, enum packet_support support, const char *value)
 
void register_remote_support_xml (const char *xml)
 
static char * remote_query_supported_append (char *msg, const char *append)
 
static void remote_unpush_target (void)
 
static void remote_detach_pid (int pid)
 
static void remote_detach_1 (const char *args, int from_tty)
 
static void remote_detach (struct target_ops *ops, const char *args, int from_tty)
 
static void extended_remote_detach (struct target_ops *ops, const char *args, int from_tty)
 
static int remote_follow_fork (struct target_ops *ops, int follow_child, int detach_fork)
 
static void remote_disconnect (struct target_ops *target, const char *args, int from_tty)
 
static void extended_remote_attach (struct target_ops *target, const char *args, int from_tty)
 
static void extended_remote_post_attach (struct target_ops *ops, int pid)
 
static void remote_vcont_probe (struct remote_state *rs)
 
static char * append_resumption (char *p, char *endp, ptid_t ptid, int step, enum gdb_signal siggnal)
 
static char * append_pending_thread_resumptions (char *p, char *endp, ptid_t ptid)
 
static int remote_vcont_resume (ptid_t ptid, int step, enum gdb_signal siggnal)
 
static void remote_resume (struct target_ops *ops, ptid_t ptid, int step, enum gdb_signal siggnal)
 
static void async_initialize_sigint_signal_handler (void)
 
static void remote_check_pending_interrupt (struct target_ops *self)
 
static void async_remote_interrupt (gdb_client_data arg)
 
static void async_remote_interrupt_twice (gdb_client_data arg)
 
static void sync_remote_interrupt (int signo)
 
static void remote_stop_ns (ptid_t ptid)
 
static void remote_stop_as (ptid_t ptid)
 
static void remote_terminal_inferior (struct target_ops *self)
 
 DEF_VEC_O (cached_reg_t)
 
 DECLARE_QUEUE_P (stop_reply_p)
 
 DEFINE_QUEUE_P (stop_reply_p)
 
static QUEUE (stop_reply_p)
 
static void remote_notif_stop_parse (struct notif_client *self, char *buf, struct notif_event *event)
 
static void remote_notif_stop_ack (struct notif_client *self, char *buf, struct notif_event *event)
 
static int remote_notif_stop_can_get_pending_events (struct notif_client *self)
 
static void stop_reply_dtr (struct notif_event *event)
 
static struct notif_eventremote_notif_stop_alloc_reply (void)
 
static int is_pending_fork_parent (struct target_waitstatus *ws, int event_pid, ptid_t thread_ptid)
 
static int remove_child_of_pending_fork (QUEUE(stop_reply_p)*q, QUEUE_ITER(stop_reply_p)*iter, stop_reply_p event, void *data)
 
static int remove_stop_reply_for_inferior (QUEUE(stop_reply_p)*q, QUEUE_ITER(stop_reply_p)*iter, stop_reply_p event, void *data)
 
static void discard_pending_stop_replies (struct inferior *inf)
 
static int remove_stop_reply_of_remote_state (QUEUE(stop_reply_p)*q, QUEUE_ITER(stop_reply_p)*iter, stop_reply_p event, void *data)
 
static int remote_notif_remove_once_on_match (QUEUE(stop_reply_p)*q, QUEUE_ITER(stop_reply_p)*iter, stop_reply_p event, void *data)
 
static struct stop_replyremote_notif_remove_queued_reply (ptid_t ptid)
 
static struct stop_replyqueued_stop_reply (ptid_t ptid)
 
static int stop_reply_match_ptid_and_ws (QUEUE(stop_reply_p)*q, QUEUE_ITER(stop_reply_p)*iter, struct stop_reply *event, void *data)
 
static char * skip_to_semicolon (char *p)
 
static int strprefix (const char *p, const char *pend, const char *prefix)
 
void remote_notif_get_pending_events (struct notif_client *nc)
 
static ptid_t process_stop_reply (struct stop_reply *stop_reply, struct target_waitstatus *status)
 
static ptid_t remote_wait_ns (ptid_t ptid, struct target_waitstatus *status, int options)
 
static ptid_t remote_wait_as (ptid_t ptid, struct target_waitstatus *status, int options)
 
static ptid_t remote_wait (struct target_ops *ops, ptid_t ptid, struct target_waitstatus *status, int options)
 
static int fetch_register_using_p (struct regcache *regcache, struct packet_reg *reg)
 
static int send_g_packet (void)
 
static void process_g_packet (struct regcache *regcache)
 
static void fetch_registers_using_g (struct regcache *regcache)
 
static void set_remote_traceframe (void)
 
static void remote_fetch_registers (struct target_ops *ops, struct regcache *regcache, int regnum)
 
static int store_register_using_P (const struct regcache *regcache, struct packet_reg *reg)
 
static void store_registers_using_G (const struct regcache *regcache)
 
static void remote_store_registers (struct target_ops *ops, struct regcache *regcache, int regnum)
 
static int align_for_efficient_write (int todo, CORE_ADDR memaddr)
 
static enum target_xfer_status remote_write_bytes_aux (const char *header, CORE_ADDR memaddr, const gdb_byte *myaddr, ULONGEST len_units, int unit_size, ULONGEST *xfered_len_units, char packet_format, int use_length)
 
static enum target_xfer_status remote_write_bytes (CORE_ADDR memaddr, const gdb_byte *myaddr, ULONGEST len, int unit_size, ULONGEST *xfered_len)
 
static enum target_xfer_status remote_read_bytes_1 (CORE_ADDR memaddr, gdb_byte *myaddr, ULONGEST len_units, int unit_size, ULONGEST *xfered_len_units)
 
static enum target_xfer_status remote_xfer_live_readonly_partial (struct target_ops *ops, gdb_byte *readbuf, ULONGEST memaddr, ULONGEST len, int unit_size, ULONGEST *xfered_len)
 
static enum target_xfer_status remote_read_bytes (struct target_ops *ops, CORE_ADDR memaddr, gdb_byte *myaddr, ULONGEST len, int unit_size, ULONGEST *xfered_len)
 
static enum packet_result remote_send_printf (const char *format,...) ATTRIBUTE_PRINTF(1
 
static void restore_remote_timeout (void *p)
 
static void remote_flash_erase (struct target_ops *ops, ULONGEST address, LONGEST length)
 
static enum target_xfer_status remote_flash_write (struct target_ops *ops, ULONGEST address, ULONGEST length, ULONGEST *xfered_len, const gdb_byte *data)
 
static void remote_flash_done (struct target_ops *ops)
 
static void unpush_and_perror (const char *string)
 
static char * escape_buffer (const char *buf, int n)
 
int putpkt (const char *buf)
 
void getpkt (char **buf, long *sizeof_buf, int forever)
 
static int getpkt_or_notif_sane_1 (char **buf, long *sizeof_buf, int forever, int expecting_notif, int *is_notif)
 
static int kill_child_of_pending_fork (QUEUE(stop_reply_p)*q, QUEUE_ITER(stop_reply_p)*iter, stop_reply_p event, void *data)
 
static void kill_new_fork_children (int pid, struct remote_state *rs)
 
static void extended_remote_kill (struct target_ops *ops)
 
static int extended_remote_supports_disable_randomization (struct target_ops *self)
 
static void extended_remote_disable_randomization (int val)
 
static int extended_remote_run (char *args)
 
static void extended_remote_create_inferior (struct target_ops *ops, char *exec_file, char *args, char **env, int from_tty)
 
static int remote_add_target_side_condition (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt, char *buf, char *buf_end)
 
static void remote_add_target_side_commands (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt, char *buf)
 
static int remote_insert_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
 
static int remote_remove_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
 
static int watchpoint_to_Z_packet (int type)
 
static int remote_insert_watchpoint (struct target_ops *self, CORE_ADDR addr, int len, int type, struct expression *cond)
 
static int remote_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr, CORE_ADDR start, int length)
 
static int remote_remove_watchpoint (struct target_ops *self, CORE_ADDR addr, int len, int type, struct expression *cond)
 
static int remote_region_ok_for_hw_watchpoint (struct target_ops *self, CORE_ADDR addr, int len)
 
static int remote_check_watch_resources (struct target_ops *self, int type, int cnt, int ot)
 
static int remote_stopped_by_sw_breakpoint (struct target_ops *ops)
 
static int remote_supports_stopped_by_sw_breakpoint (struct target_ops *ops)
 
static int remote_stopped_by_hw_breakpoint (struct target_ops *ops)
 
static int remote_supports_stopped_by_hw_breakpoint (struct target_ops *ops)
 
static int remote_stopped_by_watchpoint (struct target_ops *ops)
 
static int remote_stopped_data_address (struct target_ops *target, CORE_ADDR *addr_p)
 
static int remote_insert_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
 
static int remote_remove_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
 
static int remote_verify_memory (struct target_ops *ops, const gdb_byte *data, CORE_ADDR lma, ULONGEST size)
 
static enum target_xfer_status remote_write_qxfer (struct target_ops *ops, const char *object_name, const char *annex, const gdb_byte *writebuf, ULONGEST offset, LONGEST len, ULONGEST *xfered_len, struct packet_config *packet)
 
static enum target_xfer_status remote_read_qxfer (struct target_ops *ops, const char *object_name, const char *annex, gdb_byte *readbuf, ULONGEST offset, LONGEST len, ULONGEST *xfered_len, struct packet_config *packet)
 
static enum target_xfer_status remote_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 int remote_search_memory (struct target_ops *ops, CORE_ADDR start_addr, ULONGEST search_space_len, const gdb_byte *pattern, ULONGEST pattern_len, CORE_ADDR *found_addrp)
 
static void remote_rcmd (struct target_ops *self, const char *command, struct ui_file *outbuf)
 
static VEC (mem_region_s)
 
static char * remote_pid_to_str (struct target_ops *ops, ptid_t ptid)
 
static CORE_ADDR remote_get_thread_local_address (struct target_ops *ops, ptid_t ptid, CORE_ADDR lm, CORE_ADDR offset)
 
static int remote_get_tib_address (struct target_ops *self, ptid_t ptid, CORE_ADDR *addr)
 
 DEF_VEC_O (remote_g_packet_guess_s)
 
static void * remote_g_packet_data_init (struct obstack *obstack)
 
void register_remote_g_packet_guess (struct gdbarch *gdbarch, int bytes, const struct target_desc *tdesc)
 
static const struct target_descremote_read_description (struct target_ops *target)
 
static void remote_buffer_add_string (char **buffer, int *left, char *string)
 
static void remote_buffer_add_bytes (char **buffer, int *left, const gdb_byte *bytes, int len)
 
static void remote_buffer_add_int (char **buffer, int *left, ULONGEST value)
 
static int remote_hostio_parse_result (char *buffer, int *retcode, int *remote_errno, char **attachment)
 
static int remote_hostio_send_command (int command_bytes, int which_packet, int *remote_errno, char **attachment, int *attachment_len)
 
static void readahead_cache_invalidate_fd (int fd)
 
static int remote_hostio_set_filesystem (struct inferior *inf, int *remote_errno)
 
static int remote_hostio_open (struct target_ops *self, struct inferior *inf, const char *filename, int flags, int mode, int warn_if_slow, int *remote_errno)
 
static int remote_hostio_pwrite (struct target_ops *self, int fd, const gdb_byte *write_buf, int len, ULONGEST offset, int *remote_errno)
 
static int remote_hostio_pread_vFile (struct target_ops *self, int fd, gdb_byte *read_buf, int len, ULONGEST offset, int *remote_errno)
 
static int remote_hostio_pread_from_cache (struct remote_state *rs, int fd, gdb_byte *read_buf, size_t len, ULONGEST offset)
 
static int remote_hostio_pread (struct target_ops *self, int fd, gdb_byte *read_buf, int len, ULONGEST offset, int *remote_errno)
 
static int remote_hostio_close (struct target_ops *self, int fd, int *remote_errno)
 
static int remote_hostio_unlink (struct target_ops *self, struct inferior *inf, const char *filename, int *remote_errno)
 
static char * remote_hostio_readlink (struct target_ops *self, struct inferior *inf, const char *filename, int *remote_errno)
 
static int remote_hostio_fstat (struct target_ops *self, int fd, struct stat *st, int *remote_errno)
 
static int remote_filesystem_is_local (struct target_ops *self)
 
static int remote_fileio_errno_to_host (int errnum)
 
static char * remote_hostio_error (int errnum)
 
static void remote_hostio_close_cleanup (void *opaque)
 
void remote_file_put (const char *local_file, const char *remote_file, int from_tty)
 
void remote_file_get (const char *remote_file, const char *local_file, int from_tty)
 
void remote_file_delete (const char *remote_file, int from_tty)
 
static void remote_put_command (char *args, int from_tty)
 
static void remote_get_command (char *args, int from_tty)
 
static void remote_delete_command (char *args, int from_tty)
 
static void remote_command (char *args, int from_tty)
 
static int remote_can_execute_reverse (struct target_ops *self)
 
static int remote_supports_non_stop (struct target_ops *self)
 
static int remote_supports_disable_randomization (struct target_ops *self)
 
static int remote_supports_multi_process (struct target_ops *self)
 
static int remote_supports_cond_tracepoints (void)
 
static int remote_supports_fast_tracepoints (void)
 
static int remote_supports_static_tracepoints (void)
 
static int remote_supports_install_in_trace (void)
 
static int remote_supports_enable_disable_tracepoint (struct target_ops *self)
 
static int remote_supports_string_tracing (struct target_ops *self)
 
static void remote_trace_init (struct target_ops *self)
 
static void free_actions_list (char **actions_list)
 
static void free_actions_list_cleanup_wrapper (void *)
 
static void remote_download_command_source (int num, ULONGEST addr, struct command_line *cmds)
 
static void remote_download_tracepoint (struct target_ops *self, struct bp_location *loc)
 
static int remote_can_download_tracepoint (struct target_ops *self)
 
static void remote_download_trace_state_variable (struct target_ops *self, struct trace_state_variable *tsv)
 
static void remote_enable_tracepoint (struct target_ops *self, struct bp_location *location)
 
static void remote_disable_tracepoint (struct target_ops *self, struct bp_location *location)
 
static void remote_trace_set_readonly_regions (struct target_ops *self)
 
static void remote_trace_start (struct target_ops *self)
 
static void remote_get_tracepoint_status (struct target_ops *self, struct breakpoint *bp, struct uploaded_tp *utp)
 
static void remote_trace_stop (struct target_ops *self)
 
static int remote_trace_find (struct target_ops *self, enum trace_find_type type, int num, CORE_ADDR addr1, CORE_ADDR addr2, int *tpp)
 
static int remote_get_trace_state_variable_value (struct target_ops *self, int tsvnum, LONGEST *val)
 
static int remote_save_trace_data (struct target_ops *self, const char *filename)
 
static LONGEST remote_get_raw_trace_data (struct target_ops *self, gdb_byte *buf, ULONGEST offset, LONGEST len)
 
static void remote_set_disconnected_tracing (struct target_ops *self, int val)
 
static int remote_core_of_thread (struct target_ops *ops, ptid_t ptid)
 
static void remote_set_circular_trace_buffer (struct target_ops *self, int val)
 
static struct traceframe_inforemote_traceframe_info (struct target_ops *self)
 
static int remote_get_min_fast_tracepoint_insn_len (struct target_ops *self)
 
static void remote_set_trace_buffer_size (struct target_ops *self, LONGEST val)
 
static int remote_set_trace_notes (struct target_ops *self, const char *user, const char *notes, const char *stop_notes)
 
static int remote_use_agent (struct target_ops *self, int use)
 
static int remote_can_use_agent (struct target_ops *self)
 
static int remote_supports_btrace (struct target_ops *self, enum btrace_format format)
 
static void btrace_sync_conf (const struct btrace_config *conf)
 
static void btrace_read_config (struct btrace_config *conf)
 
static struct btrace_target_inforemote_enable_btrace (struct target_ops *self, ptid_t ptid, const struct btrace_config *conf)
 
static void remote_disable_btrace (struct target_ops *self, struct btrace_target_info *tinfo)
 
static void remote_teardown_btrace (struct target_ops *self, struct btrace_target_info *tinfo)
 
static enum btrace_error remote_read_btrace (struct target_ops *self, struct btrace_data *btrace, struct btrace_target_info *tinfo, enum btrace_read_type type)
 
static const struct btrace_configremote_btrace_conf (struct target_ops *self, const struct btrace_target_info *tinfo)
 
static int remote_augmented_libraries_svr4_read (struct target_ops *self)
 
static void remote_load (struct target_ops *self, const char *name, int from_tty)
 
static char * remote_pid_to_exec_file (struct target_ops *self, int pid)
 
static void remote_async_serial_handler (struct serial *scb, void *context)
 
static void set_remote_cmd (char *args, int from_tty)
 
static void show_remote_cmd (char *args, int from_tty)
 
static void remote_new_objfile (struct objfile *objfile)
 
static void show_range_stepping (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void set_range_stepping (char *ignore_args, int from_tty, struct cmd_list_element *c)
 

Variables

static char * target_buf
 
static long target_buf_size
 
static struct cmd_list_elementremote_cmdlist
 
static struct cmd_list_elementremote_set_cmdlist
 
static struct cmd_list_elementremote_show_cmdlist
 
static int use_range_stepping = 1
 
static struct remote_stateremote_state
 
static struct gdbarch_dataremote_gdbarch_data_handle
 
static struct target_ops remote_ops
 
static struct target_ops extended_remote_ops
 
static int wait_forever_enabled_p = 1
 
const char interrupt_sequence_control_c [] = "Ctrl-C"
 
const char interrupt_sequence_break [] = "BREAK"
 
const char interrupt_sequence_break_g [] = "BREAK-g"
 
static const char *const interrupt_sequence_modes []
 
static const char * interrupt_sequence_mode = interrupt_sequence_control_c
 
static int interrupt_on_connect = 0
 
static int remote_break
 
static unsigned int remote_address_size
 
static int remote_async_terminal_ours_p
 
static char * remote_exec_file = ""
 
static struct memory_packet_config memory_write_packet_config
 
static struct memory_packet_config memory_read_packet_config
 
static struct packet_config remote_protocol_packets [PACKET_MAX]
 
static enum auto_boolean remote_Z_packet_detect
 
static struct async_signal_handlerasync_sigint_remote_twice_token
 
static struct async_signal_handlerasync_sigint_remote_token
 
static struct async_event_handlerremote_async_inferior_event_token
 
static ptid_t magic_null_ptid
 
static ptid_t not_sent_ptid
 
static ptid_t any_thread_ptid
 
const struct gdb_xml_attribute thread_attributes []
 
const struct gdb_xml_element thread_children []
 
const struct gdb_xml_element threads_children []
 
const struct gdb_xml_element threads_elements []
 
static const struct protocol_feature remote_protocol_features []
 
static char * remote_support_xml
 
static void(* ofunc )(int)
 
struct notif_client notif_client_stop
 
static const int remote_flash_timeout = 1000
 
int remote_hw_watchpoint_limit = -1
 
int remote_hw_watchpoint_length_limit = -1
 
int remote_hw_breakpoint_limit = -1
 
static struct gdbarch_dataremote_g_packet_data_handle
 
static serial_event_ftype remote_async_serial_handler
 

Macro Definition Documentation

#define BUF_SIZE   2048
#define BUF_THREAD_ID_SIZE   (OPAQUETHREADBYTES * 2)
#define CRAZY_MAX_THREADS   1000

Definition at line 2776 of file remote.c.

Referenced by remote_get_threads_with_ql().

#define MAX_REMOTE_PACKET_SIZE   16384
#define MAX_TRIES   3

Referenced by getpkt_or_notif_sane_1().

#define MAXTHREADLISTRESULTS   32

Definition at line 263 of file remote.c.

Referenced by remote_threadlist_iterator().

#define MIN_REMOTE_PACKET_SIZE   20

Referenced by get_memory_packet_size().

#define OPAQUETHREADBYTES   8

Definition at line 256 of file remote.c.

#define TAG_DISPLAY   4

Definition at line 2428 of file remote.c.

Referenced by remote_threads_extra_info(), and remote_unpack_thread_info_response().

#define TAG_DISPLAY   4 /* A short thing maybe to put on a window */

Definition at line 2428 of file remote.c.

#define TAG_EXISTS   2

Definition at line 2426 of file remote.c.

Referenced by remote_threads_extra_info(), and remote_unpack_thread_info_response().

#define TAG_EXISTS
Value:
2 /* Is this process defined enough to
fetch registers and its stack? */

Definition at line 2426 of file remote.c.

#define TAG_MOREDISPLAY   16

Definition at line 2430 of file remote.c.

Referenced by remote_threads_extra_info(), and remote_unpack_thread_info_response().

#define TAG_MOREDISPLAY
Value:
16 /* Whatever the kernel wants to say about
the process. */

Definition at line 2430 of file remote.c.

#define TAG_THREADID   1

Definition at line 2425 of file remote.c.

Referenced by remote_threads_extra_info(), and remote_unpack_thread_info_response().

#define TAG_THREADID   1 /* Echo the thread identifier. */

Definition at line 2425 of file remote.c.

#define TAG_THREADNAME   8

Definition at line 2429 of file remote.c.

Referenced by remote_threads_extra_info(), and remote_unpack_thread_info_response().

#define TAG_THREADNAME   8 /* string, maps 1-to-1 with a thread is. */

Definition at line 2429 of file remote.c.

Typedef Documentation

typedef struct cached_reg cached_reg_t
typedef int gdb_threadref

Definition at line 2050 of file remote.c.

Definition at line 10046 of file remote.c.

typedef int(* rmt_thread_action) (threadref *ref, void *context)

Definition at line 2132 of file remote.c.

typedef struct stop_reply * stop_reply_p
typedef struct thread_item thread_item_t
typedef unsigned char threadref[OPAQUETHREADBYTES]

Definition at line 259 of file remote.c.

Enumeration Type Documentation

anonymous enum
Enumerator
REMOTE_ALIGN_WRITES 

Definition at line 86 of file remote.c.

anonymous enum
Enumerator
PACKET_vCont 
PACKET_X 
PACKET_qSymbol 
PACKET_P 
PACKET_p 
PACKET_Z0 
PACKET_Z1 
PACKET_Z2 
PACKET_Z3 
PACKET_Z4 
PACKET_vFile_setfs 
PACKET_vFile_open 
PACKET_vFile_pread 
PACKET_vFile_pwrite 
PACKET_vFile_close 
PACKET_vFile_unlink 
PACKET_vFile_readlink 
PACKET_vFile_fstat 
PACKET_qXfer_auxv 
PACKET_qXfer_features 
PACKET_qXfer_exec_file 
PACKET_qXfer_libraries 
PACKET_qXfer_libraries_svr4 
PACKET_qXfer_memory_map 
PACKET_qXfer_spu_read 
PACKET_qXfer_spu_write 
PACKET_qXfer_osdata 
PACKET_qXfer_threads 
PACKET_qXfer_statictrace_read 
PACKET_qXfer_traceframe_info 
PACKET_qXfer_uib 
PACKET_qGetTIBAddr 
PACKET_qGetTLSAddr 
PACKET_qSupported 
PACKET_qTStatus 
PACKET_QPassSignals 
PACKET_QProgramSignals 
PACKET_qCRC 
PACKET_qSearch_memory 
PACKET_vAttach 
PACKET_vRun 
PACKET_QStartNoAckMode 
PACKET_vKill 
PACKET_qXfer_siginfo_read 
PACKET_qXfer_siginfo_write 
PACKET_qAttached 
PACKET_ConditionalTracepoints 
PACKET_ConditionalBreakpoints 
PACKET_BreakpointCommands 
PACKET_FastTracepoints 
PACKET_StaticTracepoints 
PACKET_InstallInTrace 
PACKET_bc 
PACKET_bs 
PACKET_TracepointSource 
PACKET_QAllow 
PACKET_qXfer_fdpic 
PACKET_QDisableRandomization 
PACKET_QAgent 
PACKET_QTBuffer_size 
PACKET_Qbtrace_off 
PACKET_Qbtrace_bts 
PACKET_Qbtrace_pt 
PACKET_qXfer_btrace 
PACKET_QNonStop 
PACKET_multiprocess_feature 
PACKET_EnableDisableTracepoints_feature 
PACKET_tracenz_feature 
PACKET_DisconnectedTracing_feature 
PACKET_augmented_libraries_svr4_read_feature 
PACKET_qXfer_btrace_conf 
PACKET_Qbtrace_conf_bts_size 
PACKET_swbreak_feature 
PACKET_hwbreak_feature 
PACKET_fork_event_feature 
PACKET_vfork_event_feature 
PACKET_Qbtrace_conf_pt_size 
PACKET_MAX 

Definition at line 1281 of file remote.c.

Enumerator
PACKET_ERROR 
PACKET_OK 
PACKET_UNKNOWN 

Definition at line 1121 of file remote.c.

Enumerator
PACKET_SUPPORT_UNKNOWN 
PACKET_ENABLE 
PACKET_DISABLE 

Definition at line 1095 of file remote.c.

Enumerator
Z_PACKET_SOFTWARE_BP 
Z_PACKET_HARDWARE_BP 
Z_PACKET_WRITE_WP 
Z_PACKET_READ_WP 
Z_PACKET_ACCESS_WP 
NR_Z_PACKET_TYPES 

Definition at line 1470 of file remote.c.

Function Documentation

void _initialize_remote ( void  )

Definition at line 12756 of file remote.c.

References _, add_cmd(), add_packet_config_cmd(), add_prefix_cmd(), add_setshow_auto_boolean_cmd(), add_setshow_boolean_cmd(), add_setshow_enum_cmd(), add_setshow_string_noescape_cmd(), add_setshow_zinteger_cmd(), add_setshow_zuinteger_cmd(), add_target(), async_remote_interrupt(), async_remote_interrupt_twice(), class_files, class_maintenance, class_obscure, class_run, class_support, cmdlist, compare_sections_command(), create_async_signal_handler(), deprecate_cmd(), discard_pending_stop_replies(), extended_remote_ops, gdb_assert, gdbarch_data_register_post_init(), gdbarch_data_register_pre_init(), init_all_packet_configs(), init_extended_remote_ops(), init_remote_ops(), init_remote_state(), initialize_remote_fileio(), interrupt_on_connect, interrupt_sequence_mode, interrupt_sequence_modes, lookup_cmd(), maintenancelist, name, new_remote_state(), no_class, observer_attach_inferior_exit(), observer_attach_new_objfile(), PACKET_augmented_libraries_svr4_read_feature, PACKET_bc, PACKET_BreakpointCommands, PACKET_bs, packet_command(), PACKET_ConditionalBreakpoints, PACKET_ConditionalTracepoints, PACKET_DisconnectedTracing_feature, PACKET_EnableDisableTracepoints_feature, PACKET_FastTracepoints, PACKET_fork_event_feature, PACKET_hwbreak_feature, PACKET_InstallInTrace, PACKET_MAX, PACKET_multiprocess_feature, PACKET_P, PACKET_p, PACKET_QAgent, PACKET_QAllow, PACKET_qAttached, PACKET_Qbtrace_bts, PACKET_Qbtrace_conf_bts_size, PACKET_Qbtrace_conf_pt_size, PACKET_Qbtrace_off, PACKET_Qbtrace_pt, PACKET_qCRC, PACKET_QDisableRandomization, PACKET_qGetTIBAddr, PACKET_qGetTLSAddr, PACKET_QNonStop, PACKET_QPassSignals, PACKET_QProgramSignals, PACKET_qSearch_memory, PACKET_QStartNoAckMode, PACKET_qSupported, PACKET_qSymbol, PACKET_QTBuffer_size, PACKET_qTStatus, PACKET_qXfer_auxv, PACKET_qXfer_btrace, PACKET_qXfer_btrace_conf, PACKET_qXfer_exec_file, PACKET_qXfer_fdpic, PACKET_qXfer_features, PACKET_qXfer_libraries, PACKET_qXfer_libraries_svr4, PACKET_qXfer_memory_map, PACKET_qXfer_osdata, PACKET_qXfer_siginfo_read, PACKET_qXfer_siginfo_write, PACKET_qXfer_spu_read, PACKET_qXfer_spu_write, PACKET_qXfer_statictrace_read, PACKET_qXfer_threads, PACKET_qXfer_traceframe_info, PACKET_qXfer_uib, PACKET_StaticTracepoints, PACKET_swbreak_feature, PACKET_tracenz_feature, PACKET_TracepointSource, PACKET_vAttach, PACKET_vCont, PACKET_vFile_close, PACKET_vFile_fstat, PACKET_vFile_open, PACKET_vFile_pread, PACKET_vFile_pwrite, PACKET_vFile_readlink, PACKET_vFile_setfs, PACKET_vFile_unlink, PACKET_vfork_event_feature, PACKET_vKill, PACKET_vRun, PACKET_X, PACKET_Z0, PACKET_Z1, PACKET_Z2, PACKET_Z3, PACKET_Z4, ptid_build(), QUEUE_alloc, remote_address_size, remote_break, remote_command(), remote_delete_command(), remote_exec_file, remote_g_packet_data_init(), remote_get_command(), remote_new_objfile(), remote_ops, remote_protocol_packets, remote_put_command(), remote_Z_packet_detect, set_memory_read_packet_size(), set_memory_write_packet_size(), set_range_stepping(), set_remote_cmd(), set_remote_protocol_Z_packet_cmd(), set_remotebreak(), setlist, show_interrupt_sequence(), show_memory_read_packet_size(), show_memory_write_packet_size(), show_range_stepping(), show_remote_cmd(), show_remote_protocol_Z_packet_cmd(), show_remotebreak(), showlist, stop_reply_xfree(), target_buf, target_buf_size, use_range_stepping, and xmalloc().

static void add_current_inferior_and_thread ( char *  wait_status)
static
static void add_packet_config_cmd ( struct packet_config config,
const char *  name,
const char *  title,
int  legacy 
)
static
static int align_for_efficient_write ( int  todo,
CORE_ADDR  memaddr 
)
static

Definition at line 7002 of file remote.c.

References REMOTE_ALIGN_WRITES.

Referenced by remote_write_bytes_aux().

static char* append_pending_thread_resumptions ( char *  p,
char *  endp,
ptid_t  ptid 
)
static
static char* append_resumption ( char *  p,
char *  endp,
ptid_t  ptid,
int  step,
enum gdb_signal  siggnal 
)
static
static void async_cleanup_sigint_signal_handler ( void *  dummy)
static

Definition at line 5233 of file remote.c.

References handle_sigint().

Referenced by remote_terminal_ours().

static void async_handle_remote_sigint ( int  sig)
static
static void async_handle_remote_sigint_twice ( int  sig)
static

Definition at line 5187 of file remote.c.

References async_handle_remote_sigint(), and gdb_call_async_signal_handler().

Referenced by async_handle_remote_sigint().

static void async_initialize_sigint_signal_handler ( void  )
static

Definition at line 5168 of file remote.c.

References async_handle_remote_sigint().

Referenced by remote_terminal_inferior().

static void async_remote_interrupt ( gdb_client_data  arg)
static

Definition at line 5211 of file remote.c.

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

Referenced by _initialize_remote().

static void async_remote_interrupt_twice ( gdb_client_data  arg)
static

Definition at line 5222 of file remote.c.

References fprintf_unfiltered(), gdb_stdlog, interrupt_query(), and remote_debug.

Referenced by _initialize_remote().

static void btrace_read_config ( struct btrace_config conf)
static
static void btrace_sync_conf ( const struct btrace_config conf)
static
static void check_binary_download ( CORE_ADDR  addr)
static
static void clear_threads_listing_context ( void *  p)
static

Definition at line 2727 of file remote.c.

References thread_item::extra, VEC_free, VEC_iterate, and xfree().

Referenced by remote_update_thread_list().

static int compare_pnums ( const void *  lhs_,
const void *  rhs_ 
)
static

Definition at line 618 of file remote.c.

Referenced by map_regcache_remote_table().

static void compare_sections_command ( char *  args,
int  from_tty 
)
static
static void copy_threadref ( threadref dest,
threadref src 
)
static

Definition at line 2370 of file remote.c.

Referenced by remote_threadlist_iterator(), and remote_unpack_thread_info_response().

DECLARE_QUEUE_P ( stop_reply_p  )
DEF_VEC_O ( thread_item_t  )
DEF_VEC_O ( cached_reg_t  )
DEF_VEC_O ( remote_g_packet_guess_s  )
DEFINE_QUEUE_P ( stop_reply_p  )
static struct private_thread_info* demand_private_info ( ptid_t  ptid)
static
static void discard_pending_stop_replies ( struct inferior inf)
static
static void discard_pending_stop_replies_in_queue ( struct remote_state rs)
static
static void end_thread ( struct gdb_xml_parser parser,
const struct gdb_xml_element element,
void *  user_data,
const char *  body_text 
)
static

Definition at line 2832 of file remote.c.

References VEC_last.

static char* escape_buffer ( const char *  buf,
int  n 
)
static
static void extended_remote_attach ( struct target_ops target,
const char *  args,
int  from_tty 
)
static
static void extended_remote_create_inferior ( struct target_ops ops,
char *  exec_file,
char *  args,
char **  env,
int  from_tty 
)
static
static void extended_remote_detach ( struct target_ops ops,
const char *  args,
int  from_tty 
)
static

Definition at line 4653 of file remote.c.

References remote_detach_1().

Referenced by init_extended_remote_ops().

static void extended_remote_disable_randomization ( int  val)
static
static void extended_remote_kill ( struct target_ops ops)
static
static void extended_remote_mourn ( struct target_ops target)
static
static void extended_remote_open ( const char *  name,
int  from_tty 
)
static

Definition at line 3881 of file remote.c.

References extended_remote_ops, and remote_open_1().

Referenced by init_extended_remote_ops().

static void extended_remote_post_attach ( struct target_ops ops,
int  pid 
)
static

Definition at line 4834 of file remote.c.

References remote_check_symbols(), and symfile_objfile.

Referenced by init_extended_remote_ops().

static void extended_remote_restart ( void  )
static
static int extended_remote_run ( char *  args)
static
static int extended_remote_supports_disable_randomization ( struct target_ops self)
static
static int fetch_register_using_p ( struct regcache regcache,
struct packet_reg reg 
)
static
static void fetch_registers_using_g ( struct regcache regcache)
static

Definition at line 6643 of file remote.c.

References process_g_packet(), and send_g_packet().

Referenced by remote_fetch_registers().

static void free_actions_list ( char **  actions_list)
static

Definition at line 11173 of file remote.c.

References xfree().

Referenced by free_actions_list_cleanup_wrapper().

static void free_actions_list_cleanup_wrapper ( void *  al)
static

Definition at line 11167 of file remote.c.

References free_actions_list().

Referenced by remote_download_tracepoint().

static void free_private_thread_info ( struct private_thread_info info)
static

Definition at line 425 of file remote.c.

References private_thread_info::extra, and xfree().

Referenced by demand_private_info().

static ptid_t get_current_thread ( char *  wait_status)
static
static long get_memory_packet_size ( struct memory_packet_config config)
static
static long get_memory_read_packet_size ( void  )
static

Definition at line 1078 of file remote.c.

References get_memory_packet_size(), get_remote_packet_size(), and size.

Referenced by remote_read_bytes_1().

static long get_memory_write_packet_size ( void  )
static

Definition at line 1055 of file remote.c.

References get_memory_packet_size().

Referenced by remote_search_memory(), remote_write_bytes_aux(), and remote_write_qxfer().

static void get_offsets ( void  )
static
static struct remote_arch_state* get_remote_arch_state ( void  )
static
static long get_remote_packet_size ( void  )
static

Definition at line 758 of file remote.c.

References remote_state::explicit_packet_size, get_remote_arch_state(), get_remote_state(), and remote_arch_state::remote_packet_size.

Referenced by btrace_sync_conf(), extended_remote_attach(), extended_remote_disable_randomization(), extended_remote_restart(), extended_remote_run(), get_memory_packet_size(), get_memory_read_packet_size(), remote_check_symbols(), remote_detach_pid(), remote_disable_btrace(), remote_disable_tracepoint(), remote_download_trace_state_variable(), remote_enable_btrace(), remote_enable_tracepoint(), remote_file_get(), remote_file_put(), remote_get_min_fast_tracepoint_insn_len(), remote_get_thread_local_address(), remote_get_threadlist(), remote_get_tib_address(), remote_get_trace_state_variable_value(), remote_get_tracepoint_status(), remote_hostio_close(), remote_hostio_fstat(), remote_hostio_open(), remote_hostio_pread(), remote_hostio_pread_vFile(), remote_hostio_pwrite(), remote_hostio_readlink(), remote_hostio_set_filesystem(), remote_hostio_unlink(), remote_insert_breakpoint(), remote_insert_hw_breakpoint(), remote_insert_watchpoint(), remote_query_attached(), remote_rcmd(), remote_read_qxfer(), remote_remove_breakpoint(), remote_remove_hw_breakpoint(), remote_remove_watchpoint(), remote_save_trace_data(), remote_send_printf(), remote_set_circular_trace_buffer(), remote_set_disconnected_tracing(), remote_set_permissions(), remote_set_trace_buffer_size(), remote_set_trace_notes(), remote_static_tracepoint_marker_at(), remote_stop_ns(), remote_thread_alive(), remote_threads_extra_info(), remote_trace_find(), remote_use_agent(), remote_vcont_resume(), remote_verify_memory(), remote_vkill(), remote_xfer_partial(), send_g_packet(), set_thread(), and store_register_using_P().

static struct remote_state* get_remote_state ( void  )
static

Definition at line 605 of file remote.c.

References get_remote_arch_state(), and get_remote_state_raw().

Referenced by add_current_inferior_and_thread(), append_resumption(), btrace_sync_conf(), check_binary_download(), discard_pending_stop_replies(), extended_remote_attach(), extended_remote_create_inferior(), extended_remote_disable_randomization(), extended_remote_kill(), extended_remote_mourn(), extended_remote_restart(), extended_remote_run(), fetch_register_using_p(), get_memory_packet_size(), get_offsets(), get_remote_packet_size(), getpkt_or_notif_sane_1(), interrupt_query(), kill_child_of_pending_fork(), kill_new_fork_children(), packet_command(), parse_threadlist_response(), process_g_packet(), process_stop_reply(), putpkt_binary(), read_frame(), readahead_cache_invalidate(), readahead_cache_invalidate_fd(), readchar(), remote_add_thread(), remote_async(), remote_btrace_reset(), remote_can_async_p(), remote_can_download_tracepoint(), remote_check_symbols(), remote_close(), remote_current_thread(), remote_detach_1(), remote_detach_pid(), remote_disable_btrace(), remote_disable_tracepoint(), remote_download_command_source(), remote_download_trace_state_variable(), remote_enable_btrace(), remote_enable_tracepoint(), remote_file_delete(), remote_file_get(), remote_file_put(), remote_follow_fork(), remote_get_min_fast_tracepoint_insn_len(), remote_get_raw_trace_data(), remote_get_thread_local_address(), remote_get_threadinfo(), remote_get_threadlist(), remote_get_threads_with_qthreadinfo(), remote_get_tib_address(), remote_get_trace_state_variable_value(), remote_get_tracepoint_status(), remote_hostio_close(), remote_hostio_fstat(), remote_hostio_open(), remote_hostio_pread(), remote_hostio_pread_vFile(), remote_hostio_pwrite(), remote_hostio_readlink(), remote_hostio_send_command(), remote_hostio_set_filesystem(), remote_hostio_unlink(), remote_insert_breakpoint(), remote_insert_fork_catchpoint(), remote_insert_hw_breakpoint(), remote_insert_vfork_catchpoint(), remote_insert_watchpoint(), remote_is_async_p(), remote_new_objfile(), remote_notice_new_inferior(), remote_notif_get_pending_events(), remote_open_1(), remote_packet_size(), remote_parse_stop_reply(), remote_pass_signals(), remote_pid_to_str(), remote_program_signals(), remote_query_attached(), remote_query_supported(), remote_rcmd(), remote_read_btrace(), remote_read_bytes_1(), remote_read_qxfer(), remote_remove_breakpoint(), remote_remove_hw_breakpoint(), remote_remove_watchpoint(), remote_resume(), remote_save_trace_data(), remote_search_memory(), remote_send_printf(), remote_serial_write(), remote_set_circular_trace_buffer(), remote_set_disconnected_tracing(), remote_set_permissions(), remote_set_trace_buffer_size(), remote_set_trace_notes(), remote_start_remote(), remote_static_tracepoint_marker_at(), remote_stop_as(), remote_stop_ns(), remote_stopped_by_hw_breakpoint(), remote_stopped_by_sw_breakpoint(), remote_stopped_by_watchpoint(), remote_stopped_data_address(), remote_supports_multi_process(), remote_supports_stopped_by_hw_breakpoint(), remote_supports_stopped_by_sw_breakpoint(), remote_thread_alive(), remote_thread_always_alive(), remote_threadlist_iterator(), remote_threads_extra_info(), remote_trace_find(), remote_unpack_thread_info_response(), remote_update_thread_list(), remote_upload_trace_state_variables(), remote_upload_tracepoints(), remote_use_agent(), remote_vcont_resume(), remote_verify_memory(), remote_wait_as(), remote_wait_ns(), remote_write_bytes_aux(), remote_write_qxfer(), remote_xfer_partial(), send_g_packet(), send_interrupt_sequence(), set_general_process(), set_range_stepping(), set_remote_traceframe(), set_thread(), store_register_using_P(), store_registers_using_G(), VEC(), and write_ptid().

static struct remote_state* get_remote_state_raw ( void  )
static

Definition at line 438 of file remote.c.

References remote_state.

Referenced by get_remote_state(), and init_remote_state().

void getpkt ( char **  buf,
long *  sizeof_buf,
int  forever 
)
static int getpkt_or_notif_sane ( char **  buf,
long *  sizeof_buf,
int  forever,
int is_notif 
)
static

Definition at line 8199 of file remote.c.

References getpkt_or_notif_sane_1().

Referenced by remote_wait_as(), and remote_wait_ns().

static int getpkt_or_notif_sane_1 ( char **  buf,
long *  sizeof_buf,
int  forever,
int  expecting_notif,
int is_notif 
)
static
static int getpkt_sane ( char **  buf,
long *  sizeof_buf,
int  forever 
)
static
static int hexnumlen ( ULONGEST  num)
static

Definition at line 6877 of file remote.c.

References max.

Referenced by hexnumstr(), remote_buffer_add_int(), and remote_write_bytes_aux().

static int hexnumnstr ( char *  buf,
ULONGEST  num,
int  width 
)
static

Definition at line 6901 of file remote.c.

Referenced by hexnumstr(), and remote_write_bytes_aux().

static int hexnumstr ( char *  buf,
ULONGEST  num 
)
static
static void init_all_packet_configs ( void  )
static
static void init_extended_remote_ops ( void  )
static
static void init_remote_ops ( void  )
static

Definition at line 12380 of file remote.c.

References default_child_has_all_memory(), default_child_has_execution(), default_child_has_memory(), default_child_has_registers(), default_child_has_stack(), OPS_MAGIC, process_stratum, remote_async(), remote_augmented_libraries_svr4_read(), remote_btrace_conf(), remote_can_async_p(), remote_can_download_tracepoint(), remote_can_execute_reverse(), remote_can_run_breakpoint_commands(), remote_can_use_agent(), remote_check_pending_interrupt(), remote_check_watch_resources(), remote_close(), remote_core_of_thread(), remote_detach(), remote_disable_btrace(), remote_disable_tracepoint(), remote_disconnect(), remote_download_trace_state_variable(), remote_download_tracepoint(), remote_enable_btrace(), remote_enable_tracepoint(), remote_fetch_registers(), remote_files_info(), remote_filesystem_is_local(), remote_flash_done(), remote_flash_erase(), remote_get_ada_task_ptid(), remote_get_min_fast_tracepoint_insn_len(), remote_get_raw_trace_data(), remote_get_thread_local_address(), remote_get_tib_address(), remote_get_trace_state_variable_value(), remote_get_trace_status(), remote_get_tracepoint_status(), remote_hostio_close(), remote_hostio_fstat(), remote_hostio_open(), remote_hostio_pread(), remote_hostio_pwrite(), remote_hostio_readlink(), remote_hostio_unlink(), remote_insert_breakpoint(), remote_insert_hw_breakpoint(), remote_insert_watchpoint(), remote_is_async_p(), remote_kill(), remote_load(), remote_mourn(), remote_open(), remote_ops, remote_pass_signals(), remote_pid_to_exec_file(), remote_pid_to_str(), remote_prepare_to_store(), remote_program_signals(), remote_rcmd(), remote_read_btrace(), remote_read_description(), remote_region_ok_for_hw_watchpoint(), remote_remove_breakpoint(), remote_remove_hw_breakpoint(), remote_remove_watchpoint(), remote_resume(), remote_save_trace_data(), remote_search_memory(), remote_set_circular_trace_buffer(), remote_set_disconnected_tracing(), remote_set_permissions(), remote_set_trace_buffer_size(), remote_set_trace_notes(), remote_static_tracepoint_marker_at(), remote_stop(), remote_stopped_by_hw_breakpoint(), remote_stopped_by_sw_breakpoint(), remote_stopped_by_watchpoint(), remote_stopped_data_address(), remote_store_registers(), remote_supports_btrace(), remote_supports_cond_breakpoints(), remote_supports_disable_randomization(), remote_supports_enable_disable_tracepoint(), remote_supports_multi_process(), remote_supports_non_stop(), remote_supports_stopped_by_hw_breakpoint(), remote_supports_stopped_by_sw_breakpoint(), remote_supports_string_tracing(), remote_teardown_btrace(), remote_terminal_inferior(), remote_terminal_ours(), remote_thread_alive(), remote_threads_extra_info(), remote_trace_find(), remote_trace_init(), remote_trace_set_readonly_regions(), remote_trace_start(), remote_trace_stop(), remote_traceframe_info(), remote_update_thread_list(), remote_upload_trace_state_variables(), remote_upload_tracepoints(), remote_use_agent(), remote_verify_memory(), remote_wait(), remote_watchpoint_addr_within_range(), remote_xfer_partial(), serial_log_command(), tc_schedlock, target_ops::to_async, target_ops::to_augmented_libraries_svr4_read, target_ops::to_btrace_conf, target_ops::to_can_async_p, target_ops::to_can_download_tracepoint, target_ops::to_can_execute_reverse, target_ops::to_can_run_breakpoint_commands, target_ops::to_can_use_agent, target_ops::to_can_use_hw_breakpoint, target_ops::to_check_pending_interrupt, target_ops::to_close, target_ops::to_core_of_thread, target_ops::to_detach, target_ops::to_disable_btrace, target_ops::to_disable_tracepoint, target_ops::to_disconnect, target_ops::to_doc, target_ops::to_download_trace_state_variable, target_ops::to_download_tracepoint, target_ops::to_enable_btrace, target_ops::to_enable_tracepoint, target_ops::to_extra_thread_info, target_ops::to_fetch_registers, target_ops::to_fileio_close, target_ops::to_fileio_fstat, target_ops::to_fileio_open, target_ops::to_fileio_pread, target_ops::to_fileio_pwrite, target_ops::to_fileio_readlink, target_ops::to_fileio_unlink, target_ops::to_files_info, target_ops::to_filesystem_is_local, target_ops::to_flash_done, target_ops::to_flash_erase, target_ops::to_get_ada_task_ptid, target_ops::to_get_min_fast_tracepoint_insn_len, target_ops::to_get_raw_trace_data, target_ops::to_get_thread_local_address, target_ops::to_get_tib_address, target_ops::to_get_trace_state_variable_value, target_ops::to_get_trace_status, target_ops::to_get_tracepoint_status, 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_has_thread_control, target_ops::to_insert_breakpoint, target_ops::to_insert_hw_breakpoint, target_ops::to_insert_watchpoint, target_ops::to_is_async_p, target_ops::to_kill, target_ops::to_load, target_ops::to_log_command, target_ops::to_longname, target_ops::to_magic, target_ops::to_mourn_inferior, target_ops::to_open, target_ops::to_pass_signals, target_ops::to_pid_to_exec_file, target_ops::to_pid_to_str, target_ops::to_prepare_to_store, target_ops::to_program_signals, target_ops::to_rcmd, target_ops::to_read_btrace, target_ops::to_read_description, target_ops::to_region_ok_for_hw_watchpoint, target_ops::to_remove_breakpoint, target_ops::to_remove_hw_breakpoint, target_ops::to_remove_watchpoint, target_ops::to_resume, target_ops::to_save_trace_data, target_ops::to_search_memory, target_ops::to_set_circular_trace_buffer, target_ops::to_set_disconnected_tracing, target_ops::to_set_permissions, target_ops::to_set_trace_buffer_size, target_ops::to_set_trace_notes, target_ops::to_shortname, target_ops::to_static_tracepoint_marker_at, target_ops::to_stop, target_ops::to_stopped_by_hw_breakpoint, target_ops::to_stopped_by_sw_breakpoint, target_ops::to_stopped_by_watchpoint, target_ops::to_stopped_data_address, target_ops::to_store_registers, target_ops::to_stratum, target_ops::to_supports_btrace, target_ops::to_supports_disable_randomization, target_ops::to_supports_enable_disable_tracepoint, target_ops::to_supports_evaluation_of_breakpoint_conditions, target_ops::to_supports_multi_process, target_ops::to_supports_non_stop, target_ops::to_supports_stopped_by_hw_breakpoint, target_ops::to_supports_stopped_by_sw_breakpoint, target_ops::to_supports_string_tracing, target_ops::to_teardown_btrace, target_ops::to_terminal_inferior, target_ops::to_terminal_ours, target_ops::to_thread_alive, target_ops::to_trace_find, target_ops::to_trace_init, target_ops::to_trace_set_readonly_regions, target_ops::to_trace_start, target_ops::to_trace_stop, target_ops::to_traceframe_info, target_ops::to_update_thread_list, target_ops::to_upload_trace_state_variables, target_ops::to_upload_tracepoints, target_ops::to_use_agent, target_ops::to_verify_memory, target_ops::to_wait, target_ops::to_watchpoint_addr_within_range, and target_ops::to_xfer_partial.

Referenced by _initialize_remote().

static void* init_remote_state ( struct gdbarch gdbarch)
static
void int_to_threadref ( threadref id,
int  value 
)

Definition at line 2339 of file remote.c.

References scan().

Referenced by remote_threads_extra_info().

static void interrupt_query ( void  )
static
static int is_pending_fork_parent ( struct target_waitstatus ws,
int  event_pid,
ptid_t  thread_ptid 
)
static
static int kill_child_of_pending_fork ( QUEUE(stop_reply_p)*  q,
QUEUE_ITER(stop_reply_p)*  iter,
stop_reply_p  event,
void *  data 
)
static
static void kill_new_fork_children ( int  pid,
struct remote_state rs 
)
static
static int map_regcache_remote_table ( struct gdbarch gdbarch,
struct packet_reg regs 
)
static
static struct remote_state* new_remote_state ( void  )
static
static char * pack_int ( char *  buf,
int  value 
)
static

Definition at line 2252 of file remote.c.

References remote_state::buf, and pack_hex_byte().

Referenced by pack_threadinfo_request().

static char * pack_threadid ( char *  pkt,
threadref id 
)
static

Definition at line 2302 of file remote.c.

References BUF_THREAD_ID_SIZE, and pack_hex_byte().

Referenced by pack_threadinfo_request(), and pack_threadlist_request().

static char * pack_threadinfo_request ( char *  pkt,
int  mode,
threadref id 
)
static

Definition at line 2411 of file remote.c.

References pack_int(), and pack_threadid().

Referenced by remote_get_threadinfo().

static char * pack_threadlist_request ( char *  pkt,
int  startflag,
int  threadcount,
threadref nextthread 
)
static

Definition at line 2548 of file remote.c.

References pack_hex_byte(), pack_nibble(), and pack_threadid().

Referenced by remote_get_threadlist().

static enum packet_result packet_check_result ( const char *  buf)
static

Definition at line 1203 of file remote.c.

References PACKET_ERROR, PACKET_OK, and PACKET_UNKNOWN.

Referenced by packet_ok(), remote_send_printf(), and store_registers_using_G().

static void packet_command ( char *  args,
int  from_tty 
)
static
static enum packet_support packet_config_support ( struct packet_config config)
static
static enum packet_result packet_ok ( const char *  buf,
struct packet_config config 
)
static
static struct packet_reg* packet_reg_from_pnum ( struct remote_arch_state rsa,
LONGEST  pnum 
)
static
static struct packet_reg* packet_reg_from_regnum ( struct remote_arch_state rsa,
long  regnum 
)
static
static enum auto_boolean packet_set_cmd_state ( int  packet)
static

Definition at line 1411 of file remote.c.

References packet_config::detect, and remote_protocol_packets.

Referenced by remote_query_supported().

static enum packet_support packet_support ( int  packet)
static

Definition at line 1440 of file remote.c.

References packet_config_support(), and remote_protocol_packets.

static int parse_threadlist_response ( char *  pkt,
int  result_limit,
threadref original_echo,
threadref resultlist,
int doneflag 
)
static
static int peek_stop_reply ( ptid_t  ptid)
static

Definition at line 5829 of file remote.c.

References QUEUE_iterate, and stop_reply_match_ptid_and_ws().

Referenced by remote_stop_ns(), and set_stop_requested_callback().

static void print_packet ( const char *  buf)
static

Definition at line 7631 of file remote.c.

References fputstr_filtered(), gdb_stdout, and puts_filtered().

Referenced by packet_command().

static void process_g_packet ( struct regcache regcache)
static
static ptid_t process_stop_reply ( struct stop_reply stop_reply,
struct target_waitstatus status 
)
static
static void push_stop_reply ( struct stop_reply new_event)
static
int putpkt ( const char *  buf)

Definition at line 7639 of file remote.c.

References putpkt_binary().

Referenced by btrace_sync_conf(), extended_remote_attach(), extended_remote_disable_randomization(), extended_remote_kill(), extended_remote_mourn(), extended_remote_restart(), extended_remote_run(), fetch_register_using_p(), get_offsets(), packet_command(), remote_check_symbols(), remote_current_thread(), remote_detach_pid(), remote_disable_btrace(), remote_disable_tracepoint(), remote_download_command_source(), remote_download_trace_state_variable(), remote_download_tracepoint(), remote_enable_btrace(), remote_enable_tracepoint(), remote_fileio_reply(), remote_get_min_fast_tracepoint_insn_len(), remote_get_noisy_reply(), remote_get_raw_trace_data(), remote_get_thread_local_address(), remote_get_threadinfo(), remote_get_threadlist(), remote_get_threads_with_qthreadinfo(), remote_get_tib_address(), remote_get_trace_state_variable_value(), remote_get_trace_status(), remote_get_tracepoint_status(), remote_insert_breakpoint(), remote_insert_hw_breakpoint(), remote_insert_watchpoint(), remote_kill(), remote_notif_stop_ack(), remote_pass_signals(), remote_program_signals(), remote_query_attached(), remote_query_supported(), remote_rcmd(), remote_read_bytes_1(), remote_read_qxfer(), remote_remove_breakpoint(), remote_remove_hw_breakpoint(), remote_remove_watchpoint(), remote_resume(), remote_save_trace_data(), remote_send(), remote_send_printf(), remote_set_circular_trace_buffer(), remote_set_disconnected_tracing(), remote_set_permissions(), remote_set_trace_buffer_size(), remote_set_trace_notes(), remote_start_remote(), remote_static_tracepoint_marker_at(), remote_stop_ns(), remote_thread_alive(), remote_threads_extra_info(), remote_trace_find(), remote_trace_init(), remote_trace_set_readonly_regions(), remote_trace_start(), remote_trace_stop(), remote_upload_trace_state_variables(), remote_upload_tracepoints(), remote_use_agent(), remote_vcont_probe(), remote_vcont_resume(), remote_verify_memory(), remote_vkill(), remote_wait_as(), remote_xfer_partial(), set_thread(), store_register_using_P(), store_registers_using_G(), and VEC().

static int putpkt_binary ( const char *  buf,
int  cnt 
)
static
static QUEUE ( stop_reply_p  )
static

Definition at line 5488 of file remote.c.

References notif_event_xfree().

static struct stop_reply* queued_stop_reply ( ptid_t  ptid)
static
static long read_frame ( char **  buf_p,
long *  sizeof_buf 
)
static
static ptid_t read_ptid ( char *  buf,
char **  obuf 
)
static
static void readahead_cache_invalidate ( void  )
static

Definition at line 10333 of file remote.c.

References readahead_cache::fd, get_remote_state(), and remote_state::readahead_cache.

Referenced by remote_open_1().

static void readahead_cache_invalidate_fd ( int  fd)
static
static int readchar ( int  timeout)
static
static void record_currthread ( struct remote_state rs,
ptid_t  currthread 
)
static
void register_remote_g_packet_guess ( struct gdbarch gdbarch,
int  bytes,
const struct target_desc tdesc 
)
void register_remote_support_xml ( const char *  xml)

Definition at line 4207 of file remote.c.

References xfree().

Referenced by _initialize_i386_tdep().

static struct inferior* remote_add_inferior ( int  fake_pid_p,
int  pid,
int  attached,
int  try_open_exec 
)
static
static void remote_add_target_side_commands ( struct gdbarch gdbarch,
struct bp_target_info bp_tgt,
char *  buf 
)
static
static int remote_add_target_side_condition ( struct gdbarch gdbarch,
struct bp_target_info bp_tgt,
char *  buf,
char *  buf_end 
)
static
static void remote_add_thread ( ptid_t  ptid,
int  running 
)
static
static CORE_ADDR remote_address_masked ( CORE_ADDR  addr)
static
static void remote_async ( struct target_ops ops,
int  enable 
)
static
static void remote_async_inferior_event_handler ( gdb_client_data  data)
static

Definition at line 12590 of file remote.c.

References INF_REG_EVENT, and inferior_event_handler().

Referenced by remote_open_1().

static void remote_async_serial_handler ( struct serial scb,
void *  context 
)
static

Definition at line 12580 of file remote.c.

References INF_REG_EVENT, and inferior_event_handler().

static int remote_augmented_libraries_svr4_read ( struct target_ops self)
static

Definition at line 12329 of file remote.c.

References PACKET_augmented_libraries_svr4_read_feature, and PACKET_ENABLE.

Referenced by init_remote_ops().

static const struct btrace_config* remote_btrace_conf ( struct target_ops self,
const struct btrace_target_info tinfo 
)
static

Definition at line 12322 of file remote.c.

References btrace_target_info::conf.

Referenced by init_remote_ops().

static void remote_btrace_reset ( void  )
static

Definition at line 12049 of file remote.c.

References remote_state::btrace_config, and get_remote_state().

Referenced by remote_open_1().

static void remote_buffer_add_bytes ( char **  buffer,
int left,
const gdb_byte bytes,
int  len 
)
static

Definition at line 10162 of file remote.c.

References _, bin2hex(), error(), and len.

Referenced by remote_hostio_open(), remote_hostio_readlink(), and remote_hostio_unlink().

static void remote_buffer_add_int ( char **  buffer,
int left,
ULONGEST  value 
)
static
static void remote_buffer_add_string ( char **  buffer,
int left,
char *  string 
)
static
static int remote_can_async_p ( struct target_ops ops)
static
static int remote_can_download_tracepoint ( struct target_ops self)
static
static int remote_can_execute_reverse ( struct target_ops self)
static

Definition at line 11072 of file remote.c.

References PACKET_bc, PACKET_bs, and PACKET_ENABLE.

Referenced by init_remote_ops().

static int remote_can_run_breakpoint_commands ( struct target_ops self)
static
static int remote_can_use_agent ( struct target_ops self)
static

Definition at line 12032 of file remote.c.

References PACKET_DISABLE, and PACKET_QAgent.

Referenced by init_remote_ops().

static void remote_check_pending_interrupt ( struct target_ops self)
static
static void remote_check_symbols ( void  )
static
static int remote_check_watch_resources ( struct target_ops self,
int  type,
int  cnt,
int  ot 
)
static

Definition at line 8878 of file remote.c.

References bp_hardware_breakpoint.

Referenced by init_remote_ops().

static void remote_close ( struct target_ops self)
static
static void remote_command ( char *  args,
int  from_tty 
)
static

Definition at line 11066 of file remote.c.

References all_commands, gdb_stdout, and help_list().

Referenced by _initialize_remote().

static void remote_console_output ( char *  msg)
static
static int remote_core_of_thread ( struct target_ops ops,
ptid_t  ptid 
)
static

Definition at line 11853 of file remote.c.

References private_thread_info::core, find_thread_ptid(), and thread_info::priv.

Referenced by init_remote_ops().

static ptid_t remote_current_thread ( ptid_t  oldptid)
static
static void remote_delete_command ( char *  args,
int  from_tty 
)
static
static void remote_detach ( struct target_ops ops,
const char *  args,
int  from_tty 
)
static

Definition at line 4647 of file remote.c.

References remote_detach_1().

Referenced by init_remote_ops().

static void remote_detach_1 ( const char *  args,
int  from_tty 
)
static
static void remote_detach_pid ( int  pid)
static
static void remote_disable_btrace ( struct target_ops self,
struct btrace_target_info tinfo 
)
static
static void remote_disable_tracepoint ( struct target_ops self,
struct bp_location location 
)
static
static void remote_disconnect ( struct target_ops target,
const char *  args,
int  from_tty 
)
static

Definition at line 4700 of file remote.c.

References _, error(), puts_filtered(), and remote_mourn().

Referenced by init_remote_ops().

static void remote_download_command_source ( int  num,
ULONGEST  addr,
struct command_line cmds 
)
static
static void remote_download_trace_state_variable ( struct target_ops self,
struct trace_state_variable tsv 
)
static
static void remote_download_tracepoint ( struct target_ops self,
struct bp_location loc 
)
static
static struct btrace_target_info* remote_enable_btrace ( struct target_ops self,
ptid_t  ptid,
const struct btrace_config conf 
)
static
static void remote_enable_tracepoint ( struct target_ops self,
struct bp_location location 
)
static
static void remote_fetch_registers ( struct target_ops ops,
struct regcache regcache,
int  regnum 
)
static
void remote_file_delete ( const char *  remote_file,
int  from_tty 
)
void remote_file_get ( const char *  remote_file,
const char *  local_file,
int  from_tty 
)
void remote_file_put ( const char *  local_file,
const char *  remote_file,
int  from_tty 
)
static int remote_fileio_errno_to_host ( int  errnum)
static

Definition at line 10768 of file remote.c.

Referenced by remote_hostio_error().

static void remote_files_info ( struct target_ops ignore)
static

Definition at line 7522 of file remote.c.

References puts_filtered().

Referenced by init_remote_ops().

static int remote_filesystem_is_local ( struct target_ops self)
static
static void remote_flash_done ( struct target_ops ops)
static
static void remote_flash_erase ( struct target_ops ops,
ULONGEST  address,
LONGEST  length 
)
static
static enum target_xfer_status remote_flash_write ( struct target_ops ops,
ULONGEST  address,
ULONGEST  length,
ULONGEST xfered_len,
const gdb_byte data 
)
static
static int remote_follow_fork ( struct target_ops ops,
int  follow_child,
int  detach_fork 
)
static
static int remote_fork_event_p ( struct remote_state rs)
static

Definition at line 1519 of file remote.c.

References PACKET_ENABLE, and PACKET_fork_event_feature.

Referenced by remote_follow_fork(), and remote_insert_fork_catchpoint().

static void* remote_g_packet_data_init ( struct obstack *  obstack)
static

Definition at line 10057 of file remote.c.

References OBSTACK_ZALLOC.

Referenced by _initialize_remote().

static ptid_t remote_get_ada_task_ptid ( struct target_ops self,
long  lwp,
long  thread 
)
static

Definition at line 3211 of file remote.c.

References inferior_ptid, ptid_build(), and ptid_get_pid().

Referenced by init_remote_ops().

static void remote_get_command ( char *  args,
int  from_tty 
)
static
static int remote_get_min_fast_tracepoint_insn_len ( struct target_ops self)
static
static char* remote_get_noisy_reply ( char **  buf_p,
long *  sizeof_buf 
)
static
static LONGEST remote_get_raw_trace_data ( struct target_ops self,
gdb_byte buf,
ULONGEST  offset,
LONGEST  len 
)
static
static CORE_ADDR remote_get_thread_local_address ( struct target_ops ops,
ptid_t  ptid,
CORE_ADDR  lm,
CORE_ADDR  offset 
)
static
static int remote_get_threadinfo ( threadref threadid,
int  fieldset,
struct gdb_ext_thread_info info 
)
static
static int remote_get_threadlist ( int  startflag,
threadref nextthread,
int  result_limit,
int done,
int result_count,
threadref threadlist 
)
static
static int remote_get_threads_with_ql ( struct target_ops ops,
struct threads_listing_context context 
)
static
static int remote_get_threads_with_qthreadinfo ( struct target_ops ops,
struct threads_listing_context context 
)
static
static int remote_get_threads_with_qxfer ( struct target_ops ops,
struct threads_listing_context context 
)
static
static int remote_get_tib_address ( struct target_ops self,
ptid_t  ptid,
CORE_ADDR addr 
)
static
static int remote_get_trace_state_variable_value ( struct target_ops self,
int  tsvnum,
LONGEST val 
)
static
static int remote_get_trace_status ( struct target_ops self,
struct trace_status ts 
)
static
static void remote_get_tracepoint_status ( struct target_ops self,
struct breakpoint bp,
struct uploaded_tp utp 
)
static
static int remote_hostio_close ( struct target_ops self,
int  fd,
int remote_errno 
)
static
static void remote_hostio_close_cleanup ( void *  opaque)
static

Definition at line 10830 of file remote.c.

References find_target_at(), process_stratum, and remote_hostio_close().

Referenced by remote_file_get(), and remote_file_put().

static char* remote_hostio_error ( int  errnum)
static
static int remote_hostio_fstat ( struct target_ops self,
int  fd,
struct stat *  st,
int remote_errno 
)
static
static int remote_hostio_open ( struct target_ops self,
struct inferior inf,
const char *  filename,
int  flags,
int  mode,
int  warn_if_slow,
int remote_errno 
)
static
static int remote_hostio_parse_result ( char *  buffer,
int retcode,
int remote_errno,
char **  attachment 
)
static

Definition at line 10210 of file remote.c.

Referenced by remote_hostio_send_command().

static int remote_hostio_pread ( struct target_ops self,
int  fd,
gdb_byte read_buf,
int  len,
ULONGEST  offset,
int remote_errno 
)
static
static int remote_hostio_pread_from_cache ( struct remote_state rs,
int  fd,
gdb_byte read_buf,
size_t  len,
ULONGEST  offset 
)
static
static int remote_hostio_pread_vFile ( struct target_ops self,
int  fd,
gdb_byte read_buf,
int  len,
ULONGEST  offset,
int remote_errno 
)
static
static int remote_hostio_pwrite ( struct target_ops self,
int  fd,
const gdb_byte write_buf,
int  len,
ULONGEST  offset,
int remote_errno 
)
static
static char* remote_hostio_readlink ( struct target_ops self,
struct inferior inf,
const char *  filename,
int remote_errno 
)
static
static int remote_hostio_send_command ( int  command_bytes,
int  which_packet,
int remote_errno,
char **  attachment,
int attachment_len 
)
static
static int remote_hostio_set_filesystem ( struct inferior inf,
int remote_errno 
)
static
static int remote_hostio_unlink ( struct target_ops self,
struct inferior inf,
const char *  filename,
int remote_errno 
)
static
static int remote_insert_breakpoint ( struct target_ops ops,
struct gdbarch gdbarch,
struct bp_target_info bp_tgt 
)
static
static int remote_insert_fork_catchpoint ( struct target_ops ops,
int  pid 
)
static

Definition at line 1536 of file remote.c.

References get_remote_state(), and remote_fork_event_p().

Referenced by init_extended_remote_ops().

static int remote_insert_hw_breakpoint ( struct target_ops self,
struct gdbarch gdbarch,
struct bp_target_info bp_tgt 
)
static
static int remote_insert_vfork_catchpoint ( struct target_ops ops,
int  pid 
)
static

Definition at line 1556 of file remote.c.

References get_remote_state(), and remote_vfork_event_p().

Referenced by init_extended_remote_ops().

static int remote_insert_watchpoint ( struct target_ops self,
CORE_ADDR  addr,
int  len,
int  type,
struct expression cond 
)
static
static int remote_is_async_p ( struct target_ops ops)
static
static void remote_kill ( struct target_ops ops)
static
static void remote_load ( struct target_ops self,
const char *  name,
int  from_tty 
)
static

Definition at line 12338 of file remote.c.

References generic_load().

Referenced by init_remote_ops().

static void remote_mourn ( struct target_ops ops)
static

Definition at line 8368 of file remote.c.

References generic_mourn_inferior(), and unpush_target().

Referenced by init_remote_ops(), and remote_disconnect().

static int remote_multi_process_p ( struct remote_state rs)
static
static void remote_new_objfile ( struct objfile objfile)
static

Definition at line 12661 of file remote.c.

References get_remote_state(), remote_check_symbols(), and remote_state::remote_desc.

Referenced by _initialize_remote().

static int remote_newthread_step ( threadref ref,
void *  context 
)
static
static void remote_notice_new_inferior ( ptid_t  currthread,
int  running 
)
static
void remote_notif_get_pending_events ( struct notif_client nc)
static int remote_notif_remove_once_on_match ( QUEUE(stop_reply_p)*  q,
QUEUE_ITER(stop_reply_p)*  iter,
stop_reply_p  event,
void *  data 
)
static
static struct stop_reply* remote_notif_remove_queued_reply ( ptid_t  ptid)
static
static void remote_notif_stop_ack ( struct notif_client self,
char *  buf,
struct notif_event event 
)
static
static struct notif_event* remote_notif_stop_alloc_reply ( void  )
static

Definition at line 5540 of file remote.c.

References notif_event::dtr, and stop_reply_dtr().

static int remote_notif_stop_can_get_pending_events ( struct notif_client self)
static

Definition at line 5520 of file remote.c.

References mark_async_event_handler().

static void remote_notif_stop_parse ( struct notif_client self,
char *  buf,
struct notif_event event 
)
static

Definition at line 5497 of file remote.c.

References remote_parse_stop_reply().

static void remote_open ( const char *  name,
int  from_tty 
)
static

Definition at line 3872 of file remote.c.

References remote_open_1(), and remote_ops.

Referenced by init_remote_ops().

static void remote_open_1 ( const char *  name,
int  from_tty,
struct target_ops target,
int  extended_p 
)
static
static void remote_packet_size ( const struct protocol_feature feature,
enum packet_support  support,
const char *  value 
)
static
static void remote_parse_stop_reply ( char *  buf,
struct stop_reply event 
)
static
static void remote_pass_signals ( struct target_ops self,
int  numsigs,
unsigned char *  pass_signals 
)
static
static char* remote_pid_to_exec_file ( struct target_ops self,
int  pid 
)
static
static char* remote_pid_to_str ( struct target_ops ops,
ptid_t  ptid 
)
static
static void remote_prepare_to_store ( struct target_ops self,
struct regcache regcache 
)
static
static void remote_program_signals ( struct target_ops self,
int  numsigs,
unsigned char *  signals 
)
static
static void remote_put_command ( char *  args,
int  from_tty 
)
static
static int remote_query_attached ( int  pid)
static
static void remote_query_supported ( void  )
static
static char* remote_query_supported_append ( char *  msg,
const char *  append 
)
static

Definition at line 4237 of file remote.c.

Referenced by remote_query_supported().

static void remote_rcmd ( struct target_ops self,
const char *  command,
struct ui_file outbuf 
)
static
static enum btrace_error remote_read_btrace ( struct target_ops self,
struct btrace_data btrace,
struct btrace_target_info tinfo,
enum btrace_read_type  type 
)
static
static enum target_xfer_status remote_read_bytes ( struct target_ops ops,
CORE_ADDR  memaddr,
gdb_byte myaddr,
ULONGEST  len,
int  unit_size,
ULONGEST xfered_len 
)
static
static enum target_xfer_status remote_read_bytes_1 ( CORE_ADDR  memaddr,
gdb_byte myaddr,
ULONGEST  len_units,
int  unit_size,
ULONGEST xfered_len_units 
)
static
static const struct target_desc* remote_read_description ( struct target_ops target)
static
static int remote_read_description_p ( struct target_ops target)
static

Definition at line 10090 of file remote.c.

References gdbarch_data(), target_gdbarch(), and VEC_empty.

Referenced by remote_start_remote().

static enum target_xfer_status remote_read_qxfer ( struct target_ops ops,
const char *  object_name,
const char *  annex,
gdb_byte readbuf,
ULONGEST  offset,
LONGEST  len,
ULONGEST xfered_len,
struct packet_config packet 
)
static
static int remote_region_ok_for_hw_watchpoint ( struct target_ops self,
CORE_ADDR  addr,
int  len 
)
static

Definition at line 8864 of file remote.c.

Referenced by init_remote_ops().

int remote_register_number_and_offset ( struct gdbarch gdbarch,
int  regnum,
int pnum,
int poffset 
)
static int remote_remove_breakpoint ( struct target_ops ops,
struct gdbarch gdbarch,
struct bp_target_info bp_tgt 
)
static
static int remote_remove_fork_catchpoint ( struct target_ops ops,
int  pid 
)
static

Definition at line 1547 of file remote.c.

Referenced by init_extended_remote_ops().

static int remote_remove_hw_breakpoint ( struct target_ops self,
struct gdbarch gdbarch,
struct bp_target_info bp_tgt 
)
static
static int remote_remove_vfork_catchpoint ( struct target_ops ops,
int  pid 
)
static

Definition at line 1567 of file remote.c.

Referenced by init_extended_remote_ops().

static int remote_remove_watchpoint ( struct target_ops self,
CORE_ADDR  addr,
int  len,
int  type,
struct expression cond 
)
static
static void remote_resume ( struct target_ops ops,
ptid_t  ptid,
int  step,
enum gdb_signal  siggnal 
)
static
static int remote_save_trace_data ( struct target_ops self,
const char *  filename 
)
static
static int remote_search_memory ( struct target_ops ops,
CORE_ADDR  start_addr,
ULONGEST  search_space_len,
const gdb_byte pattern,
ULONGEST  pattern_len,
CORE_ADDR found_addrp 
)
static
static void remote_send ( char **  buf,
long *  sizeof_buf_p 
)
static

Definition at line 7596 of file remote.c.

References _, error(), getpkt(), and putpkt().

Referenced by send_g_packet().

static enum packet_result static enum packet_result remote_send_printf ( const char *  format,
  ... 
)
static
static struct serial* remote_serial_open ( const char *  name)
static

Definition at line 3980 of file remote.c.

References _, serial_open(), startswith(), and warning().

Referenced by remote_open_1().

static void remote_serial_write ( const char *  str,
int  len 
)
static
static void remote_set_circular_trace_buffer ( struct target_ops self,
int  val 
)
static
static void remote_set_disconnected_tracing ( struct target_ops self,
int  val 
)
static
void remote_set_permissions ( struct target_ops self)
static
static void remote_set_trace_buffer_size ( struct target_ops self,
LONGEST  val 
)
static
static int remote_set_trace_notes ( struct target_ops self,
const char *  user,
const char *  notes,
const char *  stop_notes 
)
static
static void remote_start_remote ( int  from_tty,
struct target_ops target,
int  extended_p 
)
static

Definition at line 3570 of file remote.c.

References _, add_current_inferior_and_thread(), auto_solib_add, breakpoints_should_be_inserted_now(), remote_state::buf, remote_state::buf_size, remote_state::cached_wait_status, current_trace_status(), error(), gdb_assert, gdbarch_has_global_solist(), gdbarch_target_desc(), get_current_thread(), get_offsets(), get_remote_state(), getpkt(), notif_client::id, immediate_quit, arm-linux::inf, inferior_ptid, init_wait_for_inferior(), insert_breakpoints(), interrupt_on_connect, iterate_over_threads(), merge_uploaded_trace_state_variables(), merge_uploaded_tracepoints(), minus_one_ptid, remote_state::noack_mode, non_stop, notif_client_stop, remote_state::notif_state, null_ptid, packet_config_support(), PACKET_DISABLE, PACKET_ENABLE, PACKET_OK, packet_ok(), PACKET_QAllow, PACKET_QNonStop, PACKET_QStartNoAckMode, remote_notif_state::pending_event, printf_filtered(), thread_info::ptid, ptid_equal(), putpkt(), QUIT, remote_check_symbols(), remote_current_thread(), remote_state::remote_desc, remote_get_trace_status(), remote_notif_get_pending_events(), remote_notif_parse(), remote_pass_signals(), remote_protocol_packets, remote_query_supported(), remote_read_description_p(), remote_set_permissions(), remote_update_thread_list(), remote_upload_trace_state_variables(), remote_upload_tracepoints(), send_interrupt_sequence(), serial_write(), set_continue_thread(), set_general_thread(), set_stop_requested_callback(), solib_add(), start_remote(), remote_state::starting_up, symfile_objfile, target_async, target_can_async_p, target_clear_description(), target_find_description(), target_gdbarch(), target_has_execution, target_update_thread_list(), thread_count(), thread_list, update_address_spaces(), and update_signals_program_target().

Referenced by remote_open_1().

static int remote_static_tracepoint_marker_at ( struct target_ops self,
CORE_ADDR  addr,
struct static_tracepoint_marker marker 
)
static
static void remote_stop ( struct target_ops self,
ptid_t  ptid 
)
static

Definition at line 5343 of file remote.c.

References fprintf_unfiltered(), gdb_stdlog, non_stop, remote_debug, remote_stop_as(), and remote_stop_ns().

Referenced by init_remote_ops().

static void remote_stop_as ( ptid_t  ptid)
static
static void remote_stop_ns ( ptid_t  ptid)
static
static int remote_stopped_by_hw_breakpoint ( struct target_ops ops)
static
static int remote_stopped_by_sw_breakpoint ( struct target_ops ops)
static
static int remote_stopped_by_watchpoint ( struct target_ops ops)
static
static int remote_stopped_data_address ( struct target_ops target,
CORE_ADDR addr_p 
)
static
static void remote_store_registers ( struct target_ops ops,
struct regcache regcache,
int  regnum 
)
static
static void remote_supported_packet ( const struct protocol_feature feature,
enum packet_support  support,
const char *  argument 
)
static
static int remote_supports_btrace ( struct target_ops self,
enum btrace_format  format 
)
static
static int remote_supports_cond_breakpoints ( struct target_ops self)
static
static int remote_supports_cond_tracepoints ( void  )
static

Definition at line 11107 of file remote.c.

References PACKET_ConditionalTracepoints, and PACKET_ENABLE.

Referenced by remote_download_tracepoint().

static int remote_supports_disable_randomization ( struct target_ops self)
static

Definition at line 11088 of file remote.c.

Referenced by init_remote_ops().

static int remote_supports_enable_disable_tracepoint ( struct target_ops self)
static

Definition at line 11137 of file remote.c.

References PACKET_ENABLE, and PACKET_EnableDisableTracepoints_feature.

Referenced by init_remote_ops().

static int remote_supports_fast_tracepoints ( void  )
static

Definition at line 11119 of file remote.c.

References PACKET_ENABLE, and PACKET_FastTracepoints.

Referenced by remote_download_tracepoint().

static int remote_supports_install_in_trace ( void  )
static

Definition at line 11131 of file remote.c.

References PACKET_ENABLE, and PACKET_InstallInTrace.

Referenced by remote_can_download_tracepoint().

static int remote_supports_multi_process ( struct target_ops self)
static

Definition at line 11095 of file remote.c.

References remote_state::extended, get_remote_state(), and remote_multi_process_p().

Referenced by init_remote_ops().

static int remote_supports_non_stop ( struct target_ops self)
static

Definition at line 11082 of file remote.c.

Referenced by init_remote_ops().

static int remote_supports_static_tracepoints ( void  )
static

Definition at line 11125 of file remote.c.

References PACKET_ENABLE, and PACKET_StaticTracepoints.

Referenced by remote_download_tracepoint().

static int remote_supports_stopped_by_hw_breakpoint ( struct target_ops ops)
static

Definition at line 8939 of file remote.c.

References get_remote_state(), PACKET_ENABLE, and PACKET_hwbreak_feature.

Referenced by init_remote_ops().

static int remote_supports_stopped_by_sw_breakpoint ( struct target_ops ops)
static

Definition at line 8918 of file remote.c.

References get_remote_state(), PACKET_ENABLE, and PACKET_swbreak_feature.

Referenced by init_remote_ops().

static int remote_supports_string_tracing ( struct target_ops self)
static

Definition at line 11144 of file remote.c.

References PACKET_ENABLE, and PACKET_tracenz_feature.

Referenced by init_remote_ops().

static void remote_teardown_btrace ( struct target_ops self,
struct btrace_target_info tinfo 
)
static

Definition at line 12264 of file remote.c.

References xfree().

Referenced by init_remote_ops().

static void remote_terminal_inferior ( struct target_ops self)
static
static void remote_terminal_ours ( struct target_ops self)
static
static int remote_thread_alive ( struct target_ops ops,
ptid_t  ptid 
)
static
static int remote_thread_always_alive ( struct target_ops ops,
ptid_t  ptid 
)
static
static int remote_threadlist_iterator ( rmt_thread_action  stepfunction,
void *  context,
int  looplimit 
)
static
static char* remote_threads_extra_info ( struct target_ops self,
struct thread_info tp 
)
static
static int remote_trace_find ( struct target_ops self,
enum trace_find_type  type,
int  num,
CORE_ADDR  addr1,
CORE_ADDR  addr2,
int tpp 
)
static
static void remote_trace_init ( struct target_ops self)
static

Definition at line 11156 of file remote.c.

References _, error(), putpkt(), remote_get_noisy_reply(), target_buf, and target_buf_size.

Referenced by init_remote_ops().

static void remote_trace_set_readonly_regions ( struct target_ops self)
static
static void remote_trace_start ( struct target_ops self)
static

Definition at line 11539 of file remote.c.

References _, error(), putpkt(), remote_get_noisy_reply(), target_buf, and target_buf_size.

Referenced by init_remote_ops().

static void remote_trace_stop ( struct target_ops self)
static

Definition at line 11647 of file remote.c.

References _, error(), putpkt(), remote_get_noisy_reply(), target_buf, and target_buf_size.

Referenced by init_remote_ops().

static struct traceframe_info* remote_traceframe_info ( struct target_ops self)
static
static int remote_unpack_thread_info_response ( char *  pkt,
threadref expectedref,
struct gdb_ext_thread_info info 
)
static
static void remote_unpush_target ( void  )
static
static void remote_update_thread_list ( struct target_ops ops)
static
static int remote_upload_trace_state_variables ( struct target_ops self,
struct uploaded_tsv **  utsvp 
)
static
static int remote_upload_tracepoints ( struct target_ops self,
struct uploaded_tp **  utpp 
)
static
static int remote_use_agent ( struct target_ops self,
int  use 
)
static
static void remote_vcont_probe ( struct remote_state rs)
static
static int remote_vcont_resume ( ptid_t  ptid,
int  step,
enum gdb_signal  siggnal 
)
static
static int remote_verify_memory ( struct target_ops ops,
const gdb_byte data,
CORE_ADDR  lma,
ULONGEST  size 
)
static
static int remote_vfork_event_p ( struct remote_state rs)
static

Definition at line 1527 of file remote.c.

References PACKET_ENABLE, and PACKET_vfork_event_feature.

Referenced by remote_follow_fork(), and remote_insert_vfork_catchpoint().

static int remote_vkill ( int  pid,
struct remote_state rs 
)
static
static ptid_t remote_wait ( struct target_ops ops,
ptid_t  ptid,
struct target_waitstatus status,
int  options 
)
static
static ptid_t remote_wait_as ( ptid_t  ptid,
struct target_waitstatus status,
int  options 
)
static
static ptid_t remote_wait_ns ( ptid_t  ptid,
struct target_waitstatus status,
int  options 
)
static
static int remote_watchpoint_addr_within_range ( struct target_ops target,
CORE_ADDR  addr,
CORE_ADDR  start,
int  length 
)
static

Definition at line 8811 of file remote.c.

References remote_address_masked().

Referenced by init_remote_ops().

static enum target_xfer_status remote_write_bytes ( CORE_ADDR  memaddr,
const gdb_byte myaddr,
ULONGEST  len,
int  unit_size,
ULONGEST xfered_len 
)
static
static enum target_xfer_status remote_write_bytes_aux ( const char *  header,
CORE_ADDR  memaddr,
const gdb_byte myaddr,
ULONGEST  len_units,
int  unit_size,
ULONGEST xfered_len_units,
char  packet_format,
int  use_length 
)
static
static enum target_xfer_status remote_write_qxfer ( struct target_ops ops,
const char *  object_name,
const char *  annex,
const gdb_byte writebuf,
ULONGEST  offset,
LONGEST  len,
ULONGEST xfered_len,
struct packet_config packet 
)
static
static enum target_xfer_status remote_xfer_live_readonly_partial ( struct target_ops ops,
gdb_byte readbuf,
ULONGEST  memaddr,
ULONGEST  len,
int  unit_size,
ULONGEST xfered_len 
)
static
static enum target_xfer_status remote_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
static int remove_child_of_pending_fork ( QUEUE(stop_reply_p)*  q,
QUEUE_ITER(stop_reply_p)*  iter,
stop_reply_p  event,
void *  data 
)
static
static void remove_new_fork_children ( struct threads_listing_context context)
static
static int remove_stop_reply_for_inferior ( QUEUE(stop_reply_p)*  q,
QUEUE_ITER(stop_reply_p)*  iter,
stop_reply_p  event,
void *  data 
)
static
static int remove_stop_reply_of_remote_state ( QUEUE(stop_reply_p)*  q,
QUEUE_ITER(stop_reply_p)*  iter,
stop_reply_p  event,
void *  data 
)
static
static void reset_all_packet_configs_support ( void  )
static

Definition at line 3890 of file remote.c.

References PACKET_MAX, PACKET_SUPPORT_UNKNOWN, and remote_protocol_packets.

Referenced by remote_open_1().

static void restore_remote_timeout ( void *  p)
static

Definition at line 7440 of file remote.c.

References remote_timeout.

Referenced by remote_flash_done(), remote_flash_erase(), and remote_flash_write().

static int send_g_packet ( void  )
static
static void send_interrupt_sequence ( void  )
static
static void set_continue_thread ( struct ptid  ptid)
static
static void set_continue_thread ( struct ptid  ptid)
static

Definition at line 1960 of file remote.c.

References set_thread().

static void set_general_process ( void  )
static
static void set_general_thread ( struct ptid  ptid)
static
static void set_general_thread ( struct ptid  ptid)
static

Definition at line 1954 of file remote.c.

References set_thread().

static void set_memory_packet_size ( char *  args,
struct memory_packet_config config 
)
static
static void set_memory_read_packet_size ( char *  args,
int  from_tty 
)
static

Definition at line 1066 of file remote.c.

References set_memory_packet_size().

Referenced by _initialize_remote().

static void set_memory_write_packet_size ( char *  args,
int  from_tty 
)
static

Definition at line 1043 of file remote.c.

References set_memory_packet_size().

Referenced by _initialize_remote().

static void set_range_stepping ( char *  ignore_args,
int  from_tty,
struct cmd_list_element c 
)
static
static void set_remote_cmd ( char *  args,
int  from_tty 
)
static

Definition at line 12617 of file remote.c.

References all_commands, gdb_stdout, and help_list().

Referenced by _initialize_remote().

static void set_remote_protocol_Z_packet_cmd ( char *  args,
int  from_tty,
struct cmd_list_element c 
)
static
static void set_remote_traceframe ( void  )
static
static void set_remotebreak ( char *  args,
int  from_tty,
struct cmd_list_element c 
)
static
static int set_stop_requested_callback ( struct thread_info thread,
void *  data 
)
static

Definition at line 3433 of file remote.c.

References peek_stop_reply(), thread_info::ptid, and set_stop_requested().

Referenced by remote_start_remote().

static void set_thread ( struct ptid  ptid,
int  gen 
)
static
static void show_interrupt_sequence ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
)
static
static void show_memory_packet_size ( struct memory_packet_config config)
static
static void show_memory_read_packet_size ( char *  args,
int  from_tty 
)
static

Definition at line 1072 of file remote.c.

References show_memory_packet_size().

Referenced by _initialize_remote().

static void show_memory_write_packet_size ( char *  args,
int  from_tty 
)
static

Definition at line 1049 of file remote.c.

References show_memory_packet_size().

Referenced by _initialize_remote().

static void show_packet_config_cmd ( struct packet_config config)
static
static void show_range_stepping ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
)
static

Definition at line 12720 of file remote.c.

References _, and fprintf_filtered().

Referenced by _initialize_remote().

static void show_remote_cmd ( char *  args,
int  from_tty 
)
static
static void show_remote_protocol_packet_cmd ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
)
static
static void show_remote_protocol_Z_packet_cmd ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
)
static

Definition at line 1496 of file remote.c.

References NR_Z_PACKET_TYPES, PACKET_Z0, remote_protocol_packets, and show_packet_config_cmd().

Referenced by _initialize_remote().

static void show_remotebreak ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
)
static

Definition at line 875 of file remote.c.

Referenced by _initialize_remote().

static void skip_frame ( void  )
static

Definition at line 7851 of file remote.c.

References readchar(), remote_timeout, and SERIAL_TIMEOUT.

Referenced by putpkt_binary().

static char* skip_to_semicolon ( char *  p)
static

Definition at line 5838 of file remote.c.

Referenced by remote_parse_stop_reply().

static void start_thread ( struct gdb_xml_parser parser,
const struct gdb_xml_element element,
void *  user_data,
VEC(gdb_xml_value_s)*  attributes 
)
static
static void stop_reply_dtr ( struct notif_event event)
static

Definition at line 5532 of file remote.c.

References VEC_free.

Referenced by remote_notif_stop_alloc_reply().

static ptid_t stop_reply_extract_thread ( char *  stop_reply)
static

Definition at line 3468 of file remote.c.

References null_ptid, and read_ptid().

Referenced by get_current_thread().

static int stop_reply_match_ptid_and_ws ( QUEUE(stop_reply_p)*  q,
QUEUE_ITER(stop_reply_p)*  iter,
struct stop_reply event,
void *  data 
)
static

Definition at line 5815 of file remote.c.

References stop_reply::ptid, ptid_equal(), and TARGET_WAITKIND_STOPPED.

Referenced by peek_stop_reply().

static void stop_reply_xfree ( struct stop_reply )
static
static int store_register_using_P ( const struct regcache regcache,
struct packet_reg reg 
)
static
static void store_registers_using_G ( const struct regcache regcache)
static
static int strprefix ( const char *  p,
const char *  pend,
const char *  prefix 
)
static

Definition at line 5849 of file remote.c.

Referenced by remote_parse_stop_reply().

static int stub_unpack_int ( char *  buff,
int  fieldlength 
)
static

Definition at line 2221 of file remote.c.

References stubhex().

Referenced by remote_unpack_thread_info_response(), unpack_byte(), and unpack_int().

static int stubhex ( int  ch)
static

Definition at line 2209 of file remote.c.

Referenced by stub_unpack_int(), and unpack_threadid().

static void sync_remote_interrupt ( int  signo)
static
static void sync_remote_interrupt_twice ( int  signo)
static

Definition at line 5259 of file remote.c.

References gdb_call_async_signal_handler(), ofunc, and sync_remote_interrupt().

Referenced by sync_remote_interrupt().

static int threadmatch ( threadref dest,
threadref src 
)
static

Definition at line 2383 of file remote.c.

Referenced by remote_get_threadlist(), and remote_unpack_thread_info_response().

static int threadref_to_int ( threadref ref)
static

Definition at line 2356 of file remote.c.

References scan().

Referenced by remote_newthread_step().

static void threads_listing_context_remove ( struct target_waitstatus ws,
struct threads_listing_context context 
)
static
static void trace_error ( char *  buf)
static

Definition at line 500 of file remote.c.

References _, and error().

Referenced by remote_get_noisy_reply().

static char * unpack_byte ( char *  buf,
int value 
)
static

Definition at line 2245 of file remote.c.

References stub_unpack_int().

Referenced by parse_threadlist_response(), and remote_unpack_thread_info_response().

static char * unpack_int ( char *  buf,
int value 
)
static

Definition at line 2262 of file remote.c.

References stub_unpack_int().

Referenced by remote_unpack_thread_info_response().

static char * unpack_nibble ( char *  buf,
int val 
)
static

Definition at line 2238 of file remote.c.

References remote_state::buf, and fromhex().

Referenced by parse_threadlist_response().

static char * unpack_string ( char *  src,
char *  dest,
int  length 
)
static

Definition at line 2293 of file remote.c.

Referenced by remote_unpack_thread_info_response().

static char * unpack_threadid ( char *  inbuf,
threadref id 
)
static

Definition at line 2316 of file remote.c.

References BUF_THREAD_ID_SIZE, and stubhex().

Referenced by parse_threadlist_response(), and remote_unpack_thread_info_response().

static void unpush_and_perror ( const char *  string)
static

Definition at line 7537 of file remote.c.

References remote_unpush_target(), safe_strerror(), TARGET_CLOSE_ERROR, and throw_error().

Referenced by readchar(), and remote_serial_write().

static VEC ( static_tracepoint_marker_p  )
static
static VEC ( mem_region_s  )
static
static int watchpoint_to_Z_packet ( int  type)
static
static char * write_ptid ( char *  buf,
const char *  endbuf,
ptid_t  ptid 
)
static

Variable Documentation

ptid_t any_thread_ptid
static

Definition at line 1586 of file remote.c.

struct async_signal_handler* async_sigint_remote_token
static

Definition at line 1574 of file remote.c.

struct async_signal_handler* async_sigint_remote_twice_token
static

Definition at line 1573 of file remote.c.

Referenced by remote_check_pending_interrupt().

struct target_ops extended_remote_ops
static

Definition at line 800 of file remote.c.

Referenced by _initialize_remote(), extended_remote_open(), and init_extended_remote_ops().

int interrupt_on_connect = 0
static

Definition at line 858 of file remote.c.

Referenced by _initialize_remote(), and remote_start_remote().

const char interrupt_sequence_break[] = "BREAK"

Definition at line 818 of file remote.c.

Referenced by send_interrupt_sequence(), set_remotebreak(), and show_interrupt_sequence().

const char interrupt_sequence_break_g[] = "BREAK-g"

Definition at line 819 of file remote.c.

Referenced by send_interrupt_sequence(), and show_interrupt_sequence().

const char interrupt_sequence_control_c[] = "Ctrl-C"

Definition at line 817 of file remote.c.

Referenced by send_interrupt_sequence(), set_remotebreak(), and show_interrupt_sequence().

const char* interrupt_sequence_mode = interrupt_sequence_control_c
static
const char* const interrupt_sequence_modes[]
static
Initial value:
=
{
NULL
}
const char interrupt_sequence_control_c[]
Definition: remote.c:817
const char interrupt_sequence_break[]
Definition: remote.c:818
const char interrupt_sequence_break_g[]
Definition: remote.c:819

Definition at line 820 of file remote.c.

Referenced by _initialize_remote().

ptid_t magic_null_ptid
static

Definition at line 1584 of file remote.c.

Referenced by add_current_inferior_and_thread(), and extended_remote_mourn().

struct memory_packet_config memory_read_packet_config
static
Initial value:
=
{
"memory-read-packet-size",
}

Definition at line 1060 of file remote.c.

struct memory_packet_config memory_write_packet_config
static
Initial value:
=
{
"memory-write-packet-size",
}

Definition at line 1037 of file remote.c.

ptid_t not_sent_ptid
static

Definition at line 1585 of file remote.c.

Referenced by remote_open_1().

struct notif_client notif_client_stop
Initial value:
=
{
"Stop",
"vStopped",
}
static int remote_notif_stop_can_get_pending_events(struct notif_client *self)
Definition: remote.c:5520
static void remote_notif_stop_ack(struct notif_client *self, char *buf, struct notif_event *event)
Definition: remote.c:5504
static struct notif_event * remote_notif_stop_alloc_reply(void)
Definition: remote.c:5540
static void remote_notif_stop_parse(struct notif_client *self, char *buf, struct notif_event *event)
Definition: remote.c:5497

Definition at line 5552 of file remote.c.

Referenced by extended_remote_attach(), kill_new_fork_children(), remote_resume(), remote_start_remote(), and remove_new_fork_children().

void(* ofunc) (int)
static

Definition at line 5240 of file remote.c.

Referenced by remote_wait_as(), and sync_remote_interrupt_twice().

unsigned int remote_address_size
static

Definition at line 892 of file remote.c.

Referenced by _initialize_remote(), and remote_address_masked().

struct async_event_handler* remote_async_inferior_event_token
static

Definition at line 1580 of file remote.c.

serial_event_ftype remote_async_serial_handler
static

Definition at line 12577 of file remote.c.

int remote_async_terminal_ours_p
static

Definition at line 897 of file remote.c.

Referenced by remote_open_1(), remote_terminal_inferior(), and remote_terminal_ours().

int remote_break
static

Definition at line 863 of file remote.c.

Referenced by _initialize_remote(), and set_remotebreak().

struct cmd_list_element* remote_cmdlist
static

Definition at line 231 of file remote.c.

char* remote_exec_file = ""
static
const int remote_flash_timeout = 1000
static

Definition at line 7450 of file remote.c.

Referenced by remote_flash_done(), remote_flash_erase(), and remote_flash_write().

struct gdbarch_data* remote_g_packet_data_handle
static

Definition at line 10054 of file remote.c.

struct gdbarch_data* remote_gdbarch_data_handle
static

Definition at line 594 of file remote.c.

int remote_hw_breakpoint_limit = -1

Definition at line 8861 of file remote.c.

int remote_hw_watchpoint_length_limit = -1

Definition at line 8860 of file remote.c.

int remote_hw_watchpoint_limit = -1

Definition at line 8859 of file remote.c.

struct target_ops remote_ops
static
const struct protocol_feature remote_protocol_features[]
static

Definition at line 4110 of file remote.c.

struct packet_config remote_protocol_packets[PACKET_MAX]
static
struct cmd_list_element* remote_set_cmdlist
static

Definition at line 235 of file remote.c.

struct cmd_list_element* remote_show_cmdlist
static

Definition at line 236 of file remote.c.

Referenced by show_remote_cmd().

struct remote_state* remote_state
static

Definition at line 435 of file remote.c.

Referenced by get_remote_state_raw().

char* remote_support_xml
static

Definition at line 4202 of file remote.c.

enum auto_boolean remote_Z_packet_detect
static

Definition at line 1483 of file remote.c.

Referenced by _initialize_remote(), and set_remote_protocol_Z_packet_cmd().

char* target_buf
static
long target_buf_size
static
const struct gdb_xml_attribute thread_attributes[]
Initial value:
= {
{ "id", GDB_XML_AF_NONE, NULL, NULL },
{ NULL, GDB_XML_AF_NONE, NULL, NULL }
}
gdb_xml_attribute_handler gdb_xml_parse_attr_ulongest

Definition at line 2842 of file remote.c.

const struct gdb_xml_element thread_children[]
Initial value:
= {
{ NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
}

Definition at line 2848 of file remote.c.

const struct gdb_xml_element threads_children[]
Initial value:
= {
{ NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
}
static void end_thread(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, const char *body_text)
Definition: remote.c:2832
static void start_thread(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s)*attributes)
Definition: remote.c:2807
const struct gdb_xml_attribute thread_attributes[]
Definition: remote.c:2842
const struct gdb_xml_element thread_children[]
Definition: remote.c:2848

Definition at line 2852 of file remote.c.

const struct gdb_xml_element threads_elements[]
Initial value:
= {
{ "threads", NULL, threads_children,
GDB_XML_EF_NONE, NULL, NULL },
{ NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
}
const struct gdb_xml_element threads_children[]
Definition: remote.c:2852

Definition at line 2859 of file remote.c.

int use_range_stepping = 1
static

Definition at line 254 of file remote.c.

Referenced by _initialize_remote(), append_resumption(), and set_range_stepping().

int wait_forever_enabled_p = 1
static

Definition at line 809 of file remote.c.

Referenced by remote_open_1(), and remote_wait_as().