aMax = ML_(read_Addr)(p); p += sizeof(Addr);
nbytes = ML_(read_UShort)(p); p += sizeof(UShort);
nGuards++;
- if (0) VG_(printf)(" guard %d: %#lx %#lx\n",
- (Int)nGuards, aMin,aMax);
+ if (0) VG_(printf)(" guard %lu: %#lx %#lx\n",
+ nGuards, aMin,aMax);
if (regs == NULL) {
vg_assert(aMin == (Addr)0);
vg_assert(aMax == ~(Addr)0);
n = VG_(sizeXA)(maps);
for (i = 0; i < n; i++) {
const DebugInfoMapping* map = VG_(indexXA)(maps, i);
- TRACE_SYMTAB(" [%ld] avma 0x%-16llx size %-8lu "
- "foff %-8lld %s %s %s\n",
- i, (ULong)map->avma, map->size, (Long)map->foff,
+ TRACE_SYMTAB(" [%ld] avma 0x%-16lx size %-8lu "
+ "foff %-8ld %s %s %s\n",
+ i, map->avma, map->size, map->foff,
map->rx ? "rx" : "--",
map->rw ? "rw" : "--",
map->ro ? "ro" : "--");
VG_(message)(Vg_UserMsg,
"LOAD_PDB_DEBUGINFO: clreq: fd=%d, avma=%#lx, total_size=%lu, "
"bias=%#lx\n",
- fd_obj, avma_obj, total_size, bias_obj
+ fd_obj, avma_obj, total_size, (UWord)bias_obj
);
}
/* Print in XML format, dumping in as much info as we know.
Ensure all tags are balanced. */
APPEND("<frame>");
- VG_(sprintf)(ibuf,"<ip>0x%llX</ip>", (ULong)eip);
+ VG_(sprintf)(ibuf,"<ip>0x%lX</ip>", eip);
APPEND(maybe_newline);
APPEND(ibuf);
if (know_objname) {
APPEND("</file>");
APPEND(maybe_newline);
APPEND("<line>");
- VG_(sprintf)(ibuf,"%d",lineno);
+ VG_(sprintf)(ibuf,"%u",lineno);
APPEND(ibuf);
APPEND("</line>");
}
// 0x80483BF: ??? (a.c:20)
// 0x80483BF: ???
//
- VG_(sprintf)(ibuf,"0x%llX: ", (ULong)eip);
+ VG_(sprintf)(ibuf,"0x%lX: ", eip);
APPEND(ibuf);
if (know_fnname) {
APPEND(buf_fn);
}
APPEND(buf_srcloc);
APPEND(":");
- VG_(sprintf)(ibuf,"%d",lineno);
+ VG_(sprintf)(ibuf,"%u",lineno);
APPEND(ibuf);
APPEND(")");
} else if (know_objname) {
Word j;
if (0) {
/* debug printing only */
- VG_(printf)("look for %#lx size %ld i %ld\n",
+ VG_(printf)("look for %#lx size %lu i %ld\n",
*ipP, di->fpo_size, i);
for (j = 0; j < di->fpo_size; j++)
- VG_(printf)("[%02ld] %#x %d\n",
+ VG_(printf)("[%02ld] %#x %u\n",
j, di->fpo[j].ulOffStart, di->fpo[j].cbProcSize);
}
vg_assert(i >= 0 && i < di->fpo_size);
if (xml) {
TAGL( dn1 );
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside local var \"%pS\",",
+ "Location 0x%lx is %ld byte%s inside local var \"%pS\",",
data_addr, var_offset, vo_plural, var->name );
TAGR( dn1 );
TAGL( dn2 );
p2XA( dn2,
- "in frame #%d of thread %d", frameNo, (Int)tid );
+ "in frame #%d of thread %u", frameNo, tid );
TAGR( dn2 );
} else {
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside local var \"%s\",",
+ "Location 0x%lx is %ld byte%s inside local var \"%s\",",
data_addr, var_offset, vo_plural, var->name );
p2XA( dn2,
- "in frame #%d of thread %d", frameNo, (Int)tid );
+ "in frame #%d of thread %u", frameNo, tid );
}
}
else
if (xml) {
TAGL( dn1 );
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside local var \"%pS\"",
+ "Location 0x%lx is %ld byte%s inside local var \"%pS\"",
data_addr, var_offset, vo_plural, var->name );
TAGR( dn1 );
XAGL( dn2 );
TXTL( dn2 );
p2XA( dn2,
- "declared at %pS:%d, in frame #%d of thread %d",
- fileName, var->lineNo, frameNo, (Int)tid );
+ "declared at %pS:%d, in frame #%d of thread %u",
+ fileName, var->lineNo, frameNo, tid );
TXTR( dn2 );
// FIXME: also do <dir>
p2XA( dn2,
XAGR( dn2 );
} else {
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside local var \"%s\"",
+ "Location 0x%lx is %ld byte%s inside local var \"%s\"",
data_addr, var_offset, vo_plural, var->name );
p2XA( dn2,
- "declared at %s:%d, in frame #%d of thread %d",
- fileName, var->lineNo, frameNo, (Int)tid );
+ "declared at %s:%d, in frame #%d of thread %u",
+ fileName, var->lineNo, frameNo, tid );
}
}
else
if (xml) {
TAGL( dn1 );
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside %pS%pS",
+ "Location 0x%lx is %ld byte%s inside %pS%pS",
data_addr, residual_offset, ro_plural, var->name,
(HChar*)(VG_(indexXA)(described,0)) );
TAGR( dn1 );
TAGL( dn2 );
p2XA( dn2,
- "in frame #%d of thread %d", frameNo, (Int)tid );
+ "in frame #%d of thread %u", frameNo, tid );
TAGR( dn2 );
} else {
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside %s%s",
+ "Location 0x%lx is %ld byte%s inside %s%s",
data_addr, residual_offset, ro_plural, var->name,
(HChar*)(VG_(indexXA)(described,0)) );
p2XA( dn2,
- "in frame #%d of thread %d", frameNo, (Int)tid );
+ "in frame #%d of thread %u", frameNo, tid );
}
}
else
if (xml) {
TAGL( dn1 );
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside %pS%pS,",
+ "Location 0x%lx is %ld byte%s inside %pS%pS,",
data_addr, residual_offset, ro_plural, var->name,
(HChar*)(VG_(indexXA)(described,0)) );
TAGR( dn1 );
XAGL( dn2 );
TXTL( dn2 );
p2XA( dn2,
- "declared at %pS:%d, in frame #%d of thread %d",
- fileName, var->lineNo, frameNo, (Int)tid );
+ "declared at %pS:%d, in frame #%d of thread %u",
+ fileName, var->lineNo, frameNo, tid );
TXTR( dn2 );
// FIXME: also do <dir>
p2XA( dn2,
XAGR( dn2 );
} else {
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside %s%s,",
+ "Location 0x%lx is %ld byte%s inside %s%s,",
data_addr, residual_offset, ro_plural, var->name,
(HChar*)(VG_(indexXA)(described,0)) );
p2XA( dn2,
- "declared at %s:%d, in frame #%d of thread %d",
- fileName, var->lineNo, frameNo, (Int)tid );
+ "declared at %s:%d, in frame #%d of thread %u",
+ fileName, var->lineNo, frameNo, tid );
}
}
else
if (xml) {
TAGL( dn1 );
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside global var \"%pS\"",
+ "Location 0x%lx is %ld byte%s inside global var \"%pS\"",
data_addr, var_offset, vo_plural, var->name );
TAGR( dn1 );
} else {
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside global var \"%s\"",
+ "Location 0x%lx is %ld byte%s inside global var \"%s\"",
data_addr, var_offset, vo_plural, var->name );
}
}
if (xml) {
TAGL( dn1 );
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside global var \"%pS\"",
+ "Location 0x%lx is %ld byte%s inside global var \"%pS\"",
data_addr, var_offset, vo_plural, var->name );
TAGR( dn1 );
XAGL( dn2 );
XAGR( dn2 );
} else {
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside global var \"%s\"",
+ "Location 0x%lx is %ld byte%s inside global var \"%s\"",
data_addr, var_offset, vo_plural, var->name );
p2XA( dn2,
"declared at %s:%d",
if (xml) {
TAGL( dn1 );
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside %pS%pS,",
+ "Location 0x%lx is %ld byte%s inside %pS%pS,",
data_addr, residual_offset, ro_plural, var->name,
(HChar*)(VG_(indexXA)(described,0)) );
TAGR( dn1 );
TAGR( dn2 );
} else {
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside %s%s,",
+ "Location 0x%lx is %ld byte%s inside %s%s,",
data_addr, residual_offset, ro_plural, var->name,
- (char*)(VG_(indexXA)(described,0)) );
+ (HChar*)(VG_(indexXA)(described,0)) );
p2XA( dn2,
"a global variable");
}
if (xml) {
TAGL( dn1 );
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside %pS%pS,",
+ "Location 0x%lx is %ld byte%s inside %pS%pS,",
data_addr, residual_offset, ro_plural, var->name,
(HChar*)(VG_(indexXA)(described,0)) );
TAGR( dn1 );
XAGR( dn2 );
} else {
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside %s%s,",
+ "Location 0x%lx is %ld byte%s inside %s%s,",
data_addr, residual_offset, ro_plural, var->name,
(HChar*)(VG_(indexXA)(described,0)) );
p2XA( dn2,
res = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, di );
vg_assert(res.kind == GXR_Addr);
if (debug)
- VG_(printf)(" %5ld .. %5ld (sp) %s\n",
- res.word, res.word + ((UWord)mul.ul) - 1, var->name);
+ VG_(printf)(" %5lu .. %5llu (sp) %s\n",
+ res.word, res.word + mul.ul - 1, var->name);
block.base = res.word;
block.szB = (SizeT)mul.ul;
block.spRel = True;
res = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, di );
vg_assert(res.kind == GXR_Addr);
if (debug)
- VG_(printf)(" %5ld .. %5ld (FP) %s\n",
- res.word, res.word + ((UWord)mul.ul) - 1, var->name);
+ VG_(printf)(" %5lu .. %5llu (FP) %s\n",
+ res.word, res.word + mul.ul - 1, var->name);
block.base = res.word;
block.szB = (SizeT)mul.ul;
block.spRel = False;
if (0)
VG_(printf)(
- "addr=%#lx di=%p %s got=%#lx,%ld plt=%#lx,%ld "
- "data=%#lx,%ld bss=%#lx,%ld\n",
+ "addr=%#lx di=%p %s got=%#lx,%lu plt=%#lx,%lu "
+ "data=%#lx,%lu bss=%#lx,%lu\n",
a, di, di->fsm.filename,
di->got_avma, di->got_size,
di->plt_avma, di->plt_size,
UInt delay = now - t_last;
t_last = now;
nread += len;
- VG_(printf)("XXXXXXXX (tot %'lld) read %'ld offset %'lld delay %'u\n",
+ VG_(printf)("XXXXXXXX (tot %'llu) read %'lu offset %'llu delay %'u\n",
nread, len, off, delay);
}
{
VG_(umsg)("Valgrind: debuginfo reader: ensure_valid failed:\n");
VG_(umsg)("Valgrind: during call to %s\n", caller);
- VG_(umsg)("Valgrind: request for range [%llu, +%llu) exceeds\n",
- (ULong)offset, (ULong)size);
- VG_(umsg)("Valgrind: valid image size of %llu for image:\n",
- (ULong)img->size);
+ VG_(umsg)("Valgrind: request for range [%llu, +%lu) exceeds\n",
+ offset, size);
+ VG_(umsg)("Valgrind: valid image size of %lu for image:\n",
+ img->size);
VG_(umsg)("Valgrind: \"%s\"\n", img->source.name);
give_up__image_overrun();
}
switch (op_code) {
case DW_LNE_end_sequence:
if (0) VG_(printf)("1001: si->o %#lx, smr.a %#lx\n",
- di->text_debug_bias, state_machine_regs.address );
+ (UWord)di->text_debug_bias,
+ state_machine_regs.address );
/* JRS: added for compliance with spec; is pointless due to
reset_state_machine below */
state_machine_regs.end_sequence = 1;
Int advAddr = adv;
state_machine_regs.address += adv;
- if (0) VG_(printf)("smr.a += %#lx\n", adv );
+ if (0) VG_(printf)("smr.a += %#lx\n", (UWord)adv );
adv = (op_code % info.li_line_range) + info.li_line_base;
if (0) VG_(printf)("1002: di->o %#lx, smr.a %#lx\n",
- di->text_debug_bias, state_machine_regs.address );
+ (UWord)di->text_debug_bias,
+ state_machine_regs.address );
state_machine_regs.line += adv;
if (di->ddump_line)
case DW_LNS_copy:
if (0) VG_(printf)("1002: di->o %#lx, smr.a %#lx\n",
- di->text_debug_bias, state_machine_regs.address );
+ (UWord)di->text_debug_bias,
+ state_machine_regs.address );
if (state_machine_regs.is_stmt) {
/* only add a statement if there was a previous boundary */
if (state_machine_regs.last_address) {
break;
case DW_LNS_advance_pc: {
- Word adv = info.li_min_insn_length * step_leb128U(&data);
+ UWord adv = info.li_min_insn_length * step_leb128U(&data);
state_machine_regs.address += adv;
if (0) VG_(printf)("smr.a += %#lx\n", adv );
if (di->ddump_line)
- VG_(printf)(" Advance PC by %ld to 0x%lx\n",
+ VG_(printf)(" Advance PC by %lu to 0x%lx\n",
adv, state_machine_regs.address);
break;
}
Word adv = (((255 - info.li_opcode_base) / info.li_line_range)
* info.li_min_insn_length);
state_machine_regs.address += adv;
- if (0) VG_(printf)("smr.a += %#lx\n", adv );
+ if (0) VG_(printf)("smr.a += %#lx\n", (UWord)adv );
if (di->ddump_line)
VG_(printf)(" Advance PC by constant %ld to 0x%lx\n",
adv, (Addr)state_machine_regs.address);
}
case DW_LNS_fixed_advance_pc: {
/* XXX: Need something to get 2 bytes */
- Word adv = ML_(cur_step_UShort)(&data);
+ UWord adv = ML_(cur_step_UShort)(&data);
state_machine_regs.address += adv;
if (0) VG_(printf)("smr.a += %#lx\n", adv );
if (di->ddump_line)
if (0) {
HChar* str_name = ML_(cur_read_strdup)(ui.name, "di.rdd3.3");
- VG_(printf)("debug_line_sz %lld, ui.stmt_list %lld %s\n",
+ VG_(printf)("debug_line_sz %llu, ui.stmt_list %llu %s\n",
escn_debug_line.szB, ui.stmt_list, str_name );
ML_(dinfo_free)(str_name);
}
case DW_CFA_advance_loc1:
delta = (UInt)ML_(cur_step_UChar)(&instr);
- VG_(printf)(" sci:DW_CFA_advance_loc1(%d)\n", delta);
+ VG_(printf)(" sci:DW_CFA_advance_loc1(%u)\n", delta);
break;
case DW_CFA_advance_loc2:
delta = (UInt)ML_(cur_step_UShort)(&instr);
- VG_(printf)(" sci:DW_CFA_advance_loc2(%d)\n", delta);
+ VG_(printf)(" sci:DW_CFA_advance_loc2(%u)\n", delta);
break;
case DW_CFA_advance_loc4:
delta = (UInt)ML_(cur_step_UInt)(&instr);
- VG_(printf)(" DW_CFA_advance_loc4(%d)\n", delta);
+ VG_(printf)(" DW_CFA_advance_loc4(%u)\n", delta);
break;
case DW_CFA_def_cfa:
reg = step_leb128( &instr, 0 );
off = step_leb128( &instr, 0 );
- VG_(printf)(" DW_CFA_def_cfa: r%d ofs %d\n", (Int)reg, (Int)off);
+ VG_(printf)(" DW_CFA_def_cfa: r%d ofs %d\n", reg, off);
break;
case DW_CFA_def_cfa_sf:
reg = step_leb128( &instr, 0 );
off = step_leb128( &instr, 1 );
VG_(printf)(" DW_CFA_def_cfa_sf: r%d ofs %d\n",
- (Int)reg, (Int)(off * data_a_f));
+ reg, off * data_a_f);
break;
case DW_CFA_register:
if (di->trace_cfi) {
VG_(printf)("\n-----------------------------------------------\n");
- VG_(printf)("CFI info: szB %lld, _avma %#lx\n",
+ VG_(printf)("CFI info: szB %llu, _avma %#lx\n",
escn_frame.szB, frame_avma );
VG_(printf)("CFI info: name %s\n", di->fsm.filename );
}
ciefde_start = data;
if (di->trace_cfi)
VG_(printf)("\ncie/fde.start = (frame_image + 0x%llx)\n",
- ML_(cur_minus)(ciefde_start, frame_image));
+ (ULong)ML_(cur_minus)(ciefde_start, frame_image));
ciefde_len = (ULong)ML_(cur_step_UInt)(&data);
if (di->trace_cfi)
- VG_(printf)("cie/fde.length = %lld\n", ciefde_len);
+ VG_(printf)("cie/fde.length = %llu\n", ciefde_len);
/* Apparently, if the .length field is zero, we are at the end
of the sequence. This is stated in the Generic Elf
if (ciefde_len == 0) {
if (di->ddump_frames)
VG_(printf)("%08llx ZERO terminator\n\n",
- ML_(cur_minus)(ciefde_start, frame_image));
+ (ULong)ML_(cur_minus)(ciefde_start, frame_image));
return;
}
}
if (di->trace_cfi)
- VG_(printf)("cie.pointer = %lld\n", cie_pointer);
+ VG_(printf)("cie.pointer = %llu\n", cie_pointer);
/* If cie_pointer is zero for .eh_frame or all ones for .debug_frame,
we've got a CIE; else it's an FDE. */
look_for = cie_pointer;
for (cie = 0; cie < n_CIEs; cie++) {
- if (0) VG_(printf)("look for %lld %lld\n",
+ if (0) VG_(printf)("look for %llu %llu\n",
look_for, the_CIEs[cie].offset );
if (the_CIEs[cie].offset == look_for)
break;
set_position_of_Cursor( &loc, debug_loc_offset );
TRACE_D3("make_general_GX (.debug_loc_offset = %llu, ioff = %llu) {\n",
- debug_loc_offset, (ULong)get_DiCursor_from_Cursor(&loc).ioff );
+ debug_loc_offset, get_DiCursor_from_Cursor(&loc).ioff );
/* Who frees this xa? It is freed before this fn exits. */
xa = VG_(newXA)( ML_(dinfo_zalloc), "di.readdwarf3.mgGX.1",
VG_(memcpy) (ht_ta, ta, SZ_G_ABBV(ta_nf_n));
VG_(HT_add_node) ( cc->ht_abbvs, ht_ta );
if (TD3) {
- TRACE_D3(" Adding abbv_code %llu TAG %s [%s] nf %d ",
- (ULong) ht_ta->abbv_code, ML_(pp_DW_TAG)(ht_ta->atag),
+ TRACE_D3(" Adding abbv_code %lu TAG %s [%s] nf %u ",
+ ht_ta->abbv_code, ML_(pp_DW_TAG)(ht_ta->atag),
ML_(pp_DW_children)(ht_ta->has_children),
ta_nf_n);
TRACE_D3(" ");
= get_Initial_Length( &cc->is_dw64, c,
"parse_CU_Header: invalid initial-length field" );
- TRACE_D3(" Length: %lld\n", cc->unit_length );
+ TRACE_D3(" Length: %llu\n", cc->unit_length );
/* version */
cc->version = get_UShort( c );
debug_abbrev_offset = get_Dwarfish_UWord( c, cc->is_dw64 );
if (debug_abbrev_offset >= escn_debug_abbv.szB)
cc->barf( "parse_CU_Header: invalid debug_abbrev_offset" );
- TRACE_D3(" Abbrev Offset: %lld\n", debug_abbrev_offset );
+ TRACE_D3(" Abbrev Offset: %llu\n", debug_abbrev_offset );
/* address size. If this isn't equal to the host word size, just
give up. This makes it safe to assume elsewhere that
case DW_FORM_sdata:
cts->u.val = (ULong)(Long)get_SLEB128(c);
cts->szB = 8;
- TRACE_D3("%lld", (Long)cts->u.val);
+ TRACE_D3("%llu", cts->u.val);
break;
case DW_FORM_udata:
cts->u.val = (ULong)(Long)get_ULEB128(c);
cts->szB = 8;
- TRACE_D3("%llu", (Long)cts->u.val);
+ TRACE_D3("%llu", cts->u.val);
break;
case DW_FORM_addr:
/* note, this is a hack. DW_FORM_addr is defined as getting
default:
VG_(printf)(
- "get_Form_contents: unhandled %d (%s) at <%llx>\n",
+ "get_Form_contents: unhandled %u (%s) at <%llx>\n",
form, ML_(pp_DW_FORM)(form), get_position_of_Cursor(c));
c->barf("get_Form_contents: unhandled DW_FORM");
}
return sizeof_Dwarfish_UWord(cc->is_dw64);
default:
VG_(printf)(
- "get_Form_szB: unhandled %d (%s)\n",
+ "get_Form_szB: unhandled %u (%s)\n",
form, ML_(pp_DW_FORM)(form));
cc->barf("get_Form_contents: unhandled DW_FORM");
}
else
dirname = NULL;
fndn_ix = ML_(addFnDn)( cc->di, str, dirname);
- TRACE_D3(" read_filename_table: %ld fndn_ix %d %s %s\n",
+ TRACE_D3(" read_filename_table: %ld fndn_ix %u %s %s\n",
VG_(sizeXA)(fndn_ix_Table), fndn_ix,
dirname, str);
VG_(addToXA)( fndn_ix_Table, &fndn_ix );
&& ftabIx < VG_(sizeXA)( parser->fndn_ix_Table )) {
fndn_ix = *(UInt*)VG_(indexXA)( parser->fndn_ix_Table, ftabIx );
}
- if (0) VG_(printf)("XXX filename fndn_ix = %d %s\n", fndn_ix,
+ if (0) VG_(printf)("XXX filename fndn_ix = %u %s\n", fndn_ix,
ML_(fndn_ix2filename) (cc->di, fndn_ix));
}
}
caller_fndn_ix = *(UInt*)
VG_(indexXA)( parser->fndn_ix_Table, ftabIx );
}
- if (0) VG_(printf)("XXX caller_fndn_ix = %d %s\n", caller_fndn_ix,
+ if (0) VG_(printf)("XXX caller_fndn_ix = %u %s\n", caller_fndn_ix,
ML_(fndn_ix2filename) (cc->di, caller_fndn_ix));
}
if (attr == DW_AT_call_line && cts.szB > 0) {
/* .. vs how big we have found it to be */
cu_amount_used = cu_offset_now - cc.cu_start_offset;
- if (1) TRACE_D3("offset now %lld, d-i-size %lld\n",
+ if (1) TRACE_D3("offset now %llu, d-i-size %llu\n",
cu_offset_now, section_size);
if (cu_offset_now > section_size)
barf("toplevel DIEs beyond end of CU");
} else {
VG_(printf)(" FrB=none\n");
}
- VG_(printf)(" declared at: %d %s:%d\n",
+ VG_(printf)(" declared at: %u %s:%d\n",
varp->fndn_ix,
ML_(fndn_ix2filename) (di, varp->fndn_ix),
varp->fLine );
return;
}
- TRACE_SYMTAB("\n--- Reading (ELF, standard) %s (%lld entries) ---\n",
+ TRACE_SYMTAB("\n--- Reading (ELF, standard) %s (%llu entries) ---\n",
tab_name, escn_symtab->szB/sizeof(ElfXX_Sym) );
/* Perhaps should start at i = 1; ELF docs suggest that entry
return;
}
- TRACE_SYMTAB("\n--- Reading (ELF, ppc64be-linux) %s (%lld entries) ---\n",
+ TRACE_SYMTAB("\n--- Reading (ELF, ppc64be-linux) %s (%llu entries) ---\n",
tab_name, escn_symtab->szB/sizeof(ElfXX_Sym) );
oset = VG_(OSetGen_Create)( offsetof(TempSym,key),
if (modify_size && di->trace_symtab) {
VG_(printf)(" modify (old sz %4d) "
- " val %#010lx, toc %#010lx, sz %4d %lld\n",
+ " val %#010lx, toc %#010lx, sz %4d %llu\n",
old_size,
prev->key.addr,
prev->tocptr,
- (Int) prev->size,
- (ULong)prev->key.name
+ prev->size,
+ prev->key.name
);
}
if (modify_tocptr && di->trace_symtab) {
VG_(printf)(" modify (upd tocptr) "
- " val %#010lx, toc %#010lx, sz %4d %lld\n",
+ " val %#010lx, toc %#010lx, sz %4d %llu\n",
prev->key.addr,
prev->tocptr,
- (Int) prev->size,
- (ULong)prev->key.name
+ prev->size,
+ prev->key.name
);
}
TRACE_SYMTAB("------ Basic facts about the object ------\n");
TRACE_SYMTAB("object: n_oimage %llu\n",
(ULong)ML_(img_size)(mimg));
- TRACE_SYMTAB("phdr: ioff %llu nent %ld ent_szB %ld\n",
+ TRACE_SYMTAB("phdr: ioff %llu nent %lu ent_szB %lu\n",
phdr_mioff, phdr_mnent, phdr_ment_szB);
- TRACE_SYMTAB("shdr: ioff %llu nent %ld ent_szB %ld\n",
+ TRACE_SYMTAB("shdr: ioff %llu nent %lu ent_szB %lu\n",
shdr_mioff, shdr_mnent, shdr_ment_szB);
for (i = 0; i < VG_(sizeXA)(di->fsm.maps); i++) {
const DebugInfoMapping* map = VG_(indexXA)(di->fsm.maps, i);
if (map->rx)
- TRACE_SYMTAB("rx_map: avma %#lx size %lu foff %lu\n",
+ TRACE_SYMTAB("rx_map: avma %#lx size %lu foff %ld\n",
map->avma, map->size, map->foff);
}
for (i = 0; i < VG_(sizeXA)(di->fsm.maps); i++) {
const DebugInfoMapping* map = VG_(indexXA)(di->fsm.maps, i);
if (map->rw)
- TRACE_SYMTAB("rw_map: avma %#lx size %lu foff %lu\n",
+ TRACE_SYMTAB("rw_map: avma %#lx size %lu foff %ld\n",
map->avma, map->size, map->foff);
}
VG_(addToXA)(svma_ranges, &item);
TRACE_SYMTAB(
"PT_LOAD[%ld]: acquired as rw, bias 0x%lx\n",
- i, item.bias);
+ i, (UWord)item.bias);
loaded = True;
}
if (map->rx
VG_(addToXA)(svma_ranges, &item);
TRACE_SYMTAB(
"PT_LOAD[%ld]: acquired as rx, bias 0x%lx\n",
- i, item.bias);
+ i, (UWord)item.bias);
loaded = True;
}
}
for (i = 0; i < VG_(sizeXA)(di->fsm.maps); i++) {
const DebugInfoMapping* map = VG_(indexXA)(di->fsm.maps, i);
if (map->rx)
- TRACE_SYMTAB("rx: at %#lx are mapped foffsets %ld .. %ld\n",
+ TRACE_SYMTAB("rx: at %#lx are mapped foffsets %ld .. %lu\n",
map->avma, map->foff, map->foff + map->size - 1 );
}
TRACE_SYMTAB("rx: contains these svma regions:\n");
const RangeAndBias* reg = VG_(indexXA)(svma_ranges, i);
if (reg->exec)
TRACE_SYMTAB(" svmas %#lx .. %#lx with bias %#lx\n",
- reg->svma_base, reg->svma_limit - 1, reg->bias );
+ reg->svma_base, reg->svma_limit - 1, (UWord)reg->bias );
}
for (i = 0; i < VG_(sizeXA)(di->fsm.maps); i++) {
const DebugInfoMapping* map = VG_(indexXA)(di->fsm.maps, i);
if (map->rw)
- TRACE_SYMTAB("rw: at %#lx are mapped foffsets %ld .. %ld\n",
+ TRACE_SYMTAB("rw: at %#lx are mapped foffsets %ld .. %lu\n",
map->avma, map->foff, map->foff + map->size - 1 );
}
TRACE_SYMTAB("rw: contains these svma regions:\n");
const RangeAndBias* reg = VG_(indexXA)(svma_ranges, i);
if (!reg->exec)
TRACE_SYMTAB(" svmas %#lx .. %#lx with bias %#lx\n",
- reg->svma_base, reg->svma_limit - 1, reg->bias );
+ reg->svma_base, reg->svma_limit - 1, (UWord)reg->bias );
}
/* TOPLEVEL */
}
}
- TRACE_SYMTAB(" [sec %2ld] %s %s al%2u foff %6ld .. %6ld "
+ TRACE_SYMTAB(" [sec %2ld] %s %s al%2u foff %6ld .. %6lu "
" svma %p name \"%s\"\n",
i, inrx ? "rx" : " ", inrw ? "rw" : " ", alyn,
foff, foff+size-1, (void*)svma, name);
TRACE_SYMTAB("acquiring .text avma = %#lx .. %#lx\n",
di->text_avma,
di->text_avma + di->text_size - 1);
- TRACE_SYMTAB("acquiring .text bias = %#lx\n", di->text_bias);
+ TRACE_SYMTAB("acquiring .text bias = %#lx\n", (UWord)di->text_bias);
} else {
BAD(".text");
}
TRACE_SYMTAB("acquiring .data avma = %#lx .. %#lx\n",
di->data_avma,
di->data_avma + di->data_size - 1);
- TRACE_SYMTAB("acquiring .data bias = %#lx\n", di->data_bias);
+ TRACE_SYMTAB("acquiring .data bias = %#lx\n", (UWord)di->data_bias);
} else {
BAD(".data");
}
TRACE_SYMTAB("acquiring .sdata avma = %#lx .. %#lx\n",
di->sdata_avma,
di->sdata_avma + di->sdata_size - 1);
- TRACE_SYMTAB("acquiring .sdata bias = %#lx\n", di->sdata_bias);
+ TRACE_SYMTAB("acquiring .sdata bias = %#lx\n",
+ (UWord)di->sdata_bias);
} else {
BAD(".sdata");
}
TRACE_SYMTAB("acquiring .rodata avma = %#lx .. %#lx\n",
di->rodata_avma,
di->rodata_avma + di->rodata_size - 1);
- TRACE_SYMTAB("acquiring .rodata bias = %#lx\n", di->rodata_bias);
+ TRACE_SYMTAB("acquiring .rodata bias = %#lx\n",
+ (UWord)di->rodata_bias);
} else {
BAD(".rodata");
}
TRACE_SYMTAB("acquiring .dynbss avma = %#lx .. %#lx\n",
di->bss_avma,
di->bss_avma + di->bss_size - 1);
- TRACE_SYMTAB("acquiring .dynbss bias = %#lx\n", di->bss_bias);
+ TRACE_SYMTAB("acquiring .dynbss bias = %#lx\n",
+ (UWord)di->bss_bias);
}
}
svma, svma + size - 1);
TRACE_SYMTAB("acquiring .bss avma = %#lx .. %#lx\n",
svma + inrw->bias, svma + inrw->bias + size - 1);
- TRACE_SYMTAB("acquiring .bss bias = %#lx\n", di->bss_bias);
+ TRACE_SYMTAB("acquiring .bss bias = %#lx\n",
+ (UWord)di->bss_bias);
} else
if (inrw && !di->bss_present) {
TRACE_SYMTAB("acquiring .bss avma = %#lx .. %#lx\n",
di->bss_avma,
di->bss_avma + di->bss_size - 1);
- TRACE_SYMTAB("acquiring .bss bias = %#lx\n", di->bss_bias);
+ TRACE_SYMTAB("acquiring .bss bias = %#lx\n",
+ (UWord)di->bss_bias);
} else
/* Now one from the wtf?! department ... */
TRACE_SYMTAB("acquiring .sdynbss avma = %#lx .. %#lx\n",
di->sbss_avma,
di->sbss_avma + di->sbss_size - 1);
- TRACE_SYMTAB("acquiring .sdynbss bias = %#lx\n", di->sbss_bias);
+ TRACE_SYMTAB("acquiring .sdynbss bias = %#lx\n",
+ (UWord)di->sbss_bias);
}
}
svma, svma + size - 1);
TRACE_SYMTAB("acquiring .sbss avma = %#lx .. %#lx\n",
svma + inrw->bias, svma + inrw->bias + size - 1);
- TRACE_SYMTAB("acquiring .sbss bias = %#lx\n", di->sbss_bias);
+ TRACE_SYMTAB("acquiring .sbss bias = %#lx\n", (UWord)di->sbss_bias);
} else
if (inrw && !di->sbss_present) {
TRACE_SYMTAB("acquiring .sbss avma = %#lx .. %#lx\n",
di->sbss_avma,
di->sbss_avma + di->sbss_size - 1);
- TRACE_SYMTAB("acquiring .sbss bias = %#lx\n", di->sbss_bias);
+ TRACE_SYMTAB("acquiring .sbss bias = %#lx\n", (UWord)di->sbss_bias);
} else {
BAD(".sbss");
}
TRACE_SYMTAB("acquiring .exidx avma = %#lx .. %#lx\n",
di->exidx_avma,
di->exidx_avma + di->exidx_size - 1);
- TRACE_SYMTAB("acquiring .exidx bias = %#lx\n", di->exidx_bias);
+ TRACE_SYMTAB("acquiring .exidx bias = %#lx\n",
+ (UWord)di->exidx_bias);
} else {
BAD(".ARM.exidx");
}
TRACE_SYMTAB("acquiring .extab avma = %#lx .. %#lx\n",
di->extab_avma,
di->extab_avma + di->extab_size - 1);
- TRACE_SYMTAB("acquiring .extab bias = %#lx\n", di->extab_bias);
+ TRACE_SYMTAB("acquiring .extab bias = %#lx\n",
+ (UWord)di->extab_bias);
} else {
BAD(".ARM.extab");
}
} /* iterate over the section headers */
/* TOPLEVEL */
- if (0) VG_(printf)("YYYY text_: avma %#lx size %ld bias %#lx\n",
- di->text_avma, di->text_size, di->text_bias);
+ if (0) VG_(printf)("YYYY text_: avma %#lx size %lu bias %#lx\n",
+ di->text_avma, di->text_size, (UWord)di->text_bias);
if (VG_(clo_verbosity) > 2 || VG_(clo_trace_redir))
VG_(message)(Vg_DebugMsg, " svma %#010lx, avma %#010lx\n",
di->_sec##_debug_svma, \
di->_sec##_debug_svma + di->_sec##_size - 1); \
TRACE_SYMTAB("acquiring ." #_sec " debug bias = %#lx\n", \
- di->_sec##_debug_bias); \
+ (UWord)di->_sec##_debug_bias); \
} \
} while (0);
}
}
}
- VG_(umsg)("VARINFO: %7lu vars %7ld text_size %s\n",
+ VG_(umsg)("VARINFO: %7lu vars %7lu text_size %s\n",
nVars, di->text_size, di->fsm.filename);
}
/* TOPLEVEL */
if (0)
VG_(printf)(" edata: cmd %08x data %08x\n",
- (UInt)edata.cmd, (UInt)edata.data);
+ (UInt)edata.cmd, edata.data);
Int ret = TranslateCmd ( state, &edata );
if (ret < 0) return ret;
default:
break;
}
- VG_(printf)("setCFAfromCFIR: FAIL: how %d off %d\n", (Int)how, (Int)off);
+ VG_(printf)("setCFAfromCFIR: FAIL: how %d off %d\n", how, off);
vg_assert(0);
return False;
}
// associated with.
Addr avma = (Addr)Prel31ToAddr(&entry_img->addr);
if (di->trace_cfi)
- VG_(printf)("XXX1 entry: entry->addr 0x%lx, avma 0x%lx\n",
- (UWord)entry_img->addr, avma);
+ VG_(printf)("XXX1 entry: entry->addr 0x%x, avma 0x%lx\n",
+ entry_img->addr, avma);
Addr next_avma;
if (entry_img < end_img - 1) {
if (!plausible && avma != text_last_avma + 1) {
HChar buf[100];
VG_(snprintf)(buf, sizeof(buf),
- "Implausible EXIDX last entry size %u"
- "; using 1 instead.", (UInt)(text_last_avma - avma));
+ "Implausible EXIDX last entry size %lu"
+ "; using 1 instead.", text_last_avma - avma);
buf[sizeof(buf)-1] = 0;
complain(buf);
}
static
void pdb_check_root_version_and_timestamp( const HChar* pdbname,
ULong pdbmtime,
- unsigned version,
+ UInt version,
UInt TimeDateStamp )
{
switch ( version ) {
default:
if (VG_(clo_verbosity) > 1)
VG_(umsg)("LOAD_PDB_DEBUGINFO: "
- "Unknown .pdb root block version %d\n", version );
+ "Unknown .pdb root block version %u\n", version );
}
if ( TimeDateStamp != pdbmtime ) {
if (VG_(clo_verbosity) > 1)
default:
if (0) {
- const int *isym = (const int *)sym;
+ const UInt *isym = (const UInt *)sym;
VG_(printf)("unknown id 0x%x len=0x%x at %p\n",
- sym->generic.id, sym->generic.len, sym);
+ (UInt)sym->generic.id, (UInt)sym->generic.len, sym);
VG_(printf)(" %8x %8x %8x %8x\n",
isym[1], isym[2], isym[3], isym[4]);
VG_(printf)(" %8x %8x %8x %8x\n",
vsym.isText = True;
vsym.isIFunc = False;
if (debug)
- VG_(umsg)(" Adding function %s addr=%#lx length=%d\n",
+ VG_(umsg)(" Adding function %s addr=%#lx length=%u\n",
symname, vsym.avmas.main, vsym.size );
ML_(addSym)( di, &vsym );
n_syms_read++;
vsym.isText = True;
vsym.isIFunc = False;
if (debug)
- VG_(umsg)(" Adding function %s addr=%#lx length=%d\n",
+ VG_(umsg)(" Adding function %s addr=%#lx length=%u\n",
symname, vsym.avmas.main, vsym.size );
ML_(addSym)( di, &vsym );
n_syms_read++;
for (i = 0; i < lbh->nlines; i++) {
if (debug)
- VG_(printf)("%s offset=%08x line=%d\n",
+ VG_(printf)("%s offset=%08x line=%u\n",
pfx, lbh->l[i].offset, lbh->l[i].lineno ^ 0x80000000);
}
svma_e = sectp[lbh->seg - 1].VirtualAddress + lbh->start
+ lbh->l[i+1].offset-1;
if (debug)
- VG_(printf)("%s line %d: %08lx to %08lx\n",
+ VG_(printf)("%s line %u: %08lx to %08lx\n",
pfx, lbh->l[i].lineno ^ 0x80000000, svma_s, svma_e);
ML_(addLineInfo)( di,
filedirname_ix,
svma_e = sectp[lbh->seg - 1].VirtualAddress + lbh->start
+ lbh->size - 1;
if (debug)
- VG_(printf)("%s line %d: %08lx to %08lx\n",
+ VG_(printf)("%s line %u: %08lx to %08lx\n",
pfx, lbh->l[ lbh->nlines-1 ].lineno ^ 0x80000000,
svma_s, svma_e);
ML_(addLineInfo)( di,
default:
if (VG_(clo_verbosity) > 1)
VG_(umsg)("LOAD_PDB_DEBUGINFO: "
- "Unknown .pdb type info version %ld\n", types.version );
+ "Unknown .pdb type info version %lu\n", types.version );
}
header_size = 0;
default:
if (VG_(clo_verbosity) > 1)
VG_(umsg)("LOAD_PDB_DEBUGINFO: "
- "Unknown .pdb symbol info version %ld\n",
+ "Unknown .pdb symbol info version %lu\n",
symbols.version );
}
const DebugInfoMapping* map = VG_(indexXA)(di->fsm.maps, i);
if (map->rx)
VG_(dmsg)("LOAD_PDB_DEBUGINFO: "
- "rx_map: avma %#lx size %7lu foff %llu\n",
- map->avma, map->size, (Off64T)map->foff);
+ "rx_map: avma %#lx size %7lu foff %ld\n",
+ map->avma, map->size, map->foff);
}
for (i = 0; i < VG_(sizeXA)(di->fsm.maps); i++) {
const DebugInfoMapping* map = VG_(indexXA)(di->fsm.maps, i);
if (map->rw)
VG_(dmsg)("LOAD_PDB_DEBUGINFO: "
- "rw_map: avma %#lx size %7lu foff %llu\n",
- map->avma, map->size, (Off64T)map->foff);
+ "rw_map: avma %#lx size %7lu foff %ld\n",
+ map->avma, map->size, map->foff);
}
VG_(dmsg)("LOAD_PDB_DEBUGINFO: "
" text: avma %#lx svma %#lx size %7lu bias %#lx\n",
di->text_avma, di->text_svma,
- di->text_size, di->text_bias);
+ di->text_size, (UWord)di->text_bias);
}
/*
vg_assert(sym->pri_name);
if (sec_names)
vg_assert(sec_names);
- VG_(printf)( "%5d: %c%c %#8lx .. %#8lx (%d) %s%s",
+ VG_(printf)( "%5d: %c%c %#8lx .. %#8lx (%u) %s%s",
idx,
sym->isText ? 'T' : '-',
sym->isIFunc ? 'I' : '-',
} while (0)
if (base != 0 || len != 0)
- VG_(printf)("[%#lx .. %#lx]: ", base,
- base + (UWord)len - 1);
+ VG_(printf)("[%#lx .. %#lx]: ", base, base + len - 1);
else
VG_(printf)("[]: ");
if (0) VG_(message)
(Vg_DebugMsg,
"addInlInfo: fn %s inlined as addr_lo %#lx,addr_hi %#lx,"
- "caller fndn_ix %d %s:%d\n",
+ "caller fndn_ix %u %s:%d\n",
inlinedfn, addr_lo, addr_hi, fndn_ix,
ML_(fndn_ix2filename) (di, fndn_ix), lineno);
while (True) {
range = VG_(OSetGen_Next)( scope );
if (!range) break;
- VG_(printf)(" %#lx .. %#lx: %lu vars\n", range->aMin, range->aMax,
+ VG_(printf)(" %#lx .. %#lx: %ld vars\n", range->aMin, range->aMax,
range->vars ? VG_(sizeXA)(range->vars) : 0);
}
VG_(printf)("}\n");
/* Ensure relevant postconditions hold. */
for (i = 0; i < ((Word)di->loctab_used)-1; i++) {
if (0)
- VG_(printf)("%lu 0x%p lno:%d sz:%d fndn_ix:%d i+1 0x%p\n",
+ VG_(printf)("%ld 0x%p lno:%d sz:%d fndn_ix:%u i+1 0x%p\n",
i,
(void*)di->loctab[i].addr,
di->loctab[i].lineno,
}
if (di->trace_cfi)
- VG_(printf)("canonicaliseCfiSI: %ld entries, %#lx .. %#lx\n",
+ VG_(printf)("canonicaliseCfiSI: %lu entries, %#lx .. %#lx\n",
di->cfsi_used,
- di->cfsi_minavma, di->cfsi_maxavma);
+ di->cfsi_minavma, di->cfsi_maxavma);
/* Sort the cfsi_rd array by base address. */
VG_(ssort)(di->cfsi_rd, di->cfsi_used, sizeof(*di->cfsi_rd), compare_DiCfSI);
te->Te.Field.typeR, te->Te.Field.pos.offset,
te->Te.Field.name ? te->Te.Field.name : "");
else
- VG_(printf)("Te_Field(ty=0x%05lx,nLoc=%lu,pos.loc=%p,\"%s\")",
+ VG_(printf)("Te_Field(ty=0x%05lx,nLoc=%ld,pos.loc=%p,\"%s\")",
te->Te.Field.typeR, te->Te.Field.nLoc,
te->Te.Field.pos.loc,
te->Te.Field.name ? te->Te.Field.name : "");
break;
case Te_TyStOrUn:
if (te->Te.TyStOrUn.complete) {
- VG_(printf)("Te_TyStOrUn(%ld,%c,%p,\"%s\")",
+ VG_(printf)("Te_TyStOrUn(%lu,%c,%p,\"%s\")",
te->Te.TyStOrUn.szB,
te->Te.TyStOrUn.isStruct ? 'S' : 'U',
te->Te.TyStOrUn.fieldRs,
"scheduler: %'llu/%'llu major/minor sched events.\n",
n_scheduling_events_MAJOR, n_scheduling_events_MINOR);
VG_(message)(Vg_DebugMsg,
- " sanity: %d cheap, %d expensive checks.\n",
+ " sanity: %u cheap, %u expensive checks.\n",
sanity_fast_count, sanity_slow_count );
}
static
void print_sched_event ( ThreadId tid, const HChar* what )
{
- VG_(message)(Vg_DebugMsg, " SCHED[%d]: %s\n", tid, what );
+ VG_(message)(Vg_DebugMsg, " SCHED[%u]: %s\n", tid, what );
}
/* For showing SB profiles, if the user asks to see them. */
tst->status = VgTs_Runnable;
if (VG_(running_tid) != VG_INVALID_THREADID)
- VG_(printf)("tid %d found %d running\n", tid, VG_(running_tid));
+ VG_(printf)("tid %u found %u running\n", tid, VG_(running_tid));
vg_assert(VG_(running_tid) == VG_INVALID_THREADID);
VG_(running_tid) = tid;
if (VG_(threads)[tid].status == VgTs_WaitSys) {
if (VG_(clo_trace_signals)) {
VG_(message)(Vg_DebugMsg,
- "get_thread_out_of_syscall zaps tid %d lwp %d\n",
+ "get_thread_out_of_syscall zaps tid %u lwp %d\n",
tid, VG_(threads)[tid].os_state.lwpid);
}
# if defined(VGO_darwin)
Addr clstack_end,
SizeT clstack_size )
{
- VG_(debugLog)(1,"sched","sched_init_phase2: tid_main=%d, "
- "cls_end=0x%lx, cls_sz=%ld\n",
+ VG_(debugLog)(1,"sched","sched_init_phase2: tid_main=%u, "
+ "cls_end=0x%lx, cls_sz=%lu\n",
tid_main, clstack_end, clstack_size);
vg_assert(VG_IS_PAGE_ALIGNED(clstack_end+1));
_qq_tst->sched_jmpbuf_valid = True; \
stmt; \
} else if (VG_(clo_trace_sched)) \
- VG_(printf)("SCHEDSETJMP(line %d) tid %d, jumped=%ld\n", \
+ VG_(printf)("SCHEDSETJMP(line %d) tid %u, jumped=%lu\n", \
__LINE__, tid, jumped); \
vg_assert(_qq_tst->sched_jmpbuf_valid); \
_qq_tst->sched_jmpbuf_valid = False; \
UInt sz_spill = (UInt) sizeof tst->arch.vex_spill;
if (0)
- VG_(printf)("gst %p %d, sh1 %p %d, "
- "sh2 %p %d, spill %p %d\n",
+ VG_(printf)("gst %p %u, sh1 %p %u, "
+ "sh2 %p %u, spill %p %u\n",
(void*)a_vex, sz_vex,
(void*)a_vexsh1, sz_vexsh1,
(void*)a_vexsh2, sz_vexsh2,
vki_sigset_t m;
Int i, err = VG_(sigprocmask)(VKI_SIG_SETMASK, NULL, &m);
vg_assert(err == 0);
- VG_(printf)("tid %d: entering code with unblocked signals: ", tid);
+ VG_(printf)("tid %u: entering code with unblocked signals: ", tid);
for (i = 1; i <= _VKI_NSIG; i++)
if (!VG_(sigismember)(&m, i))
VG_(printf)("%d ", i);
if (VG_(clo_sanity_level) >= 3) {
HChar buf[50]; // large enough
- VG_(sprintf)(buf, "(BEFORE SYSCALL, tid %d)", tid);
+ VG_(sprintf)(buf, "(BEFORE SYSCALL, tid %u)", tid);
Bool ok = VG_(am_do_sync_check)(buf, __FILE__, __LINE__);
vg_assert(ok);
}
if (VG_(clo_sanity_level) >= 3) {
HChar buf[50]; // large enough
- VG_(sprintf)(buf, "(AFTER SYSCALL, tid %d)", tid);
+ VG_(sprintf)(buf, "(AFTER SYSCALL, tid %u)", tid);
Bool ok = VG_(am_do_sync_check)(buf, __FILE__, __LINE__);
vg_assert(ok);
}
if (!VG_(is_running_thread)(tid))
- VG_(printf)("tid %d not running; VG_(running_tid)=%d, tid %d status %d\n",
+ VG_(printf)("tid %u not running; VG_(running_tid)=%u, tid %u status %u\n",
tid, VG_(running_tid), tid, tst->status);
vg_assert(VG_(is_running_thread)(tid));
n_scheduling_events_MINOR++;
if (0)
- VG_(message)(Vg_DebugMsg, "thread %d: running for %d bbs\n",
+ VG_(message)(Vg_DebugMsg, "thread %u: running for %d bbs\n",
tid, dispatch_ctr - 1 );
HWord trc[2]; /* "two_words" */
continue;
if (0)
VG_(printf)(
- "VG_(nuke_all_threads_except): nuking tid %d\n", tid);
+ "VG_(nuke_all_threads_except): nuking tid %u\n", tid);
VG_(threads)[tid].exitreason = src;
if (src == VgSrc_FatalSig)
*q = '\0';
VG_(printf_xml)( "<clientmsg>\n" );
- VG_(printf_xml)( " <tid>%d</tid>\n", tid );
+ VG_(printf_xml)( " <tid>%u</tid>\n", tid );
const ThreadState *tst = VG_(get_ThreadState)(tid);
if (tst->thread_name)
VG_(printf_xml)(" <threadname>%s</threadname>\n", tst->thread_name);
UWord req_no = arg[0];
if (0)
- VG_(printf)("req no = 0x%llx, arg = %p\n", (ULong)req_no, arg);
+ VG_(printf)("req no = 0x%lx, arg = %p\n", req_no, arg);
switch (req_no) {
case VG_USERREQ__CLIENT_CALL0: {
if (!VG_(is_running_thread)(tid)) {
VG_(message)(Vg_DebugMsg,
- "Thread %d is supposed to be running, "
- "but doesn't own the_BigLock (owned by %d)\n",
+ "Thread %u is supposed to be running, "
+ "but doesn't own the_BigLock (owned by %u)\n",
tid, VG_(running_tid));
bad = True;
}
if (lwpid != VG_(threads)[tid].os_state.lwpid) {
VG_(message)(Vg_DebugMsg,
- "Thread %d supposed to be in LWP %d, but we're actually %d\n",
+ "Thread %u supposed to be in LWP %d, but we're actually %d\n",
tid, VG_(threads)[tid].os_state.lwpid, VG_(gettid)());
bad = True;
}
if (lwpid != ML_(get_sched_lock_owner)(the_BigLock)) {
VG_(message)(Vg_DebugMsg,
- "Thread (LWPID) %d doesn't own the_BigLock\n",
+ "Thread (LWPID) %u doesn't own the_BigLock\n",
tid);
bad = True;
}
|| (VG_(clo_sanity_level) == 1
&& sanity_fast_count == next_slow_check_at)) {
- if (0) VG_(printf)("SLOW at %d\n", sanity_fast_count-1);
+ if (0) VG_(printf)("SLOW at %u\n", sanity_fast_count-1);
next_slow_check_at = sanity_fast_count - 1 + slow_check_interval;
slow_check_interval++;
= VG_(am_get_VgStack_unused_szB)(stack, limit);
if (remains < limit)
VG_(message)(Vg_DebugMsg,
- "WARNING: Thread %d is within %ld bytes "
+ "WARNING: Thread %u is within %lu bytes "
"of running out of valgrind stack!\n"
"Valgrind stack size can be increased "
"using --valgrind-stacksize=....\n",
ticket = __sync_fetch_and_add(&p->tail, 1);
futex = &p->futex[ticket & TL_FUTEX_MASK];
if (s_debug)
- VG_(printf)("[%d/%d] acquire: ticket %d\n", VG_(getpid)(),
+ VG_(printf)("[%d/%d] acquire: ticket %u\n", VG_(getpid)(),
VG_(gettid)(), ticket);
for (;;) {
futex_value = *futex;
if (ticket == p->head)
break;
if (s_debug)
- VG_(printf)("[%d/%d] acquire: ticket %d - waiting until"
- " futex[%ld] != %d\n", VG_(getpid)(),
+ VG_(printf)("[%d/%d] acquire: ticket %u - waiting until"
+ " futex[%ld] != %u\n", VG_(getpid)(),
VG_(gettid)(), ticket, (long)(futex - p->futex),
futex_value);
sres = VG_(do_syscall3)(__NR_futex, (UWord)futex,
VKI_FUTEX_WAIT | VKI_FUTEX_PRIVATE_FLAG,
futex_value);
if (sr_isError(sres) && sr_Err(sres) != VKI_EAGAIN) {
- VG_(printf)("futex_wait() returned error code %ld\n", sr_Err(sres));
+ VG_(printf)("futex_wait() returned error code %lu\n", sr_Err(sres));
vg_assert(False);
}
}
futex = &p->futex[wakeup_ticket & TL_FUTEX_MASK];
futex_value = __sync_fetch_and_add(futex, 1);
if (s_debug)
- VG_(printf)("[%d/%d] release: waking up ticket %d (futex[%ld] = %d)"
+ VG_(printf)("[%d/%d] release: waking up ticket %u (futex[%ld] = %u)"
"\n", VG_(getpid)(), VG_(gettid)(), wakeup_ticket,
(long)(futex - p->futex), futex_value);
sres = VG_(do_syscall3)(__NR_futex, (UWord)futex,
vg_assert(!sr_isError(sres));
} else {
if (s_debug)
- VG_(printf)("[%d/%d] release: no thread is waiting for ticket %d\n",
+ VG_(printf)("[%d/%d] release: no thread is waiting for ticket %u\n",
VG_(getpid)(), VG_(gettid)(), wakeup_ticket);
}
}