New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call-fixup for function gets a data from the code that follows right after a call. #1177
Comments
|
Please, provide exact steps you doing to specify the override. |
|
I have added the new part at the end of "8051.cspec" and changed Casll Fixup for ?C?LSTKXDATA function to Call_2944: After that decompiled listing looks like: The call of ?C?LSTKXDATA with dword data following by it should decompiled as: Unfortunately I could not create the right call-fixup for this kind of issue. |
|
Why don't you want to use the Fallthrough override for that? |
|
Fallthrough helps for assembly listing only, not affecting to the decompiler. |
|
It's wrong. It does change the decompiler output too. |
|
Which version are you using? |
|
I noted this in my question: ghidra_9.1-BETA_DEV_20190923 |
|
Have you tried to use the master build? I'm completely sure it was fixed in the master code. Just checked: ca44ae9 was committed after the 9.1 BETA DEV release. |
|
Thank you for your support. |
|
Never saw any online builds. So, you should build it by yourself. A short build instruction:
Also, make sure that you're using the JDK 11 in the command line: run |
|
In case of Windows it also may require to upgrade Visual Studio solution ( |
|
Thanks a lot. I am trying to build right now. :-) |
|
Latest build solves the problem using Fallthrough. And the next question regarding decompilation of this function ?C?LSTKXDATA, if you allow. And |
|
As I know: |
|
This is binary of 8051 CPU, not ARM. The first argument is a pointer to dword in external memory and the second one is a pointer to dword in code. |
|
I don't sure it will decompile the function as you want. |
|
Not as I want, but as it should be :-) |





My question is regarding to the closed issue #484
I am working on binary file for 8051 CPU compiled by Keil. There is one of library functions ?C?LSTKXDATA which gets dword data from the code follows right after a call.
lab313ru noticed that "They've fixed it in ca44ae9." But in this (latest?) build: ghidra_9.1-BETA_DEV_20190923 it's not fixed.
As emtreere suggests "One possibilty is to inline the called function, which should cause flow to the correct location." Unfortunately it's also doesn't help due to WARNING: Could not inline here.
The next suggestion from emteere is "The alternative is to create a general call-fixup that is added to the .cspec file to describe the implicit side-effects that happen for the particular call."
Could someone kindly provide me with an example of this call-fixup ? Because the SLEIGH Help do not give a single example and .cspec files in the folder Ghidra\Ghidra\Processors\ do not contains anything similar.
The text was updated successfully, but these errors were encountered: