public static void ss_recursive2 (int x)
{
ss_recursive2_at ( "ss_recursive2 in " + x);
- if (x < 10) {
+ if (x < 5) {
int next = x + 1;
ss_recursive2_at ("ss_recursive2 descend " + x);
ss_recursive2_trap ();
public static void ss_recursive_chaotic_at (bool exiting, string at, int n)
{
// string indent = "";
-// for (int count = 12 - n; count > 0; count--)
+// for (int count = 5 - n; count > 0; count--)
// indent += "\t";
// Console.WriteLine (indent + (exiting ? "<--" : "-->") + " " + at + " " + n);
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static void ss_recursive_chaotic ()
{
- ss_recursive_chaotic_fizz (12);
+ ss_recursive_chaotic_fizz (5);
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static void ss_recursive_chaotic_trap (int n, List<RecursiveChaoticPoint> trace, ref bool didLast, ref bool didAny)
{
// Depth is calculated as:
- // Main + single_stepping + ss_recursive_chaotic + (n is 12 at outermost frame and 0 at innermost frame) + ss_recursive_chaotic_trap
- trace.Add (new RecursiveChaoticPoint (true, "ss_recursive_chaotic_trap", 12 - n + 5));
+ // Main + single_stepping + ss_recursive_chaotic + (n is 5 at outermost frame and 0 at innermost frame) + ss_recursive_chaotic_trap
+ trace.Add (new RecursiveChaoticPoint (true, "ss_recursive_chaotic_trap", 5 - n + 5));
didLast = true;
}
// This will be called after every return from a function. The other function will return whether "step out" is currently active, and it will be passed in here as didLast.
if (didLast) {
// Depth is calculated as:
- // Main + single_stepping + ss_recursive_chaotic + (n is 12 at outermost frame and 0 at innermost frame)
- trace.Add (new RecursiveChaoticPoint (false, "ss_recursive_chaotic_" + at, 12 - n + 4));
+ // Main + single_stepping + ss_recursive_chaotic + (n is 5 at outermost frame and 0 at innermost frame)
+ trace.Add (new RecursiveChaoticPoint (false, "ss_recursive_chaotic_" + at, 5 - n + 4));
didAny = true;
didLast = false;
}
public static void trace_ss_recursive_chaotic (List<RecursiveChaoticPoint> trace)
{
- ss_recursive_chaotic_fizz (12, trace);
+ ss_recursive_chaotic_fizz (5, trace);
}
Event single_step (ThreadMirror t) {
breakpoint.Continue ();
e = breakpoint.lastEvent;
req = create_step (e);
- for (int c = 1; c <= 9; c++) {
- // The first ten times we try to step over this function, the breakpoint will stop us
+ for (int c = 1; c <= 4; c++) {
+ // The first five times we try to step over this function, the breakpoint will stop us
assert_location_at_breakpoint (e, "ss_recursive2_trap");
req.Disable ();
}
// At this point we should have escaped the breakpoints and this will be a normal step stop
assert_location (e, "ss_recursive2");
- Assert.AreEqual (11, e.Thread.GetFrames ().Length);
+ Assert.AreEqual (6, e.Thread.GetFrames ().Length);
} finally {
req.Disable ();
breakpoint.Disable ();
breakpoint.Continue ();
e = breakpoint.lastEvent;
req = create_step (e);
- for (int c = 1; c <= 9; c++) {
- // The first ten times we try to step over this function, the breakpoint will stop us
+ for (int c = 1; c <= 4; c++) {
+ // The first five times we try to step over this function, the breakpoint will stop us
assert_location_at_breakpoint (e, "ss_recursive2_trap");
req.Disable ();
Assert.AreEqual (c+2, e.Thread.GetFrames ().Length);
e = step_out_or_breakpoint ();
}
- for (int c = 8; c >= 1; c--) {
+ for (int c = 3; c >= 1; c--) {
assert_location (e, "ss_recursive2");
Assert.AreEqual (c + 2, e.Thread.GetFrames ().Length);