diff --git a/Ghidra/Features/Base/src/main/help/help/topics/ExporterPlugin/exporter.htm b/Ghidra/Features/Base/src/main/help/help/topics/ExporterPlugin/exporter.htm index 2166be79db..7cc81d3288 100644 --- a/Ghidra/Features/Base/src/main/help/help/topics/ExporterPlugin/exporter.htm +++ b/Ghidra/Features/Base/src/main/help/help/topics/ExporterPlugin/exporter.htm @@ -308,7 +308,7 @@ address space.
* The output defaults to lines of 16-bytes but this is configurable using the
* {@link #recordSizeOption} attribute. This allows users to select any record size
- * up to the max of 0xFF. Users may also choose to force
a record size for every line
- * of output, which will only print out lines that match the max record size; any other
+ * up to the max of 0xFF. Users may also choose to Drop Extra Bytes
, which will
+ * cause only lines that match the max record size to be printed; any other
* bytes will be dropped. If this option is not set, every byte will be represented in the output.
*/
public class IntelHexExporter extends Exporter {
@@ -100,8 +100,8 @@ public class IntelHexExporter extends Exporter {
/**
* Option for exporting Intel Hex records that allows users to specify a record size for the
- * output. Users may also optionally specify a force
option that will only output
- * lines that match this maximum size.
+ * output. Users may also optionally select the Drop Extra Bytes
option that
+ * will cause only those records that match the maximum size to be output to the file.
*
* @see RecordSizeComponent
*/
@@ -140,8 +140,8 @@ public class IntelHexExporter extends Exporter {
return Integer.class;
}
- public boolean getForce() {
- return comp.getForce();
+ public boolean dropExtraBytes() {
+ return comp.dropExtraBytes();
}
}
@@ -151,28 +151,28 @@ public class IntelHexExporter extends Exporter {
*
input
: a {@link HintTextField} for entering numeric digits; these
* represent the record size for each line of outputforce
setting; this
- * enforces that every line in the output matches the specified record sizeforce
option is set, any bytes that are left over after outputting
- * all lines that match the record size will be dropped on the floor.
+ * Note: If the Drop Extra Bytes
option is set, any bytes that are left over
+ * after outputting all lines that match the record size will be omitted from the output.
*/
private class RecordSizeComponent extends JPanel {
private HintTextField input;
- private JCheckBox forceCb;
+ private JCheckBox dropCb;
public RecordSizeComponent(int recordSize) {
setLayout(new BorderLayout());
input = new HintTextField(String.valueOf(recordSize), false, new BoundedIntegerVerifier());
- forceCb = new JCheckBox("force");
+ dropCb = new JCheckBox("Drop Extra Bytes");
input.setText(String.valueOf(recordSize));
add(input, BorderLayout.CENTER);
- add(forceCb, BorderLayout.EAST);
+ add(dropCb, BorderLayout.EAST);
}
public int getValue() {
@@ -184,8 +184,8 @@ public class IntelHexExporter extends Exporter {
return Integer.valueOf(val);
}
- public boolean getForce() {
- return forceCb.isSelected();
+ public boolean dropExtraBytes() {
+ return dropCb.isSelected();
}
}
@@ -276,9 +276,9 @@ public class IntelHexExporter extends Exporter {
AddressSetView addrSetView, TaskMonitor monitor) throws MemoryAccessException {
int size = (int) recordSizeOption.getValue();
- boolean forceSize = recordSizeOption.getForce();
+ boolean dropBytes = recordSizeOption.dropExtraBytes();
- IntelHexRecordWriter writer = new IntelHexRecordWriter(size, forceSize);
+ IntelHexRecordWriter writer = new IntelHexRecordWriter(size, dropBytes);
AddressSet set = new AddressSet(addrSetView);
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/IntelHexRecordWriter.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/IntelHexRecordWriter.java
index 471842790e..16d21698c1 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/IntelHexRecordWriter.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/IntelHexRecordWriter.java
@@ -22,7 +22,7 @@ import ghidra.program.model.address.*;
public class IntelHexRecordWriter {
private final int maxBytesPerLine;
- private final boolean forceSize;
+ private final boolean dropExtraBytes;
private Address startAddress = null;
private Long oldSegment = null;
@@ -36,15 +36,15 @@ public class IntelHexRecordWriter {
* Constructor
*
* @param maxBytesPerLine the maximum number of bytes to write per line in the hex output
- * @param forceSize if true, only lines matching {@link #maxBytesPerLine} will be output;
+ * @param dropExtraBytes if true, only lines matching {@link #maxBytesPerLine} will be output;
* remaining bytes will be left out
*/
- public IntelHexRecordWriter(int maxBytesPerLine, boolean forceSize) {
+ public IntelHexRecordWriter(int maxBytesPerLine, boolean dropExtraBytes) {
if (maxBytesPerLine > IntelHexRecord.MAX_RECORD_LENGTH) {
throw new IllegalArgumentException("maxBytesPerLine > IntelHexRecord.MAX_RECORD_LENGTH");
}
this.maxBytesPerLine = maxBytesPerLine;
- this.forceSize = forceSize;
+ this.dropExtraBytes = dropExtraBytes;
}
public void addByte(Address address, byte b) {
@@ -129,8 +129,9 @@ public class IntelHexRecordWriter {
public List