GDBserver
|
#include "server.h"
#include "linux-low.h"
#include "gdb_proc_service.h"
#include "nat/gdb_thread_db.h"
#include "gdb_vecs.h"
#include "nat/linux-procfs.h"
#include <dlfcn.h>
#include <limits.h>
#include <ctype.h>
Go to the source code of this file.
Classes | |
struct | thread_db |
Macros | |
#define | CHK(required, a) |
Variables | |
int | debug_threads |
static int | thread_db_use_events |
static char * | libthread_db_search_path |
#define CHK | ( | required, | |
a | |||
) |
Referenced by try_thread_db_load_1().
|
static |
Definition at line 885 of file thread-db.c.
References inferior_list_entry::id, and ptid_get_pid().
Referenced by switch_to_process().
|
static |
Definition at line 325 of file thread-db.c.
References current_process(), debug_printf(), debug_threads, error(), find_lwp_pid(), gdb_assert, linux_attach_lwp(), linux_ptrace_attach_fail_reason_string(), pid_of, process_info::priv, ptid_build(), TD_OK, thread_db::td_thr_event_enable_p, process_info_private::thread_db, thread_db_err_str(), thread_db_use_events, td_thrinfo::ti_lid, td_thrinfo::ti_tid, and warning().
Referenced by maybe_attach_thread().
|
static |
Definition at line 908 of file thread-db.c.
References current_thread, thread_db::handle, process_info::priv, switch_to_process(), td_event_fillset, td_ta_clear_event(), thread_db::thread_agent, and process_info_private::thread_db.
Referenced by thread_db_detach().
|
static |
Definition at line 388 of file thread-db.c.
References current_process(), debug_printf(), debug_threads, error(), maybe_attach_thread(), process_info::priv, TD_OK, thread_db::td_thr_get_info_p, TD_THR_UNKNOWN, TD_THR_ZOMBIE, process_info_private::thread_db, thread_db_err_str(), td_thrinfo::ti_lid, td_thrinfo::ti_state, and td_thrinfo::ti_tid.
Referenced by thread_db_create_event(), and thread_db_find_new_threads().
|
static |
Definition at line 266 of file thread-db.c.
References all_threads, current_process(), debug_printf(), debug_threads, error(), find_inferior_id(), get_thread_lwp, process_info::priv, ptid_get_lwp(), TD_OK, thread_db::td_ta_map_lwp2thr_p, thread_db::td_thr_event_enable_p, thread_db::td_thr_get_info_p, thread_db::thread_agent, process_info_private::thread_db, thread_db_err_str(), thread_db_use_events, td_thrinfo::ti_lid, td_thrinfo::ti_tid, and warning().
Referenced by thread_db_create_event(), thread_db_find_new_threads(), and thread_db_get_tls_address().
|
static |
Definition at line 369 of file thread-db.c.
References attach_thread(), find_lwp_pid(), pid_to_ptid(), and td_thrinfo::ti_lid.
Referenced by find_new_threads_callback().
|
static |
Definition at line 940 of file thread-db.c.
References current_thread, delete_breakpoint(), process_info::priv, switch_to_process(), thread_db::td_create_bp, and process_info_private::thread_db.
Referenced by thread_db_detach().
|
static |
Definition at line 896 of file thread-db.c.
References all_threads, any_thread_of(), current_thread, find_inferior(), and pid_of.
Referenced by disable_thread_event_reporting(), and remove_thread_event_breakpoints().
|
static |
Definition at line 188 of file thread-db.c.
References current_process(), current_thread, debug_printf(), debug_threads, thread_info::entry, find_new_threads_callback(), find_one_thread(), gdb_assert, get_thread_lwp, inferior_list_entry::id, process_info::priv, TD_OK, thread_db::td_ta_event_getmsg_p, td_event_msg::th_p, thread_db::thread_agent, process_info_private::thread_db, and thread_db_err_str().
Referenced by thread_db_enable_reporting().
void thread_db_detach | ( | struct process_info * | proc | ) |
Definition at line 958 of file thread-db.c.
References disable_thread_event_reporting(), process_info::priv, remove_thread_event_breakpoints(), and process_info_private::thread_db.
Referenced by linux_detach().
|
static |
Definition at line 224 of file thread-db.c.
References td_notify::bptaddr, current_process(), process_info::priv, set_breakpoint_at(), TD_CREATE, thread_db::td_create_bp, td_event_addset, td_event_emptyset, TD_OK, thread_db::td_ta_event_addr_p, thread_db::td_ta_event_getmsg_p, thread_db::td_ta_set_event_p, thread_db::thread_agent, process_info_private::thread_db, thread_db_create_event(), thread_db_err_str(), td_notify::u, and warning().
Referenced by thread_db_init().
|
static |
Definition at line 102 of file thread-db.c.
References TD_BADKEY, TD_BADPH, TD_BADSH, TD_BADTA, TD_BADTH, TD_DBERR, TD_ERR, TD_MALLOC, TD_NOAPLIC, TD_NOCAPAB, TD_NOEVENT, TD_NOFPREGS, TD_NOLIBTHREAD, TD_NOLWP, TD_NOMSG, TD_NOSV, TD_NOTHR, TD_NOTSD, TD_NOXREGS, TD_OK, TD_PARTIALREG, TD_VERSION, and xsnprintf().
Referenced by attach_thread(), find_new_threads_callback(), find_one_thread(), thread_db_create_event(), thread_db_enable_reporting(), thread_db_find_new_threads(), and try_thread_db_load_1().
|
static |
Definition at line 427 of file thread-db.c.
References current_process(), current_ptid, debug_printf(), debug_threads, error(), find_new_threads_callback(), find_one_thread(), process_info::priv, TD_OK, TD_SIGNO_MASK, thread_db::td_ta_thr_iter_p, TD_THR_ANY_STATE, TD_THR_ANY_USER_FLAGS, TD_THR_LOWEST_PRIORITY, thread_db::thread_agent, process_info_private::thread_db, and thread_db_err_str().
Referenced by thread_db_init().
int thread_db_get_tls_address | ( | struct thread_info * | thread, |
CORE_ADDR | offset, | ||
CORE_ADDR | load_module, | ||
CORE_ADDR * | address | ||
) |
Definition at line 504 of file thread-db.c.
References thread_db::all_symbols_looked_up, current_thread, thread_info::entry, find_one_thread(), get_thread_lwp, get_thread_process(), inferior_list_entry::id, process_info::priv, TD_ERR, TD_NOTHR, TD_OK, thread_db::td_thr_tls_get_addr_p, thread_db::td_thr_tlsbase_p, and process_info_private::thread_db.
int thread_db_handle_monitor_command | ( | char * | mon | ) |
Definition at line 1001 of file thread-db.c.
References LIBTHREAD_DB_SEARCH_PATH, libthread_db_search_path, monitor_output(), and xstrdup().
int thread_db_init | ( | int | use_events | ) |
Definition at line 836 of file thread-db.c.
References current_process(), linux_proc_task_list_dir_exists(), pid_of, thread_db_enable_reporting(), thread_db_find_new_threads(), thread_db_load_search(), thread_db_look_up_symbols(), thread_db_mourn(), and thread_db_use_events.
Referenced by linux_look_up_symbols().
|
static |
Definition at line 783 of file thread-db.c.
References debug_printf(), debug_threads, free_char_ptr_vec(), LIBTHREAD_DB_SEARCH_PATH, libthread_db_search_path, try_thread_db_load_from_dir(), try_thread_db_load_from_sdir(), VEC, VEC_iterate, and xstrdup().
Referenced by thread_db_init().
int thread_db_look_up_one_symbol | ( | const char * | name, |
CORE_ADDR * | addrp | ||
) |
Definition at line 490 of file thread-db.c.
References thread_db::all_symbols_looked_up, current_process(), look_up_one_symbol(), process_info::priv, and process_info_private::thread_db.
Referenced by ps_pglobal_lookup().
|
static |
Definition at line 475 of file thread-db.c.
References thread_db::all_symbols_looked_up, current_process(), look_up_one_symbol(), process_info::priv, thread_db::td_symbol_list_p, and process_info_private::thread_db.
Referenced by thread_db_init().
void thread_db_mourn | ( | struct process_info * | proc | ) |
Definition at line 972 of file thread-db.c.
References thread_db::handle, process_info::priv, td_ta_delete(), thread_db::thread_agent, and process_info_private::thread_db.
Referenced by linux_mourn(), and thread_db_init().
|
static |
Definition at line 701 of file thread-db.c.
References debug_printf(), debug_threads, td_init(), and try_thread_db_load_1().
Referenced by try_thread_db_load_from_dir(), and try_thread_db_load_from_sdir().
|
static |
Definition at line 615 of file thread-db.c.
References CHK, current_process(), debug_printf(), debug_threads, gdb_assert, thread_db::handle, process_info::priv, thread_db::proc_handle, TD_OK, thread_db::td_symbol_list_p, thread_db::td_ta_event_addr_p, thread_db::td_ta_event_getmsg_p, thread_db::td_ta_map_lwp2thr_p, thread_db::td_ta_new_p, thread_db::td_ta_set_event_p, thread_db::td_ta_thr_iter_p, thread_db::td_thr_event_enable_p, thread_db::td_thr_get_info_p, thread_db::td_thr_tls_get_addr_p, thread_db::td_thr_tlsbase_p, thread_db::thread_agent, process_info_private::thread_db, thread_db_err_str(), thread_db_use_events, and xcalloc().
Referenced by try_thread_db_load().
|
static |
Definition at line 756 of file thread-db.c.
References _, LIBTHREAD_DB_SO, try_thread_db_load(), warning(), and xmalloc().
Referenced by thread_db_load_search().
|
static |
Definition at line 747 of file thread-db.c.
References LIBTHREAD_DB_SO, and try_thread_db_load().
Referenced by thread_db_load_search().
int debug_threads |
Definition at line 24 of file debug.c.
Referenced by add_insns(), attach_proc_task_lwp_callback(), attach_thread(), captured_main(), check_stopped_by_breakpoint(), check_zombie_leaders(), complete_ongoing_step_over(), delete_fast_tracepoint_jump(), delete_lwp(), delete_raw_breakpoint(), dequeue_one_deferred_signal(), enqueue_one_deferred_signal(), find_new_threads_callback(), find_one_thread(), finish_step_over(), gdb_no_commands_at_breakpoint_z_type(), get_detach_signal(), get_pc(), handle_extended_wait(), handle_monitor_command(), handle_serial_event(), handle_target_event(), handle_tracepoint_bkpts(), handle_tracepoints(), insert_memory_breakpoint(), kill_one_lwp_callback(), kill_wait_lwp(), linux_async(), linux_attach_lwp(), linux_debug(), linux_detach_one_lwp(), linux_kill(), linux_kill_one_lwp(), linux_low_filter_event(), linux_resume(), linux_resume_one_lwp_throw(), linux_resume_one_thread(), linux_set_resume_request(), linux_stabilize_threads(), linux_wait_1(), linux_wait_for_event_filtered(), linux_write_memory(), linux_xfer_siginfo(), lwp_suspended_inc(), lynx_debug(), lynx_ptrace(), m32r_get_pc(), maybe_move_out_of_jump_pad(), move_out_of_jump_pad_callback(), need_step_over_p(), nto_trace(), 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(), remove_memory_breakpoint(), resume_stopped_resumed_lwps(), select_event_lwp(), send_sigstop(), set_fast_tracepoint_jump(), set_raw_breakpoint_at(), sigchld_handler(), start_inferior(), start_step_over(), stop_all_lwps(), thread_db_create_event(), thread_db_find_new_threads(), thread_db_load_search(), thread_still_has_status_pending_p(), 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().
|
static |
Definition at line 96 of file thread-db.c.
Referenced by thread_db_handle_monitor_command(), and thread_db_load_search().
|
static |
Definition at line 27 of file thread-db.c.
Referenced by attach_thread(), find_one_thread(), thread_db_init(), and try_thread_db_load_1().