public StackFrame GetFrame(int number)
{
Thread thread = CurrentThread;
if (!thread.IsStopped)
throw new TargetException (TargetError.NotStopped);
if (number == -1)
return thread.CurrentFrame;
Backtrace bt = thread.GetBacktrace ();
if (number >= bt.Count)
throw new ScriptingException ("No such frame: {0}", number);
return bt [number];
}