GDB (xrefs)
Macros | Functions
/tmp/gdb-8.1/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 <fcntl.h>
#include "regcache.h"
#include "regset.h"
#include "gdb_bfd.h"
#include "readline/tilde.h"
#include <algorithm>
#include "common/gdb_unlinker.h"
#include "byte-vector.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 *)
 
gdb_bfd_ref_ptr create_gcore_bfd (const char *filename)
 
static void write_gcore_file_1 (bfd *obfd)
 
void write_gcore_file (bfd *obfd)
 
static void gcore_command (const 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)
 

Macro Definition Documentation

◆ MAX_COPY_BYTES

#define MAX_COPY_BYTES   (1024 * 1024)

Definition at line 44 of file gcore.c.

Referenced by gcore_copy_callback().

Function Documentation

◆ _initialize_gcore()

void _initialize_gcore ( void  )

Definition at line 610 of file gcore.c.

References _, add_com(), add_com_alias(), class_files, and gcore_command().

◆ call_target_sbrk()

static bfd_vma call_target_sbrk ( int  sbrk_arg)
static

◆ create_gcore_bfd()

gdb_bfd_ref_ptr create_gcore_bfd ( const char *  filename)

◆ default_gcore_arch()

static enum bfd_architecture default_gcore_arch ( void  )
static

Definition at line 196 of file gcore.c.

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

Referenced by create_gcore_bfd().

◆ default_gcore_mach()

static unsigned long default_gcore_mach ( void  )
static

Definition at line 178 of file gcore.c.

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

Referenced by create_gcore_bfd().

◆ default_gcore_target()

static const char * default_gcore_target ( void  )
static

◆ derive_heap_segment()

static int derive_heap_segment ( bfd *  abfd,
bfd_vma *  bottom,
bfd_vma *  top 
)
static

Definition at line 320 of file gcore.c.

References call_target_sbrk(), gdb_assert, and target_has_execution.

Referenced by objfile_find_memory_regions().

◆ derive_stack_segment()

static int derive_stack_segment ( bfd_vma *  bottom,
bfd_vma *  top 
)
static

◆ gcore_command()

static void gcore_command ( const char *  args,
int  from_tty 
)
static

◆ gcore_copy_callback()

static void gcore_copy_callback ( bfd *  obfd,
asection *  osec,
void *  ignored 
)
static

◆ gcore_create_callback()

static int gcore_create_callback ( CORE_ADDR  vaddr,
unsigned long  size,
int  read,
int  write,
int  exec,
int  modified,
void *  data 
)
static

◆ gcore_memory_sections()

static int gcore_memory_sections ( bfd *  obfd)
static

◆ make_output_phdrs()

static void make_output_phdrs ( bfd *  obfd,
asection *  osec,
void *  ignored 
)
static

Definition at line 376 of file gcore.c.

References startswith().

Referenced by gcore_memory_sections().

◆ objfile_find_memory_regions()

int objfile_find_memory_regions ( struct target_ops self,
find_memory_region_ftype  func,
void *  obfd 
)

◆ write_gcore_file()

void write_gcore_file ( bfd *  obfd)

◆ write_gcore_file_1()

static void write_gcore_file_1 ( bfd *  obfd)
static