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: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to