Fix AVR regprofile, disable memset optimization

This commit is contained in:
Anton Kochkov 2015-09-23 01:09:33 +03:00
parent c1cdaf3d16
commit 17750b5e03
2 changed files with 8 additions and 8 deletions

View File

@ -54,10 +54,10 @@ static int r_debug_gdb_reg_read(RDebug *dbg, int type, ut8 *buf, int size) {
return -1;
buf_size = buflen;
}
memset (buf, 0, size);
memcpy (buf, desc->data, copy_size);
memset (reg_buf, 0, buflen);
memcpy (reg_buf, desc->data, copy_size);
memset ((volatile void*)buf, 0, size);
memcpy ((volatile void*)buf, desc->data, copy_size);
memset ((volatile void*)reg_buf, 0, buflen);
memcpy ((volatile void*)reg_buf, desc->data, copy_size);
#if 0
int i;
//for(i=0;i<168;i++) {
@ -568,8 +568,8 @@ static const char *r_debug_gdb_reg_profile(RDebug *dbg) {
"gpr r31 .8 31 0\n"
"gpr sreg .8 32 0\n"
"gpr sp .16 33 0\n"
"gpr pc2 .32 35 0\n"
"gpr pc .32 39 0\n"
"gpr pc .32 35 0\n"
/* "gpr pc .32 39 0\n" */
);
}
@ -600,7 +600,7 @@ struct r_debug_plugin_t r_debug_plugin_gdb = {
/* TODO: Add support for more architectures here */
.license = "LGPL3",
.arch = "x86,arm,sh,mips,avr",
.bits = R_SYS_BITS_32 | R_SYS_BITS_64,
.bits = R_SYS_BITS_16 | R_SYS_BITS_32 | R_SYS_BITS_64,
.step = r_debug_gdb_step,
.cont = r_debug_gdb_continue,
.attach = &r_debug_gdb_attach,

View File

@ -328,7 +328,7 @@ static registers_t avr[] = {
{"r31", 31, 1},
{"sreg", 32, 1},
{"sp", 33, 2},
{"pc2", 35, 4},
//{"pc2", 35, 4},
{"pc", 39, 4},
{"", 0, 0}
};