GDB (xrefs)
|
#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 addrmap * | addrmap_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 addrmap * | addrmap_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 addrmap * | addrmap_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 addrmap * | addrmap_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 |
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] |
Definition at line 71 of file addrmap.c.
References addrmap_funcs::create_fixed, and addrmap::funcs.
Referenced by create_addrmap_from_index(), dwarf2_build_psymtabs_hard(), and make_blockvector().
struct addrmap* addrmap_create_mutable | ( | struct obstack * | obstack | ) | [read] |
Definition at line 573 of file addrmap.c.
References addrmap_mutable::addrmap, addrmap_mutable_funcs, addrmap_mutable::free_nodes, addrmap::funcs, addrmap_mutable::obstack, splay_compare_CORE_ADDR_ptr(), splay_obstack_alloc(), splay_obstack_free(), and addrmap_mutable::tree.
Referenced by create_addrmap_from_index(), dwarf2_build_psymtabs_hard(), and record_block_range().
void* addrmap_find | ( | struct addrmap * | map, |
CORE_ADDR | addr | ||
) |
Definition at line 64 of file addrmap.c.
References addrmap_funcs::find, and addrmap::funcs.
Referenced by block_starting_point_at(), dw2_find_pc_sect_symtab(), find_block_in_blockvector(), and find_pc_sect_psymtab().
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] |
Definition at line 132 of file addrmap.c.
References addrmap_transition::addr, addrmap_fixed::num_transitions, addrmap_fixed::transitions, and addrmap_transition::value.
static int addrmap_fixed_foreach | ( | struct addrmap * | this, |
addrmap_foreach_fn | fn, | ||
void * | data | ||
) | [static] |
Definition at line 185 of file addrmap.c.
References addrmap_transition::addr, addrmap_fixed::num_transitions, addrmap_fixed::transitions, and addrmap_transition::value.
static void addrmap_fixed_relocate | ( | struct addrmap * | this, |
CORE_ADDR | offset | ||
) | [static] |
Definition at line 174 of file addrmap.c.
References addrmap_transition::addr, addrmap_fixed::num_transitions, and addrmap_fixed::transitions.
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] |
Definition at line 430 of file addrmap.c.
References addrmap_transition::addr, addrmap_fixed::addrmap, addrmap_fixed_funcs, addrmap::funcs, gdb_assert, addrmap_fixed::num_transitions, splay_foreach_copy(), splay_foreach_count(), addrmap_fixed::transitions, and addrmap_transition::value.
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] |
Definition at line 496 of file addrmap.c.
References addrmap_mutable_foreach_worker(), mutable_foreach_data::data, and mutable_foreach_data::fn.
static int addrmap_mutable_foreach_worker | ( | splay_tree_node | node, |
void * | data | ||
) | [static] |
Definition at line 485 of file addrmap.c.
References addrmap_node_key(), addrmap_node_value(), mutable_foreach_data::data, and mutable_foreach_data::fn.
Referenced by addrmap_mutable_foreach().
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] |
Definition at line 338 of file addrmap.c.
References addrmap_node_key(), addrmap_node_set_value(), addrmap_node_value(), addrmap_splay_tree_lookup(), addrmap_splay_tree_predecessor(), addrmap_splay_tree_remove(), addrmap_splay_tree_successor(), CORE_ADDR_MAX, force_transition(), and gdb_assert.
static CORE_ADDR addrmap_node_key | ( | splay_tree_node | node | ) | [static] |
Definition at line 289 of file addrmap.c.
Referenced by addrmap_mutable_foreach_worker(), addrmap_mutable_set_empty(), and splay_foreach_copy().
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] |
Definition at line 296 of file addrmap.c.
Referenced by addrmap_mutable_foreach_worker(), addrmap_mutable_set_empty(), force_transition(), and splay_foreach_copy().
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 | ||
) |
Definition at line 55 of file addrmap.c.
References addrmap::funcs, and addrmap_funcs::set_empty.
Referenced by add_partial_subprogram(), create_addrmap_from_index(), dwarf2_ranges_read(), process_psymtab_comp_unit_reader(), and record_block_range().
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] |
Definition at line 323 of file addrmap.c.
References addrmap_node_value(), addrmap_splay_tree_insert(), addrmap_splay_tree_lookup(), and addrmap_splay_tree_predecessor().
Referenced by addrmap_mutable_set_empty().
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] |
Definition at line 416 of file addrmap.c.
References addrmap_transition::addr, addrmap_node_key(), addrmap_node_value(), addrmap_fixed::num_transitions, addrmap_fixed::transitions, and addrmap_transition::value.
Referenced by addrmap_mutable_create_fixed().
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().
Referenced by _initialize_addrmap(), and initialize_all_files().
struct addrmap_funcs addrmap_fixed_funcs [static] |
{ addrmap_fixed_set_empty, addrmap_fixed_find, addrmap_fixed_create_fixed, addrmap_fixed_relocate, addrmap_fixed_foreach }
Definition at line 203 of file addrmap.c.
Referenced by addrmap_mutable_create_fixed().
struct addrmap_funcs addrmap_mutable_funcs [static] |
{ addrmap_mutable_set_empty, addrmap_mutable_find, addrmap_mutable_create_fixed, addrmap_mutable_relocate, addrmap_mutable_foreach }
Definition at line 509 of file addrmap.c.
Referenced by addrmap_create_mutable().