Stackdb
Stackdb is a stackable, multi-target and -level source debugger and memory forensics library.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions | Variables
binfile.c File Reference
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <stdint.h>
#include <inttypes.h>
#include <assert.h>
#include "config.h"
#include "common.h"
#include "log.h"
#include "output.h"
#include "binfile.h"
#include "dwdebug.h"
#include "dwdebug_priv.h"
#include <dwarf.h>
#include <gelf.h>
#include <elfutils/libebl.h>
#include <elfutils/libdw.h>
#include <elfutils/libdwfl.h>
#include "memory-access.h"
Include dependency graph for binfile.c:

Go to the source code of this file.

Functions

void binfile_init (void)
 
struct binfilebinfile_create (char *filename, struct binfile_ops *bfops, void *priv)
 
struct binfilebinfile_lookup (char *filename)
 
int binfile_cache (struct binfile *binfile)
 
int binfile_uncache (struct binfile *binfile)
 
int binfile_cache_clean (void)
 
struct binfile_instancebinfile_infer_instance__int (char *filename, char *root_prefix, ADDR base, GHashTable *config)
 
struct binfile_instancebinfile_infer_instance (char *filename, char *root_prefix, ADDR base, GHashTable *config)
 
struct binfilebinfile_open__int (char *filename, char *root_prefix, struct binfile_instance *bfinst)
 
struct binfilebinfile_open (char *filename, char *root_prefix, struct binfile_instance *bfinst)
 
struct binfilebinfile_open_debuginfo__int (struct binfile *binfile, struct binfile_instance *bfinst, const char *DFPATH[])
 
struct binfilebinfile_open_debuginfo (struct binfile *binfile, struct binfile_instance *bfinst, const char *DFPATH[])
 
const char * binfile_get_backend_name (struct binfile *binfile)
 
binfile_type_t binfile_get_binfile_type (struct binfile *binfile)
 
int binfile_get_root_scope_sizes (struct binfile *binfile, int *named, int *duplicated, int *anon, int *numscopes)
 
int binfile_close (struct binfile *binfile)
 
REFCNT binfile_release (struct binfile *binfile)
 
REFCNT binfile_free (struct binfile *binfile, int force)
 
REFCNT binfile_instance_release (struct binfile_instance *bfi)
 
REFCNT binfile_instance_free (struct binfile_instance *bfi, int force)
 

Variables

struct binfile_ops elf_binfile_ops
 
struct binfile_opsbinfile_types []
 

Function Documentation

int binfile_cache ( struct binfile binfile)

Definition at line 180 of file binfile.c.

int binfile_cache_clean ( void  )

Definition at line 197 of file binfile.c.

int binfile_close ( struct binfile binfile)

Definition at line 339 of file binfile.c.

struct binfile* binfile_create ( char *  filename,
struct binfile_ops bfops,
void *  priv 
)

Definition at line 124 of file binfile.c.

REFCNT binfile_free ( struct binfile binfile,
int  force 
)

Definition at line 358 of file binfile.c.

const char* binfile_get_backend_name ( struct binfile binfile)

Definition at line 318 of file binfile.c.

binfile_type_t binfile_get_binfile_type ( struct binfile binfile)

Definition at line 322 of file binfile.c.

int binfile_get_root_scope_sizes ( struct binfile binfile,
int *  named,
int *  duplicated,
int *  anon,
int *  numscopes 
)

Definition at line 326 of file binfile.c.

struct binfile_instance* binfile_infer_instance ( char *  filename,
char *  root_prefix,
ADDR  base,
GHashTable *  config 
)

Definition at line 242 of file binfile.c.

struct binfile_instance* binfile_infer_instance__int ( char *  filename,
char *  root_prefix,
ADDR  base,
GHashTable *  config 
)

Definition at line 219 of file binfile.c.

void binfile_init ( void  )

Definition at line 103 of file binfile.c.

REFCNT binfile_instance_free ( struct binfile_instance bfi,
int  force 
)

Definition at line 437 of file binfile.c.

REFCNT binfile_instance_release ( struct binfile_instance bfi)

Definition at line 431 of file binfile.c.

struct binfile* binfile_lookup ( char *  filename)

Definition at line 162 of file binfile.c.

struct binfile* binfile_open ( char *  filename,
char *  root_prefix,
struct binfile_instance bfinst 
)

Definition at line 286 of file binfile.c.

struct binfile* binfile_open__int ( char *  filename,
char *  root_prefix,
struct binfile_instance bfinst 
)

Definition at line 254 of file binfile.c.

struct binfile* binfile_open_debuginfo ( struct binfile binfile,
struct binfile_instance bfinst,
const char *  DFPATH[] 
)

Definition at line 306 of file binfile.c.

struct binfile* binfile_open_debuginfo__int ( struct binfile binfile,
struct binfile_instance bfinst,
const char *  DFPATH[] 
)

Definition at line 297 of file binfile.c.

REFCNT binfile_release ( struct binfile binfile)

Definition at line 352 of file binfile.c.

int binfile_uncache ( struct binfile binfile)

Definition at line 189 of file binfile.c.

Variable Documentation

struct binfile_ops* binfile_types[]
Initial value:
= {
NULL,
}
struct binfile_ops elf_binfile_ops
Definition: binfile_elf.c:67

Definition at line 55 of file binfile.c.

struct binfile_ops elf_binfile_ops

Definition at line 67 of file binfile_elf.c.