Thanks for providing a self contained repro: I'll check it out (it might
take some time, I have a huge  deadline next week).

Jb

On Tue, May 2, 2017 at 11:21 PM, <[email protected]> wrote:

> Hi,
>
> I'm using the latest beta and I've also tried with the master branch (and
> tried with the version used by Fody in the first place). I've managed to
> gather some more info on this problem. As you can see in the attachment
> dotPeek properly recognizes the mapping, however dia2dump gives an
> interesting result. The proper.txt contains data before the rewrite and
> bad.txt contains after it. If you like to see the code I've added it to
> github https://github.com/csnemes/CecilTest
>
> Thanks
>
> Csaba
>
> 2017. május 2., kedd 20:28:58 UTC+2 időpontban Jb Evain a következőt írta:
>
>> Hey,
>>
>> Which version of Cecil are you using?
>>
>> Thanks,
>> Jb
>>
>> On Tue, May 2, 2017 at 11:04 AM, <[email protected]> wrote:
>>
>>> Hi JB,
>>>
>>> I'm stuck with this weird issue. When I inject some extra method calls
>>> into a method the debug information gets messy at least in Visual Studio
>>> 2015. Breakpoints cannot be set on some lines after the injection point.
>>> The program still runs ok, and as far as I can tell the sequence points are
>>> good too. This is what you can see before changes, after changes and after
>>> calling optimize.
>>>
>>> ------ Test started: Assembly: CecilRewriter.dll ------
>>> -------
>>> 0 IL_0000: nop
>>> 1 IL_0001: call System.String System.Console::ReadLine()
>>> 6 IL_0006: pop
>>> 7 IL_0007: ldstr "Original"
>>> 12 IL_000c: call System.Void System.Console::WriteLine(System.String)
>>> 17 IL_0011: nop
>>> 18 IL_0012: ldstr "Whatever"
>>> 23 IL_0017: call System.Void System.Console::WriteLine(System.String)
>>> 28 IL_001c: nop
>>> 29 IL_001d: call System.String System.Console::ReadLine()
>>> 34 IL_0022: pop
>>> 35 IL_0023: ret
>>> 0 12:12[9:10] False c:\temp\CecilTest\Program.cs
>>> 1 13:13[13:32] False c:\temp\CecilTest\Program.cs
>>> 7 14:14[13:43] False c:\temp\CecilTest\Program.cs
>>> 18 15:15[13:43] False c:\temp\CecilTest\Program.cs
>>> 29 16:16[13:32] False c:\temp\CecilTest\Program.cs
>>> 35 17:17[9:10] False c:\temp\CecilTest\Program.cs
>>> -------
>>> 0 IL_0000: nop
>>> 1 IL_0001: call System.String System.Console::ReadLine()
>>> 6 IL_0006: pop
>>> 7 IL_0007: ldstr "Original"
>>> 12 IL_000c: call System.Void System.Console::WriteLine(System.String)
>>> 0 IL_0000: ldstr "Hello {0}!"
>>> 0 IL_0000: ldstr "Joe"
>>> 0 IL_0000: call System.Void System.Console::WriteLine(Syst
>>> em.String,System.Object)
>>> 0 IL_0000: nop
>>> 17 IL_0011: nop
>>> 18 IL_0012: ldstr "Whatever"
>>> 23 IL_0017: call System.Void System.Console::WriteLine(System.String)
>>> 28 IL_001c: nop
>>> 29 IL_001d: call System.String System.Console::ReadLine()
>>> 34 IL_0022: pop
>>> 35 IL_0023: ret
>>> 0 12:12[9:10] False c:\temp\CecilTest\Program.cs
>>> 1 13:13[13:32] False c:\temp\CecilTest\Program.cs
>>> 7 14:14[13:43] False c:\temp\CecilTest\Program.cs
>>> 18 15:15[13:43] False c:\temp\CecilTest\Program.cs
>>> 29 16:16[13:32] False c:\temp\CecilTest\Program.cs
>>> 35 17:17[9:10] False c:\temp\CecilTest\Program.cs
>>> -------
>>> 0 IL_0000: nop
>>> 1 IL_0001: call System.String System.Console::ReadLine()
>>> 6 IL_0006: pop
>>> 7 IL_0007: ldstr "Original"
>>> 12 IL_000c: call System.Void System.Console::WriteLine(System.String)
>>> 17 IL_0011: ldstr "Hello {0}!"
>>> 22 IL_0016: ldstr "Joe"
>>> 27 IL_001b: call System.Void System.Console::WriteLine(Syst
>>> em.String,System.Object)
>>> 32 IL_0020: nop
>>> 33 IL_0021: nop
>>> 34 IL_0022: ldstr "Whatever"
>>> 39 IL_0027: call System.Void System.Console::WriteLine(System.String)
>>> 44 IL_002c: nop
>>> 45 IL_002d: call System.String System.Console::ReadLine()
>>> 50 IL_0032: pop
>>> 51 IL_0033: ret
>>> 0 12:12[9:10] False c:\temp\CecilTest\Program.cs
>>> 1 13:13[13:32] False c:\temp\CecilTest\Program.cs
>>> 7 14:14[13:43] False c:\temp\CecilTest\Program.cs
>>> 34 15:15[13:43] False c:\temp\CecilTest\Program.cs
>>> 45 16:16[13:32] False c:\temp\CecilTest\Program.cs
>>> 51 17:17[9:10] False c:\temp\CecilTest\Program.cs
>>>
>>> It starts to drive me crazy, I'm sure I miss something. Can you point me
>>> to what else to check?
>>>
>>> Thanks a lot.
>>>
>>> --
>>> --
>>> --
>>> mono-cecil
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "mono-cecil" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> --
> --
> mono-cecil
> ---
> You received this message because you are subscribed to the Google Groups
> "mono-cecil" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
--
mono-cecil
--- 
You received this message because you are subscribed to the Google Groups 
"mono-cecil" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to