GDBserver
|
#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 |
#define require_running | ( | BUF | ) |
Definition at line 3188 of file server.c.
Referenced by handle_query(), handle_v_requests(), and process_serial_event().
#define require_running | ( | BUF | ) |
#define SEARCH_CHUNK_SIZE 16000 |
Referenced by handle_search_memory().
typedef int( visit_actioned_threads_callback_ftype) (const struct thread_resume *, struct thread_info *) |
|
static |
Definition at line 1267 of file server.c.
References dll_info::name.
Referenced by handle_qxfer_libraries().
|
static |
Definition at line 296 of file server.c.
References current_thread, thread_info::last_resume_kind, thread_info::last_status, last_status, myattach, mywait(), non_stop, pid_to_ptid(), and signal_pid.
Referenced by captured_main(), and handle_v_attach().
|
static |
Definition at line 3321 of file server.c.
References all_threads, attach_inferior(), CATCH, clear_pending_status_callback(), current_traceframe, debug_threads, detach_or_kill_for_exit_cleanup(), disable_packet_qC, disable_packet_qfThreadInfo, disable_packet_Tthread, disable_packet_vCont, disable_randomization, discard_queued_stop_replies(), disconnected_tracing, dlls_changed, END_CATCH, error(), exit_requested, for_each_inferior(), gdbserver_show_disableable(), gdbserver_usage(), gdbserver_version(), hwbreak_feature, initialize_async_io(), initialize_event_loop(), initialize_low(), initialize_notif(), initialize_tracepoint(), last_status, make_cleanup(), mem_buf, minus_one_ptid, multi_process, noack_mode, non_stop, notice_open_fds(), null_ptid, own_buf, parse_debug_format_options(), PBUFSIZ, program_argv, putpkt(), remote_open(), remote_prepare(), report_fork_events, report_vfork_events, response_needed, RETURN_MASK_ERROR, run_once, start_event_loop(), start_inferior(), start_non_stop(), startswith(), STDIO_CONNECTION_NAME, stop_tracing(), swbreak_feature, target_supports_tracepoints, throw_quit(), tracing, TRY, wrapper_argv, write_enn(), xmalloc(), and xstrdup().
Referenced by main().
|
static |
Definition at line 2996 of file server.c.
References thread_info::status_pending_p.
Referenced by captured_main().
|
static |
Definition at line 1873 of file server.c.
References read_inferior_memory().
Referenced by handle_query().
|
static |
Definition at line 346 of file server.c.
Referenced by handle_qxfer().
|
static |
Definition at line 336 of file server.c.
References decode_m_packet().
Referenced by handle_qxfer().
DEFINE_QUEUE_P | ( | notif_event_p | ) |
|
static |
Definition at line 3269 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 detach_or_kill_for_exit_cleanup().
|
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 |
Definition at line 3222 of file server.c.
References process_info::attached, detach_inferior, discard_queued_stop_replies(), process_info::entry, inferior_list_entry::id, kill_inferior(), and ptid_get_pid().
Referenced by detach_or_kill_for_exit().
|
static |
Definition at line 172 of file server.c.
References notif_stop, QUEUE_iterate, and remove_all_on_match_pid().
Referenced by captured_main(), detach_or_kill_inferior_callback(), handle_v_kill(), kill_inferior_callback(), and process_serial_event().
|
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 |
Definition at line 3027 of file server.c.
References thread_info::status_pending_p.
Referenced by handle_status().
|
static |
Definition at line 3196 of file server.c.
References inferior_list_entry::id, and ptid_get_pid().
Referenced by process_serial_event().
|
static |
Definition at line 793 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 |
Definition at line 2985 of file server.c.
References process_info::gdb_detached.
Referenced by handle_status().
|
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 |
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 |
Definition at line 830 of file server.c.
References current_traceframe, done_accessing_memory, prepare_to_access_memory, and write_inferior_memory().
Referenced by process_serial_event().
|
static |
Definition at line 3175 of file server.c.
Referenced by captured_main().
|
static |
|
static |
Definition at line 3111 of file server.c.
References host_name, PKGVERSION, and version.
Referenced by captured_main().
|
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 |
Definition at line 494 of file server.c.
References btrace_config::bts, current_btrace_conf, errno, find_thread_ptid(), minus_one_ptid, null_ptid, btrace_config::pt, ptid_equal(), btrace_config_bts::size, btrace_config_pt::size, startswith(), and write_ok().
Referenced by handle_general_set().
|
static |
Definition at line 431 of file server.c.
References thread_info::btrace, and target_disable_btrace.
Referenced by handle_btrace_general_set().
|
static |
Definition at line 397 of file server.c.
References thread_info::btrace, BTRACE_FORMAT_BTS, current_btrace_conf, thread_info::entry, btrace_config::format, inferior_list_entry::id, and target_enable_btrace.
Referenced by handle_btrace_general_set().
|
static |
Definition at line 414 of file server.c.
References thread_info::btrace, BTRACE_FORMAT_PT, current_btrace_conf, thread_info::entry, btrace_config::format, inferior_list_entry::id, and target_enable_btrace.
Referenced by handle_btrace_general_set().
|
static |
Definition at line 447 of file server.c.
References find_thread_ptid(), handle_btrace_disable(), handle_btrace_enable_bts(), handle_btrace_enable_pt(), minus_one_ptid, null_ptid, ptid_equal(), startswith(), and write_ok().
Referenced by handle_general_set().
|
static |
Definition at line 561 of file server.c.
References decode_address_to_semicolon(), disable_randomization, handle_btrace_conf_general_set(), handle_btrace_general_set(), handle_tracepoint_general_set(), noack_mode, non_stop, pass_signals, program_signals, program_signals_p, start_non_stop(), startswith(), target_supports_tracepoints, unpack_varlen_hex(), use_agent, write_enn(), and write_ok().
Referenced by process_serial_event().
|
static |
Definition at line 1080 of file server.c.
References debug_threads, exit_requested, monitor_output(), monitor_show_help(), parse_debug_format_options(), show_debug_regs, startswith(), write_enn(), and xfree().
Referenced by handle_query().
|
static |
Definition at line 2463 of file server.c.
References thread_info::entry, inferior_list_entry::id, thread_info::last_status, last_status, own_buf, prepare_resume_reply(), and thread_info::status_pending_p.
Referenced by resume().
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 |
Definition at line 1744 of file server.c.
References decode_xfer(), decode_xfer_read(), decode_xfer_write(), qxfer::object, offset, PBUFSIZ, qxfer_packets, startswith(), write_enn(), write_qxfer_response(), and qxfer::xfer.
Referenced by handle_query().
|
static |
Definition at line 1165 of file server.c.
References offset, target_ops::read_auxv, target_running(), and the_target.
|
static |
Definition at line 1592 of file server.c.
References thread_info::btrace, BTRACE_READ_ALL, BTRACE_READ_DELTA, BTRACE_READ_NEW, buffer::buffer, buffer_free(), find_thread_ptid(), 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 |
Definition at line 1666 of file server.c.
References thread_info::btrace, buffer::buffer, buffer_free(), find_thread_ptid(), minus_one_ptid, null_ptid, offset, own_buf, ptid_equal(), target_ops::read_btrace_conf, target_read_btrace_conf, target_running(), the_target, and buffer::used_size.
|
static |
Definition at line 1181 of file server.c.
References alloca(), current_thread, offset, pid_of, target_ops::pid_to_exec_file, the_target, and unpack_varlen_hex().
|
static |
Definition at line 1577 of file server.c.
References offset, target_ops::read_loadmap, target_running(), and the_target.
|
static |
Definition at line 1232 of file server.c.
References get_features_xml(), offset, and target_running().
|
static |
Definition at line 1307 of file server.c.
References accumulate_file_name_length(), all_dlls, emit_dll_description(), for_each_inferior_with_data(), offset, and target_running().
|
static |
Definition at line 1354 of file server.c.
References target_ops::qxfer_libraries_svr4, target_running(), and the_target.
|
static |
Definition at line 1370 of file server.c.
References offset, target_ops::qxfer_osdata, and the_target.
|
static |
Definition at line 1383 of file server.c.
References offset, target_ops::qxfer_siginfo, target_running(), and the_target.
|
static |
Definition at line 1399 of file server.c.
References offset, target_ops::qxfer_spu, target_running(), and the_target.
|
static |
Definition at line 1415 of file server.c.
References current_traceframe, target_running(), and traceframe_read_sdata().
|
static |
Definition at line 1477 of file server.c.
References buffer_finish(), buffer_free(), buffer_init(), handle_qxfer_threads_proper(), offset, and target_running().
|
static |
Definition at line 1464 of file server.c.
References all_threads, buffer_grow_str, buffer_grow_str0, for_each_inferior_with_data(), and handle_qxfer_threads_worker().
Referenced by handle_qxfer_threads().
|
static |
Definition at line 1437 of file server.c.
References buffer_xml_printf(), target_core_of_thread, thread_to_gdb_id(), and write_ptid().
Referenced by handle_qxfer_threads_proper().
|
static |
Definition at line 1527 of file server.c.
References buffer_finish(), buffer_free(), buffer_init(), current_traceframe, offset, target_running(), and traceframe_read_info().
|
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 |
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 | ||
) |
Definition at line 4175 of file server.c.
References debug_printf(), debug_threads, process_serial_event(), and set_desired_thread().
Referenced by handle_accept_event(), process_remaining(), and remote_open().
|
static |
Definition at line 3037 of file server.c.
References all_processes, all_threads, thread_info::entry, find_inferior(), find_inferior_id(), find_status_pending_thread_callback(), for_each_inferior(), gdb_assert, gdb_reattached_process(), gdb_wants_all_threads_stopped(), get_first_inferior(), inferior_list_entry::id, thread_info::last_status, last_status, non_stop, notif_write_event(), pause_all, prepare_resume_reply(), queue_stop_reply_callback(), set_desired_thread(), set_pending_status_callback(), stabilize_threads, and thread_info::status_pending_p.
Referenced by process_serial_event().
int handle_target_event | ( | int | err, |
gdb_client_data | client_data | ||
) |
Definition at line 4194 of file server.c.
References current_thread, debug_printf(), 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_thread(), 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 2648 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 2480 of file server.c.
References gdb_signal_to_host(), gdb_signal_to_host_p(), thread_resume::kind, minus_one_ptid, read_ptid(), resume(), set_desired_thread(), thread_resume::sig, thread_resume::step_range_end, thread_resume::step_range_start, thread_resume::thread, unpack_varlen_hex(), and write_enn().
Referenced by handle_v_requests().
int handle_v_kill | ( | char * | own_buf | ) |
Definition at line 2771 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 2797 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, startswith(), target_running(), target_supports_range_stepping, and write_enn().
Referenced by process_serial_event().
|
static |
Definition at line 2682 of file server.c.
References hex2bin(), last_ptid, last_status, non_stop, prepare_resume_reply(), program_argv, start_inferior(), write_enn(), and xmalloc().
Referenced by handle_v_requests().
|
static |
Definition at line 3207 of file server.c.
References discard_queued_stop_replies(), process_info::entry, inferior_list_entry::id, kill_inferior(), and ptid_get_pid().
Referenced by process_serial_event().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 3624 of file server.c.
References captured_main(), CATCH, END_CATCH, gdb_assert_not_reached, RETURN_ERROR, RETURN_MASK_ALL, and TRY.
void monitor_show_help | ( | void | ) |
Definition at line 764 of file server.c.
References monitor_output().
Referenced by handle_monitor_command().
|
static |
Definition at line 2873 of file server.c.
References current_ptid, thread_resume::kind, minus_one_ptid, null_ptid, ptid_equal(), resume(), set_desired_thread(), thread_resume::sig, and thread_resume::thread.
Referenced by process_serial_event().
|
static |
Definition at line 1023 of file server.c.
References debug_timestamp, free_char_ptr_vec(), monitor_output(), VEC, VEC_iterate, and xstrprintf().
Referenced by captured_main(), and handle_monitor_command().
|
static |
Definition at line 3254 of file server.c.
References process_info::attached, process_info::entry, inferior_list_entry::id, and ptid_get_pid().
Referenced by detach_or_kill_for_exit().
|
static |
Definition at line 3239 of file server.c.
References process_info::attached, process_info::entry, inferior_list_entry::id, and ptid_get_pid().
Referenced by detach_or_kill_for_exit().
|
static |
Definition at line 3662 of file server.c.
References add_breakpoint_commands(), add_breakpoint_condition(), debug_printf(), debug_threads, skip_to_semicolon(), and startswith().
Referenced by process_serial_event().
|
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 |
Definition at line 138 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 |
Definition at line 2910 of file server.c.
References debug_printf(), 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 |
Definition at line 149 of file server.c.
References ptid_get_pid(), and QUEUE_remove_elem.
Referenced by discard_queued_stop_replies().
|
static |
Definition at line 2591 of file server.c.
References visit_actioned_threads_data::actions, all_threads, visit_actioned_threads_data::callback, current_thread, disable_async_io(), enable_async_io(), find_inferior(), find_process_pid(), gdb_wants_all_threads_stopped(), handle_pending_status(), thread_info::last_status, last_status, minus_one_ptid, mourn_inferior, mywait(), non_stop, visit_actioned_threads_data::num_actions, own_buf, prepare_resume_reply(), ptid_get_pid(), target_ops::resume, the_target, visit_actioned_threads(), and write_ok().
Referenced by handle_v_cont(), and myresume().
|
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 |
Definition at line 3651 of file server.c.
Referenced by process_point_options().
|
static |
Definition at line 198 of file server.c.
References alloca(), create_inferior, current_thread, debug_flush(), debug_printf(), debug_threads, find_process_pid(), thread_resume::kind, thread_info::last_resume_kind, thread_info::last_status, last_status, mourn_inferior, mywait(), pid_to_ptid(), ptid_get_pid(), target_ops::resume, thread_resume::sig, signal_pid, the_target, thread_resume::thread, and wrapper_argv.
Referenced by captured_main(), handle_v_run(), and process_serial_event().
|
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 |
Definition at line 192 of file server.c.
References get_first_thread().
Referenced by handle_query(), handle_qxfer_auxv(), handle_qxfer_btrace(), handle_qxfer_btrace_conf(), 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 |
Definition at line 2431 of file server.c.
References visit_actioned_threads_data::actions, visit_actioned_threads_data::callback, inferior_list_entry::id, minus_one_ptid, visit_actioned_threads_data::num_actions, ptid_equal(), ptid_get_lwp(), ptid_get_pid(), and thread_resume::thread.
Referenced by resume().
|
static |
Definition at line 179 of file server.c.
References prepare_resume_reply(), vstop_notif::ptid, and vstop_notif::status.
|
static |
Definition at line 381 of file server.c.
References PBUFSIZ, and remote_escape_output().
Referenced by handle_qxfer().
ptid_t cont_thread |
Definition at line 45 of file server.c.
Referenced by set_desired_thread().
|
static |
|
static |
Definition at line 131 of file server.c.
Referenced by handle_btrace_conf_general_set(), handle_btrace_enable_bts(), and handle_btrace_enable_pt().
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().
|
static |
Definition at line 54 of file server.c.
Referenced by captured_main(), handle_monitor_command(), and process_serial_event().
|
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().
|
static |
Definition at line 109 of file server.c.
Referenced by handle_target_event(), and handle_v_run().
|
static |
Definition at line 108 of file server.c.
Referenced by attach_inferior(), captured_main(), handle_pending_status(), handle_status(), handle_target_event(), handle_v_attach(), handle_v_kill(), handle_v_run(), process_serial_event(), resume(), and start_inferior().
|
static |
Definition at line 112 of file server.c.
Referenced by captured_main(), look_up_one_symbol(), process_serial_event(), and relocate_instruction().
int multi_process |
Definition at line 59 of file server.c.
Referenced by captured_main(), handle_query(), handle_v_kill(), handle_v_requests(), prepare_resume_reply(), process_serial_event(), and write_ptid().
int non_stop |
Definition at line 62 of file server.c.
Referenced by attach_inferior(), captured_main(), handle_general_set(), handle_status(), handle_v_attach(), handle_v_run(), linux_attach(), linux_done_accessing_memory(), linux_prepare_to_access_memory(), linux_resume(), linux_wait_1(), prepare_resume_reply(), process_serial_event(), resume(), select_event_lwp(), target_stop_and_wait(), and wait_for_sigstop().
struct notif_server notif_stop |
Definition at line 186 of file server.c.
Referenced by discard_queued_stop_replies(), and queue_stop_reply().
|
static |
Definition at line 111 of file server.c.
Referenced by captured_main(), 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_pending_status(), handle_qxfer_btrace(), handle_qxfer_btrace_conf(), look_up_one_symbol(), new_thread_notify(), process_serial_event(), relocate_instruction(), and resume().
int pass_signals[GDB_SIGNAL_LAST] |
Definition at line 72 of file server.c.
Referenced by handle_general_set(), and linux_wait_1().
|
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().
|
static |
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 |
Definition at line 60 of file server.c.
Referenced by captured_main(), handle_query(), linux_low_ptrace_options(), and prepare_resume_reply().
int report_vfork_events |
Definition at line 61 of file server.c.
Referenced by captured_main(), handle_query(), linux_low_ptrace_options(), and prepare_resume_reply().
|
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().
|
static |
Definition at line 70 of file server.c.
Referenced by captured_main(), and start_inferior().