GDBserver
Classes | Macros | Functions | Variables
thread-db.c File Reference
#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)
 

Functions

static int find_one_thread (ptid_t)
 
static int find_new_threads_callback (const td_thrhandle_t *th_p, void *data)
 
static const char * thread_db_err_str (td_err_e err)
 
static int thread_db_create_event (CORE_ADDR where)
 
static int thread_db_enable_reporting (void)
 
static int attach_thread (const td_thrhandle_t *th_p, td_thrinfo_t *ti_p)
 
static int maybe_attach_thread (const td_thrhandle_t *th_p, td_thrinfo_t *ti_p, int *counter)
 
static void thread_db_find_new_threads (void)
 
static void thread_db_look_up_symbols (void)
 
int thread_db_look_up_one_symbol (const char *name, CORE_ADDR *addrp)
 
int thread_db_get_tls_address (struct thread_info *thread, CORE_ADDR offset, CORE_ADDR load_module, CORE_ADDR *address)
 
static int try_thread_db_load_1 (void *handle)
 
static int try_thread_db_load (const char *library)
 
static int try_thread_db_load_from_sdir (void)
 
static int try_thread_db_load_from_dir (const char *dir, size_t dir_len)
 
static int thread_db_load_search (void)
 
int thread_db_init (int use_events)
 
static int any_thread_of (struct inferior_list_entry *entry, void *args)
 
static void switch_to_process (struct process_info *proc)
 
static void disable_thread_event_reporting (struct process_info *proc)
 
static void remove_thread_event_breakpoints (struct process_info *proc)
 
void thread_db_detach (struct process_info *proc)
 
void thread_db_mourn (struct process_info *proc)
 
int thread_db_handle_monitor_command (char *mon)
 

Variables

int debug_threads
 
static int thread_db_use_events
 
static char * libthread_db_search_path
 

Macro Definition Documentation

#define CHK (   required,
 
)
Value:
do \
{ \
if ((a) == NULL) \
{ \
debug_printf ("dlsym: %s\n", dlerror ()); \
if (required) \
{ \
free (tdb); \
proc->priv->thread_db = NULL; \
return 0; \
} \
} \
} \
while (0)
int required
Definition: tracepoint.c:180
int debug_threads
Definition: debug.c:24

Referenced by try_thread_db_load_1().

Function Documentation

static int any_thread_of ( struct inferior_list_entry entry,
void *  args 
)
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 int attach_thread ( const td_thrhandle_t th_p,
td_thrinfo_t ti_p 
)
static
static void disable_thread_event_reporting ( struct process_info proc)
static
static int find_new_threads_callback ( const td_thrhandle_t th_p,
void *  data 
)
static
static int find_one_thread ( ptid_t  ptid)
static
static int maybe_attach_thread ( const td_thrhandle_t th_p,
td_thrinfo_t ti_p,
int *  counter 
)
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 void remove_thread_event_breakpoints ( struct process_info proc)
static
static void switch_to_process ( struct process_info proc)
static
static int thread_db_create_event ( CORE_ADDR  where)
static
void thread_db_detach ( struct process_info proc)
static int thread_db_enable_reporting ( void  )
static
static const char* thread_db_err_str ( td_err_e  err)
static
static void thread_db_find_new_threads ( void  )
static
int thread_db_get_tls_address ( struct thread_info thread,
CORE_ADDR  offset,
CORE_ADDR  load_module,
CORE_ADDR address 
)
int thread_db_handle_monitor_command ( char *  mon)
int thread_db_init ( int  use_events)
static int thread_db_load_search ( void  )
static
int thread_db_look_up_one_symbol ( const char *  name,
CORE_ADDR addrp 
)
static void thread_db_look_up_symbols ( void  )
static
void thread_db_mourn ( struct process_info proc)
static int try_thread_db_load ( const char *  library)
static
static int try_thread_db_load_1 ( void *  handle)
static
static int try_thread_db_load_from_dir ( const char *  dir,
size_t  dir_len 
)
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 int try_thread_db_load_from_sdir ( void  )
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().

Variable Documentation

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().

char* libthread_db_search_path
static

Definition at line 96 of file thread-db.c.

Referenced by thread_db_handle_monitor_command(), and thread_db_load_search().

int thread_db_use_events
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().