mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
BitFields - do not pass bitfield components to decompiler (not yet
supported)
This commit is contained in:
parent
1fcad78bc4
commit
1946e8971d
1 changed files with 8 additions and 3 deletions
|
@ -87,9 +87,9 @@ public class PcodeDataTypeManager {
|
||||||
private DataOrganization dataOrganization;
|
private DataOrganization dataOrganization;
|
||||||
private DecompilerLanguage displayLanguage;
|
private DecompilerLanguage displayLanguage;
|
||||||
private boolean voidInputIsVarargs; // true if we should consider void parameter lists as varargs
|
private boolean voidInputIsVarargs; // true if we should consider void parameter lists as varargs
|
||||||
// Some C header conventions use an empty prototype to mean a
|
// Some C header conventions use an empty prototype to mean a
|
||||||
// varargs function. Locking in void can cause data-flow to get
|
// varargs function. Locking in void can cause data-flow to get
|
||||||
// truncated. This boolean controls whether we lock it in or not
|
// truncated. This boolean controls whether we lock it in or not
|
||||||
private TypeMap[] coreBuiltin; // Core decompiler datatypes and how they map to full datatype objects
|
private TypeMap[] coreBuiltin; // Core decompiler datatypes and how they map to full datatype objects
|
||||||
private VoidDataType voidDt;
|
private VoidDataType voidDt;
|
||||||
private int pointerWordSize; // Wordsize to assign to all pointer datatypes
|
private int pointerWordSize; // Wordsize to assign to all pointer datatypes
|
||||||
|
@ -390,6 +390,10 @@ public class PcodeDataTypeManager {
|
||||||
resBuf.append(">\n");
|
resBuf.append(">\n");
|
||||||
DataTypeComponent[] comps = ((Structure) type).getDefinedComponents();
|
DataTypeComponent[] comps = ((Structure) type).getDefinedComponents();
|
||||||
for (DataTypeComponent comp : comps) {
|
for (DataTypeComponent comp : comps) {
|
||||||
|
if (comp.isBitFieldComponent()) {
|
||||||
|
// TODO: bitfields are not yet supported by decompiler
|
||||||
|
continue;
|
||||||
|
}
|
||||||
resBuf.append("<field");
|
resBuf.append("<field");
|
||||||
String field_name = comp.getFieldName();
|
String field_name = comp.getFieldName();
|
||||||
if (field_name == null) {
|
if (field_name == null) {
|
||||||
|
@ -402,6 +406,7 @@ public class PcodeDataTypeManager {
|
||||||
resBuf.append(buildTypeRef(fieldtype, comp.getLength()));
|
resBuf.append(buildTypeRef(fieldtype, comp.getLength()));
|
||||||
resBuf.append("</field>\n");
|
resBuf.append("</field>\n");
|
||||||
}
|
}
|
||||||
|
// TODO: trailing flexible array component not yet supported
|
||||||
}
|
}
|
||||||
else if (type instanceof Enum) {
|
else if (type instanceof Enum) {
|
||||||
Enum enumDt = (Enum) type;
|
Enum enumDt = (Enum) type;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue