File: StepFrame.cs

package info (click to toggle)
mono-debugger 0.60%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 9,556 kB
  • ctags: 22,787
  • sloc: ansic: 99,407; cs: 42,429; sh: 9,192; makefile: 376
file content (106 lines) | stat: -rw-r--r-- 1,962 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
using System;
using System.IO;
using System.Text;

using Mono.Debugger;
using Mono.Debugger.Languages;

namespace Mono.Debugger.Backend
{
	internal enum StepMode
	{
		// <summary>
		//   Step a single machine instruction, but step over trampolines.
		// </summary>
		SingleInstruction,

		// <summary>
		//   Step a single macihne instruction, always step into method calls.
		// </summary>
		NativeInstruction,

		// <summary>
		//   Step a single machine instruction, but step over function calls.
		// </summary>
		NextInstruction,

		// <summary>
		//   Step one source line.
		// </summary>
		SourceLine,

		// <summary>
		//   Step one source line, but step over method calls.
		// </summary>
		NextLine,

		// <summary>
		//   Single-step until leaving the specified step frame or entering a method.
		// </summary>
		StepFrame,

		// <summary>
		//   Single-step until leaving the specified step frame and never enter any
		//   methods.
		// </summary>
		Finish
	}

	internal sealed class StepFrame
	{
		TargetAddress start, end;
		Language language;
		StackFrame stack;
		StepMode mode;

		internal StepFrame (Language language, StepMode mode)
			: this (TargetAddress.Null, TargetAddress.Null, null, language, mode)
		{ }

		internal StepFrame (TargetAddress start, TargetAddress end, StackFrame stack,
				    Language language, StepMode mode)
		{
			this.start = start;
			this.end = end;
			this.stack = stack;
			this.language = language;
			this.mode = mode;
		}

		public StepMode Mode {
			get {
				return mode;
			}
		}

		public TargetAddress Start {
			get {
				return start;
			}
		}

		public TargetAddress End {
			get {
				return end;
			}
		}

		public StackFrame StackFrame {
			get {
				return stack;
			}
		}

		public Language Language {
			get {
				return language;
			}
		}

		public override string ToString ()
		{
			return String.Format ("StepFrame ({0:x},{1:x},{2},{3})",
					      Start, End, Mode, Language);
		}
	}
}