mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +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) {
|
if (sz <= 0) {
|
||||||
sz = size;
|
sz = size;
|
||||||
}
|
}
|
||||||
if (sz < 16) {
|
|
||||||
appendNameIdAttributes(resBuf, origType);
|
appendNameIdAttributes(resBuf, origType);
|
||||||
|
if (sz < 16) {
|
||||||
SpecXmlUtils.encodeStringAttribute(resBuf, "metatype", "unknown");
|
SpecXmlUtils.encodeStringAttribute(resBuf, "metatype", "unknown");
|
||||||
SpecXmlUtils.encodeSignedIntegerAttribute(resBuf, "size", sz);
|
SpecXmlUtils.encodeSignedIntegerAttribute(resBuf, "size", sz);
|
||||||
resBuf.append('>');
|
resBuf.append('>');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SpecXmlUtils.encodeStringAttribute(resBuf, "name", "");
|
// Build an "opaque" structure with no fields
|
||||||
SpecXmlUtils.encodeStringAttribute(resBuf, "metatype", "array");
|
SpecXmlUtils.encodeStringAttribute(resBuf, "metatype", "struct");
|
||||||
SpecXmlUtils.encodeSignedIntegerAttribute(resBuf, "size", sz);
|
SpecXmlUtils.encodeSignedIntegerAttribute(resBuf, "size", sz);
|
||||||
SpecXmlUtils.encodeSignedIntegerAttribute(resBuf, "arraysize", sz);
|
|
||||||
resBuf.append('>');
|
resBuf.append('>');
|
||||||
resBuf.append(buildTypeRef(new ByteDataType(), 1));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return resBuf.toString();
|
return resBuf.toString();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue