diff --git a/src/target/armv7m.c b/src/target/armv7m.c
index 258653e..bbffffd 100644
a
|
b
|
int armv7m_get_gdb_reg_list(struct target *target, struct reg **reg_list[], int |
267 | 267 | struct armv7m_common *armv7m = target_to_armv7m(target); |
268 | 268 | int i; |
269 | 269 | |
270 | | *reg_list_size = 26; |
| 270 | *reg_list_size = 17; |
271 | 271 | *reg_list = malloc(sizeof(struct reg *) * (*reg_list_size)); |
272 | 272 | |
273 | 273 | /* |
… |
… |
int armv7m_get_gdb_reg_list(struct target *target, struct reg **reg_list[], int |
280 | 280 | for (i = 0; i < 16; i++) |
281 | 281 | (*reg_list)[i] = &armv7m->core_cache->reg_list[i]; |
282 | 282 | |
283 | | for (i = 16; i < 24; i++) |
284 | | (*reg_list)[i] = &arm_gdb_dummy_fp_reg; |
285 | | (*reg_list)[24] = &arm_gdb_dummy_fps_reg; |
286 | | |
287 | 283 | #ifdef ARMV7_GDB_HACKS |
288 | 284 | /* use dummy cpsr reg otherwise gdb may try and set the thumb bit */ |
289 | | (*reg_list)[25] = &armv7m_gdb_dummy_cpsr_reg; |
| 285 | (*reg_list)[16] = &armv7m_gdb_dummy_cpsr_reg; |
290 | 286 | |
291 | 287 | /* ARMV7M is always in thumb mode, try to make GDB understand this |
292 | 288 | * if it does not support this arch */ |
293 | 289 | *((char *)armv7m->arm.pc->value) |= 1; |
294 | 290 | #else |
295 | | (*reg_list)[25] = &armv7m->core_cache->reg_list[ARMV7M_xPSR]; |
| 291 | (*reg_list)[16] = &armv7m->core_cache->reg_list[ARMV7M_xPSR]; |
296 | 292 | #endif |
297 | 293 | |
298 | 294 | return ERROR_OK; |