Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 319180 - "Variables" window shows wrong data if pointer is equal to zero
Summary: "Variables" window shows wrong data if pointer is equal to zero
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 7.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-07 14:42 EDT by Alex CLA
Modified: 2020-09-04 15:18 EDT (History)
3 users (show)

See Also:


Attachments
example class to test the problem (405 bytes, text/plain)
2010-07-07 14:43 EDT, Alex CLA
no flags Details
Screenshot of the problem (150.24 KB, image/jpeg)
2010-07-07 14:44 EDT, Alex CLA
no flags Details
CDI traces showing problem (5.42 KB, text/plain)
2010-07-08 10:06 EDT, Marc Khouzam CLA
no flags Details
DSF-GDB traces showing problem (3.31 KB, text/plain)
2010-07-08 10:06 EDT, Marc Khouzam CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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