mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
GP-1645 Added relative pointer action in the decompiler
This commit is contained in:
parent
ca410b1274
commit
ec5b6aada7
4 changed files with 540 additions and 3 deletions
|
@ -260,7 +260,7 @@ public class PcodeDataTypeManager {
|
|||
* @param offset is the offset into the base data-type
|
||||
* @return the inner data-type
|
||||
*/
|
||||
private DataType findSubType(DataType base, int offset) {
|
||||
public static DataType findPointerRelativeInner(DataType base, int offset) {
|
||||
if (base instanceof TypeDef) {
|
||||
base = ((TypeDef) base).getBaseDataType();
|
||||
}
|
||||
|
@ -297,7 +297,7 @@ public class PcodeDataTypeManager {
|
|||
}
|
||||
resBuf.append(">\n");
|
||||
DataType parent = pointer.getDataType();
|
||||
DataType ptrto = findSubType(parent, (int) offset);
|
||||
DataType ptrto = findPointerRelativeInner(parent, (int) offset);
|
||||
buildTypeRef(resBuf, ptrto, 1);
|
||||
buildTypeRef(resBuf, parent, 1);
|
||||
resBuf.append("\n<off>").append(offset).append("</off>\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue