After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 386594 - Display doesn't update variables content
Display doesn't update variables content
Status: RESOLVED FIXED
Product: nemiver
Classification: Other
Component: general
trunk
Other Linux
: Normal normal
: ---
Assigned To: Nemiver maintainers
Nemiver maintainers
Depends on: 573678
Blocks:
 
 
Reported: 2006-12-16 20:14 UTC by Bruno Dusausoy
Modified: 2009-05-26 19:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fictive C source file (456 bytes, text/plain)
2008-12-01 20:26 UTC, Jean-Philippe Fleury
Details
Fictive C source file (451 bytes, text/plain)
2008-12-01 20:34 UTC, Jean-Philippe Fleury
Details
The screen shot of the variables content (80.79 KB, image/png)
2008-12-01 20:55 UTC, Jean-Philippe Fleury
Details
"Dereferenced Variables" not updated (17.03 KB, image/png)
2009-02-02 14:50 UTC, Jean-Philippe Fleury
Details

Description Bruno Dusausoy 2006-12-16 20:14:35 UTC
I have a function that takes a pointer to a class as argument.
Within this function, I call a method that modifies the content of member variables.
So, when stepping through this code, the value of the member being updated should change. It's done internally but the display (the "value" field of the "Variables" tab) doesn't reflect it - the display is not updated.
Comment 1 Dodji Seketeli 2006-12-16 20:28:13 UTC
If I understand correctly, 

What don't get updated (when you step in the function) is the members of the class _pointed_ to by the pointer declared in the current scope.

On the other hand, if you have a local instance of a class (not a pointer to an instance), the members of that instance get updated. Don't they ?
Comment 2 Bruno Dusausoy 2006-12-16 20:40:35 UTC
Indeed, that's exactly what I meant. Sorry for my confusing explanation.
Comment 3 Dodji Seketeli 2007-01-08 10:32:28 UTC
Hello,

Changeset #362 should fix your problem.

Closing the bug for now.

Cheers,

Dodji.
Comment 4 Jean-Philippe Fleury 2008-12-01 19:13:12 UTC
I have still this bug on Nemiver 0.6.3. My variables content are often not updated in the "Variables" tab. I will attach a file on the next message to explain the bug that I have.
Comment 5 Jean-Philippe Fleury 2008-12-01 20:26:25 UTC
Created attachment 123758 [details]
Fictive C source file

I attach a fictive C source file to illustrate the bug. On a next message, I will attach a screen shot. Here's how to reproduce the bug:

1) Compile this source and open the executable with Nemiver:

gcc -g exemple.c -o exemple && nemiver exemple

2) For all this demonstration, I use the Step ("Execute next line, stepping into the next function, if any") action.

3) We start on line 11 (Nemiver puts automatically a breakpoint at this line). Actual situation:

tab array isn't initialized (see the dot number 1 on the next attached image). That's ok.

4) Do Step. We're now on the line 12. The tab array should be initialized, but its content isn't updated in the "Variables" tab (see the dot 2 on the next image). For comparison, on Eclipse, at this line 12, we correctly see the good tab content.

5) Do Step until the line 18. We see for the first time the updated tab content.

6) Do Step until the line 20. tab[0] should has the value -1, but it's not updated in the "Variables" tab. Click right on ptr and select "Dereference the pointer". The displayed value of *ptr is still 17, but it should be -1 (see the dot 3 on the next image).

7) Do Step until enter another time on the rechMax function. Do Step until the line 29. Dereference the p local variable and the t function argument. We see *p = 17 and *t = 17. We should see -1 instead of 17.

8) Finish the execution of the rechMax function and Step until the line 20. tab[3] should has the value -1, but it doesn't. We see tab[3] = 14. *ptr should have the value -1, but we see 17 (see the dot 4 in the next image).

9) Etc.
Comment 6 Jean-Philippe Fleury 2008-12-01 20:34:12 UTC
Created attachment 123759 [details]
Fictive C source file

The line numbers aren't good in the previous source attached. I change the file.
Comment 7 Jean-Philippe Fleury 2008-12-01 20:55:34 UTC
Created attachment 123760 [details]
The screen shot of the variables content
Comment 8 Jean-Philippe Fleury 2009-02-02 14:50:24 UTC
Created attachment 127768 [details]
"Dereferenced Variables" not updated

Unfortunately, this bug makes Nemiver almost unusable. I'll give another example with this code:


int main (void)
{
	int a = 5;
	int *p = &a;
	a = 5;
	*p = 0;
	return 0;
}


The line *p = 0; doesn't update "Dereferenced Variables" in the "Variable" tab.
Comment 9 Dodji Seketeli 2009-02-02 18:15:27 UTC
Okay, I am looking at this bug at the moment. Thanks for all the input you gave. That's very much appreciated.
Comment 10 Dodji Seketeli 2009-04-12 15:37:22 UTC
Hello Jean-Philippe,

I wanted to let you know that I am working on this issue. It's taking time, but things are going forward :)

Actually I am adding the support of a GDB feature that is named "Variable Objects". When that feature is complete, I believe this bug should go away.

I have created bug #573678 to track the progress of that feature.

I am setting that bug as a dependency for this one.

Stay tuned.
Comment 11 Jean-Philippe Fleury 2009-04-12 17:25:41 UTC
(In reply to comment #10)
> I wanted to let you know that I am working on this issue. It's taking time, but
> things are going forward :)

Thanks a lot for giving news about this report.

> Stay tuned.

Yes! :-)
Comment 12 Dodji Seketeli 2009-04-12 21:23:41 UTC
(In reply to comment #11)

> Thanks a lot for giving news about this report.

No problem. I really appreciated that you file a so detailed bug report about the issue. Also that issue has been bugging me for a while, and I made several attempts at fixing it :)

For now, in the varobjs-support branch, I think the problem about dereferenced variables not being updated is now resolved.

Also variable dereferencing is done in a more elegant way, as you just have to unfold the node of the pointer to have it dereferenced. No more need to right click, click a dereference menu item etc...

I still need time to test/debug the branch before merging it into master.

Thanks again for your time.
Comment 13 Dodji Seketeli 2009-05-26 19:01:51 UTC
Okay this bug should be fixed now, as the content of the varobjs-support branch got merged into the master branch.

It should be available in the next release of Nemiver.