mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 19:42:36 +02:00
Merge remote-tracking branch
'origin/GP-3260_ghidra1_ElfMipsRelocs--SQUASHED' (Closes #5160) Conflicts: Ghidra/Features/DecompilerDependent/src/main/java/ghidra/app/extension/datatype/finder/DecompilerReference.java
This commit is contained in:
commit
d0e28a7036
12 changed files with 271 additions and 245 deletions
|
@ -156,17 +156,14 @@ public abstract class DecompilerReference {
|
|||
public static DataType getFieldDataType(ClangFieldToken field) {
|
||||
DataType fieldDt = field.getDataType();
|
||||
fieldDt = DecompilerReference.getBaseType(fieldDt);
|
||||
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();
|
||||
if (fieldDt instanceof Structure parent) {
|
||||
int offset = field.getOffset();
|
||||
int n = parent.getLength();
|
||||
if (offset >= 0 && offset < n) {
|
||||
DataTypeComponent dtc = parent.getComponentContaining(field.getOffset());
|
||||
if (dtc != null) {
|
||||
return dtc.getDataType();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue