This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Expressions window not showing struct contents

Hi,

I am trying to display the members of a global struct in the expressions window. The struct is named `_ishr` There is a pointer to it named `ishr`.

The struct and the pointer are declared similarly to the objects and there handles defined in the f2802x device driver device support files. (As shown in the code in the screenshot below)

The pointer is confirmed to be correctly initialised in main and is declared globally there.

Optimization is off and full symbolic debug is enabled.

Yet, whichever way I reference this struct in the expressions window (short of using the address of each individual member) the struct variable is displayed as a pointer and the structure of the struct is listed as being the same as the ADC Regs!    I.e. when I click in the Expressions window to expand the struct variable, it shows some kind of conglomeration of the ADCRegs and ADCResults struct (it has parts of both) overlayed on the memory locations where my ISHR_Obj struct should be shown...

All the addresses of pointers shown, etc seem to be correct...

Is this a bug in CCSv6.1? 

(CCSv6.1.0.00104 on win 7 64-bit with f28027 launchpad, xds100)

  • Hmmm, playing with this some more it seems that the expression window is ignoring the leading underscore on the struct object name thus `_ishr` becomes `ishr` which just happens to be the name of the pointer to the object. So I guess that's a bug in CCS.

     EDIT: (This may be due to the expressions window matching against C vars using a leading underscore [as apposed to asm labels without ] and finding `_ishr` first, in this case relating to the pointer `ishr`, before finding  the `__ishr` as the object `_ishr`. See https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/53057/202650#202650)

    Why a pointer to a struct should display that struct's members in the expressions window as the members of the ADCResults and ADCRegs members remains a mystery though...