Debugger watch - structure bitfield adresses and content
Crossworks 4.10.3
I have a structure with bitfields. In debugger watch window, all bitfields are displayed with wrong address, equal base address of the structure. When I change the content of the first field (sum_depth in this case), only the spare0 field (unsigned spare0:4) reads new data, the rest (specified as bool xxx:1) keep to read false.
See the screenshot and structure definition below.
Tomas
typedef struct {
uint64_t sum_depth;
t_cns_data cns_data;
float surface_pressure;
t_time_short average_start;
uint16_t bookmark;
t_datim dive_start;
t_datim free_start;
tDiveHandle log_handle;
float sp;
bool screen_reverse:1;
bool auto_SPhigh_set:1;
bool not_pressure_test:1;
bool manual_gf_switch:1;
unsigned spare0:4;
t_mode original_mode;
t_time_short stack_time;
} t_global_saved;
-
Here you are
The file is a C++ file.
#define _packed __attribute__((packed))
typedef struct {
double cns;
t_datim last_cns;
} _packed t_cns_data;typedef uint16_t t_time_short;
typedef uint32_t t_datim;
typedef uint32_t tDiveHandle;
typedef enum {
MODE_SURFACE,
MODE_OC,
MODE_FREE,
MODE_CCR,
} _packed t_mode; -
Can you see if this
http://www.rowleydownload.co.uk/snapshots/arm_crossworks_v4_win_x64_setup.exe
fixes it?
Please sign in to leave a comment.
Comments
10 comments