BitFields - disallow bitfield markup for VariableOffset. Insufficient

information for correct markup.
This commit is contained in:
ghidra1 2019-05-14 16:15:29 -04:00
parent 1946e8971d
commit a6d692e19d

View file

@ -159,7 +159,8 @@ public class VariableOffset {
} }
if (dt instanceof Structure) { if (dt instanceof Structure) {
DataTypeComponent cdt = ((Structure) dt).getComponentAt(intOff); DataTypeComponent cdt = ((Structure) dt).getComponentAt(intOff);
if (cdt == null) { if (cdt == null || cdt.isBitFieldComponent()) {
// NOTE: byte offset is insufficient to identify a specific bitfield
break; break;
} }
String fieldName = cdt.getFieldName(); String fieldName = cdt.getFieldName();
@ -195,7 +196,7 @@ public class VariableOffset {
absOffset = intOff; absOffset = intOff;
} }
List<Object> list = new ArrayList<Object>(); List<Object> list = new ArrayList<>();
list.add(new LabelString(name.toString(), LabelString.VARIABLE)); list.add(new LabelString(name.toString(), LabelString.VARIABLE));
if (absOffset != 0 || scalarAdjustment != 0) { if (absOffset != 0 || scalarAdjustment != 0) {