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
location.c File Reference
#include <stdlib.h>
#include <errno.h>
#include "dwdebug.h"
#include "dwdebug_priv.h"

Go to the source code of this file.

Functions

struct location * location_create (void)
 
int location_set_addr (struct location *l, ADDR addr)
 
int location_set_reg (struct location *l, REG reg)
 
int location_set_reg_addr (struct location *l, REG reg)
 
int location_set_reg_offset (struct location *l, REG reg, OFFSET offset)
 
int location_set_member_offset (struct location *l, OFFSET offset)
 
int location_set_fbreg_offset (struct location *l, OFFSET offset)
 
int location_set_loclist (struct location *l, struct loclistloc *list)
 
int location_set_implicit_word (struct location *loc, ADDR word)
 
int location_set_implicit_data (struct location *loc, char *data, int len, int nocopy)
 
int location_set_runtime (struct location *l, char *data, int len, int nocopy)
 
int location_update_loclist (struct location *loc, ADDR start, ADDR end, struct location *rloc, int *action)
 
struct location * location_copy (struct location *location)
 
void location_internal_free (struct location *location)
 
void location_free (struct location *location)
 
void loclistloc_dump (struct loclistloc *list, struct dump_info *ud)
 
void location_dump (struct location *location, struct dump_info *ud)
 
loctype_t symbol_resolve_location (struct symbol *symbol, struct location_ctxt *lctxt, struct location *o_loc)
 
int location_ctxt_read_retaddr (struct location_ctxt *lctxt, ADDR *o_retaddr)
 
int location_ctxt_read_reg (struct location_ctxt *lctxt, REG reg, REGVAL *o_regval)
 
int location_ctxt_writereg (struct location_ctxt *lctxt, REG reg, REGVAL regval)
 
struct location_ctxt * location_ctxt_create (struct location_ops *ops, void *priv)
 
void location_ctxt_free (struct location_ctxt *lctxt)
 
loctype_t location_resolve (struct location *loc, struct location_ctxt *lctxt, struct symbol *symbol, struct location *o_loc)
 
int symbol_resolve_bounds (struct symbol *symbol, struct location_ctxt *lctxt, ADDR *o_start, ADDR *o_end, int *is_noncontiguous, ADDR *o_alt_start, ADDR *o_alt_end)
 
ADDR __autoload_pointers (struct symbol *datatype, ADDR addr, struct location_ctxt *lctxt, struct symbol **datatype_saveptr)
 
loctype_t lsymbol_resolve_location (struct lsymbol *lsymbol, ADDR base_addr, struct location_ctxt *lctxt, struct location *o_loc)
 
int lsymbol_resolve_bounds (struct lsymbol *lsymbol, ADDR base_addr, struct location_ctxt *lctxt, ADDR *start, ADDR *end, int *is_noncontiguous, ADDR *alt_start, ADDR *alt_end)
 

Function Documentation

ADDR __autoload_pointers ( struct symbol *  datatype,
ADDR  addr,
struct location_ctxt *  lctxt,
struct symbol **  datatype_saveptr 
)

Definition at line 1196 of file location.c.

struct location* location_copy ( struct location *  location)

Definition at line 313 of file location.c.

struct location* location_create ( void  )

Locations.

Definition at line 39 of file location.c.

struct location_ctxt* location_ctxt_create ( struct location_ops *  ops,
void *  priv 
)

Definition at line 802 of file location.c.

void location_ctxt_free ( struct location_ctxt *  lctxt)

Definition at line 812 of file location.c.

int location_ctxt_read_reg ( struct location_ctxt *  lctxt,
REG  reg,
REGVAL *  o_regval 
)

Definition at line 632 of file location.c.

int location_ctxt_read_retaddr ( struct location_ctxt *  lctxt,
ADDR *  o_retaddr 
)

Definition at line 576 of file location.c.

int location_ctxt_writereg ( struct location_ctxt *  lctxt,
REG  reg,
REGVAL  regval 
)

Definition at line 774 of file location.c.

void location_dump ( struct location *  location,
struct dump_info *  ud 
)

Definition at line 392 of file location.c.

void location_free ( struct location *  location)

Definition at line 359 of file location.c.

void location_internal_free ( struct location *  location)

Definition at line 347 of file location.c.

loctype_t location_resolve ( struct location *  loc,
struct location_ctxt *  lctxt,
struct symbol *  symbol,
struct location *  o_loc 
)

Definition at line 825 of file location.c.

int location_set_addr ( struct location *  l,
ADDR  addr 
)

Definition at line 46 of file location.c.

int location_set_fbreg_offset ( struct location *  l,
OFFSET  offset 
)

Definition at line 98 of file location.c.

int location_set_implicit_data ( struct location *  loc,
char *  data,
int  len,
int  nocopy 
)

Definition at line 128 of file location.c.

int location_set_implicit_word ( struct location *  loc,
ADDR  word 
)

Definition at line 119 of file location.c.

int location_set_loclist ( struct location *  l,
struct loclistloc *  list 
)

Definition at line 107 of file location.c.

int location_set_member_offset ( struct location *  l,
OFFSET  offset 
)

Definition at line 89 of file location.c.

int location_set_reg ( struct location *  l,
REG  reg 
)

Definition at line 55 of file location.c.

int location_set_reg_addr ( struct location *  l,
REG  reg 
)

Definition at line 64 of file location.c.

int location_set_reg_offset ( struct location *  l,
REG  reg,
OFFSET  offset 
)

Definition at line 73 of file location.c.

int location_set_runtime ( struct location *  l,
char *  data,
int  len,
int  nocopy 
)

Definition at line 164 of file location.c.

int location_update_loclist ( struct location *  loc,
ADDR  start,
ADDR  end,
struct location *  rloc,
int *  action 
)

Definition at line 199 of file location.c.

void loclistloc_dump ( struct loclistloc *  list,
struct dump_info *  ud 
)

Definition at line 364 of file location.c.

int lsymbol_resolve_bounds ( struct lsymbol *  lsymbol,
ADDR  base_addr,
struct location_ctxt *  lctxt,
ADDR *  start,
ADDR *  end,
int *  is_noncontiguous,
ADDR *  alt_start,
ADDR *  alt_end 
)

Definition at line 1566 of file location.c.

loctype_t lsymbol_resolve_location ( struct lsymbol *  lsymbol,
ADDR  base_addr,
struct location_ctxt *  lctxt,
struct location *  o_loc 
)

Definition at line 1266 of file location.c.

int symbol_resolve_bounds ( struct symbol *  symbol,
struct location_ctxt *  lctxt,
ADDR *  o_start,
ADDR *  o_end,
int *  is_noncontiguous,
ADDR *  o_alt_start,
ADDR *  o_alt_end 
)

Definition at line 1047 of file location.c.

loctype_t symbol_resolve_location ( struct symbol *  symbol,
struct location_ctxt *  lctxt,
struct location *  o_loc 
)

Definition at line 546 of file location.c.