diff --git a/src/target/armv7m.c b/src/target/armv7m.c index 014bdb0d3..712b5ae34 100644 --- a/src/target/armv7m.c +++ b/src/target/armv7m.c @@ -289,7 +289,7 @@ int armv7m_get_gdb_reg_list(target_t *target, reg_t **reg_list[], int *reg_list_ /* ARMV7M is always in thumb mode, try to make GDB understand this * if it does not support this arch */ - armv7m->core_cache->reg_list[15].value[0] |= 1; + *((char*)armv7m->core_cache->reg_list[15].value) |= 1; #else (*reg_list)[25] = &armv7m->core_cache->reg_list[ARMV7M_xPSR]; #endif diff --git a/src/target/register.h b/src/target/register.h index f87ab9a64..e6ea09c6e 100644 --- a/src/target/register.h +++ b/src/target/register.h @@ -37,7 +37,7 @@ typedef struct bitfield_desc_s typedef struct reg_s { char *name; - u8 *value; + void *value; int dirty; int valid; u32 size;