You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@x87 In some cases this problem still exists. In fact, I don't have an example, but I decompile the cleo that I wrote before and still have this problem. I noticed that when a cleo has a lot of hex (string,assembly) code, some OP tags are still not properly decompiled:
@XMDS I found an interesting quirk testing this script. If I compile the script without Extra info and then disassemble it with IGNORE_UNKNOWN I get different result:
If I compile the script with Extra info, then open it and decline a request to use the original source code I get the same result as you. I will need to look into why the behavior is different in these cases.
@x87 As you said. In fact, in one of my cleos, when I decompile, some labels are displayed normally, but some labels are not displayed normally. I have just gone through a lot of testing, I don’t know why this is so, so I didn’t have too many clear examples to provide, especially 0AB1 cleo_call. I still don’t have a simple example to provide. It is only in my old VC CLEO appear. In addition, the same is true for Android 0DD0, it is sometimes normal, but some scripts are not displayed.
In addition, other OPs such as jump and gosub are normal. I did not find any problems with them.
So two things here. First, when the script is compiled with Extra info there is an information on hex..end locations so the disassembler is able to properly restore the labels. It was just that those hex location were not accounted as valid label offsets, so you see the numbers in 0AC6. This has been fixed, will be delivered in the next version.
But for IGNORE_UNKNOWN (when the script does not have Extra info) it's not fixable at this point. Due to implementation details the disassembler skips some potential targettable offsets during scanning (it steps in 2 bytes when ignoring unknown data). So you see some labels present and some not. This can be improved eventually with #33 specifically and reducing stepping to 1 byte, but it requires major refactoring. I will create a separate issue for this.
Activity
x87 commentedon Dec 2, 2020
@XMDS can you share this file?
x87 commentedon Dec 2, 2020
#81 #99
XMDS commentedon Dec 2, 2020
@x87 Simple sample code:
Decompile:
CLEO_CALL is the same, when there is hex, so is 0DD0 of Android
x87 commentedon Dec 2, 2020
@XMDS I found an interesting quirk testing this script. If I compile the script without Extra info and then disassemble it with IGNORE_UNKNOWN I get different result:
It properly restored 2 of 3 labels.
If I compile the script with Extra info, then open it and decline a request to use the original source code I get the same result as you. I will need to look into why the behavior is different in these cases.
XMDS commentedon Dec 2, 2020
@x87 As you said. In fact, in one of my cleos, when I decompile, some labels are displayed normally, but some labels are not displayed normally. I have just gone through a lot of testing, I don’t know why this is so, so I didn’t have too many clear examples to provide, especially 0AB1 cleo_call. I still don’t have a simple example to provide. It is only in my old VC CLEO appear. In addition, the same is true for Android 0DD0, it is sometimes normal, but some scripts are not displayed.
In addition, other OPs such as jump and gosub are normal. I did not find any problems with them.
x87 commentedon Dec 2, 2020
So two things here. First, when the script is compiled with Extra info there is an information on hex..end locations so the disassembler is able to properly restore the labels. It was just that those hex location were not accounted as valid label offsets, so you see the numbers in 0AC6. This has been fixed, will be delivered in the next version.
But for IGNORE_UNKNOWN (when the script does not have Extra info) it's not fixable at this point. Due to implementation details the disassembler skips some potential targettable offsets during scanning (it steps in 2 bytes when ignoring unknown data). So you see some labels present and some not. This can be improved eventually with #33 specifically and reducing stepping to 1 byte, but it requires major refactoring. I will create a separate issue for this.
x87 commentedon Jan 12, 2021
there is an issue with how disassembler treats absolute offsets in missions/cleo scripts.
given a script:
after disassembling it becomes: