mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
GP-4376 Updated gcc class recovery to allow for special typeinfos that
are not in program memory or external block. Also updated to add a check for unhandled relocations. Also updated to allow for non-mangled typeinfo-name strings.
This commit is contained in:
parent
3e35b4d4a7
commit
b04d5335ca
5 changed files with 318 additions and 128 deletions
|
@ -80,7 +80,9 @@ public class Vtable {
|
|||
this.monitor = monitor;
|
||||
this.typeinfoRefAddress = typeinfoRef.getAddress();
|
||||
this.typeinfo = (GccTypeinfo) typeinfoRef.getReferencedTypeinfo();
|
||||
this.typeinfoNamespace = typeinfo.getNamespace();
|
||||
if (this.typeinfo != null) {
|
||||
this.typeinfoNamespace = typeinfo.getNamespace();
|
||||
}
|
||||
|
||||
AddressSpace addressSpace = vtableAddress.getAddressSpace();
|
||||
defaultPointerSize = addressSpace.getPointerSize();
|
||||
|
@ -390,9 +392,6 @@ public class Vtable {
|
|||
*/
|
||||
private boolean isPossibleFunctionPointer(Address address) throws CancelledException {
|
||||
|
||||
// TODO: make one that works for all casea in helper
|
||||
// TODO: make sure it recognizes the external functions
|
||||
|
||||
long longValue = extendedFlatAPI.getLongValueAt(address);
|
||||
|
||||
Register lowBitCodeMode = program.getRegister("LowBitCodeMode");
|
||||
|
@ -605,26 +604,6 @@ public class Vtable {
|
|||
public List<Vtable> getInternalVtables() {
|
||||
return internalVtables;
|
||||
}
|
||||
|
||||
|
||||
// TODO: put in helper or ext api
|
||||
private boolean inExternalBlock(Address address) {
|
||||
|
||||
MemoryBlock externalBlock = getExternalBlock();
|
||||
if (externalBlock == null) {
|
||||
return false;
|
||||
}
|
||||
if (externalBlock.contains(address)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
private MemoryBlock getExternalBlock() {
|
||||
return program.getMemory().getBlock("EXTERNAL");
|
||||
}
|
||||
|
||||
|
||||
public void setIsConstructionVtable(Boolean setting) {
|
||||
isConstruction = setting;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue