kotcrab / ghidra-allegrex

Ghidra processor module adding support for the Allegrex CPU (PSP)
Apache License 2.0
88 stars 8 forks source link

Upgrade to Ghidra 10.3 #26

Closed Nemoumbra closed 1 year ago

Nemoumbra commented 1 year ago

Is the plugin compatible with the newest Ghidra release? If not, will this be hard to make a new version like how it happened last time?

kotcrab commented 1 year ago

It's not compatible yet. As for the effort needed, I don't know yet but there were some breaking changes in the APIs.

CB9001 commented 1 year ago

Hey there! Here's a set of changes I made which got the code compiling for 10.3: https://github.com/CB9001/ghidra-allegrex/commit/bb04f25099de634cb5d86e0524843aeee513835d

I have very little experience with the Ghidra API (and Kotlin), so can't guarantee everything is updated as it should be, but it seems to be working in my 10.3 installation.

Some of the key changes I noticed for 10.3:

kotcrab commented 1 year ago

Great work, I'll try to integrate your changes over the weekend. For relocation status we'll probably use APPLIED. CountLeadingOnesOpBehavior and CountLeadingZerosOpBehavior were replaced by native pcode instructions.

kotcrab commented 1 year ago

Thanks @CB9001 I added your commit as a patch so you are contributed.

kotcrab commented 1 year ago

Released v16.

Nemoumbra commented 1 year ago

I've got the same error log as here: https://github.com/kotcrab/ghidra-allegrex/issues/19

java.lang.NoClassDefFoundError: ghidra/app/util/importer/MessageLogContinuesFactory
    at ghidra.app.util.opinion.PspElfLoader.load(PspElfLoader.kt:67)
    at ghidra.app.util.opinion.AbstractLibrarySupportLoader.doLoad(AbstractLibrarySupportLoader.java:809)
    at ghidra.app.util.opinion.AbstractLibrarySupportLoader.loadProgram(AbstractLibrarySupportLoader.java:100)
    at ghidra.app.util.opinion.AbstractProgramLoader.load(AbstractProgramLoader.java:131)
    at ghidra.plugin.importer.ImporterUtilities.importSingleFile(ImporterUtilities.java:388)
    at ghidra.plugin.importer.ImporterDialog.lambda$okCallback$7(ImporterDialog.java:347)
    at ghidra.util.task.TaskBuilder$TaskBuilderTask.run(TaskBuilder.java:306)
    at ghidra.util.task.Task.monitoredRun(Task.java:134)
    at ghidra.util.task.TaskRunner.lambda$startTaskThread$0(TaskRunner.java:106)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.ClassNotFoundException: ghidra.app.util.importer.MessageLogContinuesFactory
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
    ... 12 more

---------------------------------------------------
Build Date: 2023-May-12 1514 CEST
Ghidra Version: 10.3
Java Home: /usr/lib/jvm/java-17-openjdk
JVM Version: N/A 17.0.7
OS: Linux 5.15.114-2-MANJARO amd64

This may be indicative of the fact that bumping the version up for Ghidra_10.3.1 was a mistake. Can you please investigate?

kotcrab commented 1 year ago

You are most likely using wrong plugin version, update to a release compatible with your Ghidra version: https://github.com/kotcrab/ghidra-allegrex/releases if that doesn't help please create new issue with reproduction steps.

Nemoumbra commented 1 year ago

False alert, I mistakenly thought that "ghidra-10.3-1" meant 10.3.1 and downloaded the wrong plugin version. By the way, can I contact you in Discord to discuss the beta feature of PPSSPP remote debugging?

kotcrab commented 1 year ago

You most likely downloaded v15 looking at the stack trace.

No, sorry, I try to keep DMs for friends only for various reasons. We can either talk in some public channel if it's suitable or I've enabled discussions here.