mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-23 13:19:54 +00:00
Fix gdb reg parsing and gdb 'G' reg writing issues ##debug
This commit is contained in:
parent
d6f1160464
commit
c25595a767
@ -127,7 +127,7 @@ gdb_reg_t *arch_parse_reg_profile(const char * reg_profile) {
|
||||
}
|
||||
i = 0;
|
||||
r_list_foreach (gdb_regs_list, iter, reg) {
|
||||
memcpy (reg, gdb_regs + i, sizeof (gdb_reg_t));
|
||||
memcpy (gdb_regs + i, reg, sizeof (gdb_reg_t));
|
||||
i++;
|
||||
}
|
||||
memset (gdb_regs + i, 0, sizeof (gdb_reg_t));
|
||||
|
@ -1087,7 +1087,7 @@ int gdbr_write_reg(libgdbr_t *g, const char *name, char *value, int len) {
|
||||
|
||||
// Use 'G' if write_register failed/isn't supported
|
||||
gdbr_read_registers (g);
|
||||
memcpy (g->data + g->registers[i].offset, value, len);
|
||||
memcpy (g->data + (g->registers[i].offset / 8), value, len);
|
||||
gdbr_write_bin_registers (g, g->data, g->data_len);
|
||||
|
||||
ret = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user