Topic : Debugging shows incorrect local variable addresses and values

Forum : Ride IDE

Original Post
Post Information Post
February 9, 2016 - 9:11pm
Jacob Egner

When I am debugging, the "View Locals" window shows local variables, but it seems to get the address of the local variables incorrect (all off by some offset), and thus display local variable values incorrectly as well.

Ride7 (version 7.60.15.0327) doesn't display all functions' local variables incorrectly, and I've tried to find out what factors cause the issue, but that has been a very thorny endeavor.  The issue seems to be identical regardless of whether I use the GCC option of "ARM call conventions".  The behavior of the program is correct, just the debugger's display of local variables is incorrect.

Another issue which I am unsure is related or not: I can not step into functions.  Pressing the step-into button steps over functions.  In order to step into a function, I have to do an assembly-step-into.  And once I've done an assembly-step-into, it seems every step operation (step over and step into) steps one assembly statement at a time, rather than C statements.

Replies
Post Information Post
+1
0
-1
February 17, 2016 - 9:13am
Etienne Cassin

Dear Jacob,

Strange behaviour, before to release a new version, watch and steps are tested. Maybe you installed an old Rkit-ARM.

Which version of Rkit-ARM are you using? I thing something went wrong during the installation, I suggest you to do a clean installation:

uninstall Ride7 and Rkit-ARM with the small application provided at http://support.raisonance.com/content/how-can-i-uninstall-all-raisonance-tools-same-time and install again the last release of Ride7 (http://support.raisonance.com/content/760150327) and Rkit-ARM (http://support.raisonance.com/content/162150334).

Please let me know if it solves your issue.

Best regards,

+1
0
-1
February 17, 2016 - 7:37pm
Jacob Egner

>Which version of Rkit-ARM are you using?

In Ride7, the "About Ride7" window reports the following versions...

Ride7: 7.60.15.0327

RKit-ARM for Ride7: 1.62.15.0334

>I thing something went wrong during the installation, I suggest you to do a clean installation...uninstall Ride7 and Rkit-ARM with the small application…install again the last release of Ride7…and Rkit-ARM

I have followed those steps.  The problem remains.

Just so you have more information…

I've uninstalled and installed the latest Ride7 and RKit-ARM several times before.  I even tried out Ride7 v7.30.10.0169 with RKit-ARM v1.26.10.0130, and that displayed local variables correctly for a while, then one day it stopped displaying local variables completely, and even reinstalling that old version did not fix that issue.

+1
0
-1
February 19, 2016 - 8:08pm
Jacob Egner

I've created a minimal project to demonstrate the local variable issue.  The forum seems like it only allows me to attach particular file types, so I've attached the following ods file that is really a zip file:demo_local_var_issue_2016-02-19_1238_really_a_zip.ods

Included in the zip is this main.c, which contains all code except for startup assembly code: main.txt

Also, I have four pictures showing the "local variables" window, disassembly window, c code window, and registers window at various points in execution:

01_bad_function_before_call.png

02_bad_function_inside_call.png

03_good_function_before_call.png

04_good_function_inside_call.png

+1
0
-1
February 19, 2016 - 8:59pm
Jacob Egner

I just noticed that my pictures do not show the full address of localVar.

In badFunction: 0x500162CC

In goodFunction: 0x5001162DC

+1
0
-1
February 24, 2016 - 11:58am
Etienne Cassin

Dear Jacob,

Thank you for the project.

I transfer this issue to my colleague in charge of Ride7. Note that the right value and address is visible when debugging into disassembly view at the "return 0;"

We will let you know as soon as possible.

Best regards,

+1
0
-1
March 1, 2016 - 2:43pm
Etienne Cassin

We fixed the issue. we are now testing it...

+1
0
-1
March 8, 2016 - 4:41pm
Jacob Egner

That's great news.  Is there anything I can do to assist in the matter?

+1
0
-1
March 10, 2016 - 11:15am
Etienne Cassin

I confirm that the bug is fixed.

Let see the other issue about step into - step over...

+1
0
-1
March 31, 2016 - 1:56pm
Tobias Wedell

I have the same issues as Jacob.
I spend some hours in finding the fault in my code :( 

Are these bugs solved now? And when there is a new Ride7 version?

+1
0
-1
April 1, 2016 - 9:05am
Etienne Cassin

Dear tobias,

Yes the bug is solved but we didn't released yet. Please contact and we will provide the way to fix this problem.

Best regards,