stop_reason (Debugger::Context)

    /*
     *   call-seq:
     *      context.stop_reason -> sym
     *
     *   Returns the reason for the stop. It maybe of the following values:
     *   :initial, :step, :breakpoint, :catchpoint, :post-mortem
     */
    static VALUE
    context_stop_reason(VALUE self)
    {
        debug_context_t *debug_context;
        char * sym_name;

        debug_check_started();

        Data_Get_Struct(self, debug_context_t, debug_context);

        switch(debug_context->stop_reason)
        {
            case CTX_STOP_STEP:
                sym_name = "step";
                break;
            case CTX_STOP_BREAKPOINT:
                sym_name = "breakpoint";
                break;
            case CTX_STOP_CATCHPOINT:
                sym_name = "catchpoint";
                break;
            case CTX_STOP_NONE:
            default:
                sym_name = "none";
        }
        if(CTX_FL_TEST(debug_context, CTX_FL_DEAD))
            sym_name = "post-mortem";

        return ID2SYM(rb_intern(sym_name));
    }