if ((field.ModFlags & Modifiers.STATIC) == 0)
fe.InstanceExpression = new CompilerGeneratedThis (Parent.CurrentType, Location);
- // Create get block
- Get.Block = new ToplevelBlock (Compiler, ParametersCompiled.EmptyReadOnlyParameters, Location);
- Return r = new Return (fe, Location);
+ //
+ // Create get block but we careful with location to
+ // emit only single sequence point per accessor. This allow
+ // to set a breakpoint on it even with no user code
+ //
+ Get.Block = new ToplevelBlock (Compiler, ParametersCompiled.EmptyReadOnlyParameters, Get.Location) {
+ EndLocation = Location.Null
+ };
+ Return r = new Return (fe, Location.Null);
Get.Block.AddStatement (r);
// Create set block
- Set.Block = new ToplevelBlock (Compiler, Set.ParameterInfo, Location);
- Assign a = new SimpleAssign (fe, new SimpleName ("value", Location));
+ Set.Block = new ToplevelBlock (Compiler, Set.ParameterInfo, Set.Location) {
+ EndLocation = Location.Null
+ };
+ Assign a = new SimpleAssign (fe, new SimpleName ("value", Location.Null), Location.Null);
Set.Block.AddStatement (new StatementExpression (a));
}
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<symbols>
+ <files>
+ <file id="1" name="test-debug-10.cs" checksum="c1382ff87ceabeec202eed6c58e40747" />
+ </files>
+ <methods>
+ <method token="0x6000001">
+ <sequencepoints>
+ <entry il="0x0" row="4" file_ref="1" hidden="false" />
+ <entry il="0x1" row="5" file_ref="1" hidden="false" />
+ <entry il="0x7" row="6" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals />
+ <scopes />
+ </method>
+ <method token="0x6000002">
+ <sequencepoints>
+ <entry il="0x0" row="10" file_ref="1" hidden="false" />
+ <entry il="0x1" row="11" file_ref="1" hidden="false" />
+ <entry il="0x9" row="12" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals />
+ <scopes />
+ </method>
+ <method token="0x6000003">
+ <sequencepoints>
+ <entry il="0x0" row="14" file_ref="1" hidden="false" />
+ <entry il="0x1" row="15" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals />
+ <scopes />
+ </method>
+ <method token="0x6000004">
+ <sequencepoints>
+ <entry il="0x0" row="20" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals />
+ <scopes />
+ </method>
+ <method token="0x6000005">
+ <sequencepoints>
+ <entry il="0x0" row="21" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals />
+ <scopes />
+ </method>
+ <method token="0x6000006">
+ <sequencepoints />
+ <locals />
+ <scopes />
+ </method>
+ </methods>
+</symbols>
\ No newline at end of file
--- /dev/null
+class C
+{
+ public static void Main ()
+ {
+ Prop = 3;
+ }
+
+ static int Prop
+ {
+ get {
+ return 4;
+ }
+
+ set {
+ }
+ }
+
+ static int PropAuto
+ {
+ get;
+ set;
+ }
+}
</method>
</type>
</test>
+ <test name="dtest-anontype-01.cs">
+ <type name="C">
+ <method name="Void Main()" attrs="150">
+ <size>101</size>
+ </method>
+ <method name="Void Test()" attrs="129">
+ <size>2</size>
+ </method>
+ <method name="System.Object Factory()" attrs="145">
+ <size>14</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="<>__AnonType0`1[<Field>__T]">
+ <method name="<Field>__T get_Field()" attrs="2182">
+ <size>15</size>
+ </method>
+ <method name="Boolean Equals(System.Object)" attrs="198">
+ <size>47</size>
+ </method>
+ <method name="Int32 GetHashCode()" attrs="198">
+ <size>71</size>
+ </method>
+ <method name="System.String ToString()" attrs="198">
+ <size>75</size>
+ </method>
+ <method name="Void .ctor(<Field>__T)" attrs="6278">
+ <size>15</size>
+ </method>
+ </type>
+ </test>
<test name="dtest-cls-01.cs">
<type name="A">
<method name="Void Main()" attrs="150">
</method>
</type>
</test>
+ <test name="test-debug-10.cs">
+ <type name="C">
+ <method name="Void Main()" attrs="150">
+ <size>8</size>
+ </method>
+ <method name="Int32 get_Prop()" attrs="2193">
+ <size>10</size>
+ </method>
+ <method name="Void set_Prop(Int32)" attrs="2193">
+ <size>2</size>
+ </method>
+ <method name="Int32 get_PropAuto()" attrs="2193">
+ <size>14</size>
+ </method>
+ <method name="Void set_PropAuto(Int32)" attrs="2193">
+ <size>8</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="test-externalias-01.cs">
<type name="Test">
<method name="Int32 Main()" attrs="145">