mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 09:49:23 +02:00
Merge remote-tracking branch 'origin/GP-5867_dev747368_dwarf_only_iterate_defined_dtc' into patch
This commit is contained in:
commit
60ff7c9791
2 changed files with 6 additions and 6 deletions
|
@ -115,14 +115,14 @@ public class DWARFDataTypeConflictHandler extends DataTypeConflictHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, DataTypeComponent> fullComponentsByName = new HashMap<>();
|
Map<String, DataTypeComponent> fullComponentsByName = new HashMap<>();
|
||||||
for (DataTypeComponent dtc : full.getComponents()) {
|
for (DataTypeComponent dtc : full.getDefinedComponents()) {
|
||||||
String name = dtc.getFieldName();
|
String name = dtc.getFieldName();
|
||||||
if (name == null) {
|
if (name == null) {
|
||||||
name = dtc.getDefaultFieldName();
|
name = dtc.getDefaultFieldName();
|
||||||
}
|
}
|
||||||
fullComponentsByName.put(name, dtc);
|
fullComponentsByName.put(name, dtc);
|
||||||
}
|
}
|
||||||
for (DataTypeComponent dtc : part.getComponents()) {
|
for (DataTypeComponent dtc : part.getDefinedComponents()) {
|
||||||
String name = dtc.getFieldName();
|
String name = dtc.getFieldName();
|
||||||
if (name == null) {
|
if (name == null) {
|
||||||
name = dtc.getDefaultFieldName();
|
name = dtc.getDefaultFieldName();
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class DataTypeGraphComparator {
|
||||||
* @param dt2 matching element from the second/right/dest DataType graph
|
* @param dt2 matching element from the second/right/dest DataType graph
|
||||||
* @return false if abort this subtree, true if continue
|
* @return false if abort this subtree, true if continue
|
||||||
*/
|
*/
|
||||||
public boolean observe(DataType dt1, DataType dt2);
|
boolean observe(DataType dt1, DataType dt2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -156,7 +156,7 @@ public class DataTypeGraphComparator {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void compare(Structure pre, Structure post) {
|
private void compare(Structure pre, Structure post) {
|
||||||
for (DataTypeComponent dtc : pre.getComponents()) {
|
for (DataTypeComponent dtc : pre.getDefinedComponents()) {
|
||||||
DataType preDTCType = dtc.getDataType();
|
DataType preDTCType = dtc.getDataType();
|
||||||
DataTypeComponent postDTC = post.getComponentAt(dtc.getOffset());
|
DataTypeComponent postDTC = post.getComponentAt(dtc.getOffset());
|
||||||
if (postDTC == null) {
|
if (postDTC == null) {
|
||||||
|
@ -173,12 +173,12 @@ public class DataTypeGraphComparator {
|
||||||
|
|
||||||
private void compare(Union pre, Union post) {
|
private void compare(Union pre, Union post) {
|
||||||
Map<String, DataTypeComponent> postCompsByName = new HashMap<>();
|
Map<String, DataTypeComponent> postCompsByName = new HashMap<>();
|
||||||
for (DataTypeComponent dtc : post.getComponents()) {
|
for (DataTypeComponent dtc : post.getDefinedComponents()) {
|
||||||
if (dtc.getFieldName() != null) {
|
if (dtc.getFieldName() != null) {
|
||||||
postCompsByName.put(dtc.getFieldName(), dtc);
|
postCompsByName.put(dtc.getFieldName(), dtc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (DataTypeComponent preDTC : pre.getComponents()) {
|
for (DataTypeComponent preDTC : pre.getDefinedComponents()) {
|
||||||
DataTypeComponent postDTC = postCompsByName.get(preDTC.getFieldName());
|
DataTypeComponent postDTC = postCompsByName.get(preDTC.getFieldName());
|
||||||
if (postDTC != null) {
|
if (postDTC != null) {
|
||||||
compare(preDTC.getDataType(), postDTC.getDataType());
|
compare(preDTC.getDataType(), postDTC.getDataType());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue