pike.git / src / interpret.c

version» Context lines:

pike.git/src/interpret.c:878:      struct backlog backlog[BACKLOG];   int backlogp=BACKLOG-1;      static INLINE void low_debug_instr_prologue (PIKE_INSTR_T instr)   {    if(Pike_interpreter.trace_level > 2)    {    char *file = NULL, *f;    struct pike_string *filep; -  INT32 linep; +  INT_TYPE linep;       filep = get_line(Pike_fp->pc,Pike_fp->context->prog,&linep);    if (filep && !filep->size_shift) {    file = filep->str;    while((f=STRCHR(file,'/')))    file=f+1;    }    fprintf(stderr,"- %s:%4ld:%p(%"PRINTPTRDIFFT"d): "    "%-25s %4"PRINTPTRDIFFT"d %4"PRINTPTRDIFFT"d\n",    file ? file : "-",(long)linep,
pike.git/src/interpret.c:1019:    do    {    struct program *p;    e++;    if(e>=BACKLOG) e=0;       p = id_to_program (backlog[e].program_id);    if (p)    {    struct pike_string *file; -  INT32 line; +  INT_TYPE line;      #ifdef _REENTRANT    if(thread != backlog[e].thread_state)    {    fprintf(stderr,"[Thread swap, Pike_interpreter.thread_state=%p]\n",backlog[e].thread_state);    thread = backlog[e].thread_state;    }   #endif       file = get_line(backlog[e].pc,p, &line);
pike.git/src/interpret.c:1731:      #undef REAL_PIKE_DEBUG   #undef DO_IF_REAL_DEBUG   #undef DO_IF_NOT_REAL_DEBUG         static void do_trace_call(INT32 args, dynamic_buffer *old_buf)   {    struct pike_string *filep = NULL;    char *file, *s; -  INT32 linep,e; +  INT_TYPE linep; +  INT32 e;    ptrdiff_t len = 0;       my_strcat("(");    for(e=0;e<args;e++)    {    if(e) my_strcat(",");    safe_describe_svalue(Pike_sp-args+e,0,0);    }    my_strcat(")");   
pike.git/src/interpret.c:1818:    else    my_strcat ("function in destructed object ");    }    do_trace_return (got_retval, &save_buf);   }      static void do_trace_return (int got_retval, dynamic_buffer *old_buf)   {    struct pike_string *filep = NULL;    char *file, *s; -  INT32 linep; +  INT_TYPE linep;       if (got_retval) {    my_strcat ("returns: ");    safe_describe_svalue(Pike_sp-1,0,0);    }    else    my_strcat ("returns with no value");       s=simple_free_buf(old_buf);    if((size_t)strlen(s) > (size_t)TRACE_LEN)
pike.git/src/interpret.c:3045: Inside #if defined(PIKE_DEBUG) and #if defined(PIKE_THREADS)
   }    f = ts->state.frame_pointer;   #else    f = Pike_fp;   #endif       for (of = 0; f; f = (of = f)->next)    if (f->refs) {    int args, i;    char *file = NULL; -  INT32 line; +  INT_TYPE line;       if (f->context) {    if (f->pc)    file = low_get_line_plain (f->pc, f->context->prog, &line, 0);    else    file = low_get_program_line_plain (f->context->prog, &line, 0);    }    if (file) -  fprintf (stderr, "%s:%d: ", file, line); +  fprintf (stderr, "%s:%ld: ", file, (long)line);    else    fputs ("unknown program: ", stderr);       if (f->current_program) {    /* FIXME: Wide string identifiers. */    fputs (safe_idname_from_int(f->current_program, f->fun), stderr);    fputc ('(', stderr);    }    else    fputs ("unknown function(", stderr);
pike.git/src/interpret.c:3166:    fputs (safe_idname_from_int(arg->u.object->prog,    SUBTYPEOF(*arg)), stderr);    else    fputc ('0', stderr);    break;       case T_OBJECT: {    struct program *p = arg->u.object->prog;    if (p && p->num_linenumbers) {    file = low_get_program_line_plain (p, &line, 0); -  fprintf (stderr, "object(%s:%d)", file, line); +  fprintf (stderr, "object(%s:%ld)", file, (long)line);    }    else    fputs ("object", stderr);    break;    }       case T_PROGRAM: {    struct program *p = arg->u.program;    if (p->num_linenumbers) {    file = low_get_program_line_plain (p, &line, 0); -  fprintf (stderr, "program(%s:%d)", file, line); +  fprintf (stderr, "program(%s:%ld)", file, (long)line);    }    else    fputs ("program", stderr);    break;    }       case T_FLOAT:    fprintf (stderr, "%f",(double) arg->u.float_number);    break;   
pike.git/src/interpret.c:3226:    *: debugger session; it can't be used from inside the program.    */   void gdb_backtraces()   {   #ifdef PIKE_THREADS    extern INT32 gdb_next_thread_state(INT32, struct thread_state **);    INT32 i = 0;    struct thread_state *ts = 0;    while ((i = gdb_next_thread_state (i, &ts)), ts) {    fprintf (stderr, "\nTHREAD_ID %p (swapped %s):\n", -  (void *)ts->id, ts->swapped ? "out" : "in"); +  (void *)(ptrdiff_t)ts->id, ts->swapped ? "out" : "in");    gdb_backtrace (ts->id);    }   #else    gdb_backtrace();   #endif   }   #endif      PMOD_EXPORT void custom_check_stack(ptrdiff_t amount, const char *fmt, ...)   {