GDB (xrefs)
Classes | Functions | Variables
/home/stan/gdb/src/gdb/addrmap.c File Reference
#include "defs.h"
#include <stdlib.h>
#include "splay-tree.h"
#include "gdb_obstack.h"
#include "addrmap.h"
#include "gdb_assert.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 *this, CORE_ADDR start, CORE_ADDR end_inclusive, void *obj)
static void * addrmap_fixed_find (struct addrmap *this, CORE_ADDR addr)
static struct addrmapaddrmap_fixed_create_fixed (struct addrmap *this, struct obstack *obstack)
static void addrmap_fixed_relocate (struct addrmap *this, CORE_ADDR offset)
static int addrmap_fixed_foreach (struct addrmap *this, 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 *this, CORE_ADDR addr)
static void addrmap_mutable_set_empty (struct addrmap *this, CORE_ADDR start, CORE_ADDR end_inclusive, void *obj)
static void * addrmap_mutable_find (struct addrmap *this, 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 *this, struct obstack *obstack)
static void addrmap_mutable_relocate (struct addrmap *this, CORE_ADDR offset)
static int addrmap_mutable_foreach_worker (splay_tree_node node, void *data)
static int addrmap_mutable_foreach (struct addrmap *this, 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 struct addrmap_funcs addrmap_fixed_funcs
static struct addrmap_funcs addrmap_mutable_funcs
initialize_file_ftype _initialize_addrmap

Function Documentation

void _initialize_addrmap ( void  )

Definition at line 603 of file addrmap.c.

References _initialize_addrmap, and gdb_assert.

struct addrmap* addrmap_create_fixed ( struct addrmap original,
struct obstack *  obstack 
) [read]
struct addrmap* addrmap_create_mutable ( struct obstack *  obstack) [read]
void* addrmap_find ( struct addrmap map,
CORE_ADDR  addr 
)
static struct addrmap* addrmap_fixed_create_fixed ( struct addrmap this,
struct obstack *  obstack 
) [static, read]

Definition at line 165 of file addrmap.c.

References _, and internal_error().

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

Definition at line 121 of file addrmap.c.

References internal_error().

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

Definition at line 87 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 this,
struct obstack *  obstack 
) [static, read]
static void* addrmap_mutable_find ( struct addrmap this,
CORE_ADDR  addr 
) [static]

Definition at line 392 of file addrmap.c.

References _, and internal_error().

static int addrmap_mutable_foreach ( struct addrmap this,
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 this,
CORE_ADDR  offset 
) [static]

Definition at line 465 of file addrmap.c.

References _, and internal_error().

static void addrmap_mutable_set_empty ( struct addrmap this,
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 303 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 80 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 310 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 261 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 268 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 282 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 275 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 250 of file addrmap.c.

References addrmap_mutable::obstack.

Referenced by addrmap_splay_tree_insert().

static void force_transition ( struct addrmap_mutable this,
CORE_ADDR  addr 
) [static]
static int splay_compare_CORE_ADDR_ptr ( splay_tree_key  ak,
splay_tree_key  bk 
) [static]

Definition at line 557 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 404 of file addrmap.c.

Referenced by addrmap_mutable_create_fixed().

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

Definition at line 520 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 542 of file addrmap.c.

References addrmap_mutable::free_nodes.

Referenced by addrmap_create_mutable().


Variable Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines