/*
 *   call-seq:
 *      Debugger.debug_load(file, stop = false) -> nil
 *
 *   Same as Kernel#load but resets current context's frames.
 *   +stop+ parameter force the debugger to stop at the first line of code in the +file+
 *   FOR INTERNAL USE ONLY.
 */
static VALUE
debug_debug_load(int argc, VALUE *argv, VALUE self)
{
    VALUE file, stop, context;
    debug_context_t *debug_context;

    if(rb_scan_args(argc, argv, "11", &file, &stop) == 1)
      stop = Qfalse;

    debug_start(self);
    context = debug_current_context(self);
    Data_Get_Struct(context, debug_context_t, debug_context);
    debug_context->stack_size = 0;
    if(RTEST(stop))
      debug_context->stop_next = 1;
    rb_load(file, 0);

    debug_stop(self);
    return Qnil;
}