pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:3630:   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() { + void load_debugger(int wait_seconds) {    set_debugger(1);    // load the debugger support    function d;       mixed err = catch {    function f = main_resolv("Debug.debug",    get_compilation_handler(compat_major, compat_minor));    };    if(err) {    werror("Debugging is only available when Pike is compiled with RTL debug.\n");
pike.git/lib/master.pike.in:3653:       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(); +  debugger->load_breakpoint(wait_seconds);   }      //! 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;
pike.git/lib/master.pike.in:3703:    "Module path...: " + pike_module_path*"\n"    " " + "\n"    "Include path..: " + pike_include_path*"\n"    " " + "\n"    "Program path..: " + pike_program_path*"\n"    " " + "\n");    };       Version cur_compat_ver;    +  int have_debugger = 0; +  int debugger_wait = 5; // 5 seconds by default +     if(sizeof(argv)>1 && sizeof(argv[1]) && argv[1][0]=='-')    {    array q;    tmp = main_resolv( "Getopt" );       int NO_ARG = tmp->NO_ARG;    int MAY_HAVE_ARG = tmp->MAY_HAVE_ARG;    int HAS_ARG = tmp->HAS_ARG;       q=tmp->find_all_options(argv,({
pike.git/lib/master.pike.in:3734:    ({"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}), +  ({"debugger_wait", HAS_ARG, ({"--debugger-wait"}), 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:3789:    no_resolv[ feature ] = 1;    break;    }    }    break;       case "debug":    debug+=(int)q[i][1];    break;    case "debugger": -  load_debugger(); -  set_debugger(1); +  have_debugger = 1;    break; -  +  case "debugger_wait": +  debugger_wait = (int)q[i][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:3830:    case "run_tool":    run_tool = 1;    break;       case "show_cpp_warn":    show_if_constant_errors = 1;    break;    }    }    +  if(have_debugger) { +  load_debugger(debugger_wait); +  set_debugger(1); +  } +     cur_compat_ver = Version (compat_major, compat_minor);    if (cur_compat_ver < lowestcompat)    {    werror("This Pike only supports compatibility down to %s.\n",    (string)lowestcompat);    cur_compat_ver = lowestcompat;    compat_major = lowestcompat->major;    compat_minor = lowestcompat->minor;    }    if (compat_major != -1) {