Skip to content

Commit 3aea0c4

Browse files
committed
Merge remote-tracking branch
'origin/GT-3492_dragonmacher_PR-1423_saruman9_xml_imort_repeatable_comment' Fixes NationalSecurityAgency#1423
2 parents e5a0006 + f44adc7 commit 3aea0c4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Ghidra/Features/Base/src/main/java/ghidra/app/util/xml/FunctionsXmlMgr.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ void read(XmlPullParser parser, boolean overwriteConflicts, boolean ignoreStackF
166166

167167
String regularComment = getElementText(parser, "REGULAR_CMT");
168168
func.setComment(regularComment);
169-
getElementText(parser, "REPEATABLE_CMT");
169+
String repeatableComment = getElementText(parser, "REPEATABLE_CMT");
170+
func.setRepeatableComment(repeatableComment);
170171
String typeInfoComment = getElementText(parser, "TYPEINFO_CMT");
171172
List<Variable> stackParams = new ArrayList<>();
172173
List<Variable> stackVariables = new ArrayList<>();
@@ -533,6 +534,7 @@ private void writeFunction(XmlWriter writer, Function func) {
533534
writeReturnType(writer, func);
534535
writeAddressRange(writer, func);
535536
writeRegularComment(writer, func.getComment());
537+
writeRepeatableComment(writer, func.getRepeatableComment());
536538
if (func.getSignatureSource() != SourceType.DEFAULT) {
537539
writeTypeInfoComment(writer, func);
538540
}
@@ -602,6 +604,12 @@ private void writeRegularComment(XmlWriter writer, String comment) {
602604
}
603605
}
604606

607+
private void writeRepeatableComment(XmlWriter writer, String comment) {
608+
if (comment != null && comment.length() > 0) {
609+
writer.writeElement("REPEATABLE_CMT", null, comment);
610+
}
611+
}
612+
605613
private void writeStackFrame(XmlWriter writer, Function func) {
606614
StackFrame frame = func.getStackFrame();
607615

0 commit comments

Comments
 (0)