pike.git/src/program.c:1:
/*
|| This file is part of Pike. For copyright information see COPYRIGHT.
|| Pike is distributed under GPL, LGPL and MPL. See the file COPYING
|| for more information.
- || $Id: program.c,v 1.565 2004/09/27 15:12:09 grubba Exp $
+ || $Id: program.c,v 1.566 2005/05/18 12:36:53 mast Exp $
*/
#include "global.h"
- RCSID("$Id: program.c,v 1.565 2004/09/27 15:12:09 grubba Exp $");
+ RCSID("$Id: program.c,v 1.566 2005/05/18 12:36:53 mast Exp $");
#include "program.h"
#include "object.h"
#include "dynamic_buffer.h"
#include "pike_types.h"
#include "stralloc.h"
#include "las.h"
#include "language.h"
#include "lex.h"
#include "pike_macros.h"
#include "fsort.h"
pike.git/src/program.c:2629: Inside #if defined(PIKE_DEBUG)
}
fprintf(stderr, "\n"
"%*sInherit table:\n"
"%*s ####: Level prog_id id_level storage_offs "
"par_id par_offs par_obj_id id_ref_offs\n",
indent, "", indent, "");
for (d=0; d < p->num_inherits; d++) {
struct inherit *inh = p->inherits + d;
- fprintf(stderr, "%*s %4d: %5d %7d %8d %12d %6d %8d %10d %11d\n",
+ fprintf(stderr, "%*s %4d: %5d %7d %8d %12"PRINTPTRDIFFT"d %6d %8d %10d %11"PRINTSIZET"d\n",
indent, "",
d, inh->inherit_level,
inh->prog ? inh->prog->id : -1,
inh->identifier_level, inh->storage_offset,
inh->parent_identifier, inh->parent_offset,
inh->parent ? inh->parent->program_id : -1,
inh->identifier_ref_offset);
}
fprintf(stderr, "\n"
"%*sIdentifier table:\n"
"%*s ####: Flags Offset Type Name\n",
indent, "", indent, "");
for (d=0; d < p->num_identifiers; d++) {
struct identifier *id = p->identifiers + d;
- fprintf(stderr, "%*s %4d: %5x %6d %4d \"%s\"\n",
+ fprintf(stderr, "%*s %4d: %5x %6"PRINTPTRDIFFT"d %4d \"%s\"\n",
indent, "",
d, id->identifier_flags, id->func.offset,
id->run_time_type, id->name->str);
}
fprintf(stderr, "\n"
"%*sVariable table:\n"
"%*s ####: Index\n",
indent, "", indent, "");
for (d = 0; d < p->num_variable_index; d++) {
pike.git/src/program.c:2871: Inside #if defined(PIKE_DEBUG)
for(q=0;q<size;q++)
{
if(offset+q >= NELEM(variable_positions)) break;
if(variable_positions[offset+q] != -1)
{
if(ID_FROM_INT(p,variable_positions[offset+q])->run_time_type !=
i->run_time_type)
{
- fprintf(stderr, "Storage offset: 0x%08x vs 0x%08x\n"
- "Func offset: 0x%08x vs 0x%08x\n"
+ fprintf(stderr, "Storage offset: "
+ "0x%08"PRINTPTRDIFFT"x vs 0x%08"PRINTPTRDIFFT"x\n"
+ "Func offset: 0x%08"PRINTPTRDIFFT"x vs 0x%08"PRINTPTRDIFFT"x\n"
"Type: %s vs %s\n",
INHERIT_FROM_INT(p, variable_positions[offset+q])->
storage_offset,
INHERIT_FROM_INT(p, e)->storage_offset,
ID_FROM_INT(p, variable_positions[offset+q])->func.offset,
i->func.offset,
get_name_of_type(ID_FROM_INT(p,variable_positions[offset+q]
)->run_time_type),
get_name_of_type(i->run_time_type));
if (i->name) {
Pike_fatal("Variable '%s' and '%s' overlap\n"
- "Offset 0x%08x - 0x%08x overlaps with 0x%08x - 0x%08x\n",
+ "Offset 0x%08"PRINTPTRDIFFT"x - 0x%08"PRINTPTRDIFFT"x "
+ "overlaps with "
+ "0x%08"PRINTPTRDIFFT"x - 0x%08"PRINTPTRDIFFT"x\n",
ID_FROM_INT(p, variable_positions[offset+q])->name->str,
i->name->str,
INHERIT_FROM_INT(p, variable_positions[offset+q])->
storage_offset +
ID_FROM_INT(p, variable_positions[offset+q])->func.offset,
INHERIT_FROM_INT(p, variable_positions[offset+q])->
storage_offset +
ID_FROM_INT(p, variable_positions[offset+q])->func.offset +
sizeof_variable(ID_FROM_INT(p, variable_positions[offset+q]
)->run_time_type)-1,
offset, offset+size-1);
} else {
Pike_fatal("Variable '%s' and anonymous variable (%d) overlap\n"
- "Offset 0x%08x - 0x%08x overlaps with 0x%08x - 0x%08x\n",
+ "Offset 0x%08"PRINTPTRDIFFT"x - 0x%08"PRINTPTRDIFFT"x "
+ "overlaps with "
+ "0x%08"PRINTPTRDIFFT"x - 0x%08"PRINTPTRDIFFT"x\n",
ID_FROM_INT(p, variable_positions[offset+q])->name->str,
e,
INHERIT_FROM_INT(p, variable_positions[offset+q])->
storage_offset +
ID_FROM_INT(p, variable_positions[offset+q])->func.offset,
INHERIT_FROM_INT(p, variable_positions[offset+q])->
storage_offset +
ID_FROM_INT(p, variable_positions[offset+q])->func.offset +
sizeof_variable(ID_FROM_INT(p, variable_positions[offset+q]
)->run_time_type)-1,
pike.git/src/program.c:5512: Inside #if defined(PIKE_DEBUG)
if(*cnt == 127)
{
cnt++;
len = get_small_number(&cnt);
shift = *cnt;
file = ++cnt;
CHECK_FILE_ENTRY (Pike_compiler->new_program, cnt, len, shift);
cnt += len<<shift;
if (a_flag > 100) {
fprintf(stderr, "Filename entry:\n"
- " len: %d, shift: %d\n",
+ " len: %"PRINTSIZET"d, shift: %d\n",
len, shift);
}
}
off+=get_small_number(&cnt);
line+=get_small_number(&cnt);
if (a_flag > 100) {
fprintf(stderr, " off: %d, line: %d\n"
" raw: ",
off, line);
for (;start < cnt; start++) {
pike.git/src/program.c:5538: Inside #if defined(PIKE_DEBUG)
if(Pike_compiler->last_line != line ||
Pike_compiler->last_pc != off ||
(Pike_compiler->last_file && file &&
memcmp(Pike_compiler->last_file->str, file, len<<shift)))
{
Pike_fatal("Line numbering out of whack\n"
" (line : %d ?= %d)!\n"
" ( pc : %d ?= %d)!\n"
" (shift: %d ?= %d)!\n"
- " (len : %d ?= %d)!\n"
+ " (len : %"PRINTSIZET"d ?= %"PRINTSIZET"d)!\n"
" (file : %s ?= %s)!\n",
Pike_compiler->last_line, line,
Pike_compiler->last_pc, off,
Pike_compiler->last_file?Pike_compiler->last_file->size_shift:0,
shift,
Pike_compiler->last_file?Pike_compiler->last_file->len:0, len,
Pike_compiler->last_file?Pike_compiler->last_file->str:"N/A",
file?file:"N/A");
}
}