GDB (xrefs)
|
#include "defs.h"
#include "arch-utils.h"
#include "gdb_string.h"
#include <errno.h>
#include <signal.h>
#include <fcntl.h>
#include "frame.h"
#include "inferior.h"
#include "symtab.h"
#include "command.h"
#include "bfd.h"
#include "target.h"
#include "gdbcore.h"
#include "gdbthread.h"
#include "regcache.h"
#include "regset.h"
#include "symfile.h"
#include "exec.h"
#include "readline/readline.h"
#include "gdb_assert.h"
#include "exceptions.h"
#include "solib.h"
#include "filenames.h"
#include "progspace.h"
#include "objfiles.h"
#include "gdb_bfd.h"
#include "completer.h"
#include "filestuff.h"
Go to the source code of this file.
Classes | |
struct | spuid_list |
Defines | |
#define | O_LARGEFILE 0 |
#define | CORELOW_PID 1 |
Functions | |
static void | core_files_info (struct target_ops *) |
static struct core_fns * | sniff_core_bfd (bfd *) |
static int | gdb_check_format (bfd *) |
static void | core_open (char *, int) |
static void | core_detach (struct target_ops *ops, char *, int) |
static void | core_close (void) |
static void | core_close_cleanup (void *ignore) |
static void | add_to_thread_list (bfd *, asection *, void *) |
static void | init_core_ops (void) |
void | _initialize_corelow (void) |
void | deprecated_add_core_fns (struct core_fns *cf) |
int | default_core_sniffer (struct core_fns *our_fns, bfd *abfd) |
int | default_check_format (bfd *abfd) |
static void | get_core_register_section (struct regcache *regcache, const char *name, int which, const char *human_name, int required) |
static void | get_core_registers (struct target_ops *ops, struct regcache *regcache, int regno) |
static void | add_to_spuid_list (bfd *abfd, asection *asect, void *list_p) |
static LONGEST | get_core_siginfo (bfd *abfd, gdb_byte *readbuf, ULONGEST offset, LONGEST len) |
static LONGEST | core_xfer_partial (struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len) |
static int | ignore (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt) |
static int | core_thread_alive (struct target_ops *ops, ptid_t ptid) |
static struct target_desc * | core_read_description (struct target_ops *target) |
static char * | core_pid_to_str (struct target_ops *ops, ptid_t ptid) |
static int | core_has_memory (struct target_ops *ops) |
static int | core_has_stack (struct target_ops *ops) |
static int | core_has_registers (struct target_ops *ops) |
static void | core_info_proc (struct target_ops *ops, char *args, enum info_proc_what request) |
Variables | |
static struct core_fns * | core_file_fns = NULL |
static struct core_fns * | core_vec = NULL |
static struct gdbarch * | core_gdbarch = NULL |
static struct target_section_table * | core_data |
static struct target_ops | core_ops |
#define CORELOW_PID 1 |
Definition at line 103 of file corelow.c.
Referenced by add_to_thread_list(), and core_open().
#define O_LARGEFILE 0 |
Definition at line 53 of file corelow.c.
Referenced by core_open().
void _initialize_corelow | ( | void | ) |
static void add_to_spuid_list | ( | bfd * | abfd, |
asection * | asect, | ||
void * | list_p | ||
) | [static] |
Definition at line 628 of file corelow.c.
References spuid_list::buf, spuid_list::len, spuid_list::offset, spuid_list::pos, store_unsigned_integer(), and spuid_list::written.
Referenced by core_xfer_partial().
static void add_to_thread_list | ( | bfd * | abfd, |
asection * | asect, | ||
void * | reg_sect_arg | ||
) | [static] |
Definition at line 235 of file corelow.c.
References add_thread(), core_bfd, CORELOW_PID, current_inferior(), inferior::fake_pid_p, arm-linux::inf, inferior_appeared(), inferior_ptid, inferior::pid, and ptid_build().
Referenced by core_open().
static void core_close | ( | void | ) | [static] |
Definition at line 197 of file corelow.c.
References clear_solib(), core_bfd, exit_inferior_silent(), gdb_bfd_unref(), inferior_ptid, null_ptid, ptid_get_pid(), target_section_table::sections, and xfree().
Referenced by core_close_cleanup(), and init_core_ops().
static void core_close_cleanup | ( | void * | ignore | ) | [static] |
static void core_detach | ( | struct target_ops * | ops, |
char * | args, | ||
int | from_tty | ||
) | [static] |
Definition at line 468 of file corelow.c.
References _, error(), printf_filtered(), reinit_frame_cache(), and unpush_target().
Referenced by init_core_ops().
static void core_files_info | ( | struct target_ops * | t | ) | [static] |
Definition at line 613 of file corelow.c.
References core_bfd, and print_section_info().
Referenced by init_core_ops().
static int core_has_memory | ( | struct target_ops * | ops | ) | [static] |
static int core_has_registers | ( | struct target_ops * | ops | ) | [static] |
static int core_has_stack | ( | struct target_ops * | ops | ) | [static] |
static void core_info_proc | ( | struct target_ops * | ops, |
char * | args, | ||
enum info_proc_what | request | ||
) | [static] |
Definition at line 933 of file corelow.c.
References gdbarch_core_info_proc(), gdbarch_core_info_proc_p(), and get_current_arch().
Referenced by init_core_ops(), and set_gdbarch_core_info_proc().
Definition at line 279 of file corelow.c.
References _, add_thread_silent(), add_to_thread_list(), build_section_table(), clear_exit_convenience_vars(), core_bfd, core_close_cleanup(), core_ops, CORELOW_PID, current_directory, current_inferior(), discard_cleanups(), do_cleanups(), error(), exception_print(), exec_bfd, first_thread_of_process(), flags, gdb_bfd_fopen(), gdb_check_format(), gdb_open_cloexec(), gdb_signal_from_host(), gdb_signal_to_name(), gdb_signal_to_string(), gdb_stderr, gdbarch_from_bfd(), gdbarch_gdb_signal_from_target(), gdbarch_gdb_signal_from_target_p(), get_current_regcache(), get_selected_frame(), gnutarget, inferior_appeared(), inferior_ptid, init_thread_list(), lookup_internalvar(), make_cleanup(), make_cleanup_bfd_unref(), null_ptid, O_LARGEFILE, p, perror_with_name(), pid_to_ptid(), post_create_inferior(), print_stack_frame(), printf_filtered(), thread_info::ptid, ptid_equal(), push_target(), gdb_exception::reason, registers_changed(), reinit_frame_cache(), RETURN_MASK_ERROR, target_section_table::sections, target_section_table::sections_end, set_gdbarch_from_file(), set_internalvar_integer(), sniff_core_bfd(), SRC_AND_LOC, switch_to_thread(), target_fetch_registers(), target_find_new_threads(), target_preopen(), TRY_CATCH, unpush_target(), validate_files(), write_files, xfree(), and XZALLOC.
Referenced by init_core_ops().
static char* core_pid_to_str | ( | struct target_ops * | ops, |
ptid_t | ptid | ||
) | [static] |
Definition at line 881 of file corelow.c.
References inferior::fake_pid_p, find_inferior_pid(), gdbarch_core_pid_to_str(), gdbarch_core_pid_to_str_p(), arm-linux::inf, normal_pid_to_str(), inferior::pid, pid_to_ptid(), ptid_get_lwp(), ptid_get_pid(), and xsnprintf().
Referenced by init_core_ops(), and set_gdbarch_core_pid_to_str().
static struct target_desc* core_read_description | ( | struct target_ops * | target | ) | [static, read] |
Definition at line 871 of file corelow.c.
References core_bfd, gdbarch_core_read_description(), and gdbarch_core_read_description_p().
Referenced by init_core_ops(), and set_gdbarch_core_read_description().
static int core_thread_alive | ( | struct target_ops * | ops, |
ptid_t | ptid | ||
) | [static] |
Definition at line 860 of file corelow.c.
Referenced by init_core_ops().
static LONGEST core_xfer_partial | ( | struct target_ops * | ops, |
enum target_object | object, | ||
const char * | annex, | ||
gdb_byte * | readbuf, | ||
const gdb_byte * | writebuf, | ||
ULONGEST | offset, | ||
LONGEST | len | ||
) | [static] |
Definition at line 678 of file corelow.c.
References _, add_to_spuid_list(), target_ops::beneath, spuid_list::buf, core_bfd, gdbarch_core_xfer_shared_libraries(), gdbarch_core_xfer_shared_libraries_aix(), gdbarch_core_xfer_shared_libraries_aix_p(), gdbarch_core_xfer_shared_libraries_p(), get_core_siginfo(), len, spuid_list::len, offset, spuid_list::offset, spuid_list::pos, section_table_xfer_memory_partial(), target_section_table::sections, target_section_table::sections_end, size, TARGET_OBJECT_AUXV, TARGET_OBJECT_LIBRARIES, TARGET_OBJECT_LIBRARIES_AIX, TARGET_OBJECT_MEMORY, TARGET_OBJECT_SIGNAL_INFO, TARGET_OBJECT_SPU, TARGET_OBJECT_WCOOKIE, target_ops::to_xfer_partial, warning(), spuid_list::written, and xsnprintf().
Referenced by init_core_ops().
int default_check_format | ( | bfd * | abfd | ) |
int default_core_sniffer | ( | struct core_fns * | our_fns, |
bfd * | abfd | ||
) |
void deprecated_add_core_fns | ( | struct core_fns * | cf | ) |
Definition at line 111 of file corelow.c.
References core_file_fns, and core_fns::next.
Referenced by _initialize_alpha_nat(), _initialize_arm_netbsd_nat(), _initialize_core_regset(), _initialize_cris_tdep(), _initialize_irix5_nat(), and _initialize_m68k_linux_nat().
static int gdb_check_format | ( | bfd * | abfd | ) | [static] |
Definition at line 179 of file corelow.c.
References core_fns::check_format, and core_fns::next.
Referenced by core_open().
static void get_core_register_section | ( | struct regcache * | regcache, |
const char * | name, | ||
int | which, | ||
const char * | human_name, | ||
int | required | ||
) | [static] |
Definition at line 496 of file corelow.c.
References _, core_bfd, core_fns::core_read_registers, gdb_assert, gdbarch_regset_from_core_section(), gdbarch_regset_from_core_section_p(), inferior_ptid, ptid_get_lwp(), size, regset::supply_regset, warning(), xfree(), and xstrprintf().
Referenced by get_core_registers().
static void get_core_registers | ( | struct target_ops * | ops, |
struct regcache * | regcache, | ||
int | regno | ||
) | [static] |
Definition at line 567 of file corelow.c.
References core_fns::core_read_registers, fprintf_filtered(), gdb_stderr, gdbarch_core_regset_sections(), gdbarch_num_regs(), gdbarch_regset_from_core_section_p(), get_core_register_section(), get_regcache_arch(), core_regset_section::human_name, REG_UNKNOWN, regcache_raw_supply(), regcache_register_status(), and core_regset_section::sect_name.
Referenced by init_core_ops().
static LONGEST get_core_siginfo | ( | bfd * | abfd, |
gdb_byte * | readbuf, | ||
ULONGEST | offset, | ||
LONGEST | len | ||
) | [static] |
Definition at line 654 of file corelow.c.
References inferior_ptid, len, name, ptid_get_lwp(), xfree(), and xstrprintf().
Referenced by core_xfer_partial().
static int ignore | ( | struct gdbarch * | gdbarch, |
struct bp_target_info * | bp_tgt | ||
) | [static] |
Definition at line 847 of file corelow.c.
Referenced by init_core_ops(), and prompt_for_continue().
static void init_core_ops | ( | void | ) | [static] |
Definition at line 946 of file corelow.c.
References _, core_close(), core_detach(), core_files_info(), core_has_memory(), core_has_registers(), core_has_stack(), core_info_proc(), core_open(), core_ops, core_pid_to_str(), core_read_description(), core_target, core_thread_alive(), core_xfer_partial(), find_default_attach(), find_default_create_inferior(), get_core_registers(), ignore(), internal_error(), OPS_MAGIC, process_stratum, target_ops::to_attach, target_ops::to_close, target_ops::to_create_inferior, target_ops::to_detach, target_ops::to_doc, target_ops::to_fetch_registers, target_ops::to_files_info, target_ops::to_has_memory, target_ops::to_has_registers, target_ops::to_has_stack, target_ops::to_info_proc, target_ops::to_insert_breakpoint, target_ops::to_longname, target_ops::to_magic, target_ops::to_open, target_ops::to_pid_to_str, target_ops::to_read_description, target_ops::to_remove_breakpoint, target_ops::to_shortname, target_ops::to_stratum, target_ops::to_thread_alive, and target_ops::to_xfer_partial.
static struct core_fns * sniff_core_bfd | ( | bfd * | abfd | ) | [static, read] |
Definition at line 135 of file corelow.c.
References _, core_fns::core_sniffer, error(), gdbarch_regset_from_core_section_p(), core_fns::next, and warning().
Referenced by core_open().
struct target_section_table* core_data [static] |
struct core_fns* core_file_fns = NULL [static] |
Definition at line 60 of file corelow.c.
Referenced by deprecated_add_core_fns().
struct gdbarch* core_gdbarch = NULL [static] |
Definition at line 70 of file corelow.c.
Referenced by linux_core_info_proc_mappings().
struct target_ops core_ops [static] |
Definition at line 100 of file corelow.c.
Referenced by core_open(), and init_core_ops().