OpenOCD
register.c File Reference

Holds utilities to work with register caches. More...

Include dependency graph for register.c:

Go to the source code of this file.

Functions

void register_cache_invalidate (struct reg_cache *cache)
 Marks the contents of the register cache as invalid (and clean). More...
 
struct regregister_get_by_name (struct reg_cache *first, const char *name, bool search_all)
 
struct regregister_get_by_number (struct reg_cache *first, uint32_t reg_num, bool search_all)
 
static int register_get_dummy_core_reg (struct reg *reg)
 
struct reg_cache ** register_get_last_cache_p (struct reg_cache **first)
 
void register_init_dummy (struct reg *reg)
 
static int register_set_dummy_core_reg (struct reg *reg, uint8_t *buf)
 
void register_unlink_cache (struct reg_cache **cache_p, const struct reg_cache *cache)
 

Variables

static const struct reg_arch_type dummy_type
 

Detailed Description

Holds utilities to work with register caches.

OpenOCD uses machine registers internally, and exposes them by name to Tcl scripts. Sets of related registers are grouped into caches. For example, a CPU core will expose a set of registers, and there may be separate registers associated with debug or trace modules.

Definition in file register.c.

Function Documentation

◆ register_cache_invalidate()

◆ register_get_by_name()

◆ register_get_by_number()

struct reg* register_get_by_number ( struct reg_cache first,
uint32_t  reg_num,
bool  search_all 
)

◆ register_get_dummy_core_reg()

static int register_get_dummy_core_reg ( struct reg reg)
static

Definition at line 106 of file register.c.

References ERROR_OK.

◆ register_get_last_cache_p()

◆ register_init_dummy()

void register_init_dummy ( struct reg reg)

Definition at line 124 of file register.c.

References dummy_type, and reg::type.

Referenced by mips32_build_reg_cache().

◆ register_set_dummy_core_reg()

static int register_set_dummy_core_reg ( struct reg reg,
uint8_t *  buf 
)
static

Definition at line 111 of file register.c.

◆ register_unlink_cache()

void register_unlink_cache ( struct reg_cache **  cache_p,
const struct reg_cache cache 
)

Definition at line 85 of file register.c.

References reg_cache::next.

Referenced by cortex_m_dwt_free(), and xtensa_free_reg_cache().

Variable Documentation

◆ dummy_type

const struct reg_arch_type dummy_type
static
Initial value:
= {
}
static int register_set_dummy_core_reg(struct reg *reg, uint8_t *buf)
Definition: register.c:111
static int register_get_dummy_core_reg(struct reg *reg)
Definition: register.c:106

Definition at line 111 of file register.c.

Referenced by register_init_dummy().