GDB (xrefs)
Classes | Macros | Functions | Variables
agent.c File Reference
#include "common-defs.h"
#include "target/target.h"
#include "common/symbol.h"
#include <unistd.h>
#include "agent.h"
#include "filestuff.h"
#include <sys/socket.h>
#include <sys/un.h>

Go to the source code of this file.

Classes

struct  ipa_sym_addresses
 

Macros

#define DEBUG_AGENT   debug_agent_printf
 
#define SOCK_DIR   P_tmpdir
 
#define UNIX_PATH_MAX   sizeof(((struct sockaddr_un *) NULL)->sun_path)
 

Functions

static void ATTRIBUTE_PRINTF (1, 2)
 
int agent_loaded_p (void)
 
int agent_look_up_symbols (void *arg)
 
static unsigned int agent_get_helper_thread_id (void)
 
static int gdb_connect_sync_socket (int pid)
 
int agent_run_command (int pid, const char *cmd, int len)
 
int agent_capability_check (enum agent_capa agent_capa)
 
void agent_capability_invalidate (void)
 

Variables

int debug_agent = 0
 
int use_agent = 0
 
static uint32_t helper_thread_id = 0
 
struct {
   const char *   name
 
   int   offset
 
   int   required
 
symbol_list []
 
static struct ipa_sym_addresses ipa_sym_addrs
 
static int all_agent_symbols_looked_up = 0
 
static uint32_t agent_capability = 0
 

Macro Definition Documentation

#define DEBUG_AGENT   debug_agent_printf

Definition at line 43 of file agent.c.

Referenced by agent_look_up_symbols(), and agent_run_command().

#define SOCK_DIR   P_tmpdir

Definition at line 126 of file agent.c.

#define UNIX_PATH_MAX   sizeof(((struct sockaddr_un *) NULL)->sun_path)

Definition at line 129 of file agent.c.

Referenced by gdb_connect_sync_socket().

Function Documentation

int agent_capability_check ( enum agent_capa agent_capa  )
void agent_capability_invalidate ( void  )

Definition at line 278 of file agent.c.

References agent_capability.

Referenced by target_pre_inferior().

static unsigned int agent_get_helper_thread_id ( void  )
static
int agent_loaded_p ( void  )

Definition at line 78 of file agent.c.

References all_agent_symbols_looked_up.

Referenced by agent_new_objfile(), inf_child_can_use_agent(), and inf_child_use_agent().

int agent_look_up_symbols ( void *  arg)
int agent_run_command ( int  pid,
const char *  cmd,
int  len 
)
static void ATTRIBUTE_PRINTF ( ,
 
)
static

Definition at line 31 of file agent.c.

References debug_agent, and debug_vprintf().

static int gdb_connect_sync_socket ( int  pid)
static

Definition at line 138 of file agent.c.

References _, gdb_socket_cloexec(), UNIX_PATH_MAX, warning(), and xsnprintf().

Referenced by agent_run_command().

Variable Documentation

uint32_t agent_capability = 0
static

Definition at line 258 of file agent.c.

Referenced by agent_capability_check(), and agent_capability_invalidate().

int all_agent_symbols_looked_up = 0
static

Definition at line 75 of file agent.c.

Referenced by agent_loaded_p(), and agent_look_up_symbols().

int debug_agent = 0

Definition at line 27 of file agent.c.

Referenced by ATTRIBUTE_PRINTF().

uint32_t helper_thread_id = 0
static

Definition at line 60 of file agent.c.

Referenced by agent_get_helper_thread_id().

struct ipa_sym_addresses ipa_sym_addrs
static
const char* name

Definition at line 64 of file agent.c.

Referenced by agent_look_up_symbols().

int offset

Definition at line 65 of file agent.c.

Referenced by _initialize_amd64fbsd_nat(), _initialize_i386bsd_nat(), aarch64_align_watchpoint(), aarch64_analyze_prologue(), aarch64_record_load_store(), aarch64_software_single_step(), abbrev_table_read_table(), ada_value_primitive_packed_val(), add_bincl_to_list(), add_piece(), alpha_next_pc(), alpha_push_dummy_call(), alpha_sigtramp_frame_this_id(), alpha_skip_prologue(), amd64_analyze_stack_align(), amd64_collect_native_gregset(), amd64_push_arguments(), amd64_relocate_instruction(), amd64_return_value(), amd64_skip_xmm_prologue(), amd64_supply_native_gregset(), amd64_windows_skip_trampoline_code(), amd64_x32_analyze_stack_align(), amd64obsd_collect_uthread(), amd64obsd_sigcontext_addr(), amd64obsd_supply_uthread(), arm_analyze_prologue(), arm_copy_b_bl_blx(), arm_displaced_init_closure(), arm_exidx_fill_cache(), arm_get_next_pc_raw(), arm_neon_quad_read(), arm_neon_quad_write(), arm_pseudo_read(), arm_pseudo_write(), arm_scan_prologue(), arm_skip_stack_protector(), arm_skip_stub(), arm_stap_parse_special_token(), arm_wince_skip_main_prologue(), attr_to_dynamic_prop(), bsd_uthread_extra_thread_info(), bsd_uthread_thread_alive(), bsd_uthread_update_thread_list(), build_gdb_vtable_type(), build_std_type_info_type(), c_val_print(), cleanup_block_store_pc(), coff_symtab_read(), collect_symbol(), compute_stack_depth_worker(), cond_offset_host(), cond_offset_target(), core_xfer_partial(), cp_print_value(), create_cus_from_index_list(), create_debug_types_hash_table(), create_dwo_cu_reader(), create_dwo_unit_in_dwp_v2(), create_dwp_v2_section(), create_signatured_type_table_from_index(), ctf_save_align_write(), ctf_save_fseek(), darwin_read_write_inferior(), disassemble_dwarf_expression(), do_compile_dwarf_expr_to_c(), do_ppc_sysv_return_value(), do_search_struct_field(), dsbt_relocate_main_executable(), dump_insns(), dwarf2_add_field(), dwarf2_add_member_fn(), dwarf2_compile_expr_to_ax(), dwarf2_fetch_die_loc_cu_off(), dwarf2_fetch_die_loc_sect_off(), dwarf2_frame_find_fde(), dwarf2_ranges_read(), dwarf2_record_block_ranges(), dwarf_block_to_dwarf_reg_deref(), dwarf_decode_line_header(), dwarf_decode_macro_bytes(), dwarf_decode_macros(), dynamic_cast_check_1(), dynamic_cast_check_2(), efpr_pseudo_register_read(), efpr_pseudo_register_write(), eight_bit_offset_branch_op(), elf_symtab_read(), execute_cfa_program(), execute_code(), execute_l32e(), execute_s32e(), execute_stack_op(), f_val_print(), fetch_altivec_register(), fetch_register(), fill_vrregset(), find_linenos(), find_method_list(), find_partial_die_in_comp_unit(), find_step_target(), fixup_section(), follow_die_offset(), follow_die_ref(), frv_analyze_prologue(), frv_relocate_main_executable(), ft32_analyze_prologue(), gcore_copy_callback(), gdbscm_arch_disassemble(), gdbscm_print_insn_from_port(), gen_bitfield_ref(), gen_expr(), get_cr3(), get_die_type_at_offset(), get_frame_register_bytes(), gnu_find_memory_regions(), gnu_write_inferior(), h8300_analyze_prologue(), h8300_push_dummy_call(), heuristic_proc_start(), hppa64_push_dummy_call(), hppa64_return_value(), hppa_frame_cache(), hppa_match_insns_relaxed(), hppaobsd_supply_gregset(), i386_analyze_register_saves(), i386_analyze_stack_align(), i386_relocate_instruction(), i386_stap_parse_special_token_three_arg_disp(), i386bsd_collect_gregset(), i386bsd_supply_gregset(), i386nto_regset_fill(), i386obsd_collect_uthread(), i386obsd_sigtramp_p(), i386obsd_supply_uthread(), ia64_extract_return_value(), ia64_linux_xfer_partial(), ia64_store_return_value(), inf_ptrace_xfer_partial(), init_lineno(), init_regcache_descr(), insert_into_bit_range_vector(), install_b_bl_blx(), ioscm_lseek_address(), iq2000_scan_prologue(), is_unique_ancestor(), ld_so_xfer_auxv(), linespec_parse_variable(), linux_common_xfer_osdata(), linux_find_memory_regions_full(), linux_gdb_signal_from_target(), linux_gdb_signal_to_target(), linux_info_proc(), linux_xfer_osdata_cpus(), linux_xfer_osdata_fds(), linux_xfer_osdata_isockets(), linux_xfer_osdata_modules(), linux_xfer_osdata_msg(), linux_xfer_osdata_processes(), linux_xfer_osdata_processgroups(), linux_xfer_osdata_sem(), linux_xfer_osdata_shm(), linux_xfer_osdata_threads(), locexpr_describe_location_1(), locexpr_describe_location_piece(), lookup_die_type(), lval_func_read(), lval_func_write(), lzma_open(), m32c_part_read(), m32c_part_write(), m68k_analyze_register_saves(), m68k_push_dummy_call(), m88k_analyze_prologue(), macho_symfile_read(), map_regcache_remote_table(), mark_common_block_symbol_computed(), mem_bfd_iovec_pread(), mep_analyze_prologue(), mep_extract_return_value(), mep_store_return_value(), mi_cmd_data_read_memory(), mi_cmd_data_read_memory_bytes(), mi_cmd_data_write_memory(), microblaze_linux_sigtramp_cache(), micromips_scan_prologue(), micromips_stack_frame_destroyed_p(), mips16_get_imm(), mips16_scan_prologue(), mips32_scan_prologue(), mips_eabi_return_value(), mips_gdb_signal_from_target(), mips_gdb_signal_to_target(), mips_n32n64_return_value(), mips_o32_return_value(), mips_o64_return_value(), mips_read_fp_register_single(), mips_register_to_value(), moxie_analyze_prologue(), moxie_process_record(), msp430_push_dummy_call(), msp430_return_value(), mt_frame_unwind_cache(), nios2_analyze_prologue(), pascal_object_print_value(), pc_in_unmapped_range(), ppc64_sysv_abi_push_freg(), ppc64_sysv_abi_push_val(), ppc64_sysv_abi_return_value(), ppc64_sysv_abi_return_value_base(), ppc_collect_fpregset(), ppc_collect_gregset(), ppc_collect_vrregset(), ppc_displaced_step_fixup(), ppc_linux_sigtramp_cache(), ppc_supply_fpregset(), ppc_supply_gregset(), ppc_supply_vrregset(), ppcfbsd_sigtramp_frame_sniffer(), ppcobsd_sigtramp_frame_sniffer(), print_address_symbolic(), process_imported_unit_die(), process_linenos(), procfs_meminfo(), pstring_list(), put_frame_register_bytes(), pv_area_fetch(), pv_area_store(), pv_is_array_ref(), ranges_contain(), read_call_site_scope(), read_comp_units_from_section(), read_encoded_value(), read_frame_register_value(), read_full_die_1(), read_namespace_alias(), read_offset(), read_pieced_value(), record_full_core_xfer_partial(), remote_file_get(), remote_file_put(), remote_fileio_func_lseek(), remote_hostio_pread(), remote_hostio_pread_from_cache(), remote_trace_set_readonly_regions(), rl78_return_value(), rs6000_aix_ld_info_to_xml(), rs6000_xfer_partial(), rx_return_value(), s390_check_for_saved(), s390_store(), score_return_value(), search_struct_method(), section_table_read_available_memory(), section_table_xfer_memory_partial(), set_reg_offset(), set_section_command(), set_value_offset(), sh64_extract_return_value(), sh64_pseudo_register_read(), sh64_pseudo_register_write(), sh64_store_return_value(), sh_analyze_prologue(), sh_extract_return_value_nofpu(), show_commands(), sixteen_bit_offset_branch_op(), skip_prologue(), solib_target_relocate_section_addresses(), source_section_scripts(), sparc32_collect_gregset(), sparc32_supply_gregset(), sparc64_collect_gregset(), sparc64_supply_gregset(), sparc64obsd_pc_in_sigtramp(), sparc_analyze_control_transfer(), sparc_analyze_prologue(), sparc_collect_rwindow(), sparc_supply_rwindow(), spu_software_single_step(), store_altivec_register(), supply_vrregset(), sym_info(), target_read_string(), tfile_fetch_registers(), tfile_trace_find(), thumb2_copy_b_bl_blx(), thumb_analyze_prologue(), thumb_copy_b(), thumb_deal_with_atomic_sequence_raw(), thumb_get_next_pc_raw(), tic6x_analyze_prologue(), tilegx_analyze_prologue(), trace_save(), tui_horizontal_source_scroll(), tui_set_disassem_content(), tui_set_source_content(), unpack_mips16(), v850_handle_prepare(), v850_handle_pushm(), value_assign(), value_virtual_fn_field(), VEC(), windows_core_xfer_shared_libraries(), windows_xfer_shared_libraries(), write_pieced_value(), xcoff_get_core_n_import_files(), xml_builtin_xfer_partial(), xml_fetch_content_from_file(), xstormy16_analyze_prologue(), xtensa_extract_return_value(), xtensa_linux_gdb_signal_from_target(), xtensa_linux_gdb_signal_to_target(), xtensa_push_dummy_call(), and xtensa_store_return_value().

int required

Definition at line 66 of file agent.c.

Referenced by get_core_registers_cb().

struct { ... } symbol_list[]
Initial value:
= {
IPA_SYM(cmd_buf),
IPA_SYM(capability),
}
#define IPA_SYM(SYM)
Definition: agent.h:27
static uint32_t helper_thread_id
Definition: agent.c:60

Referenced by agent_look_up_symbols().

int use_agent = 0

Definition at line 46 of file agent.c.

Referenced by inf_child_use_agent(), and remote_use_agent().