mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-31 11:55:37 +08:00
Merge remote-tracking branch
'origin/GP-5447_ghizard_fix_spelling_on_vxt_methods_and_variables'
This commit is contained in:
+2
-2
@@ -84,7 +84,7 @@ public class ClassTypeManager {
|
|||||||
* Returns the default size of a virtual base table entry
|
* Returns the default size of a virtual base table entry
|
||||||
* @return the size of the entry
|
* @return the size of the entry
|
||||||
*/
|
*/
|
||||||
public int getDefaultVbtTableElementSize() {
|
public int getDefaultVbTableElementSize() {
|
||||||
return dtm.getDataOrganization().getIntegerSize();
|
return dtm.getDataOrganization().getIntegerSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ public class ClassTypeManager {
|
|||||||
* Returns the default size of a virtual function table entry
|
* Returns the default size of a virtual function table entry
|
||||||
* @return the size of the entry
|
* @return the size of the entry
|
||||||
*/
|
*/
|
||||||
public int getDefaultVftTableElementSize() {
|
public int getDefaultVfTableElementSize() {
|
||||||
return dtm.getDataOrganization().getPointerSize();
|
return dtm.getDataOrganization().getPointerSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -552,7 +552,7 @@ public class MsVxtManager extends VxtManager {
|
|||||||
|
|
||||||
case VFT:
|
case VFT:
|
||||||
ProgramVirtualFunctionTable vft = new ProgramVirtualFunctionTable(owner, parentage,
|
ProgramVirtualFunctionTable vft = new ProgramVirtualFunctionTable(owner, parentage,
|
||||||
program, address, ctm.getDefaultVftTableElementSize(), mangled);
|
program, address, ctm.getDefaultVfTableElementSize(), mangled);
|
||||||
if (node.getVFTable() != null) {
|
if (node.getVFTable() != null) {
|
||||||
Msg.warn(this, "VFT already exists at node for " + mangled);
|
Msg.warn(this, "VFT already exists at node for " + mangled);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
+19
-19
@@ -130,9 +130,9 @@ public class CppCompositeType {
|
|||||||
private List<Member> layoutVftPtrMembers;
|
private List<Member> layoutVftPtrMembers;
|
||||||
private List<Member> layoutVbtPtrMembers;
|
private List<Member> layoutVbtPtrMembers;
|
||||||
|
|
||||||
private Map<Long, OwnerParentage> vftTableIdByOffset; // possibly future use
|
private Map<Long, OwnerParentage> vfTableIdByOffset; // possibly future use
|
||||||
private Map<OwnerParentage, Long> vftOffsetByTableId; // possibly future use
|
private Map<OwnerParentage, Long> vftOffsetByTableId; // possibly future use
|
||||||
private Map<Long, OwnerParentage> vbtTableIdByOffset; //we use this one
|
private Map<Long, OwnerParentage> vbTableIdByOffset; //we use this one
|
||||||
private Map<OwnerParentage, Long> vbtOffsetByTableId; // possibly future use
|
private Map<OwnerParentage, Long> vbtOffsetByTableId; // possibly future use
|
||||||
|
|
||||||
private TreeMap<ClassID, Long> baseOffsetById;
|
private TreeMap<ClassID, Long> baseOffsetById;
|
||||||
@@ -846,9 +846,9 @@ public class CppCompositeType {
|
|||||||
layoutVftPtrMembers = new ArrayList<>();
|
layoutVftPtrMembers = new ArrayList<>();
|
||||||
layoutVbtPtrMembers = new ArrayList<>();
|
layoutVbtPtrMembers = new ArrayList<>();
|
||||||
|
|
||||||
vftTableIdByOffset = new HashMap<>();
|
vfTableIdByOffset = new HashMap<>();
|
||||||
vftOffsetByTableId = new HashMap<>();
|
vftOffsetByTableId = new HashMap<>();
|
||||||
vbtTableIdByOffset = new HashMap<>();
|
vbTableIdByOffset = new HashMap<>();
|
||||||
vbtOffsetByTableId = new HashMap<>();
|
vbtOffsetByTableId = new HashMap<>();
|
||||||
|
|
||||||
baseOffsetById = new TreeMap<>();
|
baseOffsetById = new TreeMap<>();
|
||||||
@@ -1263,7 +1263,7 @@ public class CppCompositeType {
|
|||||||
createSelfOwnedDirectVxtPtrInfo(parentInfo, baseId, baseOffset);
|
createSelfOwnedDirectVxtPtrInfo(parentInfo, baseId, baseOffset);
|
||||||
updateVft(vxtManager, baseId, newInfo, parentInfo);
|
updateVft(vxtManager, baseId, newInfo, parentInfo);
|
||||||
storeVxtInfo(propagatedSelfBaseVfts, finalVftPtrInfoByOffset,
|
storeVxtInfo(propagatedSelfBaseVfts, finalVftPtrInfoByOffset,
|
||||||
vftTableIdByOffset, vftOffsetByTableId, newInfo);
|
vfTableIdByOffset, vftOffsetByTableId, newInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (cppBaseType.getPropagatedSelfBaseVbts() != null) {
|
if (cppBaseType.getPropagatedSelfBaseVbts() != null) {
|
||||||
@@ -1272,7 +1272,7 @@ public class CppCompositeType {
|
|||||||
createSelfOwnedDirectVxtPtrInfo(parentInfo, baseId, baseOffset);
|
createSelfOwnedDirectVxtPtrInfo(parentInfo, baseId, baseOffset);
|
||||||
updateVbt(vxtManager, baseId, newInfo, parentInfo);
|
updateVbt(vxtManager, baseId, newInfo, parentInfo);
|
||||||
storeVxtInfo(propagatedSelfBaseVbts, finalVbtPtrInfoByOffset,
|
storeVxtInfo(propagatedSelfBaseVbts, finalVbtPtrInfoByOffset,
|
||||||
vbtTableIdByOffset, vbtOffsetByTableId, newInfo);
|
vbTableIdByOffset, vbtOffsetByTableId, newInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1296,25 +1296,25 @@ public class CppCompositeType {
|
|||||||
VxtPtrInfo newInfo = createSelfOwnedVirtualVxtPtrInfo(info);
|
VxtPtrInfo newInfo = createSelfOwnedVirtualVxtPtrInfo(info);
|
||||||
updateVft(vxtManager, baseId, newInfo, info);
|
updateVft(vxtManager, baseId, newInfo, info);
|
||||||
storeVxtInfo(propagatedDirectVirtualBaseVfts, finalVftPtrInfoByOffset,
|
storeVxtInfo(propagatedDirectVirtualBaseVfts, finalVftPtrInfoByOffset,
|
||||||
vftTableIdByOffset, vftOffsetByTableId, newInfo);
|
vfTableIdByOffset, vftOffsetByTableId, newInfo);
|
||||||
}
|
}
|
||||||
for (VxtPtrInfo info : cppBaseType.getPropagatedDirectVirtualBaseVbts()) {
|
for (VxtPtrInfo info : cppBaseType.getPropagatedDirectVirtualBaseVbts()) {
|
||||||
VxtPtrInfo newInfo = createSelfOwnedVirtualVxtPtrInfo(info);
|
VxtPtrInfo newInfo = createSelfOwnedVirtualVxtPtrInfo(info);
|
||||||
updateVbt(vxtManager, baseId, newInfo, info);
|
updateVbt(vxtManager, baseId, newInfo, info);
|
||||||
storeVxtInfo(propagatedDirectVirtualBaseVbts, finalVbtPtrInfoByOffset,
|
storeVxtInfo(propagatedDirectVirtualBaseVbts, finalVbtPtrInfoByOffset,
|
||||||
vbtTableIdByOffset, vbtOffsetByTableId, newInfo);
|
vbTableIdByOffset, vbtOffsetByTableId, newInfo);
|
||||||
}
|
}
|
||||||
for (VxtPtrInfo info : cppBaseType.getPropagatedIndirectVirtualBaseVfts()) {
|
for (VxtPtrInfo info : cppBaseType.getPropagatedIndirectVirtualBaseVfts()) {
|
||||||
VxtPtrInfo newInfo = createSelfOwnedVirtualVxtPtrInfo(info);
|
VxtPtrInfo newInfo = createSelfOwnedVirtualVxtPtrInfo(info);
|
||||||
updateVft(vxtManager, baseId, newInfo, info);
|
updateVft(vxtManager, baseId, newInfo, info);
|
||||||
storeVxtInfo(propagatededIndirectVirtualBaseVfts, finalVftPtrInfoByOffset,
|
storeVxtInfo(propagatededIndirectVirtualBaseVfts, finalVftPtrInfoByOffset,
|
||||||
vftTableIdByOffset, vftOffsetByTableId, newInfo);
|
vfTableIdByOffset, vftOffsetByTableId, newInfo);
|
||||||
}
|
}
|
||||||
for (VxtPtrInfo info : cppBaseType.getPropagatedIndirectVirtualBaseVbts()) {
|
for (VxtPtrInfo info : cppBaseType.getPropagatedIndirectVirtualBaseVbts()) {
|
||||||
VxtPtrInfo newInfo = createSelfOwnedVirtualVxtPtrInfo(info);
|
VxtPtrInfo newInfo = createSelfOwnedVirtualVxtPtrInfo(info);
|
||||||
updateVbt(vxtManager, baseId, newInfo, info);
|
updateVbt(vxtManager, baseId, newInfo, info);
|
||||||
storeVxtInfo(propagatedIndirectVirtualBaseVbts, finalVbtPtrInfoByOffset,
|
storeVxtInfo(propagatedIndirectVirtualBaseVbts, finalVbtPtrInfoByOffset,
|
||||||
vbtTableIdByOffset, vbtOffsetByTableId, newInfo);
|
vbTableIdByOffset, vbtOffsetByTableId, newInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1330,37 +1330,37 @@ public class CppCompositeType {
|
|||||||
VxtPtrInfo newInfo = createVirtualOwnedSelfVxtPtrInfo(info, baseId);
|
VxtPtrInfo newInfo = createVirtualOwnedSelfVxtPtrInfo(info, baseId);
|
||||||
updateVft(vxtManager, baseId, newInfo, info);
|
updateVft(vxtManager, baseId, newInfo, info);
|
||||||
storeVxtInfo(propagatedDirectVirtualBaseVfts, finalVftPtrInfoByOffset,
|
storeVxtInfo(propagatedDirectVirtualBaseVfts, finalVftPtrInfoByOffset,
|
||||||
vftTableIdByOffset, vftOffsetByTableId, newInfo);
|
vfTableIdByOffset, vftOffsetByTableId, newInfo);
|
||||||
}
|
}
|
||||||
for (VxtPtrInfo info : cppBaseType.getPropagatedSelfBaseVbts()) {
|
for (VxtPtrInfo info : cppBaseType.getPropagatedSelfBaseVbts()) {
|
||||||
VxtPtrInfo newInfo = createVirtualOwnedSelfVxtPtrInfo(info, baseId);
|
VxtPtrInfo newInfo = createVirtualOwnedSelfVxtPtrInfo(info, baseId);
|
||||||
updateVbt(vxtManager, baseId, newInfo, info);
|
updateVbt(vxtManager, baseId, newInfo, info);
|
||||||
storeVxtInfo(propagatedDirectVirtualBaseVbts, finalVbtPtrInfoByOffset,
|
storeVxtInfo(propagatedDirectVirtualBaseVbts, finalVbtPtrInfoByOffset,
|
||||||
vbtTableIdByOffset, vbtOffsetByTableId, newInfo);
|
vbTableIdByOffset, vbtOffsetByTableId, newInfo);
|
||||||
}
|
}
|
||||||
for (VxtPtrInfo info : cppBaseType.getPropagatedDirectVirtualBaseVfts()) {
|
for (VxtPtrInfo info : cppBaseType.getPropagatedDirectVirtualBaseVfts()) {
|
||||||
VxtPtrInfo newInfo = createVirtualOwnedVirtualVxtPtrInfo(info);
|
VxtPtrInfo newInfo = createVirtualOwnedVirtualVxtPtrInfo(info);
|
||||||
updateVft(vxtManager, baseId, newInfo, info);
|
updateVft(vxtManager, baseId, newInfo, info);
|
||||||
storeVxtInfo(propagatededIndirectVirtualBaseVfts, finalVftPtrInfoByOffset,
|
storeVxtInfo(propagatededIndirectVirtualBaseVfts, finalVftPtrInfoByOffset,
|
||||||
vftTableIdByOffset, vftOffsetByTableId, newInfo);
|
vfTableIdByOffset, vftOffsetByTableId, newInfo);
|
||||||
}
|
}
|
||||||
for (VxtPtrInfo info : cppBaseType.getPropagatedDirectVirtualBaseVbts()) {
|
for (VxtPtrInfo info : cppBaseType.getPropagatedDirectVirtualBaseVbts()) {
|
||||||
VxtPtrInfo newInfo = createVirtualOwnedVirtualVxtPtrInfo(info);
|
VxtPtrInfo newInfo = createVirtualOwnedVirtualVxtPtrInfo(info);
|
||||||
updateVbt(vxtManager, baseId, newInfo, info);
|
updateVbt(vxtManager, baseId, newInfo, info);
|
||||||
storeVxtInfo(propagatedIndirectVirtualBaseVbts, finalVbtPtrInfoByOffset,
|
storeVxtInfo(propagatedIndirectVirtualBaseVbts, finalVbtPtrInfoByOffset,
|
||||||
vbtTableIdByOffset, vbtOffsetByTableId, newInfo);
|
vbTableIdByOffset, vbtOffsetByTableId, newInfo);
|
||||||
}
|
}
|
||||||
for (VxtPtrInfo info : cppBaseType.getPropagatedIndirectVirtualBaseVfts()) {
|
for (VxtPtrInfo info : cppBaseType.getPropagatedIndirectVirtualBaseVfts()) {
|
||||||
VxtPtrInfo newInfo = createVirtualOwnedVirtualVxtPtrInfo(info);
|
VxtPtrInfo newInfo = createVirtualOwnedVirtualVxtPtrInfo(info);
|
||||||
updateVft(vxtManager, baseId, newInfo, info);
|
updateVft(vxtManager, baseId, newInfo, info);
|
||||||
storeVxtInfo(propagatededIndirectVirtualBaseVfts, finalVftPtrInfoByOffset,
|
storeVxtInfo(propagatededIndirectVirtualBaseVfts, finalVftPtrInfoByOffset,
|
||||||
vftTableIdByOffset, vftOffsetByTableId, newInfo);
|
vfTableIdByOffset, vftOffsetByTableId, newInfo);
|
||||||
}
|
}
|
||||||
for (VxtPtrInfo info : cppBaseType.getPropagatedIndirectVirtualBaseVbts()) {
|
for (VxtPtrInfo info : cppBaseType.getPropagatedIndirectVirtualBaseVbts()) {
|
||||||
VxtPtrInfo newInfo = createVirtualOwnedVirtualVxtPtrInfo(info);
|
VxtPtrInfo newInfo = createVirtualOwnedVirtualVxtPtrInfo(info);
|
||||||
updateVbt(vxtManager, baseId, newInfo, info);
|
updateVbt(vxtManager, baseId, newInfo, info);
|
||||||
storeVxtInfo(propagatedIndirectVirtualBaseVbts, finalVbtPtrInfoByOffset,
|
storeVxtInfo(propagatedIndirectVirtualBaseVbts, finalVbtPtrInfoByOffset,
|
||||||
vbtTableIdByOffset, vbtOffsetByTableId, newInfo);
|
vbTableIdByOffset, vbtOffsetByTableId, newInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1535,7 +1535,7 @@ public class CppCompositeType {
|
|||||||
finalVftByOffset.put(info.finalOffset(), myVft);
|
finalVftByOffset.put(info.finalOffset(), myVft);
|
||||||
finalVftPtrInfoByOffset.put(info.accumOffset(), info);
|
finalVftPtrInfoByOffset.put(info.accumOffset(), info);
|
||||||
OwnerParentage op = new OwnerParentage(info.baseId(), info.parentage());
|
OwnerParentage op = new OwnerParentage(info.baseId(), info.parentage());
|
||||||
vftTableIdByOffset.put(info.accumOffset(), op);
|
vfTableIdByOffset.put(info.accumOffset(), op);
|
||||||
vftOffsetByTableId.put(op, info.accumOffset());
|
vftOffsetByTableId.put(op, info.accumOffset());
|
||||||
Member newMember = new Member(ClassUtils.VFPTR, ClassUtils.VXPTR_TYPE, false,
|
Member newMember = new Member(ClassUtils.VFPTR, ClassUtils.VXPTR_TYPE, false,
|
||||||
ClassFieldAttributes.UNKNOWN, myVftPtrOffset.intValue());
|
ClassFieldAttributes.UNKNOWN, myVftPtrOffset.intValue());
|
||||||
@@ -1572,7 +1572,7 @@ public class CppCompositeType {
|
|||||||
finalVbtByOffset.put(info.finalOffset(), myVbt);
|
finalVbtByOffset.put(info.finalOffset(), myVbt);
|
||||||
finalVbtPtrInfoByOffset.put(info.accumOffset(), info);
|
finalVbtPtrInfoByOffset.put(info.accumOffset(), info);
|
||||||
OwnerParentage op = new OwnerParentage(info.baseId(), info.parentage());
|
OwnerParentage op = new OwnerParentage(info.baseId(), info.parentage());
|
||||||
vbtTableIdByOffset.put(info.accumOffset(), op);
|
vbTableIdByOffset.put(info.accumOffset(), op);
|
||||||
vbtOffsetByTableId.put(op, info.accumOffset());
|
vbtOffsetByTableId.put(op, info.accumOffset());
|
||||||
myVbtPtrOffset = finalVbtPtrInfoByOffset.firstKey();
|
myVbtPtrOffset = finalVbtPtrInfoByOffset.firstKey();
|
||||||
Member newMember = new Member(ClassUtils.VBPTR, ClassUtils.VXPTR_TYPE, false,
|
Member newMember = new Member(ClassUtils.VBPTR, ClassUtils.VXPTR_TYPE, false,
|
||||||
@@ -1873,7 +1873,7 @@ public class CppCompositeType {
|
|||||||
|
|
||||||
// private void addVirtualFunctionTableEntry(MsftVxtManager vxtManager, int offsetInTable,
|
// private void addVirtualFunctionTableEntry(MsftVxtManager vxtManager, int offsetInTable,
|
||||||
// SymbolPath methodPath, FunctionDefinition functionDefinition) throws PdbException {
|
// SymbolPath methodPath, FunctionDefinition functionDefinition) throws PdbException {
|
||||||
// OwnerParentage op = vftTableIdByOffset.get(mainVftPtrOffset);
|
// OwnerParentage op = vfTableIdByOffset.get(mainVftPtrOffset);
|
||||||
// if (op == null) {
|
// if (op == null) {
|
||||||
// // error
|
// // error
|
||||||
// return;
|
// return;
|
||||||
|
|||||||
Reference in New Issue
Block a user