Array is not traceable in Expressions during debugging

Discussions concerning TrueSTUDIO for STM32 9.0.0 and later versions.

Moderators: Markus Girdland, Mattias Norlander

m.fetzer
Posts: 9
Joined: Fri Feb 08, 2019 11:11 am

Array is not traceable in Expressions during debugging

Postby m.fetzer » Fri Feb 08, 2019 11:18 am

Hello Community,

currently I am programming and debugging on an STMG071RBT6 with TrueStudio9.2.0.

In my current example I want to initialize a simple multidimensional Array with the following expression:

Code: Select all

uint16_t VolatileDataArray[4][4];


The program can be compiled and debbug, but if I want to add the mentioned variable to the Expressions window in the debugger I get the following error message:

Code: Select all

1) Failed to execute MI command:
-var-create - * VolatileDataArray[4][4]
Error message from debugger back end:
-var-create: unable to create variable object

2) Failed to execute MI command:
-var-create - * VolatileDataArray[4][4]
Error message from debugger back end:
-var-create: unable to create variable object

3) Failed to execute MI command:
-data-evaluate-expression VolatileDataArray[4][4]
Error message from debugger back end:
No symbol "VolatileDataArray" in current context.

4) Failed to execute MI command:
-var-create - * VolatileDataArray[4][4]
Error message from debugger back end:
-var-create: unable to create variable object

5) Unable to create variable object


I read in the help of Atollic how to add variables to Expressions and I did not had any problems to add and trace arrays in other IDEs like AC6 or a stand alone Eclipse.
Even initializing the array as one dimensional array or with values does not help.
How can I make my array watchable?

Thanks.

frank_ee
Posts: 88
Joined: Wed Apr 05, 2017 5:08 pm
Location: USA

Re: Array is not traceable in Expressions during debugging

Postby frank_ee » Sun Feb 10, 2019 8:24 pm

Hello,

Can initialize the 2 dimensional array in the source code? You mentioned that single dimension array is not showing in the debug window, can you initialize that array and test. I can show a screenshot of the debugger showing the array's contents if needed.

m.fetzer
Posts: 9
Joined: Fri Feb 08, 2019 11:11 am

Re: Array is not traceable in Expressions during debugging

Postby m.fetzer » Mon Feb 11, 2019 7:09 am

frank_ee wrote:Hello,

Can initialize the 2 dimensional array in the source code? You mentioned that single dimension array is not showing in the debug window, can you initialize that array and test. I can show a screenshot of the debugger showing the array's contents if needed.


Hello Frank,

thanks for your reply. What do you mean by "Can initialize the 2 dimensional array in the source code?". The compiler has no error outputs so I assume that the array initialize in the source code.

I have the problem that single dimensional arrays as well as multidimensional arrays (in my case two dimensional) not showing in the debug window. What means not showing? I can see them in the debug window, where I can see the current instruction, but if I put my mouse pointer over it no values are shown. Also if I want to trace the in the expression window I get the error message I mentioned above. I also tried the instruction of the user manual of Atollic but nothing helped.

I attached a screenshot, which, I hope, clarifies my problem more. Feel free to share your screen as well!
You do not have the required permissions to view the files attached to this post.

m.fetzer
Posts: 9
Joined: Fri Feb 08, 2019 11:11 am

Re: Array is not traceable in Expressions during debugging

Postby m.fetzer » Mon Feb 11, 2019 2:02 pm

If I initialize the array into main() and not global I can track it over the Expressions window and it works.

That is not fine but a workaround until a patch has been released.

frank_ee
Posts: 88
Joined: Wed Apr 05, 2017 5:08 pm
Location: USA

Re: Array is not traceable in Expressions during debugging

Postby frank_ee » Mon Feb 11, 2019 7:39 pm

Hello,

Can you see the array when it's a global variable?

Initialize the array contents like: unsigned char array[2] = { 0x00, 0x01 };

m.fetzer
Posts: 9
Joined: Fri Feb 08, 2019 11:11 am

Re: Array is not traceable in Expressions during debugging

Postby m.fetzer » Tue Feb 12, 2019 7:20 am

frank_ee wrote:Hello,

Can you see the array when it's a global variable?

Initialize the array contents like: unsigned char array[2] = { 0x00, 0x01 };


As I already wrote in my previous posts. If I initialize the array, either one dimensional or two dimensional, global I don't see the content in the Expressions window during debugger. Even if I initialize it with values like your example.
I see the content only during debugger if I initialize it, either in void man(void) or as a global variable located in the flash with __attribute__.

m.fetzer
Posts: 9
Joined: Fri Feb 08, 2019 11:11 am

Re: Array is not traceable in Expressions during debugging

Postby m.fetzer » Tue Feb 19, 2019 3:04 pm

I guess the compiler optimized it because I didn't use it further in my source code.

Thanks anyway


Return to “TrueSTUDIO for STM32 discussions”

Who is online

Users browsing this forum: No registered users and 1 guest