|
GDB (xrefs)
|
#include "defs.h"#include "dcache.h"#include "gdbcmd.h"#include "gdbcore.h"#include "target-dcache.h"#include "inferior.h"#include "splay-tree.h"Go to the source code of this file.
Classes | |
| struct | dcache_block |
| struct | dcache_struct |
Macros | |
| #define | DCACHE_DEFAULT_SIZE 4096 |
| #define | DCACHE_DEFAULT_LINE_SIZE 64 |
| #define | LINE_SIZE_MASK(dcache) ((dcache->line_size - 1)) |
| #define | XFORM(dcache, x) ((x) & LINE_SIZE_MASK (dcache)) |
| #define | MASK(dcache, x) ((x) & ~LINE_SIZE_MASK (dcache)) |
Typedefs | |
| typedef void() | block_func(struct dcache_block *block, void *param) |
Functions | |
| static struct dcache_block * | dcache_hit (DCACHE *dcache, CORE_ADDR addr) |
| static int | dcache_read_line (DCACHE *dcache, struct dcache_block *db) |
| static struct dcache_block * | dcache_alloc (DCACHE *dcache, CORE_ADDR addr) |
| static void | show_dcache_enabled_p (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) |
| static void | append_block (struct dcache_block **blist, struct dcache_block *block) |
| static void | remove_block (struct dcache_block **blist, struct dcache_block *block) |
| static void | for_each_block (struct dcache_block **blist, block_func *func, void *param) |
| static void | free_block (struct dcache_block *block, void *param) |
| void | dcache_free (DCACHE *dcache) |
| static void | invalidate_block (struct dcache_block *block, void *param) |
| void | dcache_invalidate (DCACHE *dcache) |
| static void | dcache_invalidate_line (DCACHE *dcache, CORE_ADDR addr) |
| static int | dcache_peek_byte (DCACHE *dcache, CORE_ADDR addr, gdb_byte *ptr) |
| static void | dcache_poke_byte (DCACHE *dcache, CORE_ADDR addr, const gdb_byte *ptr) |
| static int | dcache_splay_tree_compare (splay_tree_key a, splay_tree_key b) |
| DCACHE * | dcache_init (void) |
| enum target_xfer_status | dcache_read_memory_partial (struct target_ops *ops, DCACHE *dcache, CORE_ADDR memaddr, gdb_byte *myaddr, ULONGEST len, ULONGEST *xfered_len) |
| void | dcache_update (DCACHE *dcache, enum target_xfer_status status, CORE_ADDR memaddr, const gdb_byte *myaddr, ULONGEST len) |
| static void | dcache_print_line (DCACHE *dcache, int index) |
| static void | dcache_info_1 (DCACHE *dcache, const char *exp) |
| static void | info_dcache_command (const char *exp, int tty) |
| static void | set_dcache_size (const char *args, int from_tty, struct cmd_list_element *c) |
| static void | set_dcache_line_size (const char *args, int from_tty, struct cmd_list_element *c) |
| static void | set_dcache_command (const char *arg, int from_tty) |
| static void | show_dcache_command (const char *args, int from_tty) |
| void | _initialize_dcache (void) |
Variables | |
| static struct cmd_list_element * | dcache_set_list = NULL |
| static struct cmd_list_element * | dcache_show_list = NULL |
| static unsigned | dcache_size = DCACHE_DEFAULT_SIZE |
| static unsigned | dcache_line_size = DCACHE_DEFAULT_LINE_SIZE |
| static int | dcache_enabled_p = 0 |
| #define DCACHE_DEFAULT_LINE_SIZE 64 |
Definition at line 82 of file dcache.c.
Referenced by set_dcache_line_size().
| #define DCACHE_DEFAULT_SIZE 4096 |
Definition at line 76 of file dcache.c.
Referenced by set_dcache_size().
| #define MASK | ( | dcache, | |
| x | |||
| ) | ((x) & ~LINE_SIZE_MASK (dcache)) |
Definition at line 90 of file dcache.c.
Referenced by dcache_alloc(), and dcache_hit().
| #define XFORM | ( | dcache, | |
| x | |||
| ) | ((x) & LINE_SIZE_MASK (dcache)) |
Definition at line 89 of file dcache.c.
Referenced by dcache_peek_byte(), and dcache_poke_byte().
| typedef void() block_func(struct dcache_block *block, void *param) |
| void _initialize_dcache | ( | void | ) |
Definition at line 687 of file dcache.c.
References _, add_info(), add_prefix_cmd(), add_setshow_boolean_cmd(), add_setshow_zuinteger_cmd(), class_obscure, class_support, dcache_enabled_p, dcache_line_size, dcache_set_list, dcache_show_list, dcache_size, info_dcache_command(), set_dcache_command(), set_dcache_line_size(), set_dcache_size(), setlist, show_dcache_command(), show_dcache_enabled_p(), and showlist.
|
static |
Definition at line 145 of file dcache.c.
Referenced by dcache_alloc(), dcache_invalidate_line(), and invalidate_block().
|
static |
Definition at line 351 of file dcache.c.
References dcache_block::addr, append_block(), dcache_block::data, dcache_size, dcache_struct::freelist, dcache_struct::line_size, MASK, dcache_struct::oldest, dcache_block::refs, remove_block(), dcache_struct::size, dcache_struct::tree, and xmalloc().
Referenced by dcache_peek_byte().
| void dcache_free | ( | DCACHE * | dcache | ) |
Definition at line 219 of file dcache.c.
References for_each_block(), free_block(), dcache_struct::freelist, dcache_struct::oldest, dcache_struct::tree, and xfree().
Referenced by target_dcache_cleanup().
|
static |
Definition at line 283 of file dcache.c.
References dcache_block::addr, MASK, dcache_block::refs, and dcache_struct::tree.
Referenced by dcache_invalidate_line(), dcache_peek_byte(), and dcache_poke_byte().
|
static |
Definition at line 586 of file dcache.c.
References _, dcache_block::addr, dcache_line_size, dcache_print_line(), dcache_size, dcache_struct::line_size, null_ptid, paddress(), printf_filtered(), dcache_struct::ptid, ptid_equal(), dcache_block::refs, target_gdbarch(), target_pid_to_str(), and dcache_struct::tree.
Referenced by info_dcache_command().
| DCACHE* dcache_init | ( | void | ) |
Definition at line 442 of file dcache.c.
References dcache_line_size, dcache_splay_tree_compare(), dcache_struct::freelist, dcache_struct::line_size, null_ptid, dcache_struct::oldest, dcache_struct::ptid, dcache_struct::size, dcache_struct::tree, and XNEW.
Referenced by target_dcache_get_or_init().
| void dcache_invalidate | ( | DCACHE * | dcache | ) |
Definition at line 244 of file dcache.c.
References dcache_line_size, for_each_block(), free_block(), dcache_struct::freelist, invalidate_block(), dcache_struct::line_size, null_ptid, dcache_struct::oldest, dcache_struct::ptid, and dcache_struct::size.
Referenced by dcache_read_memory_partial(), and target_dcache_invalidate().
Definition at line 266 of file dcache.c.
References dcache_block::addr, append_block(), dcache_hit(), dcache_struct::freelist, dcache_struct::oldest, remove_block(), dcache_struct::size, and dcache_struct::tree.
Referenced by dcache_read_memory_partial(), and dcache_update().
Definition at line 394 of file dcache.c.
References dcache_block::addr, dcache_block::data, dcache_alloc(), dcache_hit(), dcache_read_line(), and XFORM.
Referenced by dcache_read_memory_partial().
Definition at line 420 of file dcache.c.
References dcache_block::addr, dcache_block::data, dcache_hit(), and XFORM.
Referenced by dcache_update().
|
static |
Definition at line 540 of file dcache.c.
References _, dcache_block::addr, dcache_block::data, dcache_struct::line_size, paddress(), printf_filtered(), dcache_block::refs, target_gdbarch(), and dcache_struct::tree.
Referenced by dcache_info_1().
|
static |
Definition at line 303 of file dcache.c.
References dcache_block::addr, mem_region::attrib, dcache_block::data, mem_region::hi, dcache_struct::line_size, lookup_mem_region(), MEM_WO, mem_attrib::mode, and target_read_raw_memory().
Referenced by dcache_peek_byte().
| enum target_xfer_status dcache_read_memory_partial | ( | struct target_ops * | ops, |
| DCACHE * | dcache, | ||
| CORE_ADDR | memaddr, | ||
| gdb_byte * | myaddr, | ||
| ULONGEST | len, | ||
| ULONGEST * | xfered_len | ||
| ) |
Definition at line 466 of file dcache.c.
References dcache_invalidate(), dcache_invalidate_line(), dcache_peek_byte(), inferior_ptid, dcache_struct::ptid, ptid_equal(), raw_memory_xfer_partial(), and TARGET_XFER_OK.
Referenced by memory_xfer_partial_1().
|
static |
Definition at line 429 of file dcache.c.
Referenced by dcache_init().
| void dcache_update | ( | DCACHE * | dcache, |
| enum target_xfer_status | status, | ||
| CORE_ADDR | memaddr, | ||
| const gdb_byte * | myaddr, | ||
| ULONGEST | len | ||
| ) |
Definition at line 520 of file dcache.c.
References dcache_invalidate_line(), dcache_poke_byte(), status, and TARGET_XFER_OK.
Referenced by raw_memory_xfer_partial().
|
static |
Definition at line 190 of file dcache.c.
References func, and dcache_block::next.
Referenced by dcache_free(), and dcache_invalidate().
|
static |
Definition at line 211 of file dcache.c.
References xfree().
Referenced by dcache_free(), and dcache_invalidate().
|
static |
Definition at line 641 of file dcache.c.
References dcache_info_1(), and target_dcache_get().
Referenced by _initialize_dcache().
|
static |
Definition at line 233 of file dcache.c.
References append_block(), dcache_struct::freelist, and dcache_struct::tree.
Referenced by dcache_invalidate().
|
static |
Definition at line 167 of file dcache.c.
Referenced by dcache_alloc(), and dcache_invalidate_line().
|
static |
Definition at line 673 of file dcache.c.
References all_commands, dcache_set_list, gdb_stdout, help_list(), and printf_unfiltered().
Referenced by _initialize_dcache().
|
static |
Definition at line 659 of file dcache.c.
References _, DCACHE_DEFAULT_LINE_SIZE, dcache_line_size, error(), and target_dcache_invalidate().
Referenced by _initialize_dcache().
|
static |
Definition at line 647 of file dcache.c.
References _, DCACHE_DEFAULT_SIZE, dcache_size, error(), and target_dcache_invalidate().
Referenced by _initialize_dcache().
|
static |
Definition at line 681 of file dcache.c.
References cmd_show_list(), and dcache_show_list.
Referenced by _initialize_dcache().
|
static |
Definition at line 131 of file dcache.c.
References _, and fprintf_filtered().
Referenced by _initialize_dcache().
|
static |
Definition at line 128 of file dcache.c.
Referenced by _initialize_dcache().
|
static |
Definition at line 83 of file dcache.c.
Referenced by _initialize_dcache(), dcache_info_1(), dcache_init(), dcache_invalidate(), and set_dcache_line_size().
|
static |
Definition at line 29 of file dcache.c.
Referenced by _initialize_dcache(), and set_dcache_command().
|
static |
Definition at line 30 of file dcache.c.
Referenced by _initialize_dcache(), and show_dcache_command().
|
static |
Definition at line 77 of file dcache.c.
Referenced by _initialize_dcache(), dcache_alloc(), dcache_info_1(), and set_dcache_size().
1.8.14