protected final GDBTypeParser gdbTypeParser = new GDBTypeParser();
@SuppressWarnings("unused")
protected GDBType getCorrectedGdbType(String newTypeName, GDBType gdbType) {
if(gdbType.getType() == GDBType.ARRAY && gdbType instanceof GDBDerivedType) {
GDBDerivedType gdbDerivedType = (GDBDerivedType) gdbType;
if(gdbDerivedType.getDimension() == 0) {
// Correct a limitation in the GDBTypeParser when a "[]" type decl is present
// CDT will think it's a pointer-like C-style array, and will try to display a custom node structure.
// But in other languages, it's more likely to be a struct, so report as generic type.
gdbType = gdbTypeParser.new GDBDerivedType(gdbDerivedType.getChild(), GDBType.GENERIC);
}
}
return gdbType;
}