|
GDBserver
|
#include "server.h"#include "gdbthread.h"#include "agent.h"#include "notif.h"#include "tdesc.h"#include "rsp-low.h"#include "signals-state-save-restore.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"#include <vector>#include "common-inferior.h"#include "job-control.h"#include "environ.h"#include "common/selftest.h"Go to the source code of this file.
Classes | |
| struct | vstop_notif |
| struct | qxfer |
Macros | |
| #define | require_running_or_return(BUF) |
| #define | require_running_or_break(BUF) |
| #define | SEARCH_CHUNK_SIZE 16000 |
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_ptid (QUEUE(notif_event_p) *q, QUEUE_ITER(notif_event_p) *iter, struct notif_event *event, void *data) |
| void | discard_queued_stop_replies (ptid_t ptid) |
| static void | vstop_notif_reply (struct notif_event *event, char *own_buf) |
| static int | in_queued_stop_replies_ptid (QUEUE(notif_event_p) *q, QUEUE_ITER(notif_event_p) *iter, struct notif_event *event, void *data) |
| int | in_queued_stop_replies (ptid_t ptid) |
| static int | target_running (void) |
| const char * | get_exec_wrapper () |
| char * | get_exec_file (int err) |
| gdb_environ * | get_environ () |
| 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 gdb_byte *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) |
| static 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_detach (char *own_buf) |
| 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 *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_worker (thread_info *thread, struct buffer *buffer) |
| 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) |
| static 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 bool | visit_actioned_threads (thread_info *thread, const struct thread_resume *actions, size_t num_actions, visit_actioned_threads_callback_ftype *callback) |
| static int | handle_pending_status (const struct thread_resume *resumption, struct thread_info *thread) |
| static void | handle_v_cont (char *own_buf) |
| static int | handle_v_attach (char *own_buf) |
| static int | handle_v_run (char *own_buf) |
| static 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 void | queue_stop_reply_callback (thread_info *thread) |
| static void | gdb_wants_thread_stopped (thread_info *thread) |
| static void | set_pending_status_callback (thread_info *thread) |
| 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 void | kill_inferior_callback (process_info *process) |
| 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 | process_point_options (struct gdb_breakpoint *bp, const char **packet) |
| static int | process_serial_event (void) |
| int | handle_serial_event (int err, gdb_client_data client_data) |
| static void | push_stop_notification (ptid_t ptid, struct target_waitstatus *status) |
| int | handle_target_event (int err, gdb_client_data client_data) |
| #define require_running_or_break | ( | BUF | ) |
Definition at line 52 of file server.c.
Referenced by process_serial_event().
| #define require_running_or_return | ( | BUF | ) |
Definition at line 45 of file server.c.
Referenced by handle_detach(), and handle_query().
| #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 283 of file server.c.
References current_thread, last_ptid, 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 3552 of file server.c.
References _, attach_inferior(), CATCH, cont_thread, create_inferior, 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, extended_protocol, for_each_thread(), gdb_environ::from_host_environ(), gdbserver_show_disableable(), gdbserver_usage(), gdbserver_version(), have_job_control(), hwbreak_feature, initialize_async_io(), initialize_event_loop(), initialize_low(), initialize_notif(), initialize_tracepoint(), last_ptid, last_status, make_cleanup(), mem_buf, minus_one_ptid, multi_process, noack_mode, non_stop, notice_open_fds(), null_ptid, our_environ, own_buf, parse_debug_format_options(), PBUFSIZ, program_args, program_name, putpkt(), remote_debug, remote_open(), remote_prepare(), report_exec_events, report_fork_events, report_vfork_events, response_needed, RETURN_MASK_ERROR, run_once, selftests::run_tests(), save_original_signals_state(), start_event_loop(), start_non_stop(), startswith(), startup_with_shell, thread_info::status_pending_p, STDIO_CONNECTION_NAME, stop_tracing(), swbreak_feature, target_running(), target_supports_tracepoints, throw_quit(), tracing, TRY, vCont_supported, wrapper_argv, write_enn(), xmalloc(), and xstrdup().
Referenced by main().
|
static |
Definition at line 2094 of file server.c.
References read_inferior_memory().
Referenced by handle_query().
|
static |
|
static |
Definition at line 323 of file server.c.
References decode_m_packet().
Referenced by handle_qxfer().
| DEFINE_QUEUE_P | ( | notif_event_p | ) |
|
static |
Definition at line 3482 of file server.c.
References process_info::attached, detach_inferior, discard_queued_stop_replies(), for_each_process(), have_attached_inferiors_p(), have_started_inferiors_p(), kill_inferior(), process_info::pid, and pid_to_ptid().
Referenced by detach_or_kill_for_exit_cleanup().
|
static |
Definition at line 3531 of file server.c.
References CATCH, detach_or_kill_for_exit(), END_CATCH, exit_code, RETURN_MASK_ALL, and TRY.
Referenced by captured_main().
| void discard_queued_stop_replies | ( | ptid_t | ptid | ) |
Definition at line 198 of file server.c.
References notif_stop, vstop_notif::ptid, QUEUE_iterate, and remove_all_on_match_ptid().
Referenced by captured_main(), detach_or_kill_for_exit(), handle_detach(), handle_v_kill(), kill_inferior_callback(), and remove_thread().
|
static |
Definition at line 975 of file server.c.
References current_traceframe, done_accessing_memory(), in_readonly_region(), prepare_to_access_memory(), read_inferior_memory(), set_desired_thread(), and traceframe_read_mem().
Referenced by handle_search_memory_1(), and process_serial_event().
|
static |
Definition at line 3283 of file server.c.
References for_each_thread(), and gdb_wants_thread_stopped().
Referenced by handle_status(), and resume().
|
static |
Definition at line 3267 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 1015 of file server.c.
References current_traceframe, done_accessing_memory(), prepare_to_access_memory(), set_desired_thread(), and write_inferior_memory().
Referenced by process_serial_event().
|
static |
Definition at line 3458 of file server.c.
Referenced by captured_main().
|
static |
|
static |
Definition at line 3387 of file server.c.
References host_name, PKGVERSION, and version.
Referenced by captured_main().
| gdb_environ* get_environ | ( | ) |
Definition at line 277 of file server.c.
References our_environ.
Referenced by linux_create_inferior(), lynx_create_inferior(), and spu_create_inferior().
| char* get_exec_file | ( | int | err | ) |
Definition at line 266 of file server.c.
References _, error(), and program_name.
Referenced by fork_inferior().
| const char* get_exec_wrapper | ( | ) |
Definition at line 258 of file server.c.
References wrapper_argv.
Referenced by execv_argv::init_for_shell(), and startup_inferior().
|
static |
Definition at line 905 of file server.c.
References current_target_desc(), tdesc_get_features_xml(), and xml_builtin.
Referenced by handle_qxfer_features().
|
static |
Definition at line 479 of file server.c.
References btrace_config::bts, current_btrace_conf, errno, find_thread_ptid(), general_thread, minus_one_ptid, null_ptid, own_buf, 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 416 of file server.c.
References thread_info::btrace, and target_disable_btrace.
Referenced by handle_btrace_general_set().
|
static |
Definition at line 384 of file server.c.
References thread_info::btrace, BTRACE_FORMAT_BTS, current_btrace_conf, btrace_config::format, thread_info::id, and target_enable_btrace.
Referenced by handle_btrace_general_set().
|
static |
Definition at line 400 of file server.c.
References thread_info::btrace, BTRACE_FORMAT_PT, current_btrace_conf, btrace_config::format, thread_info::id, and target_enable_btrace.
Referenced by handle_btrace_general_set().
|
static |
Definition at line 432 of file server.c.
References find_thread_ptid(), general_thread, handle_btrace_disable(), handle_btrace_enable_bts(), handle_btrace_enable_pt(), minus_one_ptid, null_ptid, own_buf, ptid_equal(), startswith(), and write_ok().
Referenced by handle_general_set().
|
static |
Definition at line 1190 of file server.c.
References any_persistent_commands(), current_ptid, current_thread, debug_printf(), debug_threads, detach_inferior, discard_queued_stop_replies(), disconnected_tracing, extended_protocol, find_process_pid(), process_info::gdb_detached, join_inferior, last_ptid, last_status, minus_one_ptid, multi_process, non_stop, own_buf, process_info::pid, pid_to_ptid(), ptid_get_pid(), putpkt(), remote_close(), require_running_or_return, start_non_stop(), stop_tracing(), target_continue_no_signal(), target_running(), tracing, write_enn(), and write_ok().
Referenced by process_serial_event().
|
static |
Definition at line 546 of file server.c.
References _, ANY_SYSCALL, current_process(), debug_flush(), debug_printf(), decode_address_to_semicolon(), disable_randomization, gdb_environ::from_host_environ(), handle_btrace_conf_general_set(), handle_btrace_general_set(), handle_tracepoint_general_set(), hex2str(), noack_mode, non_stop, our_environ, own_buf, pass_signals, program_signals, program_signals_p, remote_debug, report_thread_events, gdb_environ::set(), set_inferior_cwd(), start_non_stop(), startswith(), startup_with_shell, string, process_info::syscalls_to_catch, target_running(), target_supports_catch_syscall, target_supports_tracepoints, TRIBOOL_FALSE, TRIBOOL_TRUE, TRIBOOL_UNKNOWN, unpack_varlen_hex(), gdb_environ::unset(), use_agent, warning(), write_enn(), write_ok(), xfree(), and xstrdup().
Referenced by process_serial_event().
|
static |
Definition at line 1356 of file server.c.
References debug_threads, exit_requested, monitor_output(), monitor_show_help(), own_buf, parse_debug_format_options(), remote_debug, show_debug_regs, startswith(), write_enn(), and xfree().
Referenced by handle_query().
|
static |
Definition at line 2714 of file server.c.
References last_ptid, last_status, own_buf, prepare_resume_reply(), and thread_resume::thread.
Referenced by resume().
|
static |
Definition at line 2144 of file server.c.
References all_threads, process_info::attached, crc32(), current_process(), current_thread, decode_address(), disable_packet_qC, disable_packet_qfThreadInfo, find_any_thread_of_pid(), find_process_pid(), find_thread_ptid(), free(), 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(), hex2bin(), hostio_handle_new_gdb_connection(), hwbreak_feature, target_ops::look_up_symbols, minus_one_ptid, multi_process, null_ptid, own_buf, paddress(), PBUFSIZ, process_info::pid, target_ops::pid_to_exec_file, ptid_get_pid(), 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_exec_events, report_fork_events, report_no_resumed, report_vfork_events, require_running_or_return, startswith(), supported_btrace_packets(), swbreak_feature, target_handle_new_gdb_connection, target_process_qsupported, target_supports_agent, target_supports_catch_syscall, target_supports_disable_randomization, target_supports_exec_events, target_supports_fast_tracepoints, target_supports_fork_events, target_supports_hardware_single_step, target_supports_multi_process(), target_supports_non_stop, target_supports_software_single_step, target_supports_stopped_by_hw_breakpoint, target_supports_stopped_by_sw_breakpoint, target_supports_tracepoints, target_supports_vfork_events, the_target, tracepoint_look_up_symbols(), transport_is_reliable, unpack_varlen_hex(), validate_breakpoints(), vCont_supported, write_enn(), write_ok(), write_ptid(), XRESIZEVEC, and xstrdup().
Referenced by process_serial_event().
|
static |
Definition at line 1970 of file server.c.
References decode_xfer(), decode_xfer_read(), decode_xfer_write(), free(), qxfer::object, offset, own_buf, PBUFSIZ, qxfer_packets, startswith(), write_enn(), write_qxfer_response(), and qxfer::xfer.
Referenced by handle_query().
|
static |
Definition at line 1441 of file server.c.
References current_thread, offset, target_ops::read_auxv, and the_target.
|
static |
Definition at line 1820 of file server.c.
References thread_info::btrace, BTRACE_READ_ALL, BTRACE_READ_DELTA, BTRACE_READ_NEW, buffer::buffer, buffer_free(), find_thread_ptid(), general_thread, minus_one_ptid, null_ptid, offset, own_buf, ptid_equal(), target_ops::read_btrace, target_read_btrace, the_target, and buffer::used_size.
|
static |
Definition at line 1892 of file server.c.
References thread_info::btrace, buffer::buffer, buffer_free(), find_thread_ptid(), general_thread, minus_one_ptid, null_ptid, offset, own_buf, ptid_equal(), target_ops::read_btrace_conf, target_read_btrace_conf, the_target, and buffer::used_size.
|
static |
Definition at line 1457 of file server.c.
References current_thread, offset, pid_of(), target_ops::pid_to_exec_file, the_target, and unpack_varlen_hex().
|
static |
Definition at line 1805 of file server.c.
References current_thread, offset, target_ops::read_loadmap, and the_target.
|
static |
Definition at line 1504 of file server.c.
References get_features_xml(), offset, and target_running().
|
static |
Definition at line 1537 of file server.c.
References all_dlls, current_thread, offset, string, and string_printf().
|
static |
Definition at line 1570 of file server.c.
References current_thread, offset, target_ops::qxfer_libraries_svr4, and the_target.
|
static |
Definition at line 1586 of file server.c.
References offset, target_ops::qxfer_osdata, and the_target.
|
static |
Definition at line 1599 of file server.c.
References current_thread, offset, target_ops::qxfer_siginfo, and the_target.
|
static |
Definition at line 1615 of file server.c.
References current_thread, offset, target_ops::qxfer_spu, and the_target.
|
static |
Definition at line 1631 of file server.c.
References current_thread, current_traceframe, offset, and traceframe_read_sdata().
|
static |
Definition at line 1705 of file server.c.
References buffer_finish(), buffer_free(), buffer_init(), free(), handle_qxfer_threads_proper(), and offset.
|
static |
Definition at line 1690 of file server.c.
References buffer_grow_str, buffer_grow_str0, for_each_thread(), and handle_qxfer_threads_worker().
Referenced by handle_qxfer_threads().
|
static |
Definition at line 1653 of file server.c.
References alloca(), bin2hex(), buffer_xml_printf(), handle_status(), name, ptid_of(), target_core_of_thread, target_thread_handle, target_thread_name, and write_ptid().
Referenced by handle_qxfer_threads_proper().
|
static |
Definition at line 1755 of file server.c.
References buffer_finish(), buffer_free(), buffer_init(), current_traceframe, free(), offset, target_running(), and traceframe_read_info().
|
static |
Definition at line 1122 of file server.c.
References decode_search_memory_packet(), error(), free(), handle_search_memory_1(), own_buf, and SEARCH_CHUNK_SIZE.
Referenced by handle_query().
|
static |
Definition at line 1039 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 4365 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 3309 of file server.c.
References find_thread(), find_thread_ptid(), for_each_process(), for_each_thread(), gdb_assert, process_info::gdb_detached, gdb_wants_all_threads_stopped(), general_thread, get_first_thread(), thread_info::id, last_ptid, thread_info::last_status, last_status, non_stop, notif_stop, notif_write_event(), own_buf, 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 handle_qxfer_threads_worker(), and process_serial_event().
| int handle_target_event | ( | int | err, |
| gdb_client_data | client_data | ||
| ) |
Definition at line 4397 of file server.c.
References current_thread, debug_printf(), debug_threads, find_process_pid(), gdb_connected(), process_info::gdb_detached, last_ptid, thread_info::last_resume_kind, thread_info::last_status, last_status, mark_breakpoints_out(), minus_one_ptid, mywait(), null_ptid, process_info::pid, ptid_get_pid(), push_stop_notification(), report_no_resumed, set_desired_thread(), target_continue(), target_mourn_inferior(), target_pid_to_str(), and target_running().
Referenced by linux_async().
|
static |
Definition at line 2901 of file server.c.
References attach_inferior(), dlls_changed, last_ptid, last_status, non_stop, own_buf, prepare_resume_reply(), write_enn(), and write_ok().
Referenced by handle_v_requests().
|
static |
Definition at line 2731 of file server.c.
References free(), gdb_signal_to_host(), gdb_signal_to_host_p(), thread_resume::kind, memset(), minus_one_ptid, null_ptid, own_buf, read_ptid(), resume(), 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().
|
static |
Definition at line 3067 of file server.c.
References discard_queued_stop_replies(), kill_inferior(), last_ptid, last_status, multi_process, own_buf, 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 3093 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, own_buf, target_ops::request_interrupt, startswith(), target_running(), target_supports_hardware_single_step, target_supports_range_stepping, target_supports_software_single_step, the_target, vCont_supported, write_enn(), and write_ok().
Referenced by look_up_one_symbol(), and process_serial_event().
|
static |
Definition at line 2935 of file server.c.
References create_inferior, free_vector_argv(), general_thread, hex2bin(), last_ptid, last_status, non_stop, own_buf, prepare_resume_reply(), program_args, program_name, write_enn(), xfree(), xmalloc(), and xstrdup().
Referenced by handle_v_requests().
| int in_queued_stop_replies | ( | ptid_t | ptid | ) |
Definition at line 238 of file server.c.
References in_queued_stop_replies_ptid(), notif_stop, vstop_notif::ptid, and QUEUE_iterate.
Referenced by linux_set_resume_request().
|
static |
Definition at line 215 of file server.c.
References vstop_notif::ptid, ptid_match(), and vstop_notif::status.
Referenced by in_queued_stop_replies().
|
static |
Definition at line 3470 of file server.c.
References discard_queued_stop_replies(), kill_inferior(), process_info::pid, and pid_to_ptid().
Referenced by process_serial_event().
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 3926 of file server.c.
References captured_main(), CATCH, END_CATCH, exit_code, gdb_assert_not_reached, RETURN_ERROR, RETURN_MASK_ALL, and TRY.
|
static |
Definition at line 946 of file server.c.
References monitor_output().
Referenced by handle_monitor_command().
|
static |
Definition at line 3189 of file server.c.
References cont_thread, current_ptid, thread_resume::kind, minus_one_ptid, null_ptid, ptid_equal(), resume(), thread_resume::sig, and thread_resume::thread.
Referenced by process_serial_event().
|
static |
Definition at line 1299 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 3955 of file server.c.
References add_breakpoint_commands(), add_breakpoint_condition(), debug_printf(), debug_threads, and startswith().
Referenced by process_serial_event().
|
static |
Definition at line 4006 of file server.c.
References bin2hex(), clear_breakpoint_conditions_and_commands(), cont_thread, create_inferior, current_target_desc(), current_thread, current_traceframe, decode_m_packet(), decode_M_packet(), decode_X_packet(), delete_gdb_breakpoint(), disable_async_io(), exit_requested, extended_protocol, fetch_traceframe_registers(), find_any_thread_of_pid(), find_thread_ptid(), for_each_process(), free_register_cache(), gdb_assert, gdb_read_memory(), gdb_signal_to_host(), gdb_signal_to_host_p(), gdb_write_memory(), general_thread, get_first_thread(), get_thread_regcache(), getpkt(), handle_detach(), handle_general_set(), handle_query(), handle_status(), handle_v_requests(), hex2bin(), thread_info::id, ptid_t::is_pid(), kill_inferior_callback(), last_ptid, last_status, mem_buf, minus_one_ptid, myresume(), mythread_alive, new_register_cache(), null_ptid, own_buf, ptid_t::pid(), process_point_options(), program_args, program_name, ptid_equal(), putpkt(), putpkt_binary(), read_ptid(), registers_from_string(), registers_to_string(), remote_close(), require_running_or_break, response_needed, set_desired_thread(), set_gdb_breakpoint(), target_running(), unpack_varlen_hex(), write_enn(), and write_ok().
Referenced by handle_serial_event().
|
static |
Definition at line 4384 of file server.c.
References notif_push(), notif_stop, vstop_notif::ptid, vstop_notif::status, and XNEW.
Referenced by handle_target_event().
|
static |
Definition at line 165 of file server.c.
References notif_event_enque(), notif_stop, vstop_notif::ptid, vstop_notif::status, and XNEW.
Referenced by queue_stop_reply_callback().
|
static |
Definition at line 3224 of file server.c.
References debug_printf(), debug_threads, gdb_assert, thread_info::id, thread_info::last_status, notif_event_enque(), notif_stop, vstop_notif::ptid, queue_stop_reply(), vstop_notif::status, string, target_pid_to_str(), the_target, target_ops::thread_stopped, thread_stopped, and XNEW.
Referenced by handle_status().
|
static |
Definition at line 176 of file server.c.
References vstop_notif::ptid, ptid_match(), and QUEUE_remove_elem.
Referenced by discard_queued_stop_replies().
|
static |
Definition at line 2841 of file server.c.
References current_thread, disable_async_io(), enable_async_io(), find_thread(), gdb_wants_all_threads_stopped(), handle_pending_status(), last_ptid, thread_info::last_status, last_status, minus_one_ptid, mywait(), non_stop, own_buf, prepare_resume_reply(), report_no_resumed, target_ops::resume, target_mourn_inferior(), the_target, thread_resume::thread, visit_actioned_threads(), and write_ok().
Referenced by do_initial_child_stuff(), handle_v_cont(), linux_set_resume_request(), myresume(), and win32_detach().
|
static |
Definition at line 3292 of file server.c.
References thread_info::last_status, and thread_info::status_pending_p.
Referenced by handle_status().
|
static |
Definition at line 2113 of file server.c.
References BTRACE_FORMAT_BTS, BTRACE_FORMAT_PT, and target_supports_btrace.
Referenced by handle_query().
|
static |
Definition at line 250 of file server.c.
References get_first_thread().
Referenced by captured_main(), handle_detach(), handle_general_set(), handle_qxfer_features(), handle_qxfer_traceframe_info(), handle_target_event(), handle_v_requests(), and process_serial_event().
|
static |
Definition at line 2687 of file server.c.
References minus_one_ptid, ptid_t::pid(), ptid_equal(), ptid_get_lwp(), ptid_get_pid(), and thread_resume::thread.
Referenced by resume().
|
static |
Definition at line 205 of file server.c.
References own_buf, prepare_resume_reply(), vstop_notif::ptid, and vstop_notif::status.
|
static |
Definition at line 368 of file server.c.
References PBUFSIZ, and remote_escape_output().
Referenced by handle_qxfer().
| ptid_t cont_thread |
Definition at line 75 of file server.c.
Referenced by captured_main(), myresume(), prefork_hook(), and process_serial_event().
|
static |
Definition at line 158 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 131 of file server.c.
Referenced by captured_main(), and handle_query().
| int disable_packet_qfThreadInfo |
Definition at line 132 of file server.c.
Referenced by captured_main(), and handle_query().
| int disable_packet_Tthread |
Definition at line 130 of file server.c.
Referenced by captured_main(), and prepare_resume_reply().
| int disable_packet_vCont |
Definition at line 129 of file server.c.
Referenced by captured_main(), and handle_v_requests().
| int disable_randomization = 1 |
Definition at line 109 of file server.c.
Referenced by captured_main(), handle_general_set(), linux_create_inferior(), and maybe_disable_address_space_randomization::maybe_disable_address_space_randomization().
|
static |
Definition at line 3526 of file server.c.
Referenced by detach_or_kill_for_exit_cleanup(), and main().
|
static |
Definition at line 84 of file server.c.
Referenced by captured_main(), handle_monitor_command(), and process_serial_event().
|
static |
Definition at line 82 of file server.c.
Referenced by captured_main(), handle_detach(), handle_v_requests(), and process_serial_event().
| ptid_t general_thread |
Definition at line 78 of file server.c.
Referenced by done_accessing_memory(), handle_btrace_conf_general_set(), handle_btrace_general_set(), handle_query(), handle_qxfer_btrace(), handle_qxfer_btrace_conf(), handle_status(), handle_v_run(), prepare_resume_reply(), prepare_to_access_memory(), process_serial_event(), and set_desired_thread().
| int hwbreak_feature |
Definition at line 100 of file server.c.
Referenced by captured_main(), handle_query(), and prepare_resume_reply().
| ptid_t last_ptid |
Definition at line 136 of file server.c.
Referenced by attach_inferior(), captured_main(), handle_detach(), handle_pending_status(), handle_status(), handle_target_event(), handle_v_attach(), handle_v_kill(), handle_v_run(), post_fork_inferior(), process_serial_event(), resume(), and startup_inferior().
| struct target_waitstatus last_status |
Definition at line 135 of file server.c.
Referenced by attach_inferior(), captured_main(), handle_detach(), handle_pending_status(), handle_status(), handle_target_event(), handle_v_attach(), handle_v_kill(), handle_v_run(), post_fork_inferior(), process_serial_event(), and resume().
|
static |
Definition at line 139 of file server.c.
Referenced by captured_main(), look_up_one_symbol(), process_serial_event(), and relocate_instruction().
| int multi_process |
Definition at line 89 of file server.c.
Referenced by captured_main(), handle_detach(), handle_query(), handle_v_kill(), handle_v_requests(), prepare_resume_reply(), and write_ptid().
| int non_stop |
Definition at line 98 of file server.c.
Referenced by attach_inferior(), captured_main(), handle_detach(), 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(), resume(), select_event_lwp(), and target_stop_and_wait().
| struct notif_server notif_stop |
Definition at line 244 of file server.c.
Referenced by discard_queued_stop_replies(), handle_status(), in_queued_stop_replies(), push_stop_notification(), queue_stop_reply(), and queue_stop_reply_callback().
|
static |
Definition at line 61 of file server.c.
Referenced by captured_main(), get_environ(), and handle_general_set().
| char* own_buf |
Definition at line 138 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(), handle_btrace_conf_general_set(), handle_btrace_general_set(), handle_close(), handle_detach(), handle_fstat(), handle_general_set(), handle_monitor_command(), handle_notif_ack(), handle_open(), handle_pending_status(), handle_pread(), handle_pwrite(), handle_query(), handle_qxfer(), handle_qxfer_btrace(), handle_qxfer_btrace_conf(), handle_readlink(), handle_search_memory(), handle_setfs(), handle_status(), handle_unlink(), handle_v_attach(), handle_v_cont(), handle_v_kill(), handle_v_requests(), handle_v_run(), handle_vFile(), hostio_error(), hostio_packet_error(), hostio_reply(), hostio_reply_with_data(), install_tracepoint(), look_up_one_symbol(), notif_write_event(), process_serial_event(), relocate_instruction(), resume(), and vstop_notif_reply().
| int pass_signals[GDB_SIGNAL_LAST] |
Definition at line 115 of file server.c.
Referenced by handle_general_set(), and linux_wait_1().
|
static |
Definition at line 112 of file server.c.
Referenced by captured_main(), handle_v_run(), linux_create_inferior(), lynx_create_inferior(), nto_create_inferior(), process_serial_event(), spu_create_inferior(), and win32_create_inferior().
|
static |
Definition at line 111 of file server.c.
Referenced by captured_main(), get_exec_file(), handle_v_run(), and process_serial_event().
| int program_signals[GDB_SIGNAL_LAST] |
Definition at line 116 of file server.c.
Referenced by get_detach_signal(), and handle_general_set().
| int program_signals_p |
Definition at line 117 of file server.c.
Referenced by get_detach_signal(), and handle_general_set().
|
static |
Definition at line 1951 of file server.c.
Referenced by handle_qxfer().
| int remote_debug |
Definition at line 106 of file remote-utils.c.
Referenced by captured_main(), getpkt(), handle_general_set(), handle_monitor_command(), putpkt_binary_1(), and readchar().
| int report_exec_events |
Definition at line 92 of file server.c.
Referenced by captured_main(), handle_extended_wait(), handle_query(), linux_low_ptrace_options(), and prepare_resume_reply().
| int report_fork_events |
Definition at line 90 of file server.c.
Referenced by captured_main(), handle_query(), linux_low_ptrace_options(), and prepare_resume_reply().
|
static |
Definition at line 96 of file server.c.
Referenced by handle_query(), handle_target_event(), and resume().
| int report_thread_events |
Definition at line 93 of file server.c.
Referenced by filter_exit_event(), handle_extended_wait(), handle_general_set(), linux_low_filter_event(), and prepare_resume_reply().
| int report_vfork_events |
Definition at line 91 of file server.c.
Referenced by captured_main(), handle_query(), linux_low_ptrace_options(), and prepare_resume_reply().
|
static |
Definition at line 83 of file server.c.
Referenced by captured_main(), and process_serial_event().
| int run_once |
Definition at line 87 of file server.c.
Referenced by captured_main(), and handle_accept_event().
| int server_waiting |
Definition at line 80 of file server.c.
Referenced by handle_output_debug_string(), mywait(), and spu_wait().
| unsigned long signal_pid |
Definition at line 124 of file server.c.
Referenced by attach_inferior(), handle_v_kill(), linux_request_interrupt(), and post_fork_inferior().
| int startup_with_shell = 1 |
Definition at line 67 of file server.c.
Referenced by captured_main(), fork_inferior(), handle_general_set(), and startup_inferior().
| int swbreak_feature |
Definition at line 99 of file server.c.
Referenced by captured_main(), handle_query(), linux_wait_1(), and prepare_resume_reply().
|
static |
Definition at line 105 of file server.c.
Referenced by captured_main(), handle_query(), and handle_v_requests().
|
static |
Definition at line 113 of file server.c.
Referenced by captured_main(), and get_exec_wrapper().
1.8.14