Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 319180

Summary: "Variables" window shows wrong data if pointer is equal to zero
Product: [Tools] CDT Reporter: Alex <alexei.kornienko>
Component: cdt-debugAssignee: cdt-debug-inbox <cdt-debug-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: normal    
Priority: P3 CC: alexei.kornienko, elaskavaia.cdt, pawel.1.piech
Version: 7.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
example class to test the problem
none
Screenshot of the problem
none
CDI traces showing problem
none
DSF-GDB traces showing problem none

Description Alex CLA 2010-07-07 14:42:36 EDT
Build Identifier: 20100617-1415

I have pointer to an object and it is equal zero.
In "Variables" view eclipse is trying to read memory at address 0x0 and shows empty object of that class.
This is wrong cause in case of data structure such as linked list this happens recursively.
Please see screenshot attached.

Reproducible: Always

Steps to Reproduce:
1. Create object of the class attached
2. Start debug
3. See "Variables" window, open next item
Comment 1 Alex CLA 2010-07-07 14:43:28 EDT
Created attachment 173698 [details]
example class to test the problem
Comment 2 Alex CLA 2010-07-07 14:44:17 EDT
Created attachment 173699 [details]
Screenshot of the problem
Comment 3 Elena Laskavaia CLA 2010-07-07 21:22:49 EDT
Do you have gdb log? I don't think it is CDT problem...
Comment 4 Alex CLA 2010-07-08 05:16:17 EDT
(In reply to comment #3)
> Do you have gdb log? I don't think it is CDT problem...

No I don't :(, you can easily reproduce this bug and get all the logs for yourself. I don't insist that this bug is in CDT cause I don't know eclipse structure well, but it is definitely a bug
Comment 5 Marc Khouzam CLA 2010-07-08 10:05:24 EDT
This happens with both CDI and DSF and, as Elena guessed, seems to be a GDB quirk.  I'll attach the traces and one can see that GDB keeps reporting more and more children.  It would be interesting to as the gdb mailing list if there is a good reason for this behavior.  I used GDB 7.1
Comment 6 Marc Khouzam CLA 2010-07-08 10:06:15 EDT
Created attachment 173773 [details]
CDI traces showing problem
Comment 7 Marc Khouzam CLA 2010-07-08 10:06:41 EDT
Created attachment 173774 [details]
DSF-GDB traces showing problem