GDB (xrefs)
Classes | Functions | Variables
/tmp/gdb-7.10/gdb/addrmap.c File Reference
#include "defs.h"
#include "splay-tree.h"
#include "gdb_obstack.h"
#include "addrmap.h"

Go to the source code of this file.

Classes

struct  addrmap_funcs
 
struct  addrmap
 
struct  addrmap_transition
 
struct  addrmap_fixed
 
struct  addrmap_mutable
 
struct  mutable_foreach_data
 

Functions

void addrmap_set_empty (struct addrmap *map, CORE_ADDR start, CORE_ADDR end_inclusive, void *obj)
 
void * addrmap_find (struct addrmap *map, CORE_ADDR addr)
 
struct addrmapaddrmap_create_fixed (struct addrmap *original, struct obstack *obstack)
 
void addrmap_relocate (struct addrmap *map, CORE_ADDR offset)
 
int addrmap_foreach (struct addrmap *map, addrmap_foreach_fn fn, void *data)
 
static void addrmap_fixed_set_empty (struct addrmap *self, CORE_ADDR start, CORE_ADDR end_inclusive, void *obj)
 
static void * addrmap_fixed_find (struct addrmap *self, CORE_ADDR addr)
 
static struct addrmapaddrmap_fixed_create_fixed (struct addrmap *self, struct obstack *obstack)
 
static void addrmap_fixed_relocate (struct addrmap *self, CORE_ADDR offset)
 
static int addrmap_fixed_foreach (struct addrmap *self, addrmap_foreach_fn fn, void *data)
 
static splay_tree_key allocate_key (struct addrmap_mutable *map, CORE_ADDR addr)
 
static splay_tree_node addrmap_splay_tree_lookup (struct addrmap_mutable *map, CORE_ADDR addr)
 
static splay_tree_node addrmap_splay_tree_predecessor (struct addrmap_mutable *map, CORE_ADDR addr)
 
static splay_tree_node addrmap_splay_tree_successor (struct addrmap_mutable *map, CORE_ADDR addr)
 
static void addrmap_splay_tree_remove (struct addrmap_mutable *map, CORE_ADDR addr)
 
static CORE_ADDR addrmap_node_key (splay_tree_node node)
 
static void * addrmap_node_value (splay_tree_node node)
 
static void addrmap_node_set_value (splay_tree_node node, void *value)
 
static void addrmap_splay_tree_insert (struct addrmap_mutable *map, CORE_ADDR key, void *value)
 
static void force_transition (struct addrmap_mutable *self, CORE_ADDR addr)
 
static void addrmap_mutable_set_empty (struct addrmap *self, CORE_ADDR start, CORE_ADDR end_inclusive, void *obj)
 
static void * addrmap_mutable_find (struct addrmap *self, CORE_ADDR addr)
 
static int splay_foreach_count (splay_tree_node n, void *closure)
 
static int splay_foreach_copy (splay_tree_node n, void *closure)
 
static struct addrmapaddrmap_mutable_create_fixed (struct addrmap *self, struct obstack *obstack)
 
static void addrmap_mutable_relocate (struct addrmap *self, CORE_ADDR offset)
 
static int addrmap_mutable_foreach_worker (splay_tree_node node, void *data)
 
static int addrmap_mutable_foreach (struct addrmap *self, addrmap_foreach_fn fn, void *data)
 
static void * splay_obstack_alloc (int size, void *closure)
 
static void splay_obstack_free (void *obj, void *closure)
 
static int splay_compare_CORE_ADDR_ptr (splay_tree_key ak, splay_tree_key bk)
 
struct addrmapaddrmap_create_mutable (struct obstack *obstack)
 
void _initialize_addrmap (void)
 

Variables

static const struct addrmap_funcs addrmap_fixed_funcs
 
static const struct addrmap_funcs addrmap_mutable_funcs
 
initialize_file_ftype _initialize_addrmap
 

Function Documentation

void _initialize_addrmap ( void  )

Definition at line 598 of file addrmap.c.

References gdb_assert.

struct addrmap* addrmap_create_fixed ( struct addrmap original,
struct obstack *  obstack 
)
struct addrmap* addrmap_create_mutable ( struct obstack *  obstack)
void* addrmap_find ( struct addrmap map,
CORE_ADDR  addr 
)
static struct addrmap* addrmap_fixed_create_fixed ( struct addrmap self,
struct obstack *  obstack 
)
static

Definition at line 160 of file addrmap.c.

References _, and internal_error().

static void* addrmap_fixed_find ( struct addrmap self,
CORE_ADDR  addr 
)
static
static int addrmap_fixed_foreach ( struct addrmap self,
addrmap_foreach_fn  fn,
void *  data 
)
static
static void addrmap_fixed_relocate ( struct addrmap self,
CORE_ADDR  offset 
)
static
static void addrmap_fixed_set_empty ( struct addrmap self,
CORE_ADDR  start,
CORE_ADDR  end_inclusive,
void *  obj 
)
static

Definition at line 116 of file addrmap.c.

References internal_error().

int addrmap_foreach ( struct addrmap map,
addrmap_foreach_fn  fn,
void *  data 
)

Definition at line 82 of file addrmap.c.

References addrmap_funcs::foreach, and addrmap::funcs.

Referenced by write_address_map().

static struct addrmap* addrmap_mutable_create_fixed ( struct addrmap self,
struct obstack *  obstack 
)
static
static void* addrmap_mutable_find ( struct addrmap self,
CORE_ADDR  addr 
)
static

Definition at line 387 of file addrmap.c.

References _, and internal_error().

static int addrmap_mutable_foreach ( struct addrmap self,
addrmap_foreach_fn  fn,
void *  data 
)
static
static int addrmap_mutable_foreach_worker ( splay_tree_node  node,
void *  data 
)
static
static void addrmap_mutable_relocate ( struct addrmap self,
CORE_ADDR  offset 
)
static

Definition at line 460 of file addrmap.c.

References _, and internal_error().

static void addrmap_mutable_set_empty ( struct addrmap self,
CORE_ADDR  start,
CORE_ADDR  end_inclusive,
void *  obj 
)
static
static CORE_ADDR addrmap_node_key ( splay_tree_node  node)
static
static void addrmap_node_set_value ( splay_tree_node  node,
void *  value 
)
static

Definition at line 298 of file addrmap.c.

Referenced by addrmap_mutable_set_empty().

static void* addrmap_node_value ( splay_tree_node  node)
static
void addrmap_relocate ( struct addrmap map,
CORE_ADDR  offset 
)

Definition at line 75 of file addrmap.c.

References addrmap::funcs, and addrmap_funcs::relocate.

Referenced by objfile_relocate1().

void addrmap_set_empty ( struct addrmap map,
CORE_ADDR  start,
CORE_ADDR  end_inclusive,
void *  obj 
)
static void addrmap_splay_tree_insert ( struct addrmap_mutable map,
CORE_ADDR  key,
void *  value 
)
static

Definition at line 305 of file addrmap.c.

References allocate_key(), and addrmap_mutable::tree.

Referenced by force_transition().

static splay_tree_node addrmap_splay_tree_lookup ( struct addrmap_mutable map,
CORE_ADDR  addr 
)
static

Definition at line 256 of file addrmap.c.

References addrmap_mutable::tree.

Referenced by addrmap_mutable_set_empty(), and force_transition().

static splay_tree_node addrmap_splay_tree_predecessor ( struct addrmap_mutable map,
CORE_ADDR  addr 
)
static

Definition at line 263 of file addrmap.c.

References addrmap_mutable::tree.

Referenced by addrmap_mutable_set_empty(), and force_transition().

static void addrmap_splay_tree_remove ( struct addrmap_mutable map,
CORE_ADDR  addr 
)
static

Definition at line 277 of file addrmap.c.

References addrmap_mutable::tree.

Referenced by addrmap_mutable_set_empty().

static splay_tree_node addrmap_splay_tree_successor ( struct addrmap_mutable map,
CORE_ADDR  addr 
)
static

Definition at line 270 of file addrmap.c.

References addrmap_mutable::tree.

Referenced by addrmap_mutable_set_empty().

static splay_tree_key allocate_key ( struct addrmap_mutable map,
CORE_ADDR  addr 
)
static

Definition at line 245 of file addrmap.c.

References addrmap_mutable::obstack.

Referenced by addrmap_splay_tree_insert().

static void force_transition ( struct addrmap_mutable self,
CORE_ADDR  addr 
)
static
static int splay_compare_CORE_ADDR_ptr ( splay_tree_key  ak,
splay_tree_key  bk 
)
static

Definition at line 552 of file addrmap.c.

Referenced by addrmap_create_mutable().

static int splay_foreach_copy ( splay_tree_node  n,
void *  closure 
)
static
static int splay_foreach_count ( splay_tree_node  n,
void *  closure 
)
static

Definition at line 399 of file addrmap.c.

Referenced by addrmap_mutable_create_fixed().

static void* splay_obstack_alloc ( int  size,
void *  closure 
)
static

Definition at line 515 of file addrmap.c.

References addrmap_mutable::free_nodes, gdb_assert, and addrmap_mutable::obstack.

Referenced by addrmap_create_mutable().

static void splay_obstack_free ( void *  obj,
void *  closure 
)
static

Definition at line 537 of file addrmap.c.

References addrmap_mutable::free_nodes.

Referenced by addrmap_create_mutable().

Variable Documentation

initialize_file_ftype _initialize_addrmap
const struct addrmap_funcs addrmap_fixed_funcs
static
Initial value:
=
{
}
static void * addrmap_fixed_find(struct addrmap *self, CORE_ADDR addr)
Definition: addrmap.c:127
static int addrmap_fixed_foreach(struct addrmap *self, addrmap_foreach_fn fn, void *data)
Definition: addrmap.c:180
static struct addrmap * addrmap_fixed_create_fixed(struct addrmap *self, struct obstack *obstack)
Definition: addrmap.c:160
static void addrmap_fixed_relocate(struct addrmap *self, CORE_ADDR offset)
Definition: addrmap.c:169
static void addrmap_fixed_set_empty(struct addrmap *self, CORE_ADDR start, CORE_ADDR end_inclusive, void *obj)
Definition: addrmap.c:116

Definition at line 198 of file addrmap.c.

Referenced by addrmap_mutable_create_fixed().

const struct addrmap_funcs addrmap_mutable_funcs
static
Initial value:
=
{
}
static void addrmap_mutable_relocate(struct addrmap *self, CORE_ADDR offset)
Definition: addrmap.c:460
static void * addrmap_mutable_find(struct addrmap *self, CORE_ADDR addr)
Definition: addrmap.c:387
static struct addrmap * addrmap_mutable_create_fixed(struct addrmap *self, struct obstack *obstack)
Definition: addrmap.c:425
static int addrmap_mutable_foreach(struct addrmap *self, addrmap_foreach_fn fn, void *data)
Definition: addrmap.c:491
static void addrmap_mutable_set_empty(struct addrmap *self, CORE_ADDR start, CORE_ADDR end_inclusive, void *obj)
Definition: addrmap.c:333

Definition at line 504 of file addrmap.c.

Referenced by addrmap_create_mutable().