I have the following data structure:
typedef struct __attribute__((packed)){
uint8_t lengthOfPacket;
uint32_t panelNumber;
uint32_t nextCallInTime;
uint8_t desiredStateOfCollectValve;
uint8_t nextCallInType;
}SERVER_ACK_DATA_TYPE_NORMAL_T;
typedef struct __attribute__((packed)){
uint8_t lengthOfPacket;
uint32_t panelNumber;
uint32_t nextCallInTime;
uint8_t desiredStateOfCollectValve;
uint8_t nextCallInType;
HOLDING_REGS_T modbusData;
}SERVER_ACK_DATA_TYPE_MODBUS_T;
typedef union {
UCHAR rcvdDataBuffer[MTU_SIZE + 32 + sizeof(NX_PACKET)];
SERVER_ACK_DATA_TYPE_NORMAL_T normalAckDataValues;
SERVER_ACK_DATA_TYPE_MODBUS_T modbusAckDataValues;
}DATA_RETURNED_FROM_SERVER_T;
It represents the data in a packet returned from a server. If I try and put the union or any derefernced portion of it in the Expressions window so I can see it, gdb crashes almost every single time. If it doesn't crash the first time showing it, it certainly crashes the second or third time it tries to update it. MTU size has been changed from 400 (any smaller and DHCP fails) to its normal 1500, always with the same result.
Help?