~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to src/core/Mono.Debugging/Mono.Debugging.Client/Breakpoint.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
                bool breakIfConditionChanges;
37
37
                string conditionExpression;
38
38
                string lastConditionValue;
39
 
                //int adjustedColumn = -1;
 
39
                int adjustedColumn = -1;
40
40
                int adjustedLine = -1;
41
41
                string fileName;
42
 
                //int column;
 
42
                int column;
43
43
                int line;
44
44
                
45
 
                public Breakpoint (string fileName, int line/*, int column*/)
 
45
                public Breakpoint (string fileName, int line, int column)
46
46
                {
47
47
                        FileName = fileName;
48
 
                        //Column = column;
 
48
                        Column = column;
49
49
                        Line = line;
50
50
                }
 
51
 
 
52
                public Breakpoint (string fileName, int line) : this (fileName, line, 1)
 
53
                {
 
54
                }
51
55
                
52
56
                internal Breakpoint (XmlElement elem): base (elem)
53
57
                {
59
63
                        if (string.IsNullOrEmpty (s) || !int.TryParse (s, out line))
60
64
                                line = 1;
61
65
                        
62
 
                        //s = elem.GetAttribute ("column");
63
 
                        //if (string.IsNullOrEmpty (s) || !int.TryParse (s, out column))
64
 
                        //      column = 1;
 
66
                        s = elem.GetAttribute ("column");
 
67
                        if (string.IsNullOrEmpty (s) || !int.TryParse (s, out column))
 
68
                                column = 1;
65
69
                        
66
70
                        s = elem.GetAttribute ("conditionExpression");
67
71
                        if (!string.IsNullOrEmpty (s))
80
84
                                elem.SetAttribute ("file", fileName);
81
85
                        
82
86
                        elem.SetAttribute ("line", line.ToString ());
83
 
                        //elem.SetAttribute ("column", column.ToString ());
 
87
                        elem.SetAttribute ("column", column.ToString ());
84
88
                        
85
89
                        if (!string.IsNullOrEmpty (conditionExpression)) {
86
90
                                elem.SetAttribute ("conditionExpression", conditionExpression);
95
99
                        get { return fileName; }
96
100
                        protected set { fileName = value; }
97
101
                }
 
102
 
 
103
                public int OriginalColumn {
 
104
                        get { return column; }
 
105
                }
98
106
                
99
 
                //public int Column {
100
 
                //      get { return adjustedColumn == -1 ? column : adjustedColumn; }
101
 
                //      protected set { column = value; }
102
 
                //}
 
107
                public int Column {
 
108
                        get { return adjustedColumn == -1 ? column : adjustedColumn; }
 
109
                        protected set { column = value; }
 
110
                }
103
111
                
104
112
                public int OriginalLine {
105
113
                        get { return line; }
110
118
                        protected set { line = value; }
111
119
                }
112
120
                
113
 
                //public void SetColumn (int newColumn)
114
 
                //{
115
 
                //      ResetAdjustedColumn ();
116
 
                //      column = newColumn;
117
 
                //}
 
121
                public void SetColumn (int newColumn)
 
122
                {
 
123
                        ResetAdjustedColumn ();
 
124
                        column = newColumn;
 
125
                }
118
126
                
119
127
                public void SetLine (int newLine)
120
128
                {
122
130
                        line = newLine;
123
131
                }
124
132
                
125
 
                //internal void SetAdjustedColumn (int newColumn)
126
 
                //{
127
 
                //      adjustedColumn = newColumn;
128
 
                //}
 
133
                internal void SetAdjustedColumn (int newColumn)
 
134
                {
 
135
                        adjustedColumn = newColumn;
 
136
                }
129
137
                
130
138
                internal void SetAdjustedLine (int newLine)
131
139
                {
132
140
                        adjustedLine = newLine;
133
141
                }
134
 
                
135
 
                //internal void ResetAdjustedColumn ()
136
 
                //{
137
 
                //      adjustedColumn = -1;
138
 
                //}
139
 
                
 
142
 
 
143
                // FIXME: make this private
 
144
                internal void ResetAdjustedColumn ()
 
145
                {
 
146
                        adjustedColumn = -1;
 
147
                }
 
148
 
 
149
                // FIXME: make this private
140
150
                internal void ResetAdjustedLine ()
141
151
                {
142
152
                        adjustedLine = -1;
143
153
                }
144
 
                
145
 
                //internal bool HasAdjustedColumn {
146
 
                //      get { return adjustedColumn != -1; }
147
 
                //}
148
 
 
 
154
 
 
155
                public override bool Reset ()
 
156
                {
 
157
                        bool changed = base.Reset () || HasAdjustedLine || HasAdjustedColumn;
 
158
 
 
159
                        lastConditionValue = null;
 
160
                        adjustedColumn = -1;
 
161
                        adjustedLine = -1;
 
162
 
 
163
                        return changed;
 
164
                }
 
165
 
 
166
                // FIXME: make this private
 
167
                internal bool HasAdjustedColumn {
 
168
                        get { return adjustedColumn != -1; }
 
169
                }
 
170
 
 
171
                // FIXME: make this private
149
172
                internal bool HasAdjustedLine {
150
173
                        get { return adjustedLine != -1; }
151
174
                }
186
209
                        breakIfConditionChanges = bp.breakIfConditionChanges;
187
210
                        conditionExpression = bp.conditionExpression;
188
211
                        fileName = bp.fileName;
189
 
                        //column = bp.column;
 
212
                        column = bp.column;
190
213
                        line = bp.line;
191
214
                }
192
215
        }
193
 
        
 
216
 
 
217
        public enum HitCountMode {
 
218
                None,
 
219
                LessThan,
 
220
                LessThanOrEqualTo,
 
221
                EqualTo,
 
222
                GreaterThan,
 
223
                GreaterThanOrEqualTo
 
224
        }
 
225
 
194
226
        public enum HitAction
195
227
        {
196
228
                Break,