mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
Emit opaque structure instead of undefined array
This commit is contained in:
parent
8a1c44c1d7
commit
0f0a82b8b1
1 changed files with 3 additions and 5 deletions
|
@ -591,19 +591,17 @@ public class PcodeDataTypeManager {
|
|||
if (sz <= 0) {
|
||||
sz = size;
|
||||
}
|
||||
appendNameIdAttributes(resBuf, origType);
|
||||
if (sz < 16) {
|
||||
appendNameIdAttributes(resBuf, origType);
|
||||
SpecXmlUtils.encodeStringAttribute(resBuf, "metatype", "unknown");
|
||||
SpecXmlUtils.encodeSignedIntegerAttribute(resBuf, "size", sz);
|
||||
resBuf.append('>');
|
||||
}
|
||||
else {
|
||||
SpecXmlUtils.encodeStringAttribute(resBuf, "name", "");
|
||||
SpecXmlUtils.encodeStringAttribute(resBuf, "metatype", "array");
|
||||
// Build an "opaque" structure with no fields
|
||||
SpecXmlUtils.encodeStringAttribute(resBuf, "metatype", "struct");
|
||||
SpecXmlUtils.encodeSignedIntegerAttribute(resBuf, "size", sz);
|
||||
SpecXmlUtils.encodeSignedIntegerAttribute(resBuf, "arraysize", sz);
|
||||
resBuf.append('>');
|
||||
resBuf.append(buildTypeRef(new ByteDataType(), 1));
|
||||
}
|
||||
}
|
||||
return resBuf.toString();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue