GDB (xrefs)
Defines | Functions | Variables
/home/stan/gdb/src/gdb/gcore.c File Reference
#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 "gdb_assert.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.

Defines

#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)
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)
static int objfile_find_memory_regions (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 Documentation

#define MAX_COPY_BYTES   (1024 * 1024)

Definition at line 42 of file gcore.c.

Referenced by gcore_copy_callback().


Function Documentation

void _initialize_gcore ( void  )
static bfd_vma call_target_sbrk ( int  sbrk_arg) [static]
bfd* create_gcore_bfd ( const char *  filename)
static enum bfd_architecture default_gcore_arch ( void  ) [static]

Definition at line 183 of file gcore.c.

References _, error(), exec_bfd, gdbarch_bfd_arch_info(), and target_gdbarch().

Referenced by create_gcore_bfd().

static unsigned long default_gcore_mach ( void  ) [static]

Definition at line 165 of file gcore.c.

References _, error(), exec_bfd, gdbarch_bfd_arch_info(), and target_gdbarch().

Referenced by create_gcore_bfd().

static const char * default_gcore_target ( void  ) [static]
static int derive_heap_segment ( bfd *  abfd,
bfd_vma *  bottom,
bfd_vma *  top 
) [static]

Definition at line 307 of file gcore.c.

References call_target_sbrk(), gdb_assert, and target_has_execution.

Referenced by objfile_find_memory_regions().

static int derive_stack_segment ( bfd_vma *  bottom,
bfd_vma *  top 
) [static]
static void do_bfd_delete_cleanup ( void *  arg) [static]

Definition at line 110 of file gcore.c.

References gdb_bfd_unref().

Referenced by gcore_command().

static void gcore_command ( char *  args,
int  from_tty 
) [static]
static void gcore_copy_callback ( bfd *  obfd,
asection *  osec,
void *  ignored 
) [static]
static int gcore_create_callback ( CORE_ADDR  vaddr,
unsigned long  size,
int  read,
int  write,
int  exec,
int  modified,
void *  data 
) [static]
static int gcore_memory_sections ( bfd *  obfd) [static]
static void make_output_phdrs ( bfd *  obfd,
asection *  osec,
void *  ignored 
) [static]

Definition at line 363 of file gcore.c.

Referenced by gcore_memory_sections().

static int objfile_find_memory_regions ( find_memory_region_ftype  func,
void *  obfd 
) [static]
void write_gcore_file ( bfd *  obfd)

Variable Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines