tintinweb / vscode-decompiler

Decompile things directly from VSCode
https://marketplace.visualstudio.com/items?itemName=tintinweb.vscode-decompiler
155 stars 27 forks source link

Cant decompile with Ghidra #15

Closed K0IN closed 3 years ago

K0IN commented 3 years ago

Error Message after like 3 sec of running: configuration. {"code":1,"type":"single"}

first message error settings

I also ensured that ghirda works, and im on Windows 10 x64

Are my settings correct?

Sympatron commented 3 years ago

Same problem here.

tintinweb commented 3 years ago

what happens if you load that file directly in ghidra? does it also happen with other files? @K0IN @Sympatron

K0IN commented 3 years ago

Yes I can decompile it on ghidra without errors, it happens with all files (tested elf and exe)

could this be caused by the latest ghidra update?

also running windows 10 20H2 build 19042.685 (idk if this is useful)

tintinweb commented 3 years ago

@K0IN do you see any errors in the debug console? -> cmd -> toggle developer tools -> console image

K0IN commented 3 years ago

does this help? https://i.imgur.com/AqaXSTP.png this was with settings path pointing to C:\Users\K0IN\Downloads\ghidra_9.2_PUBLIC\support\analyzeHeadless.bat

https://i.imgur.com/zfIbIct.png this was with settings path pointing to C:\Users\K0IN\Downloads\ghidra_9.2_PUBLIC\support\analyzeHeadless

tintinweb commented 3 years ago

ok, looks like it works for ghidra 9.1.2 but it doesn't for ghidra 9.2.x. I think I have a fix for it. Are you down to trying an experimental vsix? @K0IN (I only tried it on osx)

tintinweb commented 3 years ago

published as v0.0.8. update your extension.

verified working on macos/win10 ghidra 9.2.1-public (and prevs. version 9.1.2 public).

thanks for reporting this issue @K0IN @Sympatron

K0IN commented 3 years ago

Sorry to bother you but it is still not possible to decompile Windows exe files -> elf file works fine tho

tintinweb commented 3 years ago

@K0IN it seems to work fine decompling an exe on macos or win10.

If elf works and exe doesn't this may be a ghidra or path problem. e.g. does any of the paths involved contain spaces? Does it work if you decompile manually using ghidra?

(e.g. this is on macos with latest ghidra from homebrew) image