Two scripts for Ghidra, BcmDebugLogsRenameFunctions.java and BcmRenameLabelVTable.java don't work because they contains an error. When trying to add these scripts to Ghidra using Script Manager, Ghidra marks them in red, showing an error and doesn't allow to add them. The same error for both scripts:
BcmDebugLogsRenameFunctions.java:34: error: class DebugLogsAnnotateFunctions is public, should be declared in a file named DebugLogsAnnotateFunctions.java
public class DebugLogsAnnotateFunctions extends GhidraScript {
^
BcmRenameLabelVTable.java:25: error: class RenameLabelVTable is public, should be declared in a file named RenameLabelVTable.java
public class RenameLabelVTable extends GhidraScript {
^
skipping /home/teknos/ghidra_scripts/BcmRenameLabelVTable.java
skipping /home/teknos/ghidra_scripts/BcmDebugLogsRenameFunctions.java
Name of public class must match the name of .java file in which it is placed (like public class Foo{} must be placed in Foo.java file). So either:
rename your file from BcmDebugLogsRenameFunctions.java to DebugLogsAnnotateFunctions.java
rename the class from public class DebugLogsAnnotateFunctions { to public class BcmDebugLogsRenameFunctions {
Two scripts for Ghidra, BcmDebugLogsRenameFunctions.java and BcmRenameLabelVTable.java don't work because they contains an error. When trying to add these scripts to Ghidra using Script Manager, Ghidra marks them in red, showing an error and doesn't allow to add them. The same error for both scripts:
Name of public class must match the name of .java file in which it is placed (like
public class Foo{}
must be placed inFoo.java
file). So either:BcmDebugLogsRenameFunctions.java
toDebugLogsAnnotateFunctions.java
public class DebugLogsAnnotateFunctions {
topublic class BcmDebugLogsRenameFunctions {
Ghidra build 11.1.1