mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 09:49:23 +02:00
GP-3644_MDMang_rref_cleanup
This commit is contained in:
parent
befa5aa772
commit
b1bca74174
5 changed files with 17 additions and 17 deletions
|
@ -452,7 +452,7 @@ public class MDMangGhidra extends MDMang {
|
||||||
}
|
}
|
||||||
|
|
||||||
private DemangledFunctionReference processDemangledFunctionReference(MDModifierType refType) {
|
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.
|
return null; // Not planning on anything else yet.
|
||||||
}
|
}
|
||||||
DemangledFunctionReference functionReference =
|
DemangledFunctionReference functionReference =
|
||||||
|
@ -702,7 +702,7 @@ public class MDMangGhidra extends MDMang {
|
||||||
}
|
}
|
||||||
return resultDataType;
|
return resultDataType;
|
||||||
}
|
}
|
||||||
else if (modifierType instanceof MDDataRefRefType) {
|
else if (modifierType instanceof MDDataRightReferenceType) {
|
||||||
if ((modifierType.getReferencedType() instanceof MDFunctionType)) {
|
if ((modifierType.getReferencedType() instanceof MDFunctionType)) {
|
||||||
resultDataType.setName(getDataTypeName(datatype));
|
resultDataType.setName(getDataTypeName(datatype));
|
||||||
// TODO---------what are we returning... need to work on called routine.
|
// TODO---------what are we returning... need to work on called routine.
|
||||||
|
|
|
@ -138,7 +138,7 @@ public class MDDataTypeParser {
|
||||||
break;
|
break;
|
||||||
case 'Q':
|
case 'Q':
|
||||||
case 'R':
|
case 'R':
|
||||||
MDDataRefRefType drrt = new MDDataRefRefType(dmang);
|
MDDataRightReferenceType drrt = new MDDataRightReferenceType(dmang);
|
||||||
dt = drrt;
|
dt = drrt;
|
||||||
if (isHighest && (code == 'R')) {
|
if (isHighest && (code == 'R')) {
|
||||||
drrt.clearConst();
|
drrt.clearConst();
|
||||||
|
|
|
@ -38,10 +38,10 @@ public class MDCVMod extends MDParsableItem {
|
||||||
// with
|
// with
|
||||||
// // old code
|
// // old code
|
||||||
private static final String POINTER = "*";
|
private static final String POINTER = "*";
|
||||||
private static final String REFERENCE = "&";
|
private static final String AMPERSAND = "&";
|
||||||
private static final String CARROT = "^";
|
private static final String CARROT = "^";
|
||||||
private static final String PERCENT = "%";
|
private static final String PERCENT = "%";
|
||||||
private static final String REFREF = "&&";
|
private static final String DOUBLE_AMPERSAND = "&&";
|
||||||
|
|
||||||
private final static String PTR64 = " __ptr64";
|
private final static String PTR64 = " __ptr64";
|
||||||
private static final String UNALIGNED = "__unaligned ";
|
private static final String UNALIGNED = "__unaligned ";
|
||||||
|
@ -132,7 +132,7 @@ public class MDCVMod extends MDParsableItem {
|
||||||
plain,
|
plain,
|
||||||
pointer,
|
pointer,
|
||||||
reference,
|
reference,
|
||||||
refref,
|
rightreference,
|
||||||
carrot, // TODO: eliminate with old code
|
carrot, // TODO: eliminate with old code
|
||||||
percent, // TODO: eliminate with old code
|
percent, // TODO: eliminate with old code
|
||||||
functionpointer, // TODO: eliminate with old code
|
functionpointer, // TODO: eliminate with old code
|
||||||
|
@ -156,8 +156,8 @@ public class MDCVMod extends MDParsableItem {
|
||||||
modType = CvModifierType.reference;
|
modType = CvModifierType.reference;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRefRefTemplateParameter() {
|
public void setRightReferenceTemplateParameter() {
|
||||||
modType = CvModifierType.refref;
|
modType = CvModifierType.rightreference;
|
||||||
}
|
}
|
||||||
|
|
||||||
// public void setCarrotType() {
|
// public void setCarrotType() {
|
||||||
|
@ -828,10 +828,10 @@ public class MDCVMod extends MDParsableItem {
|
||||||
annotation = PERCENT;
|
annotation = PERCENT;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
annotation = REFERENCE;
|
annotation = AMPERSAND;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case refref:
|
case rightreference:
|
||||||
if (isCLIProperty()) { // highest precedence, even if isGC is set.
|
if (isCLIProperty()) { // highest precedence, even if isGC is set.
|
||||||
annotation = PERCENT;
|
annotation = PERCENT;
|
||||||
}
|
}
|
||||||
|
@ -839,7 +839,7 @@ public class MDCVMod extends MDParsableItem {
|
||||||
annotation = PERCENT;
|
annotation = PERCENT;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
annotation = REFREF;
|
annotation = DOUBLE_AMPERSAND;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case array:
|
case array:
|
||||||
|
|
|
@ -28,15 +28,15 @@ import mdemangler.MDMang;
|
||||||
// properties
|
// properties
|
||||||
// TODO: Seems very closely related to a "reference" type, so might find a way to merge
|
// TODO: Seems very closely related to a "reference" type, so might find a way to merge
|
||||||
// reference types together.
|
// reference types together.
|
||||||
public class MDDataRefRefType extends MDModifierType {
|
public class MDDataRightReferenceType extends MDModifierType {
|
||||||
|
|
||||||
public MDDataRefRefType(MDMang dmang) {
|
public MDDataRightReferenceType(MDMang dmang) {
|
||||||
super(dmang, 3);
|
super(dmang, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void parseInternal() throws MDException {
|
protected void parseInternal() throws MDException {
|
||||||
cvMod.setRefRefTemplateParameter();
|
cvMod.setRightReferenceTemplateParameter();
|
||||||
super.parseInternal();
|
super.parseInternal();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -127,7 +127,7 @@ public class MDModifiedTypeParser {
|
||||||
plain,
|
plain,
|
||||||
pointer,
|
pointer,
|
||||||
reference,
|
reference,
|
||||||
refref,
|
rightreference,
|
||||||
carrot, // TODO: eliminate with old code
|
carrot, // TODO: eliminate with old code
|
||||||
percent, // TODO: eliminate with old code
|
percent, // TODO: eliminate with old code
|
||||||
functionpointer, // TODO: eliminate with old code
|
functionpointer, // TODO: eliminate with old code
|
||||||
|
@ -150,8 +150,8 @@ public class MDModifiedTypeParser {
|
||||||
modType = CvModifierType.reference;
|
modType = CvModifierType.reference;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRefRefTemplateParameter() {
|
public void setRightReferenceParameter() {
|
||||||
modType = CvModifierType.refref;
|
modType = CvModifierType.rightreference;
|
||||||
}
|
}
|
||||||
|
|
||||||
// public void setCarrotType() {
|
// public void setCarrotType() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue