Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/target/armv7m.c b/src/target/armv7m.c
- index 258653e..bbffffd 100644
- --- a/src/target/armv7m.c
- +++ b/src/target/armv7m.c
- @@ -267,7 +267,7 @@ int armv7m_get_gdb_reg_list(struct target *target, struct reg **reg_list[], int
- struct armv7m_common *armv7m = target_to_armv7m(target);
- int i;
- - *reg_list_size = 26;
- + *reg_list_size = 17;
- *reg_list = malloc(sizeof(struct reg *) * (*reg_list_size));
- /*
- @@ -280,19 +280,15 @@ int armv7m_get_gdb_reg_list(struct target *target, struct reg **reg_list[], int
- for (i = 0; i < 16; i++)
- (*reg_list)[i] = &armv7m->core_cache->reg_list[i];
- - for (i = 16; i < 24; i++)
- - (*reg_list)[i] = &arm_gdb_dummy_fp_reg;
- - (*reg_list)[24] = &arm_gdb_dummy_fps_reg;
- -
- #ifdef ARMV7_GDB_HACKS
- /* use dummy cpsr reg otherwise gdb may try and set the thumb bit */
- - (*reg_list)[25] = &armv7m_gdb_dummy_cpsr_reg;
- + (*reg_list)[16] = &armv7m_gdb_dummy_cpsr_reg;
- /* ARMV7M is always in thumb mode, try to make GDB understand this
- * if it does not support this arch */
- *((char *)armv7m->arm.pc->value) |= 1;
- #else
- - (*reg_list)[25] = &armv7m->core_cache->reg_list[ARMV7M_xPSR];
- + (*reg_list)[16] = &armv7m->core_cache->reg_list[ARMV7M_xPSR];
- #endif
- return ERROR_OK;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement