Skip to content
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

Logic chain parsing problems #19

Open
menesakdeniz opened this issue Apr 7, 2020 · 7 comments
Open

Logic chain parsing problems #19

menesakdeniz opened this issue Apr 7, 2020 · 7 comments

Comments

@menesakdeniz
Copy link

Hi,

Can't decompile sm 1.10 files.
it doesn't recognize opcodes and cause output like this:

/* ERROR PREPROCESSING! Unrecognized opcode: shl_c_pri */
function "funcname" (number x)

can you please fix it?

@peace-maker
Copy link
Owner

Do you have a sample plugin that generates that opcode?

@menesakdeniz
Copy link
Author

first plugin that gives these errors;
https://drive.google.com/open?id=1xJHoUK6_COgLTwSnSsmH2yS_IKHzY2Be
second plugin, doesn't have RegConsoleCmd callback function names, and have lots of error inside. like /* ERROR unknown load Binary / or / ERROR! null */
https://drive.google.com/open?id=1-euKUIKWd_igxitpIUsbgilOl1lis2JK

peace-maker added a commit that referenced this issue Apr 9, 2020
That opcode can be generated when compiling plugins without the peephole optimizer `--opt-level=0`.
@peace-maker
Copy link
Owner

I've added support for the shl.c.pri opcode. Most of the other errors are because this decompiler doesn't handle raw code without debug info very well. The file format for that info changed in SourcePawn 1.10 and I haven't added support to parse that new format yet.

@menesakdeniz
Copy link
Author

now i checked and most of errors are gone, but still some errors occurs like;
/* ERROR! lysis.nodes.types.DJump cannot be cast to lysis.nodes.types.DJumpCondition */

are they going to solve when sp 1.10 support added? and when can u add this support?

@peace-maker
Copy link
Owner

Can you post the sourcecode and smx of a sample plugin that throws that error?
I'm not sure if that control flow problem is related to the 1.10 rtti changes. It will be done when it's done.

@menesakdeniz
Copy link
Author

https://drive.google.com/open?id=1xJHoUK6_COgLTwSnSsmH2yS_IKHzY2Be
after decompiled this plugin, errors occur in lines : 60, 191 and 270. Each line has unique errors please look them all

@peace-maker
Copy link
Owner

It'd would be handy if you'd post the source code of those plugins as well, to know what's correct.

@peace-maker peace-maker changed the title SM 1.10 OpCodes Logic chain parsing problems Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants