4

I want to reverse engineer some 65816 code using Ghidra. Unfortunately the third-party 65816 language is broken. No problem, I can fix it myself. However, looking at the Ghidra error gives me no clue as to what the problem is. I've looked at the .slaspec and it appears to be correct so a verbose error would be helpful. The message mentions checking the log messages but I can't find anything.

Is there a way to debug the problem with the language?

Ghidra Error:

Errors compiling /home/rob/tools/ghidra_10.2.3_PUBLIC/Ghidra/Processors/65816/data/languages/65816.slaspec -- please check log messages for details
ghidra.app.plugin.processors.sleigh.SleighException: Errors compiling /home/rob/tools/ghidra_10.2.3_PUBLIC/Ghidra/Processors/65816/data/languages/65816.slaspec -- please check log messages for details
    at ghidra.app.plugin.processors.sleigh.SleighLanguage.reloadLanguage(SleighLanguage.java:520)
    at ghidra.app.plugin.processors.sleigh.SleighLanguage.initialize(SleighLanguage.java:150)
    at ghidra.app.plugin.processors.sleigh.SleighLanguage.<init>(SleighLanguage.java:116)
    at ghidra.app.plugin.processors.sleigh.SleighLanguageProvider.getNewSleigh(SleighLanguageProvider.java:112)
    at ghidra.app.plugin.processors.sleigh.SleighLanguageProvider.getLanguage(SleighLanguageProvider.java:99)
    at ghidra.program.util.DefaultLanguageService$LanguageInfo.lambda$getLanguage$0(DefaultLanguageService.java:385)
    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)

65816 language support

Example binary

Robin Elvin
  • 183
  • 5
  • 1
    Could you please check if you have application.log file in /home/rob/.ghidra/ directory or in any subdirectories? – malikcjm Apr 15 '23 at 21:54
  • @malikcjm I hadn't thought to check there. Unfortunately that directory is empty though. – Robin Elvin Apr 16 '23 at 10:19
  • Please try to look for application.log file in /home/rob/tools/ghidra_10.2.3_PUBLIC/ directory or any subdirectories – malikcjm Apr 17 '23 at 11:07
  • @malikcjm There are no logs – Robin Elvin Apr 17 '23 at 11:50
  • Can you share that third-party language and binary file that you tried to analyze? – malikcjm Apr 18 '23 at 12:13
  • Added links to the question. Thanks – Robin Elvin Apr 19 '23 at 13:11
  • 2
    I see that there were some problems with released versions up to 1.02. With latest changes I had no problem loading you example binary. https://github.com/achan1989/ghidra-65816/commit/6df2b00cf27af4bc3c259cf499ca2ea9b6f92522 – malikcjm Apr 20 '23 at 19:37
  • @malikcjm Well that's a facepalm moment. I assumed the release version was the one to use - I never though to just take the current master! Thank you. If you want to make this the answer I'll accept it. – Robin Elvin Apr 21 '23 at 09:11

1 Answers1

3

I see that there were some problems with released versions up to 1.02. With latest changes I had no problem loading your example binary. https://github.com/achan1989/ghidra-65816/commit/6df2b00cf27af4bc3c259cf499ca2ea9b6f92522

sudhackar
  • 2,659
  • 1
  • 10
  • 27
malikcjm
  • 364
  • 1
  • 4