To fix empty methods parts problem, just change
StatementDecompiler::GetStackAfter to return 0 if method's return type
is Void:
int GetStackAfter (Instruction instruction)
{
if((instruction.OpCode == OpCodes.Call) &&
((instruction.Operand
as MethodDefinition).ReturnType.FullName=="System.Void"))
return 0;
else
return GetInstructionData (instruction).StackAfter;
}
In the bug case, function GetStackAfter returns 1 for Void functions;
On 13 дек, 14:47, Stanislav <[email protected]> wrote:
> Did you resolve this problem (empty parts)? In some times decompiler
> calls methods recusivly
>
> On 25 окт, 11:43, Giorgi <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > I did manage to compile Cecil.Decompilerwith latest version of
> > Mono.Cecil after making some changes but the sample app that prints
> > the source is usually missing some parts from the source.
>
> > Are you planning on pushing the latest version you have or an
> > alternative anytime soon?
>
> > On Oct 25, 12:30 pm, Jb Evain <[email protected]> wrote:
>
> > > Hi Giorgi,
>
> > > On Oct 23, 7:30 pm, Giorgi <[email protected]> wrote:
>
> > > > Which version of Cecil should I download so that I can compile
> > > > Cecil.Decompiler? Or is Cecil.Decompileravailable as a dll for
> > > > download?
>
> > > Cecil.Decompilerstill uses Mono.Cecil 0.6 as you can find it in Mono.
> > > I ported the code to use 0.9, but I still haven't pushed it to github.
> > > Cecil.Decompileris not really maintained as is, as I'm working on
> > > something similar but with a slightly different API.
>
> > > --
> > > Jb Evain <[email protected]>
--
--
mono-cecil