pike.git / src / encode.c

version» Context lines:

pike.git/src/encode.c:3014:       check_c_stack(1024);       DECODE("decode_value2");       switch(what & TAG_MASK)    {    case TAG_DELAYED:    EDB (2, fprintf(stderr, "%*sDecoding delay encoded from <%ld>\n",    data->depth, "", num);); +  EDB(1, DECODE_WERR(".tag delayed, %ld", num));    SET_SVAL(entry_id, T_INT, NUMBER_NUMBER, integer, num);    if (!(delayed_enc_val = low_mapping_lookup (data->decoded, &entry_id)))    decode_error (data, NULL, "Failed to find previous record of "    "delay encoded entry <%ld>.\n", num);    DECODE ("decode_value2");    break;       case TAG_AGAIN:    EDB (1, fprintf(stderr, "%*sDecoding TAG_AGAIN from <%ld>\n",    data->depth, "", num);); -  +  EDB(1, DECODE_WERR(".tag again, %ld", num));    SET_SVAL(entry_id, T_INT, NUMBER_NUMBER, integer, num);    if((tmp2=low_mapping_lookup(data->decoded, &entry_id)))    {    push_svalue(tmp2);    }else{    decode_error(data, NULL, "Failed to decode TAG_AGAIN entry <%ld>.\n",    num);    }    goto decode_done;       default:    entry_id = data->counter;    data->counter.u.integer++;    /* Fall through. */       case TAG_TYPE:    EDB (2, fprintf(stderr, "%*sDecoding to <%ld>: TAG%d (%ld)\n",    data->depth, "", entry_id.u.integer,    what & TAG_MASK, num);); -  +  EDB(1, { +  ptrdiff_t save_ptr = data->ptr; +  data->ptr = data->debug_ptr; +  DECODE_WERR("# Decoding to tag #%ld", entry_id.u.integer); +  data->ptr = save_ptr; +  });    /* Types are added to the encoded mapping AFTER they have been    * encoded. */    delayed_enc_val = NULL;    break;    }       check_stack(1);       switch(what & TAG_MASK)    {
pike.git/src/encode.c:4610:    data->len < 5 ||    GETC() != 182 ||    GETC() != 'k' ||    GETC() != 'e' ||    GETC() != '0')    {    free( (char *) data);    return 0;    }    +  EDB(1, { +  string_builder_append_disassembly(data->debug_buf, +  data->debug_ptr, +  data->data + data->debug_ptr, +  data->data + data->ptr, +  ".format 0", +  NULL, +  "Encoding #0."); +  data->debug_ptr = data->ptr; +  }); +     data->decoded=allocate_mapping(128);       add_ref (data->data_str);    if (data->codec) add_ref (data->codec);   #ifdef PIKE_THREADS    add_ref (data->thread_obj);   #endif    SET_ONERROR(err, error_free_decode_data, data);       low_do_decode (data);