GDBserver
|
#include "server.h"
#include "gdbthread.h"
#include "agent.h"
#include "notif.h"
#include "tdesc.h"
#include <unistd.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 |
Defines | |
#define | SEARCH_CHUNK_SIZE 16000 |
#define | require_running(BUF) |
#define | require_running(BUF) |
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 (struct thread_info *thread) |
static const char * | handle_btrace_disable (struct thread_info *thread) |
static int | handle_btrace_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 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_features (const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len) |
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_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 (char *own_buf, int packet_len, int *new_packet_len_p) |
static unsigned long long | crc32 (CORE_ADDR base, int len, unsigned int crc) |
void | handle_query (char *own_buf, int packet_len, int *new_packet_len_p) |
static void | gdb_wants_all_threads_stopped (void) |
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 | 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) |
int | main (int argc, char *argv[]) |
static void | process_point_options (CORE_ADDR point_addr, 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 | non_stop |
int | disable_randomization = 1 |
static char ** | program_argv |
static char ** | wrapper_argv |
int | debug_threads |
int | debug_hw_points |
int | pass_signals [GDB_SIGNAL_LAST] |
int | program_signals [GDB_SIGNAL_LAST] |
int | program_signals_p |
jmp_buf | toplevel |
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 |
struct notif_server | notif_stop |
int | remote_debug |
static struct qxfer | qxfer_packets [] |
static unsigned int | crc32_table [256] |
#define require_running | ( | BUF | ) |
if (!target_running ()) \ { \ write_enn (BUF); \ return; \ }
Definition at line 2627 of file server.c.
Referenced by handle_query(), handle_v_requests(), and process_serial_event().
#define require_running | ( | BUF | ) |
if (!target_running ()) \ { \ write_enn (BUF); \ break; \ }
#define SEARCH_CHUNK_SIZE 16000 |
Referenced by handle_search_memory().
static int attach_inferior | ( | int | pid | ) | [static] |
Definition at line 300 of file server.c.
References current_inferior, thread_info::last_resume_kind, thread_info::last_status, last_status, myattach, mywait(), non_stop, null_ptid, pid_to_ptid(), and signal_pid.
Referenced by handle_v_attach(), and main().
Definition at line 1555 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 354 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 344 of file server.c.
References decode_m_packet().
Referenced by handle_qxfer().
static void detach_or_kill_for_exit | ( | void | ) | [static] |
Definition at line 2708 of file server.c.
References all_processes, detach_or_kill_inferior_callback(), for_each_inferior(), have_attached_inferiors_p(), have_started_inferiors_p(), print_attached_pid(), and print_started_pid().
Referenced by main().
static void detach_or_kill_inferior_callback | ( | struct inferior_list_entry * | entry | ) | [static] |
Definition at line 2661 of file server.c.
References process_info::attached, detach_inferior, discard_queued_stop_replies(), process_info::head, inferior_list_entry::id, kill_inferior(), and ptid_get_pid().
Referenced by detach_or_kill_for_exit().
static void discard_queued_stop_replies | ( | int | pid | ) | [static] |
Definition at line 174 of file server.c.
References notif_stop, QUEUE_iterate, and remove_all_on_match_pid().
Referenced by detach_or_kill_inferior_callback(), handle_status(), handle_v_kill(), kill_inferior_callback(), and process_serial_event().
static int first_thread_of | ( | struct inferior_list_entry * | entry, |
void * | args | ||
) | [static] |
Definition at line 2635 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] |
Definition at line 712 of file server.c.
References current_traceframe, done_accessing_memory, in_readonly_region(), prepare_to_access_memory, read_inferior_memory(), and traceframe_read_mem().
Referenced by handle_search_memory_1(), and process_serial_event().
static void gdb_reattached_process | ( | struct inferior_list_entry * | entry | ) | [static] |
Definition at line 2532 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 2524 of file server.c.
References all_threads, for_each_inferior(), and gdb_wants_thread_stopped().
Referenced by handle_status(), and handle_v_cont().
static void gdb_wants_thread_stopped | ( | struct inferior_list_entry * | entry | ) | [static] |
Definition at line 2506 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] |
Definition at line 749 of file server.c.
References current_traceframe, done_accessing_memory, prepare_to_access_memory, and write_inferior_memory().
Referenced by process_serial_event().
static void gdbserver_show_disableable | ( | FILE * | stream | ) | [static] |
static void gdbserver_usage | ( | FILE * | stream | ) | [static] |
static void gdbserver_version | ( | void | ) | [static] |
static const char* get_features_xml | ( | const char * | annex | ) | [static] |
Definition at line 649 of file server.c.
References current_target_desc(), and target_desc::xmltarget.
Referenced by handle_qxfer_features().
static const char* handle_btrace_disable | ( | struct thread_info * | thread | ) | [static] |
Definition at line 420 of file server.c.
References thread_info::btrace, and target_disable_btrace.
Referenced by handle_btrace_general_set().
static const char* handle_btrace_enable | ( | struct thread_info * | thread | ) | [static] |
Definition at line 405 of file server.c.
References thread_info::btrace, thread_info::entry, inferior_list_entry::id, and target_enable_btrace.
Referenced by handle_btrace_general_set().
static int handle_btrace_general_set | ( | char * | own_buf | ) | [static] |
Definition at line 436 of file server.c.
References find_thread_ptid(), handle_btrace_disable(), handle_btrace_enable(), minus_one_ptid, null_ptid, ptid_equal(), target_supports_btrace, and write_ok().
Referenced by handle_general_set().
static void handle_general_set | ( | char * | own_buf | ) | [static] |
Definition at line 487 of file server.c.
References decode_address_to_semicolon(), disable_randomization, handle_btrace_general_set(), handle_tracepoint_general_set(), noack_mode, non_stop, pass_signals, program_signals, program_signals_p, start_non_stop(), target_supports_tracepoints, unpack_varlen_hex(), use_agent, write_enn(), and write_ok().
Referenced by process_serial_event().
static void handle_monitor_command | ( | char * | mon, |
char * | own_buf | ||
) | [static] |
Definition at line 927 of file server.c.
References debug_hw_points, debug_threads, exit_requested, monitor_output(), monitor_show_help(), and write_enn().
Referenced by handle_query().
void handle_query | ( | char * | own_buf, |
int | packet_len, | ||
int * | new_packet_len_p | ||
) |
Definition at line 1588 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, 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(), inferior_list::head, target_ops::look_up_symbols, minus_one_ptid, multi_process, null_ptid, paddress(), PBUFSIZ, 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(), require_running, strchr(), strtok(), target_process_qsupported, target_running(), target_supports_agent, target_supports_btrace, target_supports_disable_randomization, target_supports_fast_tracepoints, target_supports_multi_process, target_supports_non_stop, target_supports_tracepoints, the_target, thread_to_gdb_id(), tracepoint_look_up_symbols(), transport_is_reliable, unhexify(), 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] |
Definition at line 1426 of file server.c.
References decode_xfer(), decode_xfer_read(), decode_xfer_write(), qxfer::object, offset, PBUFSIZ, qxfer_packets, write_enn(), write_qxfer_response(), and qxfer::xfer.
Referenced by handle_query().
static int handle_qxfer_auxv | ( | const char * | annex, |
gdb_byte * | readbuf, | ||
const gdb_byte * | writebuf, | ||
ULONGEST | offset, | ||
LONGEST | len | ||
) | [static] |
Definition at line 998 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] |
Definition at line 1345 of file server.c.
References thread_info::btrace, btrace_read_all, btrace_read_new, buffer::buffer, buffer_free(), find_thread_ptid(), memcpy(), minus_one_ptid, null_ptid, offset, own_buf, ptid_equal(), target_ops::read_btrace, target_read_btrace, target_running(), the_target, and buffer::used_size.
static int handle_qxfer_fdpic | ( | const char * | annex, |
gdb_byte * | readbuf, | ||
const gdb_byte * | writebuf, | ||
ULONGEST | offset, | ||
LONGEST | len | ||
) | [static] |
Definition at line 1330 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 1014 of file server.c.
References get_features_xml(), memcpy(), offset, and target_running().
static int handle_qxfer_libraries | ( | const char * | annex, |
gdb_byte * | readbuf, | ||
const gdb_byte * | writebuf, | ||
ULONGEST | offset, | ||
LONGEST | len | ||
) | [static] |
Definition at line 1047 of file server.c.
References all_dlls, dll_info::base_addr, inferior_list::head, memcpy(), dll_info::name, name, inferior_list_entry::next, offset, target_running(), and xml_escape_text().
static int handle_qxfer_libraries_svr4 | ( | const char * | annex, |
gdb_byte * | readbuf, | ||
const gdb_byte * | writebuf, | ||
ULONGEST | offset, | ||
LONGEST | len | ||
) | [static] |
Definition at line 1114 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 1130 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 1143 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 1159 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 1175 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] |
Definition at line 1230 of file server.c.
References buffer_finish(), buffer_free(), buffer_init(), handle_qxfer_threads_proper(), memcpy(), offset, and target_running().
static void handle_qxfer_threads_proper | ( | struct buffer * | buffer | ) | [static] |
Definition at line 1196 of file server.c.
References all_threads, buffer_grow_str, buffer_grow_str0, buffer_xml_printf(), inferior_list::head, inferior_list_entry::next, target_core_of_thread, thread_to_gdb_id(), and write_ptid().
Referenced by handle_qxfer_threads().
static int handle_qxfer_traceframe_info | ( | const char * | annex, |
gdb_byte * | readbuf, | ||
const gdb_byte * | writebuf, | ||
ULONGEST | offset, | ||
LONGEST | len | ||
) | [static] |
Definition at line 1280 of file server.c.
References buffer_finish(), buffer_free(), buffer_init(), current_traceframe, memcpy(), offset, target_running(), and traceframe_read_info().
static void handle_search_memory | ( | char * | own_buf, |
int | packet_len | ||
) | [static] |
Definition at line 852 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 770 of file server.c.
References gdb_read_memory(), memcpy(), and warning().
Referenced by handle_search_memory().
int handle_serial_event | ( | int | err, |
gdb_client_data | client_data | ||
) |
Definition at line 3571 of file server.c.
References debug_threads, process_serial_event(), and set_desired_inferior().
Referenced by handle_accept_event(), process_remaining(), and remote_open().
static void handle_status | ( | char * | own_buf | ) | [static] |
Definition at line 2542 of file server.c.
References all_processes, all_threads, discard_queued_stop_replies(), find_inferior(), for_each_inferior(), gdb_reattached_process(), gdb_wants_all_threads_stopped(), inferior_list::head, inferior_list_entry::id, non_stop, notif_write_event(), pause_all, prepare_resume_reply(), queue_stop_reply_callback(), and stabilize_threads.
Referenced by process_serial_event().
int handle_target_event | ( | int | err, |
gdb_client_data | client_data | ||
) |
Definition at line 3590 of file server.c.
References current_inferior, debug_threads, find_process_pid(), gdb_connected(), process_info::gdb_detached, gdb_signal_to_host(), thread_resume::kind, last_ptid, thread_info::last_resume_kind, thread_info::last_status, last_status, mark_breakpoints_out(), minus_one_ptid, mourn_inferior, mywait(), notif_push(), vstop_notif::ptid, ptid_get_pid(), target_ops::resume, set_desired_inferior(), thread_resume::sig, vstop_notif::status, target_pid_to_str(), target_running(), the_target, thread_resume::thread, and xmalloc().
Referenced by linux_async().
int handle_v_attach | ( | char * | own_buf | ) |
Definition at line 2170 of file server.c.
References attach_inferior(), dlls_changed, last_status, non_stop, prepare_resume_reply(), write_enn(), and write_ok().
Referenced by handle_v_requests().
void handle_v_cont | ( | char * | own_buf | ) |
Definition at line 2022 of file server.c.
References current_inferior, disable_async_io(), enable_async_io(), find_process_pid(), gdb_signal_to_host(), gdb_signal_to_host_p(), gdb_wants_all_threads_stopped(), thread_resume::kind, thread_info::last_status, last_status, memset(), minus_one_ptid, mourn_inferior, mywait(), non_stop, prepare_resume_reply(), ptid_equal(), ptid_get_lwp(), ptid_get_pid(), read_ptid(), target_ops::resume, set_desired_inferior(), thread_resume::sig, thread_resume::step_range_end, thread_resume::step_range_start, strchr(), the_target, thread_resume::thread, unpack_varlen_hex(), write_enn(), and write_ok().
Referenced by handle_v_requests().
int handle_v_kill | ( | char * | own_buf | ) |
Definition at line 2293 of file server.c.
References discard_queued_stop_replies(), kill_inferior(), last_status, multi_process, pid_to_ptid(), signal_pid, write_enn(), and write_ok().
Referenced by handle_v_requests().
void handle_v_requests | ( | char * | own_buf, |
int | packet_len, | ||
int * | new_packet_len | ||
) |
Definition at line 2319 of file server.c.
References disable_packet_vCont, extended_protocol, handle_notif_ack(), handle_v_attach(), handle_v_cont(), handle_v_kill(), handle_v_run(), handle_vFile(), multi_process, require_running, target_running(), target_supports_range_stepping, and write_enn().
Referenced by process_serial_event().
static int handle_v_run | ( | char * | own_buf | ) | [static] |
Definition at line 2204 of file server.c.
References freeargv(), last_ptid, last_status, non_stop, prepare_resume_reply(), program_argv, start_inferior(), strchr(), unhexify(), write_enn(), and xmalloc().
Referenced by handle_v_requests().
static void kill_inferior_callback | ( | struct inferior_list_entry * | entry | ) | [static] |
Definition at line 2646 of file server.c.
References discard_queued_stop_replies(), process_info::head, inferior_list_entry::id, kill_inferior(), and ptid_get_pid().
Referenced by process_serial_event().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 2734 of file server.c.
References attach_inferior(), current_traceframe, debug_threads, detach_or_kill_for_exit(), disable_packet_qC, disable_packet_qfThreadInfo, disable_packet_Tthread, disable_packet_vCont, disable_randomization, disconnected_tracing, dlls_changed, error(), exit_requested, gdbserver_show_disableable(), gdbserver_usage(), gdbserver_version(), initialize_async_io(), initialize_event_loop(), initialize_low(), initialize_notif(), initialize_tracepoint(), last_status, mem_buf, minus_one_ptid, multi_process, noack_mode, non_stop, notice_open_fds(), own_buf, PBUFSIZ, program_argv, putpkt(), remote_open(), remote_prepare(), response_needed, run_once, start_event_loop(), start_inferior(), start_non_stop(), STDIO_CONNECTION_NAME, stop_tracing(), strtok(), target_supports_tracepoints, toplevel, tracing, wrapper_argv, write_enn(), xmalloc(), and xstrdup().
void monitor_show_help | ( | void | ) |
Definition at line 688 of file server.c.
References monitor_output().
Referenced by handle_monitor_command().
static void myresume | ( | char * | own_buf, |
int | step, | ||
int | sig | ||
) | [static] |
Definition at line 2395 of file server.c.
References current_inferior, current_ptid, disable_async_io(), enable_async_io(), find_process_pid(), thread_resume::kind, thread_info::last_resume_kind, thread_info::last_status, last_status, minus_one_ptid, mourn_inferior, mywait(), non_stop, null_ptid, prepare_resume_reply(), ptid_equal(), ptid_get_pid(), target_ops::resume, set_desired_inferior(), thread_resume::sig, the_target, thread_resume::thread, and write_ok().
Referenced by process_serial_event().
static void print_attached_pid | ( | struct inferior_list_entry * | entry | ) | [static] |
Definition at line 2693 of file server.c.
References process_info::attached, process_info::head, inferior_list_entry::id, and ptid_get_pid().
Referenced by detach_or_kill_for_exit().
static void print_started_pid | ( | struct inferior_list_entry * | entry | ) | [static] |
Definition at line 2678 of file server.c.
References process_info::attached, process_info::head, inferior_list_entry::id, and ptid_get_pid().
Referenced by detach_or_kill_for_exit().
static void process_point_options | ( | CORE_ADDR | point_addr, |
char ** | packet | ||
) | [static] |
Definition at line 3049 of file server.c.
References add_breakpoint_commands(), add_breakpoint_condition(), and debug_threads.
Referenced by process_serial_event().
static int process_serial_event | ( | void | ) | [static] |
Definition at line 3099 of file server.c.
References all_processes, all_threads, any_persistent_commands(), clear_gdb_breakpoint_conditions(), convert_ascii_to_int(), convert_int_to_ascii(), current_inferior, current_ptid, current_target_desc(), current_traceframe, debug_threads, decode_m_packet(), decode_M_packet(), decode_X_packet(), detach_inferior, disable_async_io(), discard_queued_stop_replies(), disconnected_tracing, 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_thread_regcache(), getpkt(), handle_general_set(), handle_query(), handle_status(), handle_v_requests(), inferior_list::head, inferior_list_entry::id, target_ops::insert_point, 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(), target_ops::remove_point, require_running, response_needed, target_ops::resume, set_desired_inferior(), 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] |
Definition at line 140 of file server.c.
References notif_event_enque(), notif_stop, vstop_notif::ptid, vstop_notif::status, and xmalloc().
Referenced by queue_stop_reply_callback().
static int queue_stop_reply_callback | ( | struct inferior_list_entry * | entry, |
void * | arg | ||
) | [static] |
Definition at line 2456 of file server.c.
References debug_threads, gdb_assert, inferior_list_entry::id, thread_info::last_status, notif_event_enque(), vstop_notif::ptid, queue_stop_reply(), vstop_notif::status, target_pid_to_str(), the_target, target_ops::thread_stopped, thread_stopped, xfree(), and xmalloc().
Referenced by handle_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] |
Definition at line 151 of file server.c.
References ptid_get_pid(), and QUEUE_remove_elem.
Referenced by discard_queued_stop_replies().
static int start_inferior | ( | char ** | argv | ) | [static] |
Definition at line 200 of file server.c.
References create_inferior, current_inferior, debug_threads, thread_resume::kind, thread_info::last_resume_kind, thread_info::last_status, last_status, memset(), mywait(), null_ptid, pid_to_ptid(), target_ops::resume, thread_resume::sig, signal_pid, the_target, thread_resume::thread, and wrapper_argv.
Referenced by handle_v_run(), main(), and process_serial_event().
static int target_running | ( | void | ) | [static] |
Definition at line 194 of file server.c.
References all_threads, and inferior_list::head.
Referenced by handle_query(), handle_qxfer_auxv(), handle_qxfer_btrace(), handle_qxfer_fdpic(), handle_qxfer_features(), handle_qxfer_libraries(), handle_qxfer_libraries_svr4(), handle_qxfer_siginfo(), handle_qxfer_spu(), handle_qxfer_statictrace(), handle_qxfer_threads(), handle_qxfer_traceframe_info(), handle_target_event(), handle_v_requests(), and process_serial_event().
static void vstop_notif_reply | ( | struct notif_event * | event, |
char * | own_buf | ||
) | [static] |
Definition at line 181 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 389 of file server.c.
References PBUFSIZ, and remote_escape_output().
Referenced by handle_qxfer().
Definition at line 46 of file server.c.
Referenced by linux_request_interrupt(), linux_wait_1(), and set_desired_inferior().
unsigned int crc32_table[256] [static] |
int debug_hw_points |
Definition at line 74 of file server.c.
Referenced by aarch64_handle_unaligned_watchpoint(), aarch64_insert_point(), aarch64_linux_prepare_to_resume(), aarch64_remove_point(), debug_reg_change_callback(), handle_monitor_command(), i386_low_insert_watchpoint(), i386_low_remove_watchpoint(), and i386_low_stopped_data_address().
int debug_threads |
Definition at line 71 of file server.c.
Referenced by aarch64_get_pc(), add_insns(), arm_get_pc(), attach_thread(), cancel_breakpoint(), cris_get_pc(), delete_fast_tracepoint_jump(), delete_raw_breakpoint(), dequeue_one_deferred_signal(), enqueue_one_deferred_signal(), find_one_thread(), finish_step_over(), gdb_no_commands_at_breakpoint(), get_detach_signal(), get_pc(), get_stop_pc(), handle_accept_event(), handle_monitor_command(), handle_serial_event(), handle_target_event(), handle_tracepoint_bkpts(), handle_tracepoints(), kill_one_lwp_callback(), linux_async(), linux_attach(), linux_attach_lwp_1(), linux_debug(), linux_detach_one_lwp(), linux_kill(), linux_kill_one_lwp(), linux_resume(), linux_resume_one_lwp(), linux_resume_one_thread(), linux_set_resume_request(), linux_stabilize_threads(), linux_wait(), linux_wait_1(), linux_wait_for_event(), linux_wait_for_lwp(), linux_write_memory(), linux_xfer_siginfo(), lynx_debug(), lynx_ptrace(), m32r_get_pc(), main(), maybe_move_out_of_jump_pad(), move_out_of_jump_pad_callback(), need_step_over_p(), nto_trace(), prepare_resume_reply(), proceed_all_lwps(), proceed_one_lwp(), process_point_options(), process_serial_event(), queue_stop_reply_callback(), reinsert_breakpoints_at(), reinsert_fast_tracepoint_jumps_at(), reinsert_raw_breakpoint(), select_event_lwp(), send_sigstop(), set_fast_tracepoint_jump(), set_raw_breakpoint_at(), sigchld_handler(), sparc_get_pc(), start_inferior(), start_step_over(), thread_db_create_event(), thread_db_find_new_threads(), thread_db_load_search(), trace_buffer_alloc(), tracepoint_look_up_symbols(), try_thread_db_load(), try_thread_db_load_1(), uninsert_breakpoints_at(), uninsert_fast_tracepoint_jumps_at(), uninsert_raw_breakpoint(), unstop_all_lwps(), upload_fast_traceframes(), and wait_for_sigstop().
Definition at line 110 of file server.c.
Referenced by handle_query(), and main().
Definition at line 111 of file server.c.
Referenced by handle_query(), and main().
Definition at line 109 of file server.c.
Referenced by main(), and prepare_resume_reply().
Definition at line 108 of file server.c.
Referenced by handle_v_requests(), and main().
int disable_randomization = 1 |
Definition at line 65 of file server.c.
Referenced by handle_general_set(), linux_create_inferior(), and main().
int exit_requested [static] |
Definition at line 55 of file server.c.
Referenced by handle_monitor_command(), main(), and process_serial_event().
int extended_protocol [static] |
Definition at line 53 of file server.c.
Referenced by handle_v_requests(), and process_serial_event().
Definition at line 49 of file server.c.
Referenced by handle_query(), prepare_resume_reply(), and set_desired_inferior().
Definition at line 115 of file server.c.
Referenced by handle_target_event(), and handle_v_run().
struct target_waitstatus last_status [static] |
Definition at line 114 of file server.c.
Referenced by attach_inferior(), handle_target_event(), handle_v_attach(), handle_v_cont(), handle_v_kill(), handle_v_run(), main(), myresume(), process_serial_event(), and start_inferior().
unsigned char* mem_buf [static] |
Definition at line 118 of file server.c.
Referenced by look_up_one_symbol(), main(), process_serial_event(), and relocate_instruction().
int multi_process |
Definition at line 60 of file server.c.
Referenced by handle_query(), handle_v_kill(), handle_v_requests(), main(), prepare_resume_reply(), process_serial_event(), and write_ptid().
int non_stop |
Definition at line 61 of file server.c.
Referenced by agent_run_command(), attach_inferior(), handle_general_set(), handle_status(), handle_v_attach(), handle_v_cont(), handle_v_run(), linux_attach(), linux_done_accessing_memory(), linux_prepare_to_access_memory(), linux_resume(), linux_wait_1(), linux_wait_for_event(), main(), myresume(), prepare_resume_reply(), process_serial_event(), and wait_for_sigstop().
struct notif_server notif_stop |
{ "vStopped", "Stop", NULL, vstop_notif_reply, }
Definition at line 188 of file server.c.
Referenced by discard_queued_stop_replies(), and queue_stop_reply().
char* own_buf [static] |
Definition at line 117 of file server.c.
Referenced by cmd_bigqtbuffer_circular(), cmd_bigqtbuffer_size(), cmd_qtbuffer(), cmd_qtdisconnected(), cmd_qtdp(), cmd_qtdpsrc(), cmd_qtdv(), cmd_qtenable_disable(), cmd_qtframe(), cmd_qtnotes(), cmd_qtp(), cmd_qtro(), cmd_qtv(), dead_thread_notify(), handle_qxfer_btrace(), look_up_one_symbol(), main(), new_thread_notify(), process_serial_event(), and relocate_instruction().
int pass_signals[GDB_SIGNAL_LAST] |
Definition at line 76 of file server.c.
Referenced by handle_general_set(), and linux_wait_1().
char** program_argv [static] |
Definition at line 67 of file server.c.
Referenced by handle_v_run(), main(), and process_serial_event().
int program_signals[GDB_SIGNAL_LAST] |
Definition at line 77 of file server.c.
Referenced by get_detach_signal(), and handle_general_set().
Definition at line 78 of file server.c.
Referenced by get_detach_signal(), and handle_general_set().
struct qxfer qxfer_packets[] [static] |
{ { "auxv", handle_qxfer_auxv }, { "btrace", handle_qxfer_btrace }, { "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 }, }
Definition at line 1409 of file server.c.
Referenced by handle_qxfer().
int remote_debug |
Definition at line 107 of file remote-utils.c.
int response_needed [static] |
Definition at line 54 of file server.c.
Referenced by main(), and process_serial_event().
int run_once |
Definition at line 58 of file server.c.
Referenced by handle_accept_event(), and main().
int server_waiting |
Definition at line 51 of file server.c.
Referenced by handle_load_dll(), handle_output_debug_string(), mywait(), new_thread_notify(), spu_wait(), and win32_wait().
unsigned long signal_pid |
Definition at line 87 of file server.c.
Referenced by attach_inferior(), handle_v_kill(), linux_request_interrupt(), and start_inferior().
char ** wrapper_argv [static] |
Definition at line 67 of file server.c.
Referenced by main(), and start_inferior().