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  
    254254        struct armv7m_common *armv7m = target_to_armv7m(target);
    255255        int i;
    256256
    257         *reg_list_size = 26;
     257        *reg_list_size = 17;
    258258        *reg_list = malloc(sizeof(struct reg*) * (*reg_list_size));
    259259
    260260        /*
     
    269269                (*reg_list)[i] = &armv7m->core_cache->reg_list[i];
    270270        }
    271271
    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 
    276272#ifdef ARMV7_GDB_HACKS
    277273        /* 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;
    279275
    280276        /* ARMV7M is always in thumb mode, try to make GDB understand this
    281277         * if it does not support this arch */
    282278        *((char*)armv7m->arm.pc->value) |= 1;
    283279#else
    284         (*reg_list)[25] = &armv7m->core_cache->reg_list[ARMV7M_xPSR];
     280        (*reg_list)[16] = &armv7m->core_cache->reg_list[ARMV7M_xPSR];
    285281#endif
    286282
    287283        return ERROR_OK;