pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:94:   //! This is typically set via the option @expr{"--picky-cpp"@}.   int show_if_constant_errors = 0;      int is_pike_master = 0;   // This integer variable should exist in any object that aspires to be   // the master. It gets set to 1 when the master is installed, and is   // therefore set in any object that is or has been the master. That   // makes the Encoder class encode references to the master and all   // ex-masters as references to the current master object.    + protected object debugger; +    mapping(string:object) fs_map = ([]);   object root_fs;   // --- Functions begin here.      // Have to access some stuff without going through the resolver.   private object(_static_modules.Builtin) Builtin = _static_modules.Builtin();   private constant Files = _static_modules._Stdio;      #define Stat Files.Stat   #define capitalize(X) (upper_case((X)[..0])+(X)[1..])
pike.git/lib/master.pike.in:3628:   mapping(string:string) initial_predefines = ([]);      protected mixed main_resolv(string sym, CompatResolver|void resolver) {    mixed v = (resolver||this)->resolv(sym);    if(!v)    error("Could not resolve %s. "    "(Perhaps the installed pike tree has been moved.)\n", sym);    return v;   };    + void load_debugger() { +  set_debugger(1); +  // load the debugger support +  function d; +  mixed err = catch { +  d = main_resolv("Debug.Debugger.debug_server", +  get_compilation_handler(compat_major, compat_minor)); +  }; +  +  if(!d){ werror("Unable to load debugger.\n"); +  throw(d); +  } +  debugger = d(); +  debugger->load_breakpoint(); + } +    //! This function is called when all the driver is done with all setup   //! of modules, efuns, tables etc. etc. and is ready to start executing   //! _real_ programs. It receives the arguments not meant for the driver.   void _main(array(string(0..255)) orig_argv)   {    array(string) argv=copy_value(orig_argv);    int debug,trace,run_tool;    object tmp;    string postparseaction=0;   
pike.git/lib/master.pike.in:3705:    ({"ipath", HAS_ARG, ({"-I", "--include-path"}), 0, 0}),    ({"ppath", HAS_ARG, ({"-P", "--program-path"}), 0, 0}),    ({"showpaths", MAY_HAVE_ARG, ({"--show-paths"}), 0, 0}),    ({"warnings", NO_ARG, ({"-w", "--warnings"}), 0, 0}),    ({"nowarnings", NO_ARG, ({"-W", "--woff", "--no-warnings"}), 0, 0}),    ({"autoreload", NO_ARG, ({"--autoreload"}), 0, 0}),    ({"master", HAS_ARG, ({"-m"}), 0, 0}),    ({"compiler_trace", NO_ARG, ({"--compiler-trace"}), 0, 0}),    ({"assembler_debug",MAY_HAVE_ARG, ({"--assembler-debug"}), 0, 0}),    ({"optimizer_debug",MAY_HAVE_ARG, ({"--optimizer-debug"}), 0, 0}), +  ({"debugger", MAY_HAVE_ARG, ({"--debugger"}), 0, 1}),    ({"debug", MAY_HAVE_ARG, ({"--debug"}), 0, 1}),    ({"trace", MAY_HAVE_ARG, ({"--trace"}), 0, 1}),    ({"ignore", MAY_HAVE_ARG, ({"-Dqdatplr"}), 0, 1}),    ({"ignore", HAS_ARG, ({"-s"}), 0, 0}),    ({"run_tool", NO_ARG, ({"-x"}), 0, 0}),    ({"show_cpp_warn", NO_ARG, ({"--show-all-cpp-warnings","--picky-cpp"}), 0, 0}),    }), 1);       /* Parse -M and -I backwards */    for(int i=sizeof(q)-1; i>=0; i--)
pike.git/lib/master.pike.in:3759:    default:    no_resolv[ feature ] = 1;    break;    }    }    break;       case "debug":    debug+=(int)q[i][1];    break; -  +  case "debugger": +  load_debugger(); +  set_debugger(1); +  break;    case "trace":    trace+=(int)q[i][1];    break;       case "modpath":    add_module_path(q[i][1]);    break;       case "ipath":    add_include_path(q[i][1]);
pike.git/lib/master.pike.in:3896:    // compilation errors.    exit (20, call_describe_error (compile_err));    }    else throw (compile_err);    }      #if constant(_debug)    if(debug) _debug(debug);   #endif    if(trace) trace = predef::trace(trace); +     mixed ret;    mixed err = catch {    // One reason for this catch is to get a new call to    // eval_instruction in interpret.c so that the debug and    // trace levels set above take effect in the bytecode    // evaluator.    ret = prog()->run(sizeof(argv),argv);    };    predef::trace(trace);    if (err) {