mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-07 16:26:11 +02:00
[244025] - fixed details for variable in base class for c++, based on patch from xgsa
This commit is contained in:
parent
16deae8dfc
commit
8c185eb0d2
1 changed files with 10 additions and 0 deletions
|
@ -253,6 +253,16 @@ public abstract class Variable extends VariableDescriptor implements ICDIVariabl
|
||||||
// so it is pretty safe without to do without any other type checks
|
// so it is pretty safe without to do without any other type checks
|
||||||
childFake = true;
|
childFake = true;
|
||||||
// fn remains unchanged otherwise it would be like x->public
|
// fn remains unchanged otherwise it would be like x->public
|
||||||
|
} else if (cpp && childName.equals(vars[i].getType())) {
|
||||||
|
// it is a base class (which is returned by GDB as a field)
|
||||||
|
// (type of a child is the name of a child)
|
||||||
|
if (t instanceof ICDIPointerType) {
|
||||||
|
// fn -> casting to pointer base class
|
||||||
|
fn = "(" + childName + "*)" + fn;//$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
} else {
|
||||||
|
// fn -> casting to base class
|
||||||
|
fn = "(" + childName + ")" + fn;//$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
}
|
||||||
} else if (t instanceof ICDIArrayType) {
|
} else if (t instanceof ICDIArrayType) {
|
||||||
// For Array gdb varobj only return the index, override here.
|
// For Array gdb varobj only return the index, override here.
|
||||||
int index = castingIndex + i;
|
int index = castingIndex + i;
|
||||||
|
|
Loading…
Add table
Reference in a new issue