[Mono-bugs] [Bug 592849] New: static method MethodBody.Clone() does not clone SequencePoint information

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Mar 31 17:37:26 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=592849

http://bugzilla.novell.com/show_bug.cgi?id=592849#c0


           Summary: static method MethodBody.Clone() does not clone
                    SequencePoint information
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Cecil
        AssignedTo: jbevain at novell.com
        ReportedBy: andrea.ornstein at st.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


when manipulating an assembly with Mono.Cecil, methods that are cloned with
method Clone loose all debug information.

MethodBody.Clone() ignores SequencePoint field of class Instruction

my quick solution:

Index: Mono.Cecil.Cil/MethodBody.cs
===================================================================
--- Mono.Cecil.Cil/MethodBody.cs        (revision 154573)
+++ Mono.Cecil.Cil/MethodBody.cs        (working copy)
@@ -152,6 +152,7 @@

                        foreach (Instruction instr in body.Instructions) {
                                Instruction ni = new Instruction
(instr.OpCode);
+                               ni.SequencePoint = instr.SequencePoint;

                                switch (instr.OpCode.OperandType) {
                                case OperandType.InlineParam :

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list