Skip to content

Commit 3c439a6

Browse files
Merge pull request #161 from Martmists-GH:main
PiperOrigin-RevId: 829427614 Change-Id: Iaab560399b1ebf81ee0de99e3212d504d1529873
2 parents 4dc865e + 8fd3298 commit 3c439a6

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.github/workflows/gradle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
workflow_dispatch:
77
inputs:
88
ghidra_version:
9-
description: 'Specify the Ghidra version(s) you want to build for (e.g. "latest", "11.0")'
9+
description: 'Specify the Ghidra version(s) you want to build for (e.g. "latest", "11.4")'
1010
required: true
1111
default: '"latest"'
1212
schedule:
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
ghidra: ${{ fromJSON(format('[{0}]', inputs.ghidra_version || '"latest","11.4.1","11.4","11.3.2","11.3.1","11.3","11.2.1","11.2","11.1.2","11.1.1","11.1","11.0.3","11.0.2","11.0.1","11.0"')) }}
20+
ghidra: ${{ fromJSON(format('[{0}]', inputs.ghidra_version || '"latest","11.4.2","11.4.1","11.4"')) }}
2121
runs-on: ubuntu-22.04
2222

2323
steps:

java/src/main/java/com/google/security/binexport/BinExport2Builder.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import ghidra.program.model.listing.CodeUnitFormat;
3838
import ghidra.program.model.listing.CodeUnitFormatOptions;
3939
import ghidra.program.model.listing.CodeUnitIterator;
40+
import ghidra.program.model.listing.CommentType;
4041
import ghidra.program.model.listing.Data;
4142
import ghidra.program.model.listing.Function;
4243
import ghidra.program.model.listing.FunctionManager;
@@ -221,11 +222,11 @@ private Optional<Integer> addCommentedExpression(
221222
commentType = BinExport2.Comment.Type.DEFAULT;
222223
} else if (markupToken instanceof LabelString) {
223224
var labelType = ((LabelString) markupToken).getLabelType();
224-
if (labelType == LabelString.CODE_LABEL) {
225+
if (labelType == LabelString.LabelType.CODE_LABEL) {
225226
commentType = BinExport2.Comment.Type.GLOBAL_REFERENCE;
226-
} else if (labelType == LabelString.VARIABLE) {
227+
} else if (labelType == LabelString.LabelType.VARIABLE) {
227228
commentType = BinExport2.Comment.Type.LOCAL_REFERENCE;
228-
} else if (labelType == LabelString.EXTERNAL) {
229+
} else if (labelType == LabelString.LabelType.EXTERNAL) {
229230
commentType = BinExport2.Comment.Type.DEFAULT;
230231
} else {
231232
return Optional.empty();
@@ -991,7 +992,7 @@ private void buildComments(Map<Long, Integer> instructionIndices) {
991992
monitor.setIndeterminate(true);
992993

993994
var comments = new HashSet<String>();
994-
for (int commentType : ImmutableList.of(CodeUnit.EOL_COMMENT)) {
995+
for (var commentType : ImmutableList.of(CommentType.EOL)) {
995996
for (CodeUnitIterator codeIt = listing.getCommentCodeUnitIterator(commentType, addrSet);
996997
codeIt.hasNext() && !monitor.isCancelled(); ) {
997998
CodeUnit code = codeIt.next();

0 commit comments

Comments
 (0)