Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 304010 | Differences between
and this patch

Collapse All | Expand All

(-)cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java (-2 / +3 lines)
Lines 256-267 Link Here
256
				} else if (cpp && childName.equals(vars[i].getType())) {
256
				} else if (cpp && childName.equals(vars[i].getType())) {
257
					// it is a base class (which is returned by GDB as a field)
257
					// it is a base class (which is returned by GDB as a field)
258
					// (type of a child is the name of a child)
258
					// (type of a child is the name of a child)
259
					String childNameForCast = childName.contains("::") ? "'" + childName + "'" : childName; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
259
					if (t instanceof ICDIPointerType) {
260
					if (t instanceof ICDIPointerType) {
260
						// fn -> casting to pointer base class
261
						// fn -> casting to pointer base class
261
						fn = "(" + childName + "*)" + fn;//$NON-NLS-1$ //$NON-NLS-2$
262
						fn = "(struct " + childNameForCast + ")(*" + fn+")";//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
262
					} else {
263
					} else {
263
						// fn -> casting to base class
264
						// fn -> casting to base class
264
						fn = "(" + childName + ")" + fn;//$NON-NLS-1$ //$NON-NLS-2$
265
						fn = "(struct " + childNameForCast + ")" + fn;//$NON-NLS-1$ //$NON-NLS-2$
265
					}
266
					}
266
				} else if (t instanceof ICDIArrayType) {
267
				} else if (t instanceof ICDIArrayType) {
267
					// For Array gdb varobj only return the index, override here.
268
					// For Array gdb varobj only return the index, override here.

Return to bug 304010