This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

openocd_gpacket_bug_patch.diff

By: a guest on Mar 28th, 2012  |  syntax: Diff  |  size: 1.24 KB  |  views: 1,816  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. diff --git a/src/target/armv7m.c b/src/target/armv7m.c
  2. index 258653e..bbffffd 100644
  3. --- a/src/target/armv7m.c
  4. +++ b/src/target/armv7m.c
  5. @@ -267,7 +267,7 @@ int armv7m_get_gdb_reg_list(struct target *target, struct reg **reg_list[], int
  6.         struct armv7m_common *armv7m = target_to_armv7m(target);
  7.         int i;
  8.  
  9. -       *reg_list_size = 26;
  10. +       *reg_list_size = 17;
  11.         *reg_list = malloc(sizeof(struct reg *) * (*reg_list_size));
  12.  
  13.         /*
  14. @@ -280,19 +280,15 @@ int armv7m_get_gdb_reg_list(struct target *target, struct reg **reg_list[], int
  15.         for (i = 0; i < 16; i++)
  16.                 (*reg_list)[i] = &armv7m->core_cache->reg_list[i];
  17.  
  18. -       for (i = 16; i < 24; i++)
  19. -               (*reg_list)[i] = &arm_gdb_dummy_fp_reg;
  20. -       (*reg_list)[24] = &arm_gdb_dummy_fps_reg;
  21. -
  22.  #ifdef ARMV7_GDB_HACKS
  23.         /* use dummy cpsr reg otherwise gdb may try and set the thumb bit */
  24. -       (*reg_list)[25] = &armv7m_gdb_dummy_cpsr_reg;
  25. +       (*reg_list)[16] = &armv7m_gdb_dummy_cpsr_reg;
  26.  
  27.         /* ARMV7M is always in thumb mode, try to make GDB understand this
  28.          * if it does not support this arch */
  29.         *((char *)armv7m->arm.pc->value) |= 1;
  30.  #else
  31. -       (*reg_list)[25] = &armv7m->core_cache->reg_list[ARMV7M_xPSR];
  32. +       (*reg_list)[16] = &armv7m->core_cache->reg_list[ARMV7M_xPSR];
  33.  #endif
  34.  
  35.         return ERROR_OK;
clone this paste RAW Paste Data