Ticket #36002: arm7.diff
File arm7.diff, 1.0 KB (added by dirkx (Dirk-Willem van Gulik), 12 years ago) |
---|
-
src/target/armv7m.c
old new 254 254 struct armv7m_common *armv7m = target_to_armv7m(target); 255 255 int i; 256 256 257 *reg_list_size = 26;257 *reg_list_size = 17; 258 258 *reg_list = malloc(sizeof(struct reg*) * (*reg_list_size)); 259 259 260 260 /* … … 269 269 (*reg_list)[i] = &armv7m->core_cache->reg_list[i]; 270 270 } 271 271 272 for (i = 16; i < 24; i++)273 (*reg_list)[i] = &arm_gdb_dummy_fp_reg;274 (*reg_list)[24] = &arm_gdb_dummy_fps_reg;275 276 272 #ifdef ARMV7_GDB_HACKS 277 273 /* use dummy cpsr reg otherwise gdb may try and set the thumb bit */ 278 (*reg_list)[ 25] = &armv7m_gdb_dummy_cpsr_reg;274 (*reg_list)[16] = &armv7m_gdb_dummy_cpsr_reg; 279 275 280 276 /* ARMV7M is always in thumb mode, try to make GDB understand this 281 277 * if it does not support this arch */ 282 278 *((char*)armv7m->arm.pc->value) |= 1; 283 279 #else 284 (*reg_list)[ 25] = &armv7m->core_cache->reg_list[ARMV7M_xPSR];280 (*reg_list)[16] = &armv7m->core_cache->reg_list[ARMV7M_xPSR]; 285 281 #endif 286 282 287 283 return ERROR_OK;