Update ImportMarkersAsBookmarks Ghidra script after faults.csv format change (mnemonic)
This commit is contained in:
@@ -33,8 +33,8 @@ public class ImportMarkersAsBookmarks extends GhidraScript {
|
||||
int skipped = 0;
|
||||
int lineNo = 0;
|
||||
|
||||
// CSV columns: (benchmark, resulttype, faults, fault_address)
|
||||
// Example: (ip , OK_MARKER , 4311 , 0x10001B )
|
||||
// CSV columns: (benchmark, resulttype, faults, fault_address, mnemonic)
|
||||
// Example: (ip , OK_MARKER , 4311 , 0x10001B , mov)
|
||||
try (BufferedReader br = new BufferedReader(new FileReader(input))) {
|
||||
String line;
|
||||
while ((line = br.readLine()) != null) {
|
||||
@@ -47,7 +47,7 @@ public class ImportMarkersAsBookmarks extends GhidraScript {
|
||||
|
||||
// Make sure to always use "," delimiter and never quotations
|
||||
String[] parts = line.split(",");
|
||||
if (parts.length != 4) {
|
||||
if (parts.length != 5) {
|
||||
skipped++;
|
||||
printerr("Line " + lineNo + ": malformed");
|
||||
continue;
|
||||
@@ -57,11 +57,13 @@ public class ImportMarkersAsBookmarks extends GhidraScript {
|
||||
String typeText = parts[1].trim();
|
||||
String countText = parts[2].trim();
|
||||
String addrText = parts[3].trim();
|
||||
String mnemonicText = parts[4].trim();
|
||||
|
||||
if (benchText.isEmpty()
|
||||
|| typeText.isEmpty()
|
||||
|| countText.isEmpty()
|
||||
|| addrText.isEmpty()) {
|
||||
|| addrText.isEmpty()
|
||||
|| mnemonicText.isEmpty()) {
|
||||
skipped++;
|
||||
printerr("Line " + lineNo + ": malformed");
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user