mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-12-03 17:41:33 +00:00
Merge remote-tracking branch
'origin/GP-3263-dragonmacher-dt-finder-exception' (Closes #5164)
This commit is contained in:
commit
a43de5bf95
@ -156,15 +156,20 @@ public abstract class DecompilerReference {
|
||||
public static DataType getFieldDataType(ClangFieldToken field) {
|
||||
DataType fieldDt = field.getDataType();
|
||||
fieldDt = DecompilerReference.getBaseType(fieldDt);
|
||||
if (fieldDt instanceof Structure) {
|
||||
Structure parent = (Structure) fieldDt;
|
||||
int offset = field.getOffset();
|
||||
int n = parent.getLength();
|
||||
if (offset >= 0 && offset < n) {
|
||||
DataTypeComponent dtc = parent.getComponentContaining(field.getOffset());
|
||||
if (!(fieldDt instanceof Structure)) {
|
||||
return fieldDt;
|
||||
}
|
||||
|
||||
Structure parent = (Structure) fieldDt;
|
||||
int offset = field.getOffset();
|
||||
int n = parent.getLength();
|
||||
if (offset >= 0 && offset < n) {
|
||||
DataTypeComponent dtc = parent.getComponentContaining(field.getOffset());
|
||||
if (dtc != null) {
|
||||
fieldDt = dtc.getDataType();
|
||||
}
|
||||
}
|
||||
|
||||
return fieldDt;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user