GP-3644_MDMang_rref_cleanup

This commit is contained in:
ghizard 2023-07-17 14:37:54 -04:00
parent befa5aa772
commit b1bca74174
5 changed files with 17 additions and 17 deletions

View File

@ -452,7 +452,7 @@ public class MDMangGhidra extends MDMang {
}
private DemangledFunctionReference processDemangledFunctionReference(MDModifierType refType) {
if (!((refType instanceof MDReferenceType) || (refType instanceof MDDataRefRefType))) {
if (!((refType instanceof MDReferenceType) || (refType instanceof MDDataRightReferenceType))) {
return null; // Not planning on anything else yet.
}
DemangledFunctionReference functionReference =
@ -702,7 +702,7 @@ public class MDMangGhidra extends MDMang {
}
return resultDataType;
}
else if (modifierType instanceof MDDataRefRefType) {
else if (modifierType instanceof MDDataRightReferenceType) {
if ((modifierType.getReferencedType() instanceof MDFunctionType)) {
resultDataType.setName(getDataTypeName(datatype));
// TODO---------what are we returning... need to work on called routine.

View File

@ -138,7 +138,7 @@ public class MDDataTypeParser {
break;
case 'Q':
case 'R':
MDDataRefRefType drrt = new MDDataRefRefType(dmang);
MDDataRightReferenceType drrt = new MDDataRightReferenceType(dmang);
dt = drrt;
if (isHighest && (code == 'R')) {
drrt.clearConst();

View File

@ -38,10 +38,10 @@ public class MDCVMod extends MDParsableItem {
// with
// // old code
private static final String POINTER = "*";
private static final String REFERENCE = "&";
private static final String AMPERSAND = "&";
private static final String CARROT = "^";
private static final String PERCENT = "%";
private static final String REFREF = "&&";
private static final String DOUBLE_AMPERSAND = "&&";
private final static String PTR64 = " __ptr64";
private static final String UNALIGNED = "__unaligned ";
@ -132,7 +132,7 @@ public class MDCVMod extends MDParsableItem {
plain,
pointer,
reference,
refref,
rightreference,
carrot, // TODO: eliminate with old code
percent, // TODO: eliminate with old code
functionpointer, // TODO: eliminate with old code
@ -156,8 +156,8 @@ public class MDCVMod extends MDParsableItem {
modType = CvModifierType.reference;
}
public void setRefRefTemplateParameter() {
modType = CvModifierType.refref;
public void setRightReferenceTemplateParameter() {
modType = CvModifierType.rightreference;
}
// public void setCarrotType() {
@ -828,10 +828,10 @@ public class MDCVMod extends MDParsableItem {
annotation = PERCENT;
}
else {
annotation = REFERENCE;
annotation = AMPERSAND;
}
break;
case refref:
case rightreference:
if (isCLIProperty()) { // highest precedence, even if isGC is set.
annotation = PERCENT;
}
@ -839,7 +839,7 @@ public class MDCVMod extends MDParsableItem {
annotation = PERCENT;
}
else {
annotation = REFREF;
annotation = DOUBLE_AMPERSAND;
}
break;
case array:

View File

@ -28,15 +28,15 @@ import mdemangler.MDMang;
// properties
// TODO: Seems very closely related to a "reference" type, so might find a way to merge
// reference types together.
public class MDDataRefRefType extends MDModifierType {
public class MDDataRightReferenceType extends MDModifierType {
public MDDataRefRefType(MDMang dmang) {
public MDDataRightReferenceType(MDMang dmang) {
super(dmang, 3);
}
@Override
protected void parseInternal() throws MDException {
cvMod.setRefRefTemplateParameter();
cvMod.setRightReferenceTemplateParameter();
super.parseInternal();
}
}

View File

@ -127,7 +127,7 @@ public class MDModifiedTypeParser {
plain,
pointer,
reference,
refref,
rightreference,
carrot, // TODO: eliminate with old code
percent, // TODO: eliminate with old code
functionpointer, // TODO: eliminate with old code
@ -150,8 +150,8 @@ public class MDModifiedTypeParser {
modType = CvModifierType.reference;
}
public void setRefRefTemplateParameter() {
modType = CvModifierType.refref;
public void setRightReferenceParameter() {
modType = CvModifierType.rightreference;
}
// public void setCarrotType() {