GDB (xrefs)
|
#include "defs.h"
#include "elf-bfd.h"
#include "infcall.h"
#include "inferior.h"
#include "gdbcore.h"
#include "objfiles.h"
#include "solib.h"
#include "symfile.h"
#include "arch-utils.h"
#include "completer.h"
#include "gcore.h"
#include "cli/cli-decode.h"
#include <fcntl.h>
#include "regcache.h"
#include "regset.h"
#include "gdb_bfd.h"
#include "readline/tilde.h"
Go to the source code of this file.
Macros | |
#define | MAX_COPY_BYTES (1024 * 1024) |
Functions | |
static const char * | default_gcore_target (void) |
static enum bfd_architecture | default_gcore_arch (void) |
static unsigned long | default_gcore_mach (void) |
static int | gcore_memory_sections (bfd *) |
bfd * | create_gcore_bfd (const char *filename) |
static void | write_gcore_file_1 (bfd *obfd) |
void | write_gcore_file (bfd *obfd) |
static void | do_bfd_delete_cleanup (void *arg) |
static void | gcore_command (char *args, int from_tty) |
static int | derive_stack_segment (bfd_vma *bottom, bfd_vma *top) |
static bfd_vma | call_target_sbrk (int sbrk_arg) |
static int | derive_heap_segment (bfd *abfd, bfd_vma *bottom, bfd_vma *top) |
static void | make_output_phdrs (bfd *obfd, asection *osec, void *ignored) |
static int | gcore_create_callback (CORE_ADDR vaddr, unsigned long size, int read, int write, int exec, int modified, void *data) |
int | objfile_find_memory_regions (struct target_ops *self, find_memory_region_ftype func, void *obfd) |
static void | gcore_copy_callback (bfd *obfd, asection *osec, void *ignored) |
void | _initialize_gcore (void) |
Variables | |
initialize_file_ftype | _initialize_gcore |
#define MAX_COPY_BYTES (1024 * 1024) |
Definition at line 41 of file gcore.c.
Referenced by gcore_copy_callback().
void _initialize_gcore | ( | void | ) |
Definition at line 632 of file gcore.c.
References _, add_com(), add_com_alias(), class_files, and gcore_command().
|
static |
Definition at line 290 of file gcore.c.
References call_function_by_hand(), find_function_in_inferior(), gdb_assert, get_objfile_arch(), lookup_minimal_symbol(), value_as_long(), and value_from_longest().
Referenced by derive_heap_segment().
bfd* create_gcore_bfd | ( | const char * | filename | ) |
Definition at line 52 of file gcore.c.
References _, default_gcore_arch(), default_gcore_mach(), default_gcore_target(), error(), and gdb_bfd_openw().
Referenced by gcore_command(), and record_full_save().
|
static |
Definition at line 211 of file gcore.c.
References _, error(), exec_bfd, gdbarch_bfd_arch_info(), and target_gdbarch().
Referenced by create_gcore_bfd().
|
static |
Definition at line 193 of file gcore.c.
References _, error(), exec_bfd, gdbarch_bfd_arch_info(), and target_gdbarch().
Referenced by create_gcore_bfd().
|
static |
Definition at line 224 of file gcore.c.
References exec_bfd, gdbarch_gcore_bfd_target(), gdbarch_gcore_bfd_target_p(), and target_gdbarch().
Referenced by create_gcore_bfd().
|
static |
Definition at line 335 of file gcore.c.
References call_target_sbrk(), gdb_assert, and target_has_execution.
Referenced by objfile_find_memory_regions().
|
static |
Definition at line 243 of file gcore.c.
References gdb_assert, gdbarch_inner_than(), get_current_frame(), get_frame_arch(), get_frame_base(), get_frame_sp(), get_prev_frame(), target_has_registers, and target_has_stack.
Referenced by objfile_find_memory_regions().
|
static |
|
static |
Definition at line 151 of file gcore.c.
References create_gcore_bfd(), discard_cleanups(), do_bfd_delete_cleanup(), do_cleanups(), fprintf_filtered(), gdb_bfd_unref(), gdb_stdout, inferior_ptid, info_verbose, make_cleanup(), noprocess(), ptid_get_pid(), target_has_execution, write_gcore_file(), xfree(), and xstrprintf().
Referenced by _initialize_gcore().
|
static |
Definition at line 560 of file gcore.c.
References _, do_cleanups(), make_cleanup(), MAX_COPY_BYTES, min, offset, paddress(), plongest(), size, startswith(), target_gdbarch(), target_read_memory(), warning(), xfree(), and xmalloc().
Referenced by gcore_memory_sections().
|
static |
Definition at line 417 of file gcore.c.
References _, ALL_OBJSECTIONS, flags, fprintf_filtered(), gdb_stdout, info_verbose, objfile::obfd, obj_section_addr, obj_section_endaddr, paddress(), plongest(), objfile::separate_debug_objfile_backlink, solib_keep_data_in_core(), target_gdbarch(), obj_section::the_bfd_section, and warning().
Referenced by gcore_memory_sections().
|
static |
Definition at line 608 of file gcore.c.
References gcore_copy_callback(), gcore_create_callback(), gdbarch_find_memory_regions(), gdbarch_find_memory_regions_p(), make_output_phdrs(), target_find_memory_regions, and target_gdbarch().
Referenced by write_gcore_file_1().
|
static |
Definition at line 391 of file gcore.c.
References startswith().
Referenced by gcore_memory_sections().
int objfile_find_memory_regions | ( | struct target_ops * | self, |
find_memory_region_ftype | func, | ||
void * | obfd | ||
) |
Definition at line 503 of file gcore.c.
References ALL_OBJSECTIONS, derive_heap_segment(), derive_stack_segment(), exec_bfd, flags, objfile::obfd, obj_section_addr, objfile::separate_debug_objfile_backlink, size, and obj_section::the_bfd_section.
Referenced by init_exec_ops().
void write_gcore_file | ( | bfd * | obfd | ) |
Definition at line 115 of file gcore.c.
References CATCH, END_CATCH, exception_none, gdb_exception::reason, RETURN_MASK_ALL, target_done_generating_core(), target_prepare_to_generate_core(), throw_exception(), TRY, and write_gcore_file_1().
Referenced by gcore_command(), and record_full_save().
|
static |
Definition at line 66 of file gcore.c.
References _, do_cleanups(), error(), gcore_memory_sections(), gdbarch_make_corefile_notes(), gdbarch_make_corefile_notes_p(), make_cleanup(), target_gdbarch(), target_make_corefile_notes, warning(), and xfree().
Referenced by write_gcore_file().
initialize_file_ftype _initialize_gcore |