2024-07-04 04:03 AM
Am using 1.16.0.
This picture tells the whole story:
Am I doing something wrong or is Live Expressions broken?
2024-07-04 04:40 AM
Hello,
I am suspecting an alignment request for live expressions. But after reading that https://community.st.com/t5/stm32cubeide-mcus/live-expressions-showing-unexpected-value/td-p/119158 I am not so sure anymore.
Best regards.
2024-07-05 03:18 AM
@Rim LANDOLSI Please could you comment on this problem? Is it under investigation?
2024-07-09 03:53 AM
Hello @Kier and welcome to the community,
I tried to reproduce the problem with a different variable type, but I couldn't reproduce it. Here is an example in the screenshot.
To further investigate the issue, could you share the variable type definition you used for this project?
Thanks,
Rim.
2024-07-09 04:19 AM
@Rim LANDOLSIin your example the address of system_type is aligned on 32-bit boundaries.
We don't know what is the size of system_type in the original post, but since it was put at an odd address by the linker, it should be 8 bits. @Kier can you give us more info on the variable in use ? Or better yet, make a small project that reproduce the issue ?
Best regards,
Kraal
2024-07-09 08:06 AM
Thanks all.
The variable type in question was an enum:
typedef enum
{
SYS_TYPE_TP1,
SYS_TYPE_TP2,
SYS_TYPE_MAX_NUM,
SYS_TYPE_UNDEF = 0x7F,
} SystemType_t;
I'm assuming short enums are used so the underlying type is a char.
SystemType_t system_type = SYS_TYPE_UNDEF;
Unfortunately, I can't recreate the problem now. The address (and data) in the same in both Variables and Live Expressions:
2024-07-09 08:15 AM
Try deleting all the live expressions and add them again when you are on a breakpoint where the expression variables are in scope. I've had issues with adding a second expression or adding one of a variable out of scope.