GDB (xrefs)
|
#include "defs.h"
#include "gdb_string.h"
#include <errno.h>
#include <signal.h>
#include <fcntl.h>
#include "inferior.h"
#include "symtab.h"
#include "command.h"
#include "gdbcmd.h"
#include "bfd.h"
#include "target.h"
#include "gdbcore.h"
#include "dis-asm.h"
#include "gdb_stat.h"
#include "completer.h"
#include "exceptions.h"
#include "observer.h"
#include "cli/cli-utils.h"
Go to the source code of this file.
typedef void(* hook_type)(char *) |
Definition at line 53 of file corefile.c.
void _initialize_core | ( | void | ) |
static void call_extra_exec_file_hooks | ( | char * | filename | ) | [static] |
Definition at line 90 of file corefile.c.
References exec_file_extra_hooks, and exec_file_hook_count.
Referenced by specify_exec_file_hook().
void core_file_command | ( | char * | filename, |
int | from_tty | ||
) |
Definition at line 72 of file corefile.c.
References dont_repeat(), gdb_assert, target_ops::to_detach, and target_ops::to_open.
Referenced by captured_main(), and cmd_record_full_restore().
static int do_captured_read_memory_integer | ( | void * | data | ) | [static] |
Definition at line 300 of file corefile.c.
References captured_read_memory_integer_arguments::byte_order, len, captured_read_memory_integer_arguments::len, memaddr, captured_read_memory_integer_arguments::memaddr, read_memory_integer(), and captured_read_memory_integer_arguments::result.
Referenced by safe_read_memory_integer().
char* get_exec_file | ( | int | err | ) |
Definition at line 183 of file corefile.c.
References _, error(), and exec_filename.
Referenced by attach_command_post_wait(), bsd_kvm_open(), darwin_attach(), darwin_detach(), extended_remote_attach_1(), fbsd_make_corefile_notes(), fork_inferior(), gnu_attach(), gnu_detach(), go32_create_inferior(), inf_ptrace_attach(), inf_ptrace_detach(), load_command(), m32r_load(), m32r_upload_command(), procfs_attach(), procfs_create_inferior(), procfs_detach(), remote_detach_1(), run_command_1(), spu_child_post_attach(), windows_attach(), and windows_detach().
void memory_error | ( | enum target_xfer_error | err, |
CORE_ADDR | memaddr | ||
) |
Definition at line 221 of file corefile.c.
References make_cleanup(), MEMORY_ERROR, memory_error_message(), NOT_AVAILABLE_ERROR, target_gdbarch(), TARGET_XFER_E_IO, TARGET_XFER_E_UNAVAILABLE, throw_error(), and xfree().
Referenced by alpha_read_insn(), c_get_string(), dis_asm_memory_error(), get_target_memory(), mips_fetch_instruction(), read_memory(), read_stack(), tilegx_analyze_prologue(), and write_memory().
char* memory_error_message | ( | enum target_xfer_error | err, |
struct gdbarch * | gdbarch, | ||
CORE_ADDR | memaddr | ||
) |
Definition at line 197 of file corefile.c.
References _, internal_error(), paddress(), plongest(), TARGET_XFER_E_IO, TARGET_XFER_E_UNAVAILABLE, target_xfer_error_to_string(), and xstrprintf().
Referenced by insert_bp_location(), memory_error(), and val_print_string().
void read_memory | ( | CORE_ADDR | memaddr, |
gdb_byte * | myaddr, | ||
ssize_t | len | ||
) |
Definition at line 247 of file corefile.c.
References target_ops::beneath, current_target, LONGEST, memory_error(), QUIT, TARGET_OBJECT_MEMORY, TARGET_XFER_E_IO, and target_xfer_partial().
Referenced by ada_value_assign(), ada_value_primitive_packed_val(), alpha_extract_return_value(), alpha_return_value(), amd64_analyze_prologue(), amd64_darwin_sigcontext_addr(), amd64_displaced_step_copy_insn(), amd64_relocate_instruction(), amd64_return_value(), amd64_windows_return_value(), amd64fbsd_supply_uthread(), amd64obsd_supply_pcb(), amd64obsd_supply_uthread(), avr_frame_prev_register(), avr_scan_prologue(), displaced_step_fixup(), dump_memory_to_file(), dwarf_expr_read_mem(), evaluate_subexp_java(), extract_call_winsize(), fetch_lm_info(), get_frame_memory(), get_java_utf8_name(), get_running_thread_id(), h8300h_return_value(), hppa_hpux_search_pattern(), i386_darwin_sigcontext_addr(), i386_darwin_sstep_at_sigreturn(), i386_displaced_step_copy_insn(), i386_linux_resume(), i386_linux_sigcontext_addr(), i386_relocate_instruction(), i386_return_value(), i386_skip_probe(), i386fbsd_supply_uthread(), i386nbsd_supply_pcb(), i386obsd_supply_pcb(), i386obsd_supply_uthread(), ia64_frame_prev_register(), ia64_hpux_at_dld_breakpoint_1_p(), ia64_hpux_handle_load_event(), ia64_hpux_solib_create_inferior_hook(), ia64_linux_sigcontext_register_address(), ia64_sigtramp_frame_prev_register(), infpy_read_memory(), iq2000_extract_return_value(), irix_current_sos(), irix_open_symbol_file_object(), java_value_print(), link_map_start(), lm32_extract_return_value(), m32c_return_value(), m68k_return_value(), m68k_svr4_return_value(), m68kbsd_supply_pcb(), mep_get_insn(), mep_return_value(), mips_linux_in_dynsym_stub(), mt_return_value(), open_symbol_file_object(), pascal_val_print(), ppcnbsd_supply_pcb(), ppcobsd_supply_pcb(), print_it_exception(), print_object_command(), printf_c_string(), printf_wide_c_string(), read_fat_string_value(), read_known_tasks_array(), read_known_tasks_list(), read_mem(), read_memory_integer(), read_memory_string(), read_memory_typed_address(), read_memory_unsigned_integer(), read_target_long_array(), read_value_memory(), resume(), simple_displaced_step_copy_insn(), som_current_sos(), som_open_symbol_file_object(), sparc32_return_value(), sparc64nbsd_supply_pcb(), spu_get_overlay_table(), supply_register_at_address(), value_assign(), vax_return_value(), write_pieced_value(), and xtensa_push_dummy_call().
LONGEST read_memory_integer | ( | CORE_ADDR | memaddr, |
int | len, | ||
enum bfd_endian | byte_order | ||
) |
Definition at line 338 of file corefile.c.
References extract_signed_integer(), LONGEST, and read_memory().
Referenced by alpha_osf1_sigcontext_addr(), bfin_push_dummy_call(), bl_to_blrl_insn_p(), call0_frame_cache(), call0_track_op(), do_captured_read_memory_integer(), examine_prologue(), get_frame_memory_signed(), h8300_analyze_prologue(), h8300_is_argument_spill(), hppa32_hpux_in_solib_call_trampoline(), hppa64_hpux_in_solib_call_trampoline(), hppa_hpux_in_solib_return_trampoline(), hppa_hpux_skip_trampoline_code(), hppa_hpux_unwind_adjust_stub(), i386_analyze_frame_setup(), i386_follow_jump(), i386obsd_supply_pcb(), ia64_frame_prev_register(), ia64_pseudo_register_read(), ia64_pseudo_register_write(), lm32_analyze_prologue(), look_for_args_moves(), m68k_analyze_frame_setup(), moxie_analyze_prologue(), msp430_skip_trampoline_code(), ppc_deal_with_atomic_sequence(), print_frame_nameless_args(), rs6000_skip_trampoline_code(), rs6000_software_single_step(), s390_load(), sh64_analyze_prologue(), sh64_skip_prologue_hard_way(), sh_analyze_prologue(), simple_read_overlay_table(), sixteen_bit_offset_branch_op(), skip_prologue(), v850_analyze_prologue(), xtensa_frame_cache(), and xtensa_window_interrupt_insn().
void read_memory_string | ( | CORE_ADDR | memaddr, |
char * | buffer, | ||
int | max_len | ||
) |
Definition at line 358 of file corefile.c.
References read_memory().
Referenced by ada_tag_name_from_tsd(), and ia64_hpux_handle_load_event().
CORE_ADDR read_memory_typed_address | ( | CORE_ADDR | addr, |
struct type * | type | ||
) |
Definition at line 385 of file corefile.c.
References extract_typed_address(), read_memory(), and TYPE_LENGTH.
Referenced by bsd_uthread_read_memory_address(), hppa32_convert_from_func_ptr_addr(), hppa_skip_trampoline_code(), ia64_hpux_get_load_info_addr(), solib_svr4_r_brk(), solib_svr4_r_ldsomap(), and solib_svr4_r_map().
ULONGEST read_memory_unsigned_integer | ( | CORE_ADDR | memaddr, |
int | len, | ||
enum bfd_endian | byte_order | ||
) |
Definition at line 348 of file corefile.c.
References extract_unsigned_integer(), read_memory(), and ULONGEST.
Referenced by aarch64_analyze_prologue(), amd64_analyze_prologue(), amd64_displaced_step_fixup(), amd64_windows_skip_trampoline_code(), amd64obsd_collect_uthread(), amd64obsd_supply_uthread(), amd64obsd_trapframe_cache(), append_ocl_sos(), arm_analyze_load_stack_chk_guard(), arm_analyze_prologue(), arm_deal_with_atomic_sequence_raw(), arm_get_next_pc_raw(), arm_in_function_epilogue_p(), arm_linux_get_syscall_number(), arm_linux_rt_sigreturn_init(), arm_linux_sigreturn_init(), arm_linux_syscall_next_pc(), arm_pe_skip_trampoline_code(), arm_process_displaced_insn(), arm_skip_prologue(), arm_skip_stack_protector(), arm_wince_skip_main_prologue(), bfin_breakpoint_from_pc(), bfin_skip_prologue(), branch_dest(), bsd_uthread_check_magic(), bsd_uthread_extra_thread_info(), bsd_uthread_lookup_offset(), bsd_uthread_thread_alive(), cleanup_block_load_all(), cleanup_block_store_pc(), cris_scan_prologue(), decode_prologue(), dip_prefix(), execute_l32e(), find_implementation_from_class(), find_step_target(), get_data_from_address(), get_frame_memory_unsigned(), h8300_analyze_prologue(), h8300_extract_return_value(), h8300_is_argument_spill(), hppa_fallback_frame_cache(), hppa_hpux_sigtramp_frame_unwind_cache(), i386_analyze_frame_setup(), i386_darwin_sstep_at_sigreturn(), i386_displaced_step_fixup(), i386_fetch_pointer_argument(), i386_follow_jump(), i386_linux_resume(), i386_pe_skip_trampoline_code(), i386_skip_prologue(), i386_svr4_sigcontext_addr(), i386bsd_sigcontext_addr(), i386nbsd_sigtramp_cache_init(), i386obsd_collect_uthread(), i386obsd_supply_uthread(), i386obsd_trapframe_cache(), ia64_convert_from_func_ptr_addr(), iq2000_scan_prologue(), m32c_skip_trampoline_code(), m68hc11_analyze_instruction(), m68k_analyze_frame_setup(), m68k_analyze_prologue(), m68k_analyze_register_saves(), m68k_linux_get_sigtramp_info(), m88k_fetch_instruction(), move_mem_to_reg_movem_op(), moxie_analyze_prologue(), mt_skip_prologue(), nios2_analyze_prologue(), nios2_fetch_instruction(), nios2_in_epilogue_p(), nios2_match_sequence(), none_reg_mode_jump_op(), ppc64_desc_entry_point(), ppc64_sysv_abi_push_dummy_call(), ppc_linux_sigtramp_cache(), ppc_skip_trampoline_code(), read_insn(), read_objc_class(), read_objc_methlist_nmethods(), read_objc_method(), read_objc_object(), read_objc_super(), rs6000_convert_from_func_ptr_addr(), rs6000_frame_cache(), rs6000_skip_trampoline_code(), s390_backchain_frame_unwind_cache(), s390_sigtramp_frame_unwind_cache(), sh64_frame_prev_register(), sh_analyze_prologue(), sh_in_function_epilogue_p(), skip_prologue_function(), solib_svr4_r_ldsomap(), sparc32_linux_step_trap(), sparc32_return_value(), sparc32obsd_supply_uthread(), sparc64_linux_step_trap(), sparc64obsd_supply_uthread(), spu_overlay_update_osect(), thumb_analyze_prologue(), thumb_deal_with_atomic_sequence_raw(), thumb_get_next_pc_raw(), thumb_process_displaced_insn(), tic6x_fetch_instruction(), v850_analyze_prologue(), vax_skip_prologue(), xstormy16_analyze_prologue(), and xstormy16_in_function_epilogue_p().
void read_stack | ( | CORE_ADDR | memaddr, |
gdb_byte * | myaddr, | ||
ssize_t | len | ||
) |
Definition at line 270 of file corefile.c.
References memory_error(), exsummary::status, and target_read_stack().
Referenced by read_value_memory().
void reopen_exec_file | ( | void | ) |
Definition at line 136 of file corefile.c.
References do_cleanups(), exec_bfd, exec_bfd_mtime, exec_file_attach(), make_cleanup(), and xfree().
Referenced by attach_command_post_wait(), generic_mourn_inferior(), load_command(), remote_open_1(), and run_command_1().
int safe_read_memory_integer | ( | CORE_ADDR | memaddr, |
int | len, | ||
enum bfd_endian | byte_order, | ||
LONGEST * | return_value | ||
) |
Definition at line 318 of file corefile.c.
References captured_read_memory_integer_arguments::byte_order, catch_errors(), do_captured_read_memory_integer(), len, captured_read_memory_integer_arguments::len, memaddr, captured_read_memory_integer_arguments::memaddr, captured_read_memory_integer_arguments::result, RETURN_MASK_ALL, and exsummary::status.
Referenced by arm_exidx_unwind_sniffer(), arm_m_exception_cache(), arm_scan_prologue(), decode_prologue(), m32r_skip_prologue(), s390_backchain_frame_unwind_cache(), and spu_frame_unwind_cache().
void set_gnutarget | ( | char * | newtarget | ) |
Definition at line 501 of file corefile.c.
References set_gnutarget_command(), and xfree().
static void set_gnutarget_command | ( | char * | ignore, |
int | from_tty, | ||
struct cmd_list_element * | c | ||
) | [static] |
Definition at line 461 of file corefile.c.
References gnutarget_string, and remove_trailing_whitespace().
Referenced by set_gnutarget().
static void show_gnutarget_string | ( | struct ui_file * | file, |
int | from_tty, | ||
struct cmd_list_element * | c, | ||
const char * | value | ||
) | [static] |
Definition at line 449 of file corefile.c.
References _, and fprintf_filtered().
void specify_exec_file_hook | ( | void(*)(char *) | hook | ) |
Definition at line 102 of file corefile.c.
References call_extra_exec_file_hooks(), deprecated_exec_file_display_hook, exec_file_extra_hooks, exec_file_hook_count, hook, xmalloc(), and xrealloc().
Referenced by gdbtk_add_hooks().
void validate_files | ( | void | ) |
Definition at line 167 of file corefile.c.
References _, core_bfd, exec_bfd, and warning().
Referenced by core_open(), and exec_file_attach().
Definition at line 477 of file corefile.c.
References xrealloc().
void write_memory | ( | CORE_ADDR | memaddr, |
const bfd_byte * | myaddr, | ||
ssize_t | len | ||
) |
Definition at line 396 of file corefile.c.
References memory_error(), exsummary::status, and target_write_memory().
Referenced by aarch64_push_dummy_call(), alpha_push_dummy_call(), amd64_displaced_step_copy_insn(), amd64_push_arguments(), amd64_push_dummy_call(), amd64_windows_adjust_args_passed_by_pointer(), amd64_windows_push_arguments(), amd64_windows_push_dummy_call(), amd64fbsd_collect_uthread(), amd64obsd_collect_uthread(), arm_displaced_init_closure(), arm_push_dummy_call(), avr_push_dummy_call(), bfin_push_dummy_call(), call_function_by_hand(), cris_push_dummy_call(), ensure_lval(), find_func_descr(), frv_push_dummy_call(), h8300_push_dummy_call(), hppa32_push_dummy_call(), hppa64_push_dummy_call(), hppa_hpux_push_dummy_code(), i386_darwin_push_dummy_call(), i386_darwin_sstep_at_sigreturn(), i386_displaced_step_copy_insn(), i386_linux_resume(), i386_push_dummy_call(), i386fbsd_collect_uthread(), i386obsd_collect_uthread(), ia64_hpux_push_dummy_code(), ia64_hpux_solib_create_inferior_hook(), ia64_pseudo_register_write(), ia64_push_dummy_call(), ia64_store_argument_in_slot(), iq2000_push_dummy_call(), lm32_push_dummy_call(), m32c_push_dummy_call(), m32c_return_value(), m32r_push_dummy_call(), m68hc11_push_dummy_call(), m68k_push_dummy_call(), m88k_store_arguments(), mep_push_dummy_call(), mips_eabi_push_dummy_call(), mips_n32n64_push_dummy_call(), mips_o32_push_dummy_call(), mips_o64_push_dummy_call(), mips_push_dummy_code(), mn10300_push_dummy_call(), msp430_push_dummy_call(), mt_push_dummy_call(), mt_return_value(), nios2_push_dummy_call(), ppc64_sysv_abi_push_dummy_call(), ppc64_sysv_abi_push_float(), ppc_ravenscar_generic_store_registers(), ppc_sysv_abi_push_dummy_call(), push_large_arguments(), put_frame_register(), rl78_push_dummy_call(), rs6000_lynx178_push_dummy_call(), rs6000_push_dummy_call(), rx_push_dummy_call(), s390_push_dummy_call(), score_push_dummy_call(), sh64_push_dummy_call(), sh_push_dummy_call_fpu(), sh_push_dummy_call_nofpu(), simple_displaced_step_copy_insn(), sparc32_push_dummy_code(), sparc32_return_value(), sparc32_store_arguments(), sparc32obsd_collect_uthread(), sparc64_store_arguments(), sparc64obsd_collect_uthread(), sparc_ravenscar_store_registers(), tic6x_push_dummy_call(), tilegx_push_dummy_call(), v850_push_dummy_call(), value_coerce_to_target(), vax_push_dummy_call(), vax_store_arguments(), write_memory_ptid(), write_memory_signed_integer(), write_memory_unsigned_integer(), write_memory_with_notification(), write_pieced_value(), xstormy16_push_dummy_call(), and xtensa_push_dummy_call().
void write_memory_signed_integer | ( | CORE_ADDR | addr, |
int | len, | ||
enum bfd_endian | byte_order, | ||
LONGEST | value | ||
) |
Definition at line 432 of file corefile.c.
References store_signed_integer(), and write_memory().
Referenced by ppc64_sysv_abi_push_dummy_call(), ppc_sysv_abi_push_dummy_call(), and s390_push_dummy_call().
void write_memory_unsigned_integer | ( | CORE_ADDR | addr, |
int | len, | ||
enum bfd_endian | byte_order, | ||
ULONGEST | value | ||
) |
Definition at line 419 of file corefile.c.
References store_unsigned_integer(), and write_memory().
Referenced by amd64_displaced_step_fixup(), amd64obsd_collect_uthread(), arm_catch_kernel_helper_return(), arm_displaced_init_closure(), cleanup_block_store_pc(), execute_s32e(), h8300_push_dummy_call(), i386_displaced_step_fixup(), i386obsd_collect_uthread(), m32c_push_dummy_call(), mn10300_push_dummy_call(), msp430_push_dummy_call(), ppc64_sysv_abi_push_dummy_call(), rx_push_dummy_call(), s390_push_dummy_call(), sh_push_dummy_call_fpu(), sh_push_dummy_call_nofpu(), sparc32obsd_collect_uthread(), and sparc64obsd_collect_uthread().
void write_memory_with_notification | ( | CORE_ADDR | memaddr, |
const bfd_byte * | myaddr, | ||
ssize_t | len | ||
) |
Definition at line 409 of file corefile.c.
References current_inferior(), observer_notify_memory_changed(), and write_memory().
Referenced by ada_value_assign(), infpy_write_memory(), mi_cmd_data_write_memory(), mi_cmd_data_write_memory_bytes(), and value_assign().
bfd* core_bfd = NULL |
Definition at line 62 of file corefile.c.
Referenced by add_to_thread_list(), add_vsyscall_page(), core_close(), core_files_info(), core_has_memory(), core_has_registers(), core_has_stack(), core_open(), core_read_description(), core_xfer_partial(), dsbt_current_sos(), frv_current_sos(), gdbarch_update_p(), get_core_register_section(), linux_core_info_proc(), linux_core_info_proc_mappings(), maintenance_info_sections(), record_full_core_open_1(), record_full_open(), record_full_restore(), rs6000_aix_core_xfer_shared_libraries_aix(), thread_db_load(), validate_files(), and windows_core_xfer_shared_libraries().
struct target_ops* core_target |
Definition at line 66 of file corefile.c.
Referenced by init_core_ops().
Definition at line 55 of file corefile.c.
Referenced by exec_file_attach(), and specify_exec_file_hook().
hook_type* exec_file_extra_hooks [static] |
Definition at line 56 of file corefile.c.
Referenced by call_extra_exec_file_hooks(), and specify_exec_file_hook().
int exec_file_hook_count = 0 [static] |
Definition at line 58 of file corefile.c.
Referenced by call_extra_exec_file_hooks(), and specify_exec_file_hook().
char* gnutarget |
Definition at line 444 of file corefile.c.
Referenced by core_open(), darwin_solib_get_all_image_info_addr_at_init(), dwarf2_get_dwz_file(), exec_file_attach(), find_separate_debug_file_in_section(), gdb_bfd_open_maybe_remote(), gdb_load_info(), generic_load(), jit_bfd_try_read_symtab(), m32r_load(), macho_check_dsym(), macho_symfile_read_all_oso(), solib_aix_bfd_open(), solib_bfd_fopen(), symfile_bfd_open(), and try_open_dwop_file().
char* gnutarget_string [static] |
Definition at line 447 of file corefile.c.
Referenced by set_gnutarget_command().