GDBserver
Classes | Macros | Typedefs | Functions | Variables
server.c File Reference
#include "server.h"
#include "gdbthread.h"
#include "agent.h"
#include "notif.h"
#include "tdesc.h"
#include "rsp-low.h"
#include <ctype.h>
#include <unistd.h>
#include "gdb_vecs.h"
#include "gdb_wait.h"
#include "btrace-common.h"
#include "filestuff.h"
#include "tracepoint.h"
#include "dll.h"
#include "hostio.h"

Go to the source code of this file.

Classes

struct  vstop_notif
 
struct  qxfer
 
struct  visit_actioned_threads_data
 

Macros

#define SEARCH_CHUNK_SIZE   16000
 
#define require_running(BUF)
 
#define require_running(BUF)
 

Typedefs

typedef int( visit_actioned_threads_callback_ftype) (const struct thread_resume *, struct thread_info *)
 

Functions

 DEFINE_QUEUE_P (notif_event_p)
 
static void queue_stop_reply (ptid_t ptid, struct target_waitstatus *status)
 
static int remove_all_on_match_pid (QUEUE(notif_event_p)*q, QUEUE_ITER(notif_event_p)*iter, struct notif_event *event, void *data)
 
static void discard_queued_stop_replies (int pid)
 
static void vstop_notif_reply (struct notif_event *event, char *own_buf)
 
static int target_running (void)
 
static int start_inferior (char **argv)
 
static int attach_inferior (int pid)
 
static int decode_xfer_read (char *buf, CORE_ADDR *ofs, unsigned int *len)
 
static int decode_xfer (char *buf, char **object, char **rw, char **annex, char **offset)
 
static int write_qxfer_response (char *buf, const void *data, int len, int is_more)
 
static const char * handle_btrace_enable_bts (struct thread_info *thread)
 
static const char * handle_btrace_enable_pt (struct thread_info *thread)
 
static const char * handle_btrace_disable (struct thread_info *thread)
 
static int handle_btrace_general_set (char *own_buf)
 
static int handle_btrace_conf_general_set (char *own_buf)
 
static void handle_general_set (char *own_buf)
 
static const char * get_features_xml (const char *annex)
 
void monitor_show_help (void)
 
static int gdb_read_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
 
static int gdb_write_memory (CORE_ADDR memaddr, const unsigned char *myaddr, int len)
 
static int handle_search_memory_1 (CORE_ADDR start_addr, CORE_ADDR search_space_len, gdb_byte *pattern, unsigned pattern_len, gdb_byte *search_buf, unsigned chunk_size, unsigned search_buf_size, CORE_ADDR *found_addrp)
 
static void handle_search_memory (char *own_buf, int packet_len)
 
static char * parse_debug_format_options (const char *arg, int is_monitor)
 
static void handle_monitor_command (char *mon, char *own_buf)
 
static int handle_qxfer_auxv (const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
 
static int handle_qxfer_exec_file (const char *const_annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
 
static int handle_qxfer_features (const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
 
static void accumulate_file_name_length (struct inferior_list_entry *inf, void *arg)
 
static void emit_dll_description (struct inferior_list_entry *inf, void *arg)
 
static int handle_qxfer_libraries (const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
 
static int handle_qxfer_libraries_svr4 (const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
 
static int handle_qxfer_osdata (const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
 
static int handle_qxfer_siginfo (const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
 
static int handle_qxfer_spu (const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
 
static int handle_qxfer_statictrace (const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
 
static void handle_qxfer_threads_worker (struct inferior_list_entry *inf, void *arg)
 
static void handle_qxfer_threads_proper (struct buffer *buffer)
 
static int handle_qxfer_threads (const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
 
static int handle_qxfer_traceframe_info (const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
 
static int handle_qxfer_fdpic (const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
 
static int handle_qxfer_btrace (const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
 
static int handle_qxfer_btrace_conf (const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
 
static int handle_qxfer (char *own_buf, int packet_len, int *new_packet_len_p)
 
static unsigned long long crc32 (CORE_ADDR base, int len, unsigned int crc)
 
static void supported_btrace_packets (char *buf)
 
void handle_query (char *own_buf, int packet_len, int *new_packet_len_p)
 
static void gdb_wants_all_threads_stopped (void)
 
static void resume (struct thread_resume *actions, size_t n)
 
static int visit_actioned_threads (struct inferior_list_entry *entry, void *datap)
 
static int handle_pending_status (const struct thread_resume *resumption, struct thread_info *thread)
 
void handle_v_cont (char *own_buf)
 
int handle_v_attach (char *own_buf)
 
static int handle_v_run (char *own_buf)
 
int handle_v_kill (char *own_buf)
 
void handle_v_requests (char *own_buf, int packet_len, int *new_packet_len)
 
static void myresume (char *own_buf, int step, int sig)
 
static int queue_stop_reply_callback (struct inferior_list_entry *entry, void *arg)
 
static void gdb_wants_thread_stopped (struct inferior_list_entry *entry)
 
static void gdb_reattached_process (struct inferior_list_entry *entry)
 
static void clear_pending_status_callback (struct inferior_list_entry *entry)
 
static void set_pending_status_callback (struct inferior_list_entry *entry)
 
static int find_status_pending_thread_callback (struct inferior_list_entry *entry, void *data)
 
static void handle_status (char *own_buf)
 
static void gdbserver_version (void)
 
static void gdbserver_usage (FILE *stream)
 
static void gdbserver_show_disableable (FILE *stream)
 
static int first_thread_of (struct inferior_list_entry *entry, void *args)
 
static void kill_inferior_callback (struct inferior_list_entry *entry)
 
static void detach_or_kill_inferior_callback (struct inferior_list_entry *entry)
 
static void print_started_pid (struct inferior_list_entry *entry)
 
static void print_attached_pid (struct inferior_list_entry *entry)
 
static void detach_or_kill_for_exit (void)
 
static void detach_or_kill_for_exit_cleanup (void *ignore)
 
static void ATTRIBUTE_NORETURN captured_main (int argc, char *argv[])
 
int main (int argc, char *argv[])
 
static void skip_to_semicolon (char **packet)
 
static void process_point_options (struct breakpoint *bp, char **packet)
 
static int process_serial_event (void)
 
int handle_serial_event (int err, gdb_client_data client_data)
 
int handle_target_event (int err, gdb_client_data client_data)
 

Variables

ptid_t cont_thread
 
ptid_t general_thread
 
int server_waiting
 
static int extended_protocol
 
static int response_needed
 
static int exit_requested
 
int run_once
 
int multi_process
 
int report_fork_events
 
int report_vfork_events
 
int non_stop
 
int swbreak_feature
 
int hwbreak_feature
 
int disable_randomization = 1
 
static char ** program_argv
 
static char ** wrapper_argv
 
int pass_signals [GDB_SIGNAL_LAST]
 
int program_signals [GDB_SIGNAL_LAST]
 
int program_signals_p
 
unsigned long signal_pid
 
int disable_packet_vCont
 
int disable_packet_Tthread
 
int disable_packet_qC
 
int disable_packet_qfThreadInfo
 
static struct target_waitstatus last_status
 
static ptid_t last_ptid
 
static char * own_buf
 
static unsigned char * mem_buf
 
static struct btrace_config current_btrace_conf
 
struct notif_server notif_stop
 
int remote_debug
 
static const struct qxfer qxfer_packets []
 
static unsigned int crc32_table [256]
 
static int exit_code
 

Macro Definition Documentation

#define require_running (   BUF)
Value:
if (!target_running ()) \
{ \
write_enn (BUF); \
return; \
}
static int target_running(void)
Definition: server.c:192

Definition at line 3188 of file server.c.

Referenced by handle_query(), handle_v_requests(), and process_serial_event().

#define require_running (   BUF)
Value:
if (!target_running ()) \
{ \
write_enn (BUF); \
break; \
}
static int target_running(void)
Definition: server.c:192

Definition at line 3188 of file server.c.

#define SEARCH_CHUNK_SIZE   16000

Referenced by handle_search_memory().

Typedef Documentation

typedef int( visit_actioned_threads_callback_ftype) (const struct thread_resume *, struct thread_info *)

Definition at line 2414 of file server.c.

Function Documentation

static void accumulate_file_name_length ( struct inferior_list_entry inf,
void *  arg 
)
static

Definition at line 1267 of file server.c.

References dll_info::name.

Referenced by handle_qxfer_libraries().

static int attach_inferior ( int  pid)
static
static void ATTRIBUTE_NORETURN captured_main ( int  argc,
char *  argv[] 
)
static
static void clear_pending_status_callback ( struct inferior_list_entry entry)
static

Definition at line 2996 of file server.c.

References thread_info::status_pending_p.

Referenced by captured_main().

static unsigned long long crc32 ( CORE_ADDR  base,
int  len,
unsigned int  crc 
)
static

Definition at line 1873 of file server.c.

References read_inferior_memory().

Referenced by handle_query().

static int decode_xfer ( char *  buf,
char **  object,
char **  rw,
char **  annex,
char **  offset 
)
static

Definition at line 346 of file server.c.

Referenced by handle_qxfer().

static int decode_xfer_read ( char *  buf,
CORE_ADDR ofs,
unsigned int *  len 
)
static

Definition at line 336 of file server.c.

References decode_m_packet().

Referenced by handle_qxfer().

DEFINE_QUEUE_P ( notif_event_p  )
static void detach_or_kill_for_exit ( void  )
static
static void detach_or_kill_for_exit_cleanup ( void *  ignore)
static

Definition at line 3300 of file server.c.

References CATCH, detach_or_kill_for_exit(), END_CATCH, RETURN_MASK_ALL, and TRY.

Referenced by captured_main().

static void detach_or_kill_inferior_callback ( struct inferior_list_entry entry)
static
static void discard_queued_stop_replies ( int  pid)
static
static void emit_dll_description ( struct inferior_list_entry inf,
void *  arg 
)
static

Definition at line 1281 of file server.c.

References dll_info::base_addr, dll_info::name, name, and xml_escape_text().

Referenced by handle_qxfer_libraries().

static int find_status_pending_thread_callback ( struct inferior_list_entry entry,
void *  data 
)
static

Definition at line 3027 of file server.c.

References thread_info::status_pending_p.

Referenced by handle_status().

static int first_thread_of ( struct inferior_list_entry entry,
void *  args 
)
static

Definition at line 3196 of file server.c.

References inferior_list_entry::id, and ptid_get_pid().

Referenced by process_serial_event().

static int gdb_read_memory ( CORE_ADDR  memaddr,
unsigned char *  myaddr,
int  len 
)
static
static void gdb_reattached_process ( struct inferior_list_entry entry)
static

Definition at line 2985 of file server.c.

References process_info::gdb_detached.

Referenced by handle_status().

static void gdb_wants_all_threads_stopped ( void  )
static

Definition at line 2977 of file server.c.

References all_threads, for_each_inferior(), and gdb_wants_thread_stopped().

Referenced by handle_status(), and resume().

static void gdb_wants_thread_stopped ( struct inferior_list_entry entry)
static

Definition at line 2959 of file server.c.

References thread_info::last_resume_kind, and thread_info::last_status.

Referenced by gdb_wants_all_threads_stopped().

static int gdb_write_memory ( CORE_ADDR  memaddr,
const unsigned char *  myaddr,
int  len 
)
static
static void gdbserver_show_disableable ( FILE *  stream)
static

Definition at line 3175 of file server.c.

Referenced by captured_main().

static void gdbserver_usage ( FILE *  stream)
static

Definition at line 3122 of file server.c.

References REPORT_BUGS_TO.

Referenced by captured_main().

static void gdbserver_version ( void  )
static

Definition at line 3111 of file server.c.

References host_name, PKGVERSION, and version.

Referenced by captured_main().

static const char* get_features_xml ( const char *  annex)
static

Definition at line 725 of file server.c.

References current_target_desc(), xml_builtin, and target_desc::xmltarget.

Referenced by handle_qxfer_features().

static int handle_btrace_conf_general_set ( char *  own_buf)
static
static const char* handle_btrace_disable ( struct thread_info thread)
static

Definition at line 431 of file server.c.

References thread_info::btrace, and target_disable_btrace.

Referenced by handle_btrace_general_set().

static const char* handle_btrace_enable_bts ( struct thread_info thread)
static
static const char* handle_btrace_enable_pt ( struct thread_info thread)
static
static int handle_btrace_general_set ( char *  own_buf)
static
static void handle_general_set ( char *  own_buf)
static
static void handle_monitor_command ( char *  mon,
char *  own_buf 
)
static
static int handle_pending_status ( const struct thread_resume resumption,
struct thread_info thread 
)
static
void handle_query ( char *  own_buf,
int  packet_len,
int *  new_packet_len_p 
)

Definition at line 1937 of file server.c.

References all_processes, all_threads, process_info::attached, crc32(), current_process(), decode_address(), disable_packet_qC, disable_packet_qfThreadInfo, find_inferior_id(), find_thread_ptid(), general_thread, get_first_inferior(), target_ops::get_tib_address, target_ops::get_tls_address, target_ops::handle_monitor_command, handle_monitor_command(), handle_qxfer(), handle_search_memory(), handle_tracepoint_query(), hex2bin(), hostio_handle_new_gdb_connection(), hwbreak_feature, target_ops::look_up_symbols, minus_one_ptid, multi_process, inferior_list_entry::next, null_ptid, paddress(), PBUFSIZ, target_ops::pid_to_exec_file, pid_to_ptid(), ptid_equal(), target_ops::qxfer_libraries_svr4, target_ops::qxfer_osdata, target_ops::qxfer_siginfo, target_ops::qxfer_spu, target_ops::read_auxv, target_ops::read_loadmap, target_ops::read_offsets, read_ptid(), report_fork_events, report_vfork_events, require_running, startswith(), supported_btrace_packets(), swbreak_feature, target_handle_new_gdb_connection, target_process_qsupported, target_running(), target_supports_agent, target_supports_conditional_breakpoints, target_supports_disable_randomization, target_supports_fast_tracepoints, target_supports_fork_events, target_supports_multi_process, target_supports_non_stop, target_supports_stopped_by_hw_breakpoint, target_supports_stopped_by_sw_breakpoint, target_supports_tracepoints, target_supports_vfork_events, the_target, thread_to_gdb_id(), tracepoint_look_up_symbols(), transport_is_reliable, unpack_varlen_hex(), validate_breakpoints(), write_enn(), write_ok(), write_ptid(), xrealloc(), and xstrdup().

Referenced by process_serial_event().

static int handle_qxfer ( char *  own_buf,
int  packet_len,
int *  new_packet_len_p 
)
static
static int handle_qxfer_auxv ( const char *  annex,
gdb_byte readbuf,
const gdb_byte writebuf,
ULONGEST  offset,
LONGEST  len 
)
static

Definition at line 1165 of file server.c.

References offset, target_ops::read_auxv, target_running(), and the_target.

static int handle_qxfer_btrace ( const char *  annex,
gdb_byte readbuf,
const gdb_byte writebuf,
ULONGEST  offset,
LONGEST  len 
)
static
static int handle_qxfer_btrace_conf ( const char *  annex,
gdb_byte readbuf,
const gdb_byte writebuf,
ULONGEST  offset,
LONGEST  len 
)
static
static int handle_qxfer_exec_file ( const char *  const_annex,
gdb_byte readbuf,
const gdb_byte writebuf,
ULONGEST  offset,
LONGEST  len 
)
static
static int handle_qxfer_fdpic ( const char *  annex,
gdb_byte readbuf,
const gdb_byte writebuf,
ULONGEST  offset,
LONGEST  len 
)
static

Definition at line 1577 of file server.c.

References offset, target_ops::read_loadmap, target_running(), and the_target.

static int handle_qxfer_features ( const char *  annex,
gdb_byte readbuf,
const gdb_byte writebuf,
ULONGEST  offset,
LONGEST  len 
)
static

Definition at line 1232 of file server.c.

References get_features_xml(), offset, and target_running().

static int handle_qxfer_libraries ( const char *  annex,
gdb_byte readbuf,
const gdb_byte writebuf,
ULONGEST  offset,
LONGEST  len 
)
static
static int handle_qxfer_libraries_svr4 ( const char *  annex,
gdb_byte readbuf,
const gdb_byte writebuf,
ULONGEST  offset,
LONGEST  len 
)
static

Definition at line 1354 of file server.c.

References target_ops::qxfer_libraries_svr4, target_running(), and the_target.

static int handle_qxfer_osdata ( const char *  annex,
gdb_byte readbuf,
const gdb_byte writebuf,
ULONGEST  offset,
LONGEST  len 
)
static

Definition at line 1370 of file server.c.

References offset, target_ops::qxfer_osdata, and the_target.

static int handle_qxfer_siginfo ( const char *  annex,
gdb_byte readbuf,
const gdb_byte writebuf,
ULONGEST  offset,
LONGEST  len 
)
static

Definition at line 1383 of file server.c.

References offset, target_ops::qxfer_siginfo, target_running(), and the_target.

static int handle_qxfer_spu ( const char *  annex,
gdb_byte readbuf,
const gdb_byte writebuf,
ULONGEST  offset,
LONGEST  len 
)
static

Definition at line 1399 of file server.c.

References offset, target_ops::qxfer_spu, target_running(), and the_target.

static int handle_qxfer_statictrace ( const char *  annex,
gdb_byte readbuf,
const gdb_byte writebuf,
ULONGEST  offset,
LONGEST  len 
)
static

Definition at line 1415 of file server.c.

References current_traceframe, target_running(), and traceframe_read_sdata().

static int handle_qxfer_threads ( const char *  annex,
gdb_byte readbuf,
const gdb_byte writebuf,
ULONGEST  offset,
LONGEST  len 
)
static
static void handle_qxfer_threads_proper ( struct buffer buffer)
static
static void handle_qxfer_threads_worker ( struct inferior_list_entry inf,
void *  arg 
)
static
static int handle_qxfer_traceframe_info ( const char *  annex,
gdb_byte readbuf,
const gdb_byte writebuf,
ULONGEST  offset,
LONGEST  len 
)
static
static void handle_search_memory ( char *  own_buf,
int  packet_len 
)
static

Definition at line 933 of file server.c.

References decode_search_memory_packet(), error(), handle_search_memory_1(), and SEARCH_CHUNK_SIZE.

Referenced by handle_query().

static int handle_search_memory_1 ( CORE_ADDR  start_addr,
CORE_ADDR  search_space_len,
gdb_byte pattern,
unsigned  pattern_len,
gdb_byte search_buf,
unsigned  chunk_size,
unsigned  search_buf_size,
CORE_ADDR found_addrp 
)
static

Definition at line 851 of file server.c.

References gdb_read_memory(), and warning().

Referenced by handle_search_memory().

int handle_serial_event ( int  err,
gdb_client_data  client_data 
)
static void handle_status ( char *  own_buf)
static
int handle_target_event ( int  err,
gdb_client_data  client_data 
)
int handle_v_attach ( char *  own_buf)
void handle_v_cont ( char *  own_buf)
int handle_v_kill ( char *  own_buf)
void handle_v_requests ( char *  own_buf,
int  packet_len,
int *  new_packet_len 
)
static int handle_v_run ( char *  own_buf)
static
static void kill_inferior_callback ( struct inferior_list_entry entry)
static
int main ( int  argc,
char *  argv[] 
)
void monitor_show_help ( void  )

Definition at line 764 of file server.c.

References monitor_output().

Referenced by handle_monitor_command().

static void myresume ( char *  own_buf,
int  step,
int  sig 
)
static
static char* parse_debug_format_options ( const char *  arg,
int  is_monitor 
)
static
static void print_attached_pid ( struct inferior_list_entry entry)
static
static void print_started_pid ( struct inferior_list_entry entry)
static
static void process_point_options ( struct breakpoint bp,
char **  packet 
)
static
static int process_serial_event ( void  )
static

Definition at line 3713 of file server.c.

References all_processes, all_threads, any_persistent_commands(), bin2hex(), clear_breakpoint_conditions_and_commands(), current_ptid, current_target_desc(), current_thread, current_traceframe, debug_printf(), debug_threads, decode_m_packet(), decode_M_packet(), decode_X_packet(), delete_gdb_breakpoint(), detach_inferior, disable_async_io(), discard_queued_stop_replies(), disconnected_tracing, thread_info::entry, exit_requested, extended_protocol, fetch_traceframe_registers(), find_inferior(), find_inferior_id(), find_process_pid(), first_thread_of(), for_each_inferior(), free_register_cache(), process_info::gdb_detached, gdb_id_to_thread_id(), gdb_read_memory(), gdb_signal_to_host(), gdb_signal_to_host_p(), gdb_write_memory(), get_first_thread(), get_thread_regcache(), getpkt(), handle_general_set(), handle_query(), handle_status(), handle_v_requests(), hex2bin(), inferior_list_entry::id, join_inferior, kill_inferior_callback(), thread_resume::kind, last_status, mem_buf, minus_one_ptid, multi_process, myresume(), mythread_alive, new_register_cache(), non_stop, null_ptid, own_buf, pid_to_ptid(), process_point_options(), program_argv, ptid_equal(), ptid_get_pid(), putpkt(), putpkt_binary(), QUEUE_is_empty, read_ptid(), registers_from_string(), registers_to_string(), remote_close(), remote_connection_is_stdio(), require_running, response_needed, target_ops::resume, set_desired_thread(), set_gdb_breakpoint(), thread_resume::sig, start_inferior(), start_non_stop(), stop_tracing(), target_running(), the_target, thread_resume::thread, tracing, unpack_varlen_hex(), write_enn(), and write_ok().

Referenced by handle_serial_event().

static void queue_stop_reply ( ptid_t  ptid,
struct target_waitstatus *  status 
)
static
static int queue_stop_reply_callback ( struct inferior_list_entry entry,
void *  arg 
)
static
static int remove_all_on_match_pid ( QUEUE(notif_event_p)*  q,
QUEUE_ITER(notif_event_p)*  iter,
struct notif_event event,
void *  data 
)
static

Definition at line 149 of file server.c.

References ptid_get_pid(), and QUEUE_remove_elem.

Referenced by discard_queued_stop_replies().

static void resume ( struct thread_resume actions,
size_t  n 
)
static
static void set_pending_status_callback ( struct inferior_list_entry entry)
static

Definition at line 3007 of file server.c.

References thread_info::last_status, and thread_info::status_pending_p.

Referenced by handle_status().

static void skip_to_semicolon ( char **  packet)
static

Definition at line 3651 of file server.c.

Referenced by process_point_options().

static int start_inferior ( char **  argv)
static
static void supported_btrace_packets ( char *  buf)
static

Definition at line 1906 of file server.c.

References BTRACE_FORMAT_BTS, BTRACE_FORMAT_PT, and target_supports_btrace.

Referenced by handle_query().

static int target_running ( void  )
static
static int visit_actioned_threads ( struct inferior_list_entry entry,
void *  datap 
)
static
static void vstop_notif_reply ( struct notif_event event,
char *  own_buf 
)
static

Definition at line 179 of file server.c.

References prepare_resume_reply(), vstop_notif::ptid, and vstop_notif::status.

static int write_qxfer_response ( char *  buf,
const void *  data,
int  len,
int  is_more 
)
static

Definition at line 381 of file server.c.

References PBUFSIZ, and remote_escape_output().

Referenced by handle_qxfer().

Variable Documentation

ptid_t cont_thread

Definition at line 45 of file server.c.

Referenced by set_desired_thread().

unsigned int crc32_table[256]
static
Initial value:
=
{0, 0}

Definition at line 1864 of file server.c.

struct btrace_config current_btrace_conf
static
int disable_packet_qC

Definition at line 104 of file server.c.

Referenced by captured_main(), and handle_query().

int disable_packet_qfThreadInfo

Definition at line 105 of file server.c.

Referenced by captured_main(), and handle_query().

int disable_packet_Tthread

Definition at line 103 of file server.c.

Referenced by captured_main(), and prepare_resume_reply().

int disable_packet_vCont

Definition at line 102 of file server.c.

Referenced by captured_main(), and handle_v_requests().

int disable_randomization = 1

Definition at line 68 of file server.c.

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

int exit_code
static

Definition at line 3295 of file server.c.

int exit_requested
static

Definition at line 54 of file server.c.

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

int extended_protocol
static

Definition at line 52 of file server.c.

Referenced by handle_v_requests(), and process_serial_event().

ptid_t general_thread

Definition at line 48 of file server.c.

Referenced by handle_query(), prepare_resume_reply(), and set_desired_thread().

int hwbreak_feature

Definition at line 64 of file server.c.

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

ptid_t last_ptid
static

Definition at line 109 of file server.c.

Referenced by handle_target_event(), and handle_v_run().

struct target_waitstatus last_status
static
unsigned char* mem_buf
static
int multi_process
int non_stop
struct notif_server notif_stop
Initial value:
=
{
"vStopped", "Stop", NULL, vstop_notif_reply,
}
static void vstop_notif_reply(struct notif_event *event, char *own_buf)
Definition: server.c:179

Definition at line 186 of file server.c.

Referenced by discard_queued_stop_replies(), and queue_stop_reply().

char* own_buf
static
int pass_signals[GDB_SIGNAL_LAST]

Definition at line 72 of file server.c.

Referenced by handle_general_set(), and linux_wait_1().

char** program_argv
static

Definition at line 70 of file server.c.

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

int program_signals[GDB_SIGNAL_LAST]

Definition at line 73 of file server.c.

Referenced by get_detach_signal(), and handle_general_set().

int program_signals_p

Definition at line 74 of file server.c.

Referenced by get_detach_signal(), and handle_general_set().

const struct qxfer qxfer_packets[]
static
Initial value:
=
{
{ "auxv", handle_qxfer_auxv },
{ "btrace", handle_qxfer_btrace },
{ "btrace-conf", handle_qxfer_btrace_conf },
{ "exec-file", handle_qxfer_exec_file},
{ "fdpic", handle_qxfer_fdpic},
{ "features", handle_qxfer_features },
{ "libraries", handle_qxfer_libraries },
{ "libraries-svr4", handle_qxfer_libraries_svr4 },
{ "osdata", handle_qxfer_osdata },
{ "siginfo", handle_qxfer_siginfo },
{ "spu", handle_qxfer_spu },
{ "statictrace", handle_qxfer_statictrace },
{ "threads", handle_qxfer_threads },
{ "traceframe-info", handle_qxfer_traceframe_info },
}
static int handle_qxfer_features(const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
Definition: server.c:1232
static int handle_qxfer_libraries_svr4(const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
Definition: server.c:1354
static int handle_qxfer_libraries(const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
Definition: server.c:1307
static int handle_qxfer_exec_file(const char *const_annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
Definition: server.c:1181
static int handle_qxfer_btrace(const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
Definition: server.c:1592
static int handle_qxfer_auxv(const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
Definition: server.c:1165
static int handle_qxfer_spu(const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
Definition: server.c:1399
static int handle_qxfer_btrace_conf(const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
Definition: server.c:1666
static int handle_qxfer_traceframe_info(const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
Definition: server.c:1527
static int handle_qxfer_osdata(const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
Definition: server.c:1370
static int handle_qxfer_threads(const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
Definition: server.c:1477
static int handle_qxfer_fdpic(const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
Definition: server.c:1577
static int handle_qxfer_siginfo(const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
Definition: server.c:1383
static int handle_qxfer_statictrace(const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
Definition: server.c:1415

Definition at line 1725 of file server.c.

Referenced by handle_qxfer().

int remote_debug

Definition at line 103 of file remote-utils.c.

Referenced by getpkt(), and putpkt_binary_1().

int report_fork_events
int report_vfork_events
int response_needed
static

Definition at line 53 of file server.c.

Referenced by captured_main(), and process_serial_event().

int run_once

Definition at line 57 of file server.c.

Referenced by captured_main(), and handle_accept_event().

int server_waiting

Definition at line 50 of file server.c.

Referenced by handle_output_debug_string(), mywait(), new_thread_notify(), and spu_wait().

unsigned long signal_pid

Definition at line 81 of file server.c.

Referenced by attach_inferior(), handle_v_kill(), linux_request_interrupt(), and start_inferior().

int swbreak_feature

Definition at line 63 of file server.c.

Referenced by captured_main(), handle_query(), linux_wait_1(), and prepare_resume_reply().

char ** wrapper_argv
static

Definition at line 70 of file server.c.

Referenced by captured_main(), and start_inferior().