cseagle / blc

Integrate Ghidra's decompiler as an Ida plugin
GNU General Public License v2.0
412 stars 48 forks source link

blc currently does not work on Tricore executable #3

Closed patois closed 4 years ago

patois commented 4 years ago

Hello Chris,

thank you very much for making available this great plugin!

I have loaded an ELF file for the Tricore architecture and am getting the following error within the IDA output window. My IDA 7.4 license on Windows supports the Tricore architecture but the plugin fails to load.

Using sleigh id: tricore:LE
Architecture string does not look like sleigh id: tricore:LE
Could not create architecture
cseagle commented 4 years ago

Thanks for letting me know. I have no tricore binaries to test with. I suspect it is because the arch size 8/16/32/64 is missing in the sleigh id. I'll take a look at some ghidra specs to see what they expect. If there's anything you can share about tricore it might help.

cseagle commented 4 years ago

I pushed a change that should address the issue by using a generic default tricore string. Ghidra seems to support tc29x, tc172x, and tc176x also. I'll need a means for detecting those cases in IDA in order to support them as well. Currently building updated binaries which can take a while. I'll push those when they are done. If you can test once those are posted (or you build your own) and close the issue or comment further that would be great.

patois commented 4 years ago

Thanks for addressing this issue so quickly! I'll have to wait for updated binaries since I'm not having a toolchain set up for compiling the sources myself right now. I'll happily test any new builds but if you prefer debugging/testing it by yourself, you could download an evaluation version of the Lauterbach Simulator that comes with a "demo.elf" for the Tricore architecture here.

patois commented 4 years ago

I've tested your recent commit, it fixes the issue! Thank you very much!