mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-21 19:42:14 +00:00
Merge remote-tracking branch 'origin/GP-791_ghizard_Change_PDB_Universal_constructor_return_type' into patch
This commit is contained in:
commit
ca15889208
@ -90,6 +90,14 @@ public abstract class AbstractMemberFunctionMsType extends AbstractMsType {
|
||||
return functionAttributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if known to be a constructor.
|
||||
* @return true if constructor.
|
||||
*/
|
||||
public boolean isConstructor() {
|
||||
return functionAttributes.isConstructor();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of parameters to the function.
|
||||
* @return The number of parameters.
|
||||
|
@ -58,4 +58,8 @@ public class FunctionMsAttributes extends AbstractParsableItem {
|
||||
isInstanceConstructorOfClassWithVirtualBases = ((attributes & 0x0001) == 0x0001);
|
||||
}
|
||||
|
||||
boolean isConstructor() {
|
||||
return isInstanceConstructor || isInstanceConstructorOfClassWithVirtualBases;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -121,6 +121,14 @@ public abstract class AbstractFunctionTypeApplier extends MsTypeApplier {
|
||||
*/
|
||||
protected abstract RecordNumber getArgListRecordNumber();
|
||||
|
||||
/**
|
||||
* Returns if known to be a constructor.
|
||||
* @return true if constructor.
|
||||
*/
|
||||
protected boolean isConstructor() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to create the {@link DataType} based upon the type indices of the calling
|
||||
* convention, return type, and arguments list.
|
||||
@ -203,6 +211,10 @@ public abstract class AbstractFunctionTypeApplier extends MsTypeApplier {
|
||||
|
||||
private boolean setReturnType() {
|
||||
|
||||
if (isConstructor()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
DataType returnDataType = returnApplier.getDataType();
|
||||
if (returnDataType == null) {
|
||||
applicator.appendLogMsg("Return type is null in " + functionDefinition.getName());
|
||||
|
@ -75,6 +75,11 @@ public class MemberFunctionTypeApplier extends AbstractFunctionTypeApplier {
|
||||
return ((AbstractMemberFunctionMsType) msType).getArgListRecordNumber();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isConstructor() {
|
||||
return ((AbstractMemberFunctionMsType) msType).isConstructor();
|
||||
}
|
||||
|
||||
@Override
|
||||
void apply() throws PdbException, CancelledException {
|
||||
predefineClasses();
|
||||
@ -175,8 +180,7 @@ public class MemberFunctionTypeApplier extends AbstractFunctionTypeApplier {
|
||||
// }
|
||||
|
||||
private MsTypeApplier getThisPointerApplier(AbstractMemberFunctionMsType procType) {
|
||||
MsTypeApplier applier =
|
||||
applicator.getTypeApplier(procType.getThisPointerRecordNumber());
|
||||
MsTypeApplier applier = applicator.getTypeApplier(procType.getThisPointerRecordNumber());
|
||||
|
||||
// if ((applier instanceof PrimitiveTypeApplier &&
|
||||
// ((PrimitiveTypeApplier) applier).isNoType())) {
|
||||
|
Loading…
Reference in New Issue
Block a user