Merge pull request #257 from riscv/comment
Comment riscv_set_register, register_write_direct
This commit is contained in:
commit
c3ffbc66e6
|
@ -1056,6 +1056,10 @@ static unsigned register_size(struct target *target, unsigned number)
|
||||||
return riscv_xlen(target);
|
return riscv_xlen(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Immediately write the new value to the requested register. This mechanism
|
||||||
|
* bypasses any caches.
|
||||||
|
*/
|
||||||
static int register_write_direct(struct target *target, unsigned number,
|
static int register_write_direct(struct target *target, unsigned number,
|
||||||
uint64_t value)
|
uint64_t value)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1770,6 +1770,10 @@ bool riscv_has_register(struct target *target, int hartid, int regid)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is called when the debug user wants to change the value of a
|
||||||
|
* register. The new value may be cached, and may not be written until the hart
|
||||||
|
* is resumed. */
|
||||||
int riscv_set_register(struct target *target, enum gdb_regno r, riscv_reg_t v)
|
int riscv_set_register(struct target *target, enum gdb_regno r, riscv_reg_t v)
|
||||||
{
|
{
|
||||||
return riscv_set_register_on_hart(target, riscv_current_hartid(target), r, v);
|
return riscv_set_register_on_hart(target, riscv_current_hartid(target), r, v);
|
||||||
|
|
Loading…
Reference in New Issue