pycdc icon indicating copy to clipboard operation
pycdc copied to clipboard

Lost lines in decompiled file

Open zb2oby opened this issue 1 year ago • 2 comments

Hi,

pycdc execute very well.

i've got a 2585 lines .py file but it is truncated at the end. A lot of code has been lost.

if i execute pycdas i read it should contains at least 4300 lines

                  4314    LOAD_CONST                    21: 'warning'
                    4316    LOAD_CONST                    22: ('p_tag',)
                    4318    CALL_FUNCTION_KW              2
                    4320    POP_TOP                       
                    4322    LOAD_CONST                    0: None
                    4324    RETURN_VALUE                  

what could cause this issue ?

thanks

zb2oby avatar Feb 28 '23 17:02 zb2oby

The numbers in the pycdas output are instruction positions, not line numbers... It is expected that there will be many more instructions than lines in a given compiled file.

zrax avatar Feb 28 '23 23:02 zrax

Ok, my bad. But why pycdc output show truncated decompiled code ? It never truncate exactly at the same line (depends on the length of some methods after decompilation).

Typically with a previous run, i've got "decompyle incomplete" but output has decompiled more code/methods. Now whith complete decompliation, i've lost methods at the end of the output.

Could it happen due to an error in source code (even if decompilation runs well) ?

zb2oby avatar Mar 01 '23 08:03 zb2oby