stw
This commit is contained in:
parent
763e5cb44c
commit
4af702c9c4
|
@ -111,6 +111,9 @@ riscv_addr_t riscv_program_alloc_data(struct riscv_program *p, size_t bytes)
|
|||
}
|
||||
|
||||
LOG_DEBUG("allocated %d bytes at 0x%08lx", bytes, addr);
|
||||
p->data_count =
|
||||
+ riscv_debug_buffer_size(p->target)
|
||||
- (addr - riscv_debug_buffer_addr(p->target)) / sizeof(p->debug_buffer[0]);
|
||||
return addr;
|
||||
}
|
||||
|
||||
|
|
|
@ -1234,8 +1234,8 @@ static int read_memory(struct target *target, uint32_t address,
|
|||
|
||||
struct riscv_program program;
|
||||
riscv_program_init(&program, target);
|
||||
riscv_addr_t r_addr = riscv_program_alloc_x(&program);
|
||||
riscv_addr_t r_data = riscv_program_alloc_w(&program);
|
||||
riscv_addr_t r_addr = riscv_program_alloc_x(&program);
|
||||
riscv_program_lx(&program, GDB_REGNO_S0, r_addr);
|
||||
switch (size) {
|
||||
case 1:
|
||||
|
@ -1338,8 +1338,8 @@ static int write_memory(struct target *target, uint32_t address,
|
|||
|
||||
struct riscv_program program;
|
||||
riscv_program_init(&program, target);
|
||||
riscv_addr_t r_addr = riscv_program_alloc_x(&program);
|
||||
riscv_addr_t r_data = riscv_program_alloc_w(&program);
|
||||
riscv_addr_t r_addr = riscv_program_alloc_x(&program);
|
||||
riscv_program_lx(&program, GDB_REGNO_S0, r_addr);
|
||||
riscv_program_lw(&program, GDB_REGNO_S1, r_data);
|
||||
|
||||
|
@ -1707,8 +1707,6 @@ static void riscv013_step_or_resume_current_hart(struct target *target, bool ste
|
|||
continue;
|
||||
if (step && get_field(dmstatus, DMI_DMSTATUS_ALLHALTED) == 0)
|
||||
continue;
|
||||
if (!step && get_field(dmstatus, DMI_DMSTATUS_ALLRUNNING) == 0)
|
||||
continue;
|
||||
|
||||
dmcontrol = set_field(dmcontrol, DMI_DMCONTROL_RESUMEREQ, 0);
|
||||
dmi_write(target, DMI_DMCONTROL, dmcontrol);
|
||||
|
|
Loading…
Reference in New Issue