[PATCH 16/25] dlls/dbghelp: enable compilation with long types

Eric Pouech eric.pouech at gmail.com
Wed Feb 9 02:26:26 CST 2022


Signed-off-by: Eric Pouech <eric.pouech at gmail.com>

---
 dlls/dbghelp/Makefile.in    |    2 -
 dlls/dbghelp/coff.c         |    6 +-
 dlls/dbghelp/cpu_i386.c     |   14 ++--
 dlls/dbghelp/cpu_x86_64.c   |   20 +++--
 dlls/dbghelp/dbghelp.c      |   20 +++--
 dlls/dbghelp/dwarf.c        |  162 ++++++++++++++++++++++---------------------
 dlls/dbghelp/elf_module.c   |   20 +++--
 dlls/dbghelp/image.c        |    2 -
 dlls/dbghelp/macho_module.c |   44 ++++++------
 dlls/dbghelp/minidump.c     |    2 -
 dlls/dbghelp/module.c       |   10 +--
 dlls/dbghelp/msc.c          |   42 ++++++-----
 dlls/dbghelp/path.c         |    4 +
 dlls/dbghelp/pe_module.c    |    6 +-
 dlls/dbghelp/source.c       |    4 +
 dlls/dbghelp/stabs.c        |   10 +--
 dlls/dbghelp/stack.c        |   12 ++-
 dlls/dbghelp/symbol.c       |   46 ++++++------
 18 files changed, 213 insertions(+), 213 deletions(-)

diff --git a/dlls/dbghelp/Makefile.in b/dlls/dbghelp/Makefile.in
index abb440ffbe6..22be2612eeb 100644
--- a/dlls/dbghelp/Makefile.in
+++ b/dlls/dbghelp/Makefile.in
@@ -2,7 +2,7 @@ MODULE    = dbghelp.dll
 IMPORTLIB = dbghelp
 IMPORTS   = $(ZLIB_PE_LIBS)
 EXTRAINCL = $(ZLIB_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_IMAGEHLP_SOURCE_
+EXTRADEFS = -D_IMAGEHLP_SOURCE_
 DELAYIMPORTS = version
 
 C_SRCS = \
diff --git a/dlls/dbghelp/coff.c b/dlls/dbghelp/coff.c
index cc005a3bbc5..0f29b131a86 100644
--- a/dlls/dbghelp/coff.c
+++ b/dlls/dbghelp/coff.c
@@ -223,12 +223,12 @@ DECLSPEC_HIDDEN BOOL coff_process_info(const struct msc_debug_info* msc_dbg)
                 fn = source_get(msc_dbg->module,
                                 coff_files.files[curr_file_idx].compiland->source);
 
-                TRACE("Duplicating sect from %s: %x %x %x %d %d\n",
+                TRACE("Duplicating sect from %s: %lx %x %x %d %d\n",
                       fn, aux->Section.Length,
                       aux->Section.NumberOfRelocations,
                       aux->Section.NumberOfLinenumbers,
                       aux->Section.Number, aux->Section.Selection);
-                TRACE("More sect %d %s %08x %d %d %d\n",
+                TRACE("More sect %d %s %08lx %d %d %d\n",
                       coff_sym->SectionNumber,
                       coff_get_name(coff_sym, coff_strtab),
                       coff_sym->Value, coff_sym->Type,
@@ -242,7 +242,7 @@ DECLSPEC_HIDDEN BOOL coff_process_info(const struct msc_debug_info* msc_dbg)
 	    }
             else
 	    {
-                TRACE("New text sect from %s: %x %x %x %d %d\n",
+                TRACE("New text sect from %s: %lx %x %x %d %d\n",
                       source_get(msc_dbg->module, coff_files.files[curr_file_idx].compiland->source),
                       aux->Section.Length,
                       aux->Section.NumberOfRelocations,
diff --git a/dlls/dbghelp/cpu_i386.c b/dlls/dbghelp/cpu_i386.c
index 45b3bd95df6..bd860e0cdd8 100644
--- a/dlls/dbghelp/cpu_i386.c
+++ b/dlls/dbghelp/cpu_i386.c
@@ -252,7 +252,7 @@ static BOOL i386_stack_walk(struct cpu_stack_walk *csw, STACKFRAME64 *frame,
                 p = sw_xlat_addr(csw, &tmp);
                 if (!sw_read_mem(csw, p, &frame16, sizeof(frame16)))
                 {
-                    WARN("Bad stack frame 0x%08x\n", p);
+                    WARN("Bad stack frame 0x%08lx\n", p);
                     goto done_err;
                 }
                 curr_switch = (DWORD_PTR)frame16.frame32;
@@ -316,7 +316,7 @@ static BOOL i386_stack_walk(struct cpu_stack_walk *csw, STACKFRAME64 *frame,
 
                 if (!sw_read_mem(csw, p, &frame16, sizeof(frame16)))
                 {
-                    WARN("Bad stack frame 0x%08x\n", p);
+                    WARN("Bad stack frame 0x%08lx\n", p);
                     goto done_err;
                 }
                 curr_switch = (DWORD_PTR)frame16.frame32;
@@ -333,16 +333,16 @@ static BOOL i386_stack_walk(struct cpu_stack_walk *csw, STACKFRAME64 *frame,
 
                 if (!sw_read_mem(csw, p, &frame16, sizeof(frame16)))
                 {
-                    WARN("Bad stack frame 0x%08x\n", p);
+                    WARN("Bad stack frame 0x%08lx\n", p);
                     goto done_err;
                 }
 
                 TRACE("Got a 16 bit stack switch:"
                       "\n\tframe32: %p"
-                      "\n\tedx:%08x ecx:%08x ebp:%08x"
+                      "\n\tedx:%08lx ecx:%08lx ebp:%08lx"
                       "\n\tds:%04x es:%04x fs:%04x gs:%04x"
-                      "\n\tcall_from_ip:%08x module_cs:%04x relay=%08x"
-                      "\n\tentry_ip:%04x entry_point:%08x"
+                      "\n\tcall_from_ip:%08lx module_cs:%04lx relay=%08lx"
+                      "\n\tentry_ip:%04x entry_point:%08lx"
                       "\n\tbp:%04x ip:%04x cs:%04x\n",
                       frame16.frame32,
                       frame16.edx, frame16.ecx, frame16.ebp,
@@ -403,7 +403,7 @@ static BOOL i386_stack_walk(struct cpu_stack_walk *csw, STACKFRAME64 *frame,
                 frame->AddrStack.Offset = context->x86.Esp;
                 frame->AddrFrame.Offset = context->x86.Ebp;
                 if (frame->AddrReturn.Offset != context->x86.Eip)
-                    FIXME("new PC=%s different from Eip=%x\n",
+                    FIXME("new PC=%s different from Eip=%lx\n",
                           wine_dbgstr_longlong(frame->AddrReturn.Offset), context->x86.Eip);
                 frame->AddrPC.Offset = context->x86.Eip;
             }
diff --git a/dlls/dbghelp/cpu_x86_64.c b/dlls/dbghelp/cpu_x86_64.c
index 4fd8d76e010..1ad9aa41395 100644
--- a/dlls/dbghelp/cpu_x86_64.c
+++ b/dlls/dbghelp/cpu_x86_64.c
@@ -125,14 +125,14 @@ static void dump_unwind_info(struct cpu_stack_walk* csw, ULONG64 base, RUNTIME_F
     RUNTIME_FUNCTION snext;
     ULONG64 addr;
 
-    TRACE("**** func %x-%x\n", function->BeginAddress, function->EndAddress);
+    TRACE("**** func %lx-%lx\n", function->BeginAddress, function->EndAddress);
     for (;;)
     {
         if (function->UnwindData & 1)
         {
             if (!sw_read_mem(csw, base + function->UnwindData, &snext, sizeof(snext)))
             {
-                TRACE("Couldn't unwind RUNTIME_INFO at %lx\n", base + function->UnwindData);
+                TRACE("Couldn't unwind RUNTIME_INFO at %Ix\n", base + function->UnwindData);
                 return;
             }
             TRACE("unwind info for function %p-%p chained to function %p-%p\n",
@@ -146,7 +146,7 @@ static void dump_unwind_info(struct cpu_stack_walk* csw, ULONG64 base, RUNTIME_F
             !sw_read_mem(csw, addr + FIELD_OFFSET(UNWIND_INFO, UnwindCode),
                          info->UnwindCode, info->CountOfCodes * sizeof(UNWIND_CODE)))
         {
-            FIXME("couldn't read memory for UNWIND_INFO at %lx\n", addr);
+            FIXME("couldn't read memory for UNWIND_INFO at %Ix\n", addr);
             return;
         }
         TRACE("unwind info at %p flags %x prolog 0x%x bytes function %p-%p\n",
@@ -499,13 +499,13 @@ static BOOL interpret_function_table_entry(struct cpu_stack_walk* csw,
             !sw_read_mem(csw, base + function->UnwindData + FIELD_OFFSET(UNWIND_INFO, UnwindCode),
                          info->UnwindCode, info->CountOfCodes * sizeof(UNWIND_CODE)))
         {
-            WARN("Couldn't read unwind_code at %lx\n", base + function->UnwindData);
+            WARN("Couldn't read unwind_code at %Ix\n", base + function->UnwindData);
             return FALSE;
         }
 
         if (info->Version != 1 && info->Version != 2)
         {
-            WARN("unknown unwind info version %u at %lx\n", info->Version, base + function->UnwindData);
+            WARN("unknown unwind info version %u at %Ix\n", info->Version, base + function->UnwindData);
             return FALSE;
         }
 
@@ -625,14 +625,14 @@ static BOOL fetch_next_frame(struct cpu_stack_walk *csw, union ctx *pcontext,
     else if (dwarf2_virtual_unwind(csw, curr_pc, pcontext, &cfa))
     {
         context->Rsp = cfa;
-        TRACE("next function rip=%016lx\n", context->Rip);
-        TRACE("  rax=%016lx rbx=%016lx rcx=%016lx rdx=%016lx\n",
+        TRACE("next function rip=%016Ix\n", context->Rip);
+        TRACE("  rax=%016Ix rbx=%016Ix rcx=%016Ix rdx=%016Ix\n",
               context->Rax, context->Rbx, context->Rcx, context->Rdx);
-        TRACE("  rsi=%016lx rdi=%016lx rbp=%016lx rsp=%016lx\n",
+        TRACE("  rsi=%016Ix rdi=%016Ix rbp=%016Ix rsp=%016Ix\n",
               context->Rsi, context->Rdi, context->Rbp, context->Rsp);
-        TRACE("   r8=%016lx  r9=%016lx r10=%016lx r11=%016lx\n",
+        TRACE("   r8=%016Ix  r9=%016Ix r10=%016Ix r11=%016Ix\n",
               context->R8, context->R9, context->R10, context->R11);
-        TRACE("  r12=%016lx r13=%016lx r14=%016lx r15=%016lx\n",
+        TRACE("  r12=%016Ix r13=%016Ix r14=%016Ix r15=%016Ix\n",
               context->R12, context->R13, context->R14, context->R15);
         return TRUE;
     }
diff --git a/dlls/dbghelp/dbghelp.c b/dlls/dbghelp/dbghelp.c
index d854f6287a0..6d775b633f8 100644
--- a/dlls/dbghelp/dbghelp.c
+++ b/dlls/dbghelp/dbghelp.c
@@ -137,11 +137,11 @@ const char* wine_dbgstr_addr(const ADDRESS64* addr)
     case AddrModeFlat:
         return wine_dbg_sprintf("flat<%s>", wine_dbgstr_longlong(addr->Offset));
     case AddrMode1616:
-        return wine_dbg_sprintf("1616<%04x:%04x>", addr->Segment, (DWORD)addr->Offset);
+        return wine_dbg_sprintf("1616<%04x:%04lx>", addr->Segment, (DWORD)addr->Offset);
     case AddrMode1632:
-        return wine_dbg_sprintf("1632<%04x:%08x>", addr->Segment, (DWORD)addr->Offset);
+        return wine_dbg_sprintf("1632<%04x:%08lx>", addr->Segment, (DWORD)addr->Offset);
     case AddrModeReal:
-        return wine_dbg_sprintf("real<%04x:%04x>", addr->Segment, (DWORD)addr->Offset);
+        return wine_dbg_sprintf("real<%04x:%04lx>", addr->Segment, (DWORD)addr->Offset);
     default:
         return "unknown";
     }
@@ -409,9 +409,9 @@ static BOOL check_live_target(struct process* pcs, BOOL wow64, BOOL child_wow64)
 
     if (!base) return FALSE;
 
-    TRACE("got debug info address %#lx from PEB %p\n", base, pbi.PebBaseAddress);
+    TRACE("got debug info address %#Ix from PEB %p\n", base, pbi.PebBaseAddress);
     if (!elf_read_wine_loader_dbg_info(pcs, base) && !macho_read_wine_loader_dbg_info(pcs, base))
-        WARN("couldn't load process debug info at %#lx\n", base);
+        WARN("couldn't load process debug info at %#Ix\n", base);
     return TRUE;
 }
 
@@ -688,7 +688,7 @@ BOOL WINAPI SymSetScopeFromIndex(HANDLE hProcess, ULONG64 addr, DWORD index)
     struct module_pair pair;
     struct symt* sym;
 
-    TRACE("(%p %#I64x %u)\n", hProcess, addr, index);
+    TRACE("(%p %#I64x %lu)\n", hProcess, addr, index);
 
     if (!module_init_pair(&pair, hProcess, addr)) return FALSE;
     sym = symt_index2ptr(pair.effective, index);
@@ -708,7 +708,7 @@ BOOL WINAPI SymSetScopeFromInlineContext(HANDLE hProcess, ULONG64 addr, DWORD in
     struct module_pair pair;
     struct symt_inlinesite* inlined;
 
-    TRACE("(%p %I64x %x)\n", hProcess, addr, inlinectx);
+    TRACE("(%p %I64x %lx)\n", hProcess, addr, inlinectx);
 
     switch (IFC_MODE(inlinectx))
     {
@@ -770,7 +770,7 @@ static BOOL CALLBACK reg_cb64to32(HANDLE hProcess, ULONG action, ULONG64 data, U
     case CBA_EVENT:
     case CBA_READ_MEMORY:
     default:
-        FIXME("No mapping for action %u\n", action);
+        FIXME("No mapping for action %lu\n", action);
         return FALSE;
     }
     return pcs->reg_cb32(hProcess, action, data32, (PVOID)(DWORD_PTR)user);
@@ -783,7 +783,7 @@ BOOL pcs_callback(const struct process* pcs, ULONG action, void* data)
 {
     IMAGEHLP_DEFERRED_SYMBOL_LOAD64 idsl;
 
-    TRACE("%p %u %p\n", pcs, action, data);
+    TRACE("%p %lu %p\n", pcs, action, data);
 
     if (!pcs->reg_cb) return FALSE;
     if (!pcs->reg_is_unicode)
@@ -815,7 +815,7 @@ BOOL pcs_callback(const struct process* pcs, ULONG action, void* data)
         case CBA_EVENT:
         case CBA_READ_MEMORY:
         default:
-            FIXME("No mapping for action %u\n", action);
+            FIXME("No mapping for action %lu\n", action);
             return FALSE;
         }
     }
diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c
index fc88b741a56..5cc105d35c9 100644
--- a/dlls/dbghelp/dwarf.c
+++ b/dlls/dbghelp/dwarf.c
@@ -462,7 +462,7 @@ static void dwarf2_parse_abbrev_set(dwarf2_traverse_context_t* abbrev_ctx,
     {
         TRACE("now at %s\n", dwarf2_debug_traverse_ctx(abbrev_ctx)); 
         entry_code = dwarf2_leb128_as_unsigned(abbrev_ctx);
-        TRACE("found entry_code %lu\n", entry_code);
+        TRACE("found entry_code %Iu\n", entry_code);
         if (!entry_code)
         {
             TRACE("NULL entry code at %s\n", dwarf2_debug_traverse_ctx(abbrev_ctx)); 
@@ -477,7 +477,7 @@ static void dwarf2_parse_abbrev_set(dwarf2_traverse_context_t* abbrev_ctx,
         abbrev_entry->attrs      = NULL;
         abbrev_entry->num_attr   = 0;
 
-        TRACE("table:(%p,#%u) entry_code(%lu) tag(0x%lx) have_child(%u) -> %p\n",
+        TRACE("table:(%p,#%u) entry_code(%Iu) tag(0x%Ix) have_child(%u) -> %p\n",
               abbrev_table, sparse_array_length(abbrev_table),
               entry_code, abbrev_entry->tag, abbrev_entry->have_child, abbrev_entry);
 
@@ -509,7 +509,7 @@ static void dwarf2_swallow_attribute(dwarf2_traverse_context_t* ctx,
 {
     unsigned    step;
 
-    TRACE("(attr:0x%lx,form:0x%lx)\n", abbrev_attr->attribute, abbrev_attr->form);
+    TRACE("(attr:0x%Ix,form:0x%Ix)\n", abbrev_attr->attribute, abbrev_attr->form);
 
     switch (abbrev_attr->form)
     {
@@ -539,7 +539,7 @@ static void dwarf2_swallow_attribute(dwarf2_traverse_context_t* ctx,
     case DW_FORM_GNU_strp_alt:
     case DW_FORM_strp:   step = head->offset_size; break;
     default:
-        FIXME("Unhandled attribute form %lx\n", abbrev_attr->form);
+        FIXME("Unhandled attribute form %Ix\n", abbrev_attr->form);
         return;
     }
     ctx->data += step;
@@ -558,17 +558,17 @@ static BOOL dwarf2_fill_attr(const dwarf2_parse_context_t* ctx,
             attr->u.uvalue = dwarf2_get_addr(data, ctx->head.offset_size);
         else
             attr->u.uvalue = dwarf2_get_addr(data, ctx->head.word_size);
-        TRACE("addr<0x%lx>\n", attr->u.uvalue);
+        TRACE("addr<0x%Ix>\n", attr->u.uvalue);
         break;
 
     case DW_FORM_addr:
         attr->u.uvalue = dwarf2_get_addr(data, ctx->head.word_size);
-        TRACE("addr<0x%lx>\n", attr->u.uvalue);
+        TRACE("addr<0x%Ix>\n", attr->u.uvalue);
         break;
 
     case DW_FORM_flag:
         attr->u.uvalue = dwarf2_get_byte(data);
-        TRACE("flag<0x%lx>\n", attr->u.uvalue);
+        TRACE("flag<0x%Ix>\n", attr->u.uvalue);
         break;
 
     case DW_FORM_flag_present:
@@ -578,17 +578,17 @@ static BOOL dwarf2_fill_attr(const dwarf2_parse_context_t* ctx,
 
     case DW_FORM_data1:
         attr->u.uvalue = dwarf2_get_byte(data);
-        TRACE("data1<%lu>\n", attr->u.uvalue);
+        TRACE("data1<%Iu>\n", attr->u.uvalue);
         break;
 
     case DW_FORM_data2:
         attr->u.uvalue = dwarf2_get_u2(data);
-        TRACE("data2<%lu>\n", attr->u.uvalue);
+        TRACE("data2<%Iu>\n", attr->u.uvalue);
         break;
 
     case DW_FORM_data4:
         attr->u.uvalue = dwarf2_get_u4(data);
-        TRACE("data4<%lu>\n", attr->u.uvalue);
+        TRACE("data4<%Iu>\n", attr->u.uvalue);
         break;
 
     case DW_FORM_data8:
@@ -598,17 +598,17 @@ static BOOL dwarf2_fill_attr(const dwarf2_parse_context_t* ctx,
 
     case DW_FORM_ref1:
         attr->u.uvalue = ctx->ref_offset + dwarf2_get_byte(data);
-        TRACE("ref1<0x%lx>\n", attr->u.uvalue);
+        TRACE("ref1<0x%Ix>\n", attr->u.uvalue);
         break;
 
     case DW_FORM_ref2:
         attr->u.uvalue = ctx->ref_offset + dwarf2_get_u2(data);
-        TRACE("ref2<0x%lx>\n", attr->u.uvalue);
+        TRACE("ref2<0x%Ix>\n", attr->u.uvalue);
         break;
 
     case DW_FORM_ref4:
         attr->u.uvalue = ctx->ref_offset + dwarf2_get_u4(data);
-        TRACE("ref4<0x%lx>\n", attr->u.uvalue);
+        TRACE("ref4<0x%Ix>\n", attr->u.uvalue);
         break;
     
     case DW_FORM_ref8:
@@ -621,12 +621,12 @@ static BOOL dwarf2_fill_attr(const dwarf2_parse_context_t* ctx,
 
     case DW_FORM_ref_udata:
         attr->u.uvalue = ctx->ref_offset + dwarf2_get_leb128_as_unsigned(data, NULL);
-        TRACE("ref_udata<0x%lx>\n", attr->u.uvalue);
+        TRACE("ref_udata<0x%Ix>\n", attr->u.uvalue);
         break;
 
     case DW_FORM_udata:
         attr->u.uvalue = dwarf2_get_leb128_as_unsigned(data, NULL);
-        TRACE("udata<0x%lx>\n", attr->u.uvalue);
+        TRACE("udata<0x%Ix>\n", attr->u.uvalue);
         break;
 
     case DW_FORM_string:
@@ -639,7 +639,7 @@ static BOOL dwarf2_fill_attr(const dwarf2_parse_context_t* ctx,
             ULONG_PTR ofs = dwarf2_get_addr(data, ctx->head.offset_size);
             if (ofs >= ctx->module_ctx->sections[section_string].size)
             {
-                ERR("Out of bounds string offset (%08lx)\n", ofs);
+                ERR("Out of bounds string offset (%08Ix)\n", ofs);
                 attr->u.string = "<<outofbounds-strp>>";
             }
             else
@@ -687,7 +687,7 @@ static BOOL dwarf2_fill_attr(const dwarf2_parse_context_t* ctx,
             return FALSE;
         }
         attr->u.uvalue = dwarf2_get_addr(data, ctx->head.offset_size);
-        TRACE("ref_alt<0x%lx>\n", attr->u.uvalue);
+        TRACE("ref_alt<0x%Ix>\n", attr->u.uvalue);
         break;
 
     case DW_FORM_GNU_strp_alt:
@@ -701,7 +701,7 @@ static BOOL dwarf2_fill_attr(const dwarf2_parse_context_t* ctx,
             }
             else
             {
-                ERR("out of bounds strp_alt: 0x%lx 0x%x (%u)\n", ofs, ctx->module_ctx->dwz->sections[section_string].size, ctx->head.offset_size);
+                ERR("out of bounds strp_alt: 0x%Ix 0x%x (%u)\n", ofs, ctx->module_ctx->dwz->sections[section_string].size, ctx->head.offset_size);
                 attr->u.string = "<<outofbounds-strpalt>>";
             }
         }
@@ -713,7 +713,7 @@ static BOOL dwarf2_fill_attr(const dwarf2_parse_context_t* ctx,
         break;
 
     default:
-        FIXME("Unhandled attribute form %lx\n", abbrev_attr->form);
+        FIXME("Unhandled attribute form %Ix\n", abbrev_attr->form);
         break;
     }
     return TRUE;
@@ -744,7 +744,7 @@ static BOOL dwarf2_find_attribute(const dwarf2_debug_info_t* di,
                 at != DW_AT_sibling)
             {
                 if (ref_abbrev_attr)
-                    FIXME("two references %lx and %lx\n", ref_abbrev_attr->attribute, abbrev_attr->attribute);
+                    FIXME("two references %Ix and %Ix\n", ref_abbrev_attr->attribute, abbrev_attr->attribute);
                 ref_abbrev_attr = abbrev_attr;
                 refidx = i;
                 attr->gotten_from = (abbrev_attr->attribute == DW_AT_abstract_origin) ?
@@ -846,7 +846,7 @@ compute_location(const struct module *module, const dwarf2_cuhead_t* head,
             {
                 DWORD   cvreg = dwarf2_map_register(op - DW_OP_reg0, module);
                 if (loc->reg != Wine_DW_no_register)
-                    FIXME("Only supporting one reg (%s/%d -> %s/%d)\n",
+                    FIXME("Only supporting one reg (%s/%d -> %s/%ld)\n",
                           module->cpu->fetch_regname(loc->reg), loc->reg,
                           module->cpu->fetch_regname(cvreg), cvreg);
                 loc->reg = cvreg;
@@ -863,7 +863,7 @@ compute_location(const struct module *module, const dwarf2_cuhead_t* head,
             {
                 DWORD   cvreg = dwarf2_map_register(op - DW_OP_breg0, module);
                 if (loc->reg != Wine_DW_no_register)
-                    FIXME("Only supporting one breg (%s/%d -> %s/%d)\n",
+                    FIXME("Only supporting one breg (%s/%d -> %s/%ld)\n",
                           module->cpu->fetch_regname(loc->reg), loc->reg,
                           module->cpu->fetch_regname(cvreg), cvreg);
                 loc->reg = cvreg;
@@ -985,7 +985,7 @@ compute_location(const struct module *module, const dwarf2_cuhead_t* head,
 
                 if (!ReadProcessMemory(hproc, (void*)addr, &deref, head->word_size, NULL))
                 {
-                    WARN("Couldn't read memory at %lx\n", addr);
+                    WARN("Couldn't read memory at %Ix\n", addr);
                     return loc_err_cant_read;
                 }
                 stack[++stk] = deref;
@@ -1014,7 +1014,7 @@ compute_location(const struct module *module, const dwarf2_cuhead_t* head,
 
                 if (!ReadProcessMemory(hproc, (void*)addr, &deref, derefsize, NULL))
                 {
-                    WARN("Couldn't read memory at %lx\n", addr);
+                    WARN("Couldn't read memory at %Ix\n", addr);
                        return loc_err_cant_read;
                 }
 
@@ -1094,7 +1094,7 @@ static BOOL dwarf2_compute_location_attr(dwarf2_parse_context_t* ctx,
     case DW_FORM_block4:
     case DW_FORM_exprloc:
         break;
-    default: FIXME("Unsupported yet form %lx\n", xloc.form);
+    default: FIXME("Unsupported yet form %Ix\n", xloc.form);
         return FALSE;
     }
 
@@ -1153,7 +1153,7 @@ static struct symt* dwarf2_lookup_type(const dwarf2_debug_info_t* di)
         dwarf2_load_one_entry(type);
         if (!type->symt)
         {
-            FIXME("Unable to load forward reference for tag %lx\n", type->abbrev->tag);
+            FIXME("Unable to load forward reference for tag %Ix\n", type->abbrev->tag);
             return di->unit_ctx->module_ctx->symt_cache[sc_unknown];
         }
     }
@@ -1249,7 +1249,7 @@ static BOOL dwarf2_read_range(dwarf2_parse_context_t* ctx, const dwarf2_debug_in
             if (high > *phigh) *phigh = high;
         }
         if (*plow == UMAX || *phigh == 0) {FIXME("no entry found\n"); return FALSE;}
-        if (*plow == *phigh) {WARN("entry found, but low=high %lx %lx\n", low, high); return FALSE;}
+        if (*plow == *phigh) {WARN("entry found, but low=high %Ix %Ix\n", low, high); return FALSE;}
 
         return TRUE;
     }
@@ -1383,7 +1383,7 @@ static BOOL dwarf2_read_one_debug_info(dwarf2_parse_context_t* ctx,
 
     offset = traverse->data - ctx->module_ctx->sections[ctx->section].address;
     entry_code = dwarf2_leb128_as_unsigned(traverse);
-    TRACE("found entry_code %lu at 0x%lx\n", entry_code, offset);
+    TRACE("found entry_code %Iu at 0x%Ix\n", entry_code, offset);
     if (!entry_code)
     {
         *pdi = NULL;
@@ -1392,7 +1392,7 @@ static BOOL dwarf2_read_one_debug_info(dwarf2_parse_context_t* ctx,
     abbrev = dwarf2_abbrev_table_find_entry(&ctx->abbrev_table, entry_code);
     if (!abbrev)
     {
-	WARN("Cannot find abbrev entry for %lu at 0x%lx\n", entry_code, offset);
+	WARN("Cannot find abbrev entry for %Iu at 0x%Ix\n", entry_code, offset);
 	return FALSE;
     }
     di = sparse_array_add(&ctx->debug_info_table, offset, &ctx->pool);
@@ -1429,11 +1429,11 @@ static BOOL dwarf2_read_one_debug_info(dwarf2_parse_context_t* ctx,
     {
         if (sibling.u.uvalue >= ctx->module_ctx->sections[ctx->section].size)
         {
-            FIXME("cursor sibling after section end %s: 0x%lx 0x%x\n",
+            FIXME("cursor sibling after section end %s: 0x%Ix 0x%x\n",
                   dwarf2_debug_unit_ctx(ctx), sibling.u.uvalue, ctx->module_ctx->sections[ctx->section].size);
             return FALSE;
         }
-        WARN("setting cursor for %s to next sibling <0x%lx>\n",
+        WARN("setting cursor for %s to next sibling <0x%Ix>\n",
              dwarf2_debug_traverse_ctx(traverse), sibling.u.uvalue);
         traverse->data = ctx->module_ctx->sections[ctx->section].address + sibling.u.uvalue;
     }
@@ -1535,8 +1535,8 @@ static struct symt* dwarf2_parse_subrange_type(dwarf2_debug_info_t* di)
     TRACE("%s\n", dwarf2_debug_di(di));
 
     if (dwarf2_find_attribute(di, DW_AT_name, &name)) FIXME("Found name for subrange %s\n", name.u.string);
-    if (dwarf2_find_attribute(di, DW_AT_byte_size, &dummy)) FIXME("Found byte_size %lu\n", dummy.u.uvalue);
-    if (dwarf2_find_attribute(di, DW_AT_bit_size, &dummy)) FIXME("Found bit_size %lu\n", dummy.u.uvalue);
+    if (dwarf2_find_attribute(di, DW_AT_byte_size, &dummy)) FIXME("Found byte_size %Iu\n", dummy.u.uvalue);
+    if (dwarf2_find_attribute(di, DW_AT_bit_size, &dummy)) FIXME("Found bit_size %Iu\n", dummy.u.uvalue);
     /* for now, we don't support the byte_size nor bit_size about the subrange, and pretend the two
      * types are the same (FIXME)
      */
@@ -1608,7 +1608,7 @@ static struct symt* dwarf2_parse_array_type(dwarf2_debug_info_t* di)
             }
             break;
         default:
-            FIXME("Unhandled Tag type 0x%lx at %s\n",
+            FIXME("Unhandled Tag type 0x%Ix at %s\n",
                   child->abbrev->tag, dwarf2_debug_di(di));
             break;
         }
@@ -1725,7 +1725,7 @@ static void dwarf2_parse_udt_member(dwarf2_debug_info_t* di,
             loc.offset = 0;
         }
         else
-            TRACE("found member_location at %s -> %lu\n",
+            TRACE("found member_location at %s -> %Iu\n",
                   dwarf2_debug_di(di), loc.offset);
     }
     else
@@ -1828,7 +1828,7 @@ static struct symt* dwarf2_parse_udt_type(dwarf2_debug_info_t* di,
             /* FIXME: some C++ related stuff */
             break;
         default:
-            FIXME("Unhandled Tag type 0x%lx at %s\n",
+            FIXME("Unhandled Tag type 0x%Ix at %s\n",
                   child->abbrev->tag, dwarf2_debug_di(di));
             break;
         }
@@ -1900,7 +1900,7 @@ static struct symt* dwarf2_parse_enumeration_type(dwarf2_debug_info_t* di)
                 dwarf2_parse_enumerator(child, (struct symt_enum*)di->symt);
             break;
         default:
-            FIXME("Unhandled Tag type 0x%lx at %s\n",
+            FIXME("Unhandled Tag type 0x%Ix at %s\n",
                   di->abbrev->tag, dwarf2_debug_di(di));
 	}
     }
@@ -1945,7 +1945,7 @@ static void dwarf2_parse_variable(dwarf2_subprogram_t* subpgm,
     {
         struct attribute ext;
 
-	TRACE("found parameter %s (kind=%d, offset=%ld, reg=%d) at %s\n",
+	TRACE("found parameter %s (kind=%d, offset=%Id, reg=%d) at %s\n",
               debugstr_a(name.u.string), loc.kind, loc.offset, loc.reg,
               dwarf2_debug_unit_ctx(subpgm->ctx));
 
@@ -2032,7 +2032,7 @@ static void dwarf2_parse_variable(dwarf2_subprogram_t* subpgm,
             break;
 
         default:
-            FIXME("Unsupported form for const value %s (%lx)\n",
+            FIXME("Unsupported form for const value %s (%Ix)\n",
                   debugstr_a(name.u.string), value.form);
             V_VT(&v) = VT_EMPTY;
         }
@@ -2178,7 +2178,7 @@ static void dwarf2_parse_inlined_subroutine(dwarf2_subprogram_t* subpgm,
             /* this isn't properly supported by dbghelp interface. skip it for now */
             break;
         default:
-            FIXME("Unhandled Tag type 0x%lx at %s\n",
+            FIXME("Unhandled Tag type 0x%Ix at %s\n",
                   child->abbrev->tag, dwarf2_debug_di(di));
         }
     }
@@ -2259,7 +2259,7 @@ static void dwarf2_parse_subprogram_block(dwarf2_subprogram_t* subpgm,
             /* the type referred to will be loaded when we need it, so skip it */
             break;
         default:
-            FIXME("Unhandled Tag type 0x%lx at %s\n",
+            FIXME("Unhandled Tag type 0x%Ix at %s\n",
                   child->abbrev->tag, dwarf2_debug_di(di));
         }
     }
@@ -2299,7 +2299,7 @@ static struct symt* dwarf2_parse_subprogram(dwarf2_debug_info_t* di)
         inline_flags.gotten_from == attr_direct &&
         inline_flags.u.uvalue != DW_INL_not_inlined)
     {
-        TRACE("Function %s declared as inlined (%ld)... skipping\n",
+        TRACE("Function %s declared as inlined (%Id)... skipping\n",
               debugstr_a(name.u.string), inline_flags.u.uvalue);
         return NULL;
     }
@@ -2396,7 +2396,7 @@ static struct symt* dwarf2_parse_subprogram(dwarf2_debug_info_t* di)
             /* FIXME: no support in dbghelp's internals so far */
             break;
         default:
-            FIXME("Unhandled Tag type 0x%lx at %s\n",
+            FIXME("Unhandled Tag type 0x%Ix at %s\n",
                   child->abbrev->tag, dwarf2_debug_di(di));
 	}
     }
@@ -2567,7 +2567,7 @@ static void dwarf2_load_one_entry(dwarf2_debug_info_t* di)
     case DW_TAG_ptr_to_member_type:
         break;
     default:
-        FIXME("Unhandled Tag type 0x%lx at %s\n",
+        FIXME("Unhandled Tag type 0x%Ix at %s\n",
               di->abbrev->tag, dwarf2_debug_di(di));
     }
 }
@@ -2582,7 +2582,7 @@ static void dwarf2_set_line_number(struct module* module, ULONG_PTR address,
 
     if (!file || !(psrc = vector_at(v, file - 1))) return;
 
-    TRACE("%s %lx %s %u\n",
+    TRACE("%s %Ix %s %u\n",
           debugstr_w(module->modulename), address, debugstr_a(source_get(module, *psrc)), line);
     symt = symt_find_nearest(module, address);
     if (symt_check_tag(&symt->symt, SymTagFunction))
@@ -2699,7 +2699,7 @@ static BOOL dwarf2_parse_line_numbers(dwarf2_parse_context_t* ctx,
         mod_time = dwarf2_leb128_as_unsigned(&traverse);
         length = dwarf2_leb128_as_unsigned(&traverse);
         dir = *(const char**)vector_at(&dirs, dir_index);
-        TRACE("Got file %s/%s (%u,%lu)\n", debugstr_a(dir), debugstr_a(name), mod_time, length);
+        TRACE("Got file %s/%s (%u,%Iu)\n", debugstr_a(dir), debugstr_a(name), mod_time, length);
         psrc = vector_add(&files, &ctx->pool);
         *psrc = source_new(ctx->module_ctx->module, dir, name);
     }
@@ -2833,7 +2833,7 @@ static dwarf2_parse_context_t* dwarf2_locate_cu(dwarf2_parse_module_context_t* m
         if (where >= ctx->traverse_DIE.data && where < ctx->traverse_DIE.end_data)
             return ctx;
     }
-    FIXME("Couldn't find ref 0x%lx inside sect\n", ref);
+    FIXME("Couldn't find ref 0x%Ix inside sect\n", ref);
     return NULL;
 }
 
@@ -2859,9 +2859,9 @@ static BOOL dwarf2_parse_compilation_unit_head(dwarf2_parse_context_t* ctx,
 
     TRACE("Compilation Unit Header found at 0x%x:\n",
           (int)(comp_unit_start - ctx->module_ctx->sections[section_debug].address));
-    TRACE("- length:        %lu\n", cu_length);
+    TRACE("- length:        %Iu\n", cu_length);
     TRACE("- version:       %u\n",  ctx->head.version);
-    TRACE("- abbrev_offset: %lu\n", cu_abbrev_offset);
+    TRACE("- abbrev_offset: %Iu\n", cu_abbrev_offset);
     TRACE("- word_size:     %u\n",  ctx->head.word_size);
     TRACE("- offset_size:   %u\n",  ctx->head.offset_size);
 
@@ -2876,7 +2876,7 @@ static BOOL dwarf2_parse_compilation_unit_head(dwarf2_parse_context_t* ctx,
 
     if (ctx->head.version < 2 || ctx->head.version > max_supported_dwarf_version)
     {
-        WARN("DWARF version %d isn't supported. Wine dbghelp only supports DWARF 2 up to %u.\n",
+        WARN("DWARF version %d isn't supported. Wine dbghelp only supports DWARF 2 up to %lu.\n",
              ctx->head.version, max_supported_dwarf_version);
         return FALSE;
     }
@@ -2952,7 +2952,7 @@ static BOOL dwarf2_parse_compilation_unit(dwarf2_parse_context_t* ctx)
             ctx->status = UNIT_LOADED;
             ret = TRUE;
         }
-        else FIXME("Should have a compilation unit here %lu\n", di->abbrev->tag);
+        else FIXME("Should have a compilation unit here %Iu\n", di->abbrev->tag);
     }
     if (ctx->status == UNIT_BEINGLOADED) ctx->status = UNIT_LOADED_FAIL;
     return ret;
@@ -3286,7 +3286,7 @@ static BOOL dwarf2_get_cie(ULONG_PTR addr, struct module* module, DWORD_PTR delt
 
 static int valid_reg(ULONG_PTR reg)
 {
-    if (reg >= NB_FRAME_REGS) FIXME("unsupported reg %lx\n", reg);
+    if (reg >= NB_FRAME_REGS) FIXME("unsupported reg %Ix\n", reg);
     return (reg < NB_FRAME_REGS);
 }
 
@@ -3304,7 +3304,7 @@ static void execute_cfa_instructions(struct module* module, dwarf2_traverse_cont
             case DW_CFA_advance_loc:
             {
                 ULONG_PTR offset = (op & 0x3f) * info->code_align;
-                TRACE("%lx: DW_CFA_advance_loc %lu\n", info->ip, offset);
+                TRACE("%Ix: DW_CFA_advance_loc %Iu\n", info->ip, offset);
                 info->ip += offset;
                 break;
             }
@@ -3313,7 +3313,7 @@ static void execute_cfa_instructions(struct module* module, dwarf2_traverse_cont
                 ULONG_PTR reg = op & 0x3f;
                 LONG_PTR offset = dwarf2_leb128_as_unsigned(ctx) * info->data_align;
                 if (!valid_reg(reg)) break;
-                TRACE("%lx: DW_CFA_offset %s, %ld\n",
+                TRACE("%Ix: DW_CFA_offset %s, %Id\n",
                       info->ip,
                       module->cpu->fetch_regname(module->cpu->map_dwarf_register(reg, module, TRUE)),
                       offset);
@@ -3325,7 +3325,7 @@ static void execute_cfa_instructions(struct module* module, dwarf2_traverse_cont
             {
                 ULONG_PTR reg = op & 0x3f;
                 if (!valid_reg(reg)) break;
-                TRACE("%lx: DW_CFA_restore %s\n",
+                TRACE("%Ix: DW_CFA_restore %s\n",
                       info->ip,
                       module->cpu->fetch_regname(module->cpu->map_dwarf_register(reg, module, TRUE)));
                 info->state.rules[reg] = RULE_UNSET;
@@ -3341,28 +3341,28 @@ static void execute_cfa_instructions(struct module* module, dwarf2_traverse_cont
         {
             ULONG_PTR loc = dwarf2_parse_augmentation_ptr(ctx, info->fde_encoding,
                                                           module->format_info[DFI_DWARF]->u.dwarf2_info->word_size);
-            TRACE("%lx: DW_CFA_set_loc %lx\n", info->ip, loc);
+            TRACE("%Ix: DW_CFA_set_loc %Ix\n", info->ip, loc);
             info->ip = loc;
             break;
         }
         case DW_CFA_advance_loc1:
         {
             ULONG_PTR offset = dwarf2_parse_byte(ctx) * info->code_align;
-            TRACE("%lx: DW_CFA_advance_loc1 %lu\n", info->ip, offset);
+            TRACE("%Ix: DW_CFA_advance_loc1 %Iu\n", info->ip, offset);
             info->ip += offset;
             break;
         }
         case DW_CFA_advance_loc2:
         {
             ULONG_PTR offset = dwarf2_parse_u2(ctx) * info->code_align;
-            TRACE("%lx: DW_CFA_advance_loc2 %lu\n", info->ip, offset);
+            TRACE("%Ix: DW_CFA_advance_loc2 %Iu\n", info->ip, offset);
             info->ip += offset;
             break;
         }
         case DW_CFA_advance_loc4:
         {
             ULONG_PTR offset = dwarf2_parse_u4(ctx) * info->code_align;
-            TRACE("%lx: DW_CFA_advance_loc4 %lu\n", info->ip, offset);
+            TRACE("%Ix: DW_CFA_advance_loc4 %Iu\n", info->ip, offset);
             info->ip += offset;
             break;
         }
@@ -3373,7 +3373,7 @@ static void execute_cfa_instructions(struct module* module, dwarf2_traverse_cont
             LONG_PTR offset = (op == DW_CFA_offset_extended) ? dwarf2_leb128_as_unsigned(ctx) * info->data_align
                                                              : dwarf2_leb128_as_signed(ctx) * info->data_align;
             if (!valid_reg(reg)) break;
-            TRACE("%lx: DW_CFA_offset_extended %s, %ld\n",
+            TRACE("%Ix: DW_CFA_offset_extended %s, %Id\n",
                   info->ip,
                   module->cpu->fetch_regname(module->cpu->map_dwarf_register(reg, module, TRUE)),
                   offset);
@@ -3385,7 +3385,7 @@ static void execute_cfa_instructions(struct module* module, dwarf2_traverse_cont
         {
             ULONG_PTR reg = dwarf2_leb128_as_unsigned(ctx);
             if (!valid_reg(reg)) break;
-            TRACE("%lx: DW_CFA_restore_extended %s\n",
+            TRACE("%Ix: DW_CFA_restore_extended %s\n",
                   info->ip,
                   module->cpu->fetch_regname(module->cpu->map_dwarf_register(reg, module, TRUE)));
             info->state.rules[reg] = RULE_UNSET;
@@ -3395,7 +3395,7 @@ static void execute_cfa_instructions(struct module* module, dwarf2_traverse_cont
         {
             ULONG_PTR reg = dwarf2_leb128_as_unsigned(ctx);
             if (!valid_reg(reg)) break;
-            TRACE("%lx: DW_CFA_undefined %s\n",
+            TRACE("%Ix: DW_CFA_undefined %s\n",
                   info->ip,
                   module->cpu->fetch_regname(module->cpu->map_dwarf_register(reg, module, TRUE)));
             info->state.rules[reg] = RULE_UNDEFINED;
@@ -3405,7 +3405,7 @@ static void execute_cfa_instructions(struct module* module, dwarf2_traverse_cont
         {
             ULONG_PTR reg = dwarf2_leb128_as_unsigned(ctx);
             if (!valid_reg(reg)) break;
-            TRACE("%lx: DW_CFA_same_value %s\n",
+            TRACE("%Ix: DW_CFA_same_value %s\n",
                   info->ip,
                   module->cpu->fetch_regname(module->cpu->map_dwarf_register(reg, module, TRUE)));
             info->state.regs[reg]  = reg;
@@ -3417,7 +3417,7 @@ static void execute_cfa_instructions(struct module* module, dwarf2_traverse_cont
             ULONG_PTR reg = dwarf2_leb128_as_unsigned(ctx);
             ULONG_PTR reg2 = dwarf2_leb128_as_unsigned(ctx);
             if (!valid_reg(reg) || !valid_reg(reg2)) break;
-            TRACE("%lx: DW_CFA_register %s == %s\n",
+            TRACE("%Ix: DW_CFA_register %s == %s\n",
                   info->ip,
                   module->cpu->fetch_regname(module->cpu->map_dwarf_register(reg, module, TRUE)),
                   module->cpu->fetch_regname(module->cpu->map_dwarf_register(reg2, module, TRUE)));
@@ -3426,16 +3426,16 @@ static void execute_cfa_instructions(struct module* module, dwarf2_traverse_cont
             break;
         }
         case DW_CFA_remember_state:
-            TRACE("%lx: DW_CFA_remember_state\n", info->ip);
+            TRACE("%Ix: DW_CFA_remember_state\n", info->ip);
             if (info->state_sp >= MAX_SAVED_STATES)
-                FIXME("%lx: DW_CFA_remember_state too many nested saves\n", info->ip);
+                FIXME("%Ix: DW_CFA_remember_state too many nested saves\n", info->ip);
             else
                 info->state_stack[info->state_sp++] = info->state;
             break;
         case DW_CFA_restore_state:
-            TRACE("%lx: DW_CFA_restore_state\n", info->ip);
+            TRACE("%Ix: DW_CFA_restore_state\n", info->ip);
             if (!info->state_sp)
-                FIXME("%lx: DW_CFA_restore_state without corresponding save\n", info->ip);
+                FIXME("%Ix: DW_CFA_restore_state without corresponding save\n", info->ip);
             else
                 info->state = info->state_stack[--info->state_sp];
             break;
@@ -3446,7 +3446,7 @@ static void execute_cfa_instructions(struct module* module, dwarf2_traverse_cont
             ULONG_PTR offset = (op == DW_CFA_def_cfa) ? dwarf2_leb128_as_unsigned(ctx)
                                                       : dwarf2_leb128_as_signed(ctx) * info->data_align;
             if (!valid_reg(reg)) break;
-            TRACE("%lx: DW_CFA_def_cfa %s, %ld\n",
+            TRACE("%Ix: DW_CFA_def_cfa %s, %Id\n",
                   info->ip,
                   module->cpu->fetch_regname(module->cpu->map_dwarf_register(reg, module, TRUE)),
                   offset);
@@ -3459,7 +3459,7 @@ static void execute_cfa_instructions(struct module* module, dwarf2_traverse_cont
         {
             ULONG_PTR reg = dwarf2_leb128_as_unsigned(ctx);
             if (!valid_reg(reg)) break;
-            TRACE("%lx: DW_CFA_def_cfa_register %s\n",
+            TRACE("%Ix: DW_CFA_def_cfa_register %s\n",
                   info->ip,
                   module->cpu->fetch_regname(module->cpu->map_dwarf_register(reg, module, TRUE)));
             info->state.cfa_reg  = reg;
@@ -3471,7 +3471,7 @@ static void execute_cfa_instructions(struct module* module, dwarf2_traverse_cont
         {
             ULONG_PTR offset = (op == DW_CFA_def_cfa_offset) ? dwarf2_leb128_as_unsigned(ctx)
                                                              : dwarf2_leb128_as_signed(ctx) * info->data_align;
-            TRACE("%lx: DW_CFA_def_cfa_offset %ld\n", info->ip, offset);
+            TRACE("%Ix: DW_CFA_def_cfa_offset %Id\n", info->ip, offset);
             info->state.cfa_offset = offset;
             info->state.cfa_rule   = RULE_CFA_OFFSET;
             break;
@@ -3480,7 +3480,7 @@ static void execute_cfa_instructions(struct module* module, dwarf2_traverse_cont
         {
             ULONG_PTR expr = (ULONG_PTR)ctx->data;
             ULONG_PTR len = dwarf2_leb128_as_unsigned(ctx);
-            TRACE("%lx: DW_CFA_def_cfa_expression %lx-%lx\n", info->ip, expr, expr+len);
+            TRACE("%Ix: DW_CFA_def_cfa_expression %Ix-%Ix\n", info->ip, expr, expr+len);
             info->state.cfa_offset = expr;
             info->state.cfa_rule   = RULE_VAL_EXPRESSION;
             ctx->data += len;
@@ -3493,7 +3493,7 @@ static void execute_cfa_instructions(struct module* module, dwarf2_traverse_cont
             ULONG_PTR expr = (ULONG_PTR)ctx->data;
             ULONG_PTR len = dwarf2_leb128_as_unsigned(ctx);
             if (!valid_reg(reg)) break;
-            TRACE("%lx: DW_CFA_%sexpression %s %lx-%lx\n",
+            TRACE("%Ix: DW_CFA_%sexpression %s %Ix-%Ix\n",
                   info->ip, (op == DW_CFA_expression) ? "" : "val_",
                   module->cpu->fetch_regname(module->cpu->map_dwarf_register(reg, module, TRUE)),
                   expr, expr + len);
@@ -3506,12 +3506,12 @@ static void execute_cfa_instructions(struct module* module, dwarf2_traverse_cont
         /* FIXME: should check that GCC is the compiler for this CU */
         {
             ULONG_PTR   args = dwarf2_leb128_as_unsigned(ctx);
-            TRACE("%lx: DW_CFA_GNU_args_size %lu\n", info->ip, args);
+            TRACE("%Ix: DW_CFA_GNU_args_size %Iu\n", info->ip, args);
             /* ignored */
             break;
         }
         default:
-            FIXME("%lx: unknown CFA opcode %02x\n", info->ip, op);
+            FIXME("%Ix: unknown CFA opcode %02x\n", info->ip, op);
             break;
         }
     }
@@ -3548,7 +3548,7 @@ static void set_context_reg(const struct module* module, struct cpu_stack_walk*
 
         if (sz > sizeof(tmp))
         {
-            FIXME("register %lu/%u size is too wide: %u\n", dw_reg, regno, sz);
+            FIXME("register %Iu/%u size is too wide: %u\n", dw_reg, regno, sz);
             return;
         }
         if (!sw_read_mem(csw, val, tmp, sz))
@@ -3562,7 +3562,7 @@ static void set_context_reg(const struct module* module, struct cpu_stack_walk*
     {
         if (sz != sizeof(ULONG_PTR))
         {
-            FIXME("assigning to register %lu/%u of wrong size %u\n", dw_reg, regno, sz);
+            FIXME("assigning to register %Iu/%u of wrong size %u\n", dw_reg, regno, sz);
             return;
         }
         *ptr = val;
@@ -3582,7 +3582,7 @@ static void copy_context_reg(const struct module* module, struct cpu_stack_walk
     if (csw->cpu != module->cpu) FIXME("mismatch in cpu\n");
     if (szdst != szsrc)
     {
-        FIXME("Cannot copy register %lu/%u => %lu/%u because of size mismatch (%u => %u)\n",
+        FIXME("Cannot copy register %Iu/%u => %Iu/%u because of size mismatch (%u => %u)\n",
               dwregsrc, regsrcno, dwregdst, regdstno, szsrc, szdst);
         return;
     }
@@ -3693,7 +3693,7 @@ static ULONG_PTR eval_expression(const struct module* module, struct cpu_stack_w
             case 2: stack[sp] = *(unsigned short*)&tmp; break;
             case 4: stack[sp] = *(unsigned int*)&tmp; break;
             case 8: stack[sp] = tmp; break; /* FIXME: won't work on 32bit platform */
-            default: FIXME("Unknown size for deref 0x%lx\n", sz);
+            default: FIXME("Unknown size for deref 0x%Ix\n", sz);
             }
             break;
         default:
@@ -3783,12 +3783,12 @@ static BOOL dwarf2_fetch_frame_info(struct module* module, struct cpu* cpu, LONG
         if (modfmt->u.dwarf2_info->debug_frame.address == IMAGE_NO_MAP ||
             !dwarf2_get_cie(ip, module, delta, &fde_ctx, &cie_ctx, info, FALSE))
         {
-            TRACE("Couldn't find information for %lx\n", ip);
+            TRACE("Couldn't find information for %Ix\n", ip);
             return FALSE;
         }
     }
 
-    TRACE("function %lx/%lx code_align %lu data_align %ld retaddr %s\n",
+    TRACE("function %Ix/%Ix code_align %Iu data_align %Id retaddr %s\n",
           ip, info->ip, info->code_align, info->data_align,
           cpu->fetch_regname(cpu->map_dwarf_register(info->retaddr_reg, module, TRUE)));
 
diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c
index def8b444e4e..404c7c11dbb 100644
--- a/dlls/dbghelp/elf_module.c
+++ b/dlls/dbghelp/elf_module.c
@@ -162,14 +162,14 @@ static const char* elf_map_section(struct image_section_map* ism)
     size = fmap->sect[ism->sidx].shdr.sh_offset + fmap->sect[ism->sidx].shdr.sh_size - ofst;
     if (!(mapping = CreateFileMappingW(fmap->handle, NULL, PAGE_READONLY, 0, ofst + size, NULL)))
     {
-        ERR("map creation %p failed %u offset %lu %lu size %lu\n", fmap->handle, GetLastError(), ofst, ofst % 4096, size);
+        ERR("map creation %p failed %lu offset %Iu %Iu size %Iu\n", fmap->handle, GetLastError(), ofst, ofst % 4096, size);
         return IMAGE_NO_MAP;
     }
     fmap->sect[ism->sidx].mapped = MapViewOfFile(mapping, FILE_MAP_READ, 0, ofst, size);
     CloseHandle(mapping);
     if (!fmap->sect[ism->sidx].mapped)
     {
-        ERR("map %p failed %u offset %lu %lu size %lu\n", fmap->handle, GetLastError(), ofst, ofst % 4096, size);
+        ERR("map %p failed %lu offset %Iu %Iu size %Iu\n", fmap->handle, GetLastError(), ofst, ofst % 4096, size);
         return IMAGE_NO_MAP;
     }
     return fmap->sect[ism->sidx].mapped + (fmap->sect[ism->sidx].shdr.sh_offset & (sysinfo.dwAllocationGranularity - 1));
@@ -861,12 +861,12 @@ static void elf_finish_stabs_info(struct module* module, const struct hash_table
             {
                 if (((struct symt_function*)sym)->address != elf_info->elf_addr &&
                     ((struct symt_function*)sym)->address != elf_info->elf_addr + symp->st_value)
-                    FIXME("Changing address for %p/%s!%s from %08lx to %s\n",
+                    FIXME("Changing address for %p/%s!%s from %08Ix to %s\n",
                           sym, debugstr_w(module->modulename), sym->hash_elt.name,
                           ((struct symt_function*)sym)->address,
                           wine_dbgstr_longlong(elf_info->elf_addr + symp->st_value));
                 if (((struct symt_function*)sym)->size && ((struct symt_function*)sym)->size != symp->st_size)
-                    FIXME("Changing size for %p/%s!%s from %08lx to %08x\n",
+                    FIXME("Changing size for %p/%s!%s from %08Ix to %08x\n",
                           sym, debugstr_w(module->modulename), sym->hash_elt.name,
                           ((struct symt_function*)sym)->size, (unsigned int)symp->st_size);
 
@@ -890,7 +890,7 @@ static void elf_finish_stabs_info(struct module* module, const struct hash_table
                 {
                     if (((struct symt_data*)sym)->u.var.offset != elf_info->elf_addr &&
                         ((struct symt_data*)sym)->u.var.offset != elf_info->elf_addr + symp->st_value)
-                        FIXME("Changing address for %p/%s!%s from %08lx to %s\n",
+                        FIXME("Changing address for %p/%s!%s from %08Ix to %s\n",
                               sym, debugstr_w(module->modulename), sym->hash_elt.name,
                               ((struct symt_function*)sym)->address,
                               wine_dbgstr_longlong(elf_info->elf_addr + symp->st_value));
@@ -1227,12 +1227,12 @@ static BOOL elf_load_file_from_fmap(struct process* pcs, const WCHAR* filename,
         {
             ULONG_PTR rva_dyn = elf_get_map_rva(&ism);
 
-            TRACE("For module %s, got ELF (start=%lx dyn=%lx), link_map (start=%lx dyn=%lx)\n",
+            TRACE("For module %s, got ELF (start=%Ix dyn=%Ix), link_map (start=%Ix dyn=%Ix)\n",
                   debugstr_w(filename), (ULONG_PTR)fmap->u.elf.elf_start, rva_dyn,
                   load_offset, dyn_addr);
             if (dyn_addr && load_offset + rva_dyn != dyn_addr)
             {
-                WARN("\thave to relocate: %lx\n", dyn_addr - rva_dyn);
+                WARN("\thave to relocate: %Ix\n", dyn_addr - rva_dyn);
                 modbase = dyn_addr - rva_dyn;
             }
 	} else WARN("For module %s, no .dynamic section\n", debugstr_w(filename));
@@ -1301,7 +1301,7 @@ static BOOL elf_load_file(struct process* pcs, const WCHAR* filename,
     struct image_file_map       fmap;
     struct elf_map_file_data    emfd;
 
-    TRACE("Processing elf file '%s' at %08lx\n", debugstr_w(filename), load_offset);
+    TRACE("Processing elf file '%s' at %08Ix\n", debugstr_w(filename), load_offset);
 
     emfd.kind = from_file;
     emfd.u.file.filename = filename;
@@ -1667,7 +1667,7 @@ static struct module* elf_load_module(struct process* pcs, const WCHAR* name, UL
 {
     struct elf_load     el;
 
-    TRACE("(%p %s %08lx)\n", pcs, debugstr_w(name), addr);
+    TRACE("(%p %s %08Ix)\n", pcs, debugstr_w(name), addr);
 
     el.elf_info.flags = ELF_INFO_MODULE;
     el.ret = FALSE;
@@ -1770,7 +1770,7 @@ BOOL elf_read_wine_loader_dbg_info(struct process* pcs, ULONG_PTR addr)
     }
     if (!ret || !elf_info.dbg_hdr_addr) return FALSE;
 
-    TRACE("Found ELF debug header %#lx\n", elf_info.dbg_hdr_addr);
+    TRACE("Found ELF debug header %#Ix\n", elf_info.dbg_hdr_addr);
     elf_info.module->format_info[DFI_ELF]->u.elf_info->elf_loader = 1;
     module_set_module(elf_info.module, S_WineLoaderW);
     pcs->dbg_hdr_addr = elf_info.dbg_hdr_addr;
diff --git a/dlls/dbghelp/image.c b/dlls/dbghelp/image.c
index 7de0a6e23c8..a9c83849311 100644
--- a/dlls/dbghelp/image.c
+++ b/dlls/dbghelp/image.c
@@ -44,7 +44,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
 PIMAGE_DEBUG_INFORMATION WINAPI MapDebugInformation(HANDLE FileHandle, PCSTR FileName,
                                                     PCSTR SymbolPath, ULONG ImageBase)
 {
-    FIXME("(%p, %s, %s, 0x%08x): stub\n", FileHandle, FileName, SymbolPath, ImageBase);
+    FIXME("(%p, %s, %s, 0x%08lx): stub\n", FileHandle, FileName, SymbolPath, ImageBase);
     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
     return NULL;
 }
diff --git a/dlls/dbghelp/macho_module.c b/dlls/dbghelp/macho_module.c
index 50ae32bc826..b90f248b15d 100644
--- a/dlls/dbghelp/macho_module.c
+++ b/dlls/dbghelp/macho_module.c
@@ -242,24 +242,24 @@ static const char* macho_map_range(const struct macho_file_map* fmap, ULONG_PTR
     const void*     aligned_ptr;
     HANDLE          mapping;
 
-    TRACE("(%p/%p, 0x%08lx, 0x%08lx)\n", fmap, fmap->handle, offset, len);
+    TRACE("(%p/%p, 0x%08Ix, 0x%08Ix)\n", fmap, fmap->handle, offset, len);
 
     macho_calc_range(fmap, offset, len, &aligned_offset, &aligned_map_end, &misalign);
 
     if (!(mapping = CreateFileMappingW(fmap->handle, NULL, PAGE_READONLY, 0, 0, NULL)))
     {
-        ERR("map creation %p failed %u size %lu\n", fmap->handle, GetLastError(), aligned_map_end);
+        ERR("map creation %p failed %lu size %Iu\n", fmap->handle, GetLastError(), aligned_map_end);
         return IMAGE_NO_MAP;
     }
     aligned_ptr = MapViewOfFile(mapping, FILE_MAP_READ, 0, aligned_offset, aligned_map_end - aligned_offset);
     CloseHandle(mapping);
     if (!aligned_ptr)
     {
-        ERR("map failed %u\n", GetLastError());
+        ERR("map failed %lu\n", GetLastError());
         return IMAGE_NO_MAP;
     }
 
-    TRACE("Mapped (0x%08lx - 0x%08lx) to %p\n", aligned_offset, aligned_map_end, aligned_ptr);
+    TRACE("Mapped (0x%08Ix - 0x%08Ix) to %p\n", aligned_offset, aligned_map_end, aligned_ptr);
 
     if (base)
         *base = aligned_ptr;
@@ -274,7 +274,7 @@ static const char* macho_map_range(const struct macho_file_map* fmap, ULONG_PTR
 static void macho_unmap_range(const char** base, const void** mapped, const struct macho_file_map* fmap,
                               ULONG_PTR offset, ULONG_PTR len)
 {
-    TRACE("(%p, %p, %p/%p, 0x%08lx, 0x%08lx)\n", base, mapped, fmap, fmap->handle, offset, len);
+    TRACE("(%p, %p, %p/%p, 0x%08Ix, 0x%08Ix)\n", base, mapped, fmap, fmap->handle, offset, len);
 
     if ((mapped && *mapped != IMAGE_NO_MAP) || (base && *base != IMAGE_NO_MAP))
     {
@@ -311,7 +311,7 @@ static BOOL macho_map_ranges(const struct macho_file_map* fmap,
     ULONG_PTR aligned_offset1, aligned_map_end1;
     ULONG_PTR aligned_offset2, aligned_map_end2;
 
-    TRACE("(%p/%p, 0x%08lx, 0x%08lx, 0x%08lx, 0x%08lx, %p, %p)\n", fmap, fmap->handle,
+    TRACE("(%p/%p, 0x%08Ix, 0x%08Ix, 0x%08Ix, 0x%08Ix, %p, %p)\n", fmap, fmap->handle,
             offset1, len1, offset2, len2, mapped1, mapped2);
 
     macho_calc_range(fmap, offset1, len1, &aligned_offset1, &aligned_map_end1, NULL);
@@ -363,7 +363,7 @@ static void macho_unmap_ranges(const struct macho_file_map* fmap,
     ULONG_PTR       aligned_offset1, aligned_map_end1;
     ULONG_PTR       aligned_offset2, aligned_map_end2;
 
-    TRACE("(%p/%p, 0x%08lx, 0x%08lx, 0x%08lx, 0x%08lx, %p/%p, %p/%p)\n", fmap, fmap->handle,
+    TRACE("(%p/%p, 0x%08Ix, 0x%08Ix, 0x%08Ix, 0x%08Ix, %p/%p, %p/%p)\n", fmap, fmap->handle,
             offset1, len1, offset2, len2, mapped1, *mapped1, mapped2, *mapped2);
 
     macho_calc_range(fmap, offset1, len1, &aligned_offset1, &aligned_map_end1, NULL);
@@ -648,9 +648,9 @@ static int macho_load_section_info(struct image_file_map* ifm, const struct mach
         sections = (const void *)(sc + 1);
     }
 
-    TRACE("(%p/%p, %p, %p) before: 0x%08lx - 0x%08lx\n", fmap, fmap->handle, lc, user,
+    TRACE("(%p/%p, %p, %p) before: 0x%08Ix - 0x%08Ix\n", fmap, fmap->handle, lc, user,
             (ULONG_PTR)fmap->segs_start, (ULONG_PTR)fmap->segs_size);
-    TRACE("Segment command vm: 0x%08lx - 0x%08lx\n", (ULONG_PTR)vmaddr,
+    TRACE("Segment command vm: 0x%08Ix - 0x%08Ix\n", (ULONG_PTR)vmaddr,
             (ULONG_PTR)(vmaddr + vmsize));
 
     /* Images in the dyld shared cache have their segments mapped non-contiguously.
@@ -674,7 +674,7 @@ static int macho_load_section_info(struct image_file_map* ifm, const struct mach
         tmp = (vmaddr + vmsize + page_mask) & ~page_mask;
         if (fmap->segs_size < tmp) fmap->segs_size = tmp;
 
-        TRACE("after: 0x%08lx - 0x%08lx\n", (ULONG_PTR)fmap->segs_start, (ULONG_PTR)fmap->segs_size);
+        TRACE("after: 0x%08Ix - 0x%08Ix\n", (ULONG_PTR)fmap->segs_start, (ULONG_PTR)fmap->segs_size);
     }
 
     for (i = 0; i < nsects; i++)
@@ -777,7 +777,7 @@ static BOOL macho_map_file(struct process *pcs, const WCHAR *filenameW,
 
     if (!ReadFile(fmap->handle, &fat_header, sizeof(fat_header), &bytes_read, NULL) || bytes_read != sizeof(fat_header))
     {
-        TRACE("failed to read fat header: %u\n", GetLastError());
+        TRACE("failed to read fat header: %lu\n", GetLastError());
         goto done;
     }
     TRACE("... got possible fat header\n");
@@ -859,7 +859,7 @@ static BOOL macho_map_file(struct process *pcs, const WCHAR *filenameW,
     }
 
     fmap->segs_size -= fmap->segs_start;
-    TRACE("segs_start: 0x%08lx, segs_size: 0x%08lx\n", (ULONG_PTR)fmap->segs_start,
+    TRACE("segs_start: 0x%08Ix, segs_size: 0x%08Ix\n", (ULONG_PTR)fmap->segs_start,
             (ULONG_PTR)fmap->segs_size);
 
     if (macho_enum_load_commands(ifm, MACHO_LC_UUID, find_uuid, NULL) < 0)
@@ -973,7 +973,7 @@ static void macho_stabs_def_cb(struct module* module, ULONG_PTR load_offset,
     struct macho_debug_info*    mdi = user;
     struct symtab_elt*          ste;
 
-    TRACE("(%p, 0x%08lx, %s, 0x%08lx, %d, %d, %u, %p, %p/%p/%p)\n", module, load_offset,
+    TRACE("(%p, 0x%08Ix, %s, 0x%08Ix, %d, %d, %u, %p, %p/%p/%p)\n", module, load_offset,
             debugstr_a(name), offset, is_public, is_global, sectidx,
             compiland, mdi, mdi->fmap, mdi->fmap->handle);
 
@@ -1065,7 +1065,7 @@ static void macho_finish_stabs(struct module* module, struct hash_table* ht_symt
                 func = (struct symt_function*)sym;
                 if (func->address == module->format_info[DFI_MACHO]->u.macho_info->load_addr)
                 {
-                    TRACE("Adjusting function %p/%s!%s from 0x%08lx to 0x%08lx\n", func,
+                    TRACE("Adjusting function %p/%s!%s from 0x%08Ix to 0x%08Ix\n", func,
                           debugstr_w(module->modulename), sym->hash_elt.name,
                           func->address, ste->addr);
                     func->address = ste->addr;
@@ -1082,7 +1082,7 @@ static void macho_finish_stabs(struct module* module, struct hash_table* ht_symt
                 case DataIsFileStatic:
                     if (data->u.var.offset == module->format_info[DFI_MACHO]->u.macho_info->load_addr)
                     {
-                        TRACE("Adjusting data symbol %p/%s!%s from 0x%08lx to 0x%08lx\n",
+                        TRACE("Adjusting data symbol %p/%s!%s from 0x%08Ix to 0x%08Ix\n",
                               data, debugstr_w(module->modulename), sym->hash_elt.name,
                               data->u.var.offset, ste->addr);
                         data->u.var.offset = ste->addr;
@@ -1154,7 +1154,7 @@ static void macho_finish_stabs(struct module* module, struct hash_table* ht_symt
                 symt_get_info(module, &sym->symt, TI_GET_LENGTH,   &size);
                 symt_get_info(module, &sym->symt, TI_GET_DATAKIND, &kind);
                 if (size && kind == (ste->is_global ? DataIsGlobal : DataIsFileStatic))
-                    FIXME("Duplicate in %s: %s<%08lx> %s<%s-%s>\n",
+                    FIXME("Duplicate in %s: %s<%08Ix> %s<%s-%s>\n",
                           debugstr_w(module->modulename),
                           ste->ht_elt.name, ste->addr,
                           sym->hash_elt.name,
@@ -1462,7 +1462,7 @@ static BOOL macho_load_file(struct process* pcs, const WCHAR* filename,
     BOOL                    split_segs;
     struct image_file_map   fmap;
 
-    TRACE("(%p/%p, %s, 0x%08lx, %p/0x%08x)\n", pcs, pcs->handle, debugstr_w(filename),
+    TRACE("(%p/%p, %s, 0x%08Ix, %p/0x%08x)\n", pcs, pcs->handle, debugstr_w(filename),
             load_addr, macho_info, macho_info->flags);
 
     split_segs = image_uses_split_segs(pcs, load_addr);
@@ -1549,7 +1549,7 @@ static BOOL macho_search_and_load_file(struct process* pcs, const WCHAR* filenam
     const WCHAR*        p;
     struct macho_load_params load_params;
 
-    TRACE("(%p/%p, %s, 0x%08lx, %p)\n", pcs, pcs->handle, debugstr_w(filename), load_addr,
+    TRACE("(%p/%p, %s, 0x%08Ix, %p)\n", pcs, pcs->handle, debugstr_w(filename), load_addr,
             macho_info);
 
     if (filename == NULL || *filename == '\0') return FALSE;
@@ -1673,7 +1673,7 @@ static BOOL macho_enum_sync_cb(const WCHAR* name, ULONG_PTR addr, void* user)
 {
     struct macho_sync*  ms = user;
 
-    TRACE("(%s, 0x%08lx, %p)\n", debugstr_w(name), addr, user);
+    TRACE("(%s, 0x%08Ix, %p)\n", debugstr_w(name), addr, user);
     macho_search_and_load_file(ms->pcs, name, addr, &ms->macho_info);
     return TRUE;
 }
@@ -1759,7 +1759,7 @@ static BOOL macho_load_cb(const WCHAR* name, ULONG_PTR addr, void* user)
     struct macho_load*  ml = user;
     const WCHAR*        p;
 
-    TRACE("(%s, 0x%08lx, %p)\n", debugstr_w(name), addr, user);
+    TRACE("(%s, 0x%08Ix, %p)\n", debugstr_w(name), addr, user);
 
     /* memcmp is needed for matches when bufstr contains also version information
      * ml->name: libc.so, name: libc.so.6.0
@@ -1784,7 +1784,7 @@ static struct module* macho_load_module(struct process* pcs, const WCHAR* name,
 {
     struct macho_load   ml;
 
-    TRACE("(%p/%p, %s, 0x%08lx)\n", pcs, pcs->handle, debugstr_w(name), addr);
+    TRACE("(%p/%p, %s, 0x%08Ix)\n", pcs, pcs->handle, debugstr_w(name), addr);
 
     ml.macho_info.flags = MACHO_INFO_MODULE;
     ml.ret = FALSE;
@@ -1916,6 +1916,6 @@ BOOL macho_read_wine_loader_dbg_info(struct process* pcs, ULONG_PTR addr)
     macho_info.module->format_info[DFI_MACHO]->u.macho_info->is_loader = 1;
     module_set_module(macho_info.module, S_WineLoaderW);
     pcs->loader = &macho_loader_ops;
-    TRACE("Found macho debug header %#lx\n", pcs->dbg_hdr_addr);
+    TRACE("Found macho debug header %#Ix\n", pcs->dbg_hdr_addr);
     return TRUE;
 }
diff --git a/dlls/dbghelp/minidump.c b/dlls/dbghelp/minidump.c
index c2461413570..172847529f1 100644
--- a/dlls/dbghelp/minidump.c
+++ b/dlls/dbghelp/minidump.c
@@ -141,7 +141,7 @@ static BOOL fetch_thread_info(struct dump_context* dc, int thd_idx,
 
     if ((hThread = OpenThread(THREAD_ALL_ACCESS, FALSE, tid)) == NULL)
     {
-        FIXME("Couldn't open thread %u (%u)\n", tid, GetLastError());
+        FIXME("Couldn't open thread %lu (%lu)\n", tid, GetLastError());
         return FALSE;
     }
     
diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c
index def7b799d73..cd34b81460f 100644
--- a/dlls/dbghelp/module.c
+++ b/dlls/dbghelp/module.c
@@ -489,7 +489,7 @@ static BOOL image_check_debug_link_crc(const WCHAR* file, struct image_file_map*
     crc = calc_crc32(handle);
     if (crc != link_crc)
     {
-        WARN("Bad CRC for file %s (got %08x while expecting %08x)\n",  debugstr_w(file), crc, link_crc);
+        WARN("Bad CRC for file %s (got %08lx while expecting %08lx)\n",  debugstr_w(file), crc, link_crc);
         CloseHandle(handle);
         return FALSE;
     }
@@ -858,7 +858,7 @@ DWORD64 WINAPI  SymLoadModuleEx(HANDLE hProcess, HANDLE hFile, PCSTR ImageName,
     unsigned    len;
     DWORD64     ret;
 
-    TRACE("(%p %p %s %s %s %08x %p %08x)\n",
+    TRACE("(%p %p %s %s %s %08lx %p %08lx)\n",
           hProcess, hFile, debugstr_a(ImageName), debugstr_a(ModuleName),
           wine_dbgstr_longlong(BaseOfDll), DllSize, Data, Flags);
 
@@ -895,7 +895,7 @@ DWORD64 WINAPI  SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam
     struct module*      module = NULL;
     struct module*      altmodule;
 
-    TRACE("(%p %p %s %s %s %08x %p %08x)\n",
+    TRACE("(%p %p %s %s %s %08lx %p %08lx)\n",
           hProcess, hFile, debugstr_w(wImageName), debugstr_w(wModuleName),
           wine_dbgstr_longlong(BaseOfDll), SizeOfDll, Data, Flags);
 
@@ -906,7 +906,7 @@ DWORD64 WINAPI  SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam
     if (!(pcs = process_find_by_handle(hProcess))) return 0;
 
     if (Flags & ~(SLMFLAG_VIRTUAL))
-        FIXME("Unsupported Flags %08x for %s\n", Flags, debugstr_w(wImageName));
+        FIXME("Unsupported Flags %08lx for %s\n", Flags, debugstr_w(wImageName));
 
     pcs->loader->synchronize_module_list(pcs);
 
@@ -1342,7 +1342,7 @@ BOOL  WINAPI SymGetModuleInfo64(HANDLE hProcess, DWORD64 dwAddr,
     if (sizeof(mi64) < ModuleInfo->SizeOfStruct)
     {
         SetLastError(ERROR_MOD_NOT_FOUND); /* NOTE: native returns this error */
-        WARN("Wrong size %u\n", ModuleInfo->SizeOfStruct);
+        WARN("Wrong size %lu\n", ModuleInfo->SizeOfStruct);
         return FALSE;
     }
 
diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c
index 317f7bb84b5..079e3a2ee4a 100644
--- a/dlls/dbghelp/msc.c
+++ b/dlls/dbghelp/msc.c
@@ -693,7 +693,7 @@ static struct symt* codeview_add_type_array(struct codeview_type_parse* ctp,
     if (symt_get_info(ctp->module, elem, TI_GET_LENGTH, &elem_size) && elem_size)
     {
         if (arr_len % (DWORD)elem_size)
-            FIXME("array size should be a multiple of element size %u %u\n", arr_len, (DWORD)elem_size);
+            FIXME("array size should be a multiple of element size %u %lu\n", arr_len, (DWORD)elem_size);
         count = arr_len / (unsigned)elem_size;
     }
     return &symt_new_array(ctp->module, 0, count, elem, index)->symt;
@@ -1465,7 +1465,7 @@ static void codeview_snarf_linetab(const struct msc_debug_info* msc_dbg, const B
                     /* FIXME: at least labels support line numbers */
                     if (!symt_check_tag(&func->symt, SymTagFunction) && !symt_check_tag(&func->symt, SymTagInlineSite))
                     {
-                        WARN("--not a func at %04x:%08x %lx tag=%d\n",
+                        WARN("--not a func at %04x:%08x %Ix tag=%d\n",
                              ltb->seg, ltb->offsets[k], addr, func ? func->symt.tag : -1);
                         func = NULL;
                         break;
@@ -1871,7 +1871,7 @@ static BOOL cv_dbgsubsect_find_inlinee(const struct msc_debug_info* msc_dbg,
             }
             break;
         default:
-            FIXME("Unknown signature %x in INLINEELINES subsection\n", *(DWORD*)CV_RECORD_AFTER(hdr));
+            FIXME("Unknown signature %lx in INLINEELINES subsection\n", *(DWORD*)CV_RECORD_AFTER(hdr));
             break;
         }
     }
@@ -3069,7 +3069,7 @@ static BOOL pdb_init_type_parse(const struct msc_debug_info* msc_dbg,
     case 20040203:      /* VC 8.0 */
         break;
     default:
-        ERR("-Unknown type info version %d\n", types.version);
+        ERR("-Unknown type info version %ld\n", types.version);
         return FALSE;
     }
 
@@ -3150,7 +3150,7 @@ static BOOL pdb_init(const struct pdb_lookup* pdb_lookup, struct pdb_file_info*
         case 19970604:      /* VC 6.0 */
             break;
         default:
-            ERR("-Unknown root block version %d\n", root->Version);
+            ERR("-Unknown root block version %ld\n", root->Version);
         }
         if (pdb_lookup->kind != PDB_JG)
         {
@@ -3162,12 +3162,12 @@ static BOOL pdb_init(const struct pdb_lookup* pdb_lookup, struct pdb_file_info*
         pdb_file->u.jg.timestamp = root->TimeDateStamp;
         pdb_file->age = root->Age;
         if (root->TimeDateStamp == pdb_lookup->timestamp) (*matched)++;
-        else WARN("Found %s, but wrong signature: %08x %08x\n",
+        else WARN("Found %s, but wrong signature: %08lx %08lx\n",
                   pdb_lookup->filename, root->TimeDateStamp, pdb_lookup->timestamp);
         if (root->Age == pdb_lookup->age) (*matched)++;
-        else WARN("Found %s, but wrong age: %08x %08x\n",
+        else WARN("Found %s, but wrong age: %08lx %08lx\n",
                   pdb_lookup->filename, root->Age, pdb_lookup->age);
-        TRACE("found JG for %s: age=%x timestamp=%x\n",
+        TRACE("found JG for %s: age=%lx timestamp=%lx\n",
               pdb_lookup->filename, root->Age, root->TimeDateStamp);
         pdb_load_stream_name_table(pdb_file, &root->names[0], root->cbNames);
 
@@ -3193,7 +3193,7 @@ static BOOL pdb_init(const struct pdb_lookup* pdb_lookup, struct pdb_file_info*
         case 20000404:
             break;
         default:
-            ERR("-Unknown root block version %d\n", root->Version);
+            ERR("-Unknown root block version %ld\n", root->Version);
         }
         pdb_file->kind = PDB_DS;
         pdb_file->u.ds.guid = root->guid;
@@ -3203,9 +3203,9 @@ static BOOL pdb_init(const struct pdb_lookup* pdb_lookup, struct pdb_file_info*
                   pdb_lookup->filename, debugstr_guid(&root->guid),
                      debugstr_guid(&pdb_lookup->guid));
         if (root->Age == pdb_lookup->age) (*matched)++;
-        else WARN("Found %s, but wrong age: %08x %08x\n",
+        else WARN("Found %s, but wrong age: %08lx %08lx\n",
                   pdb_lookup->filename, root->Age, pdb_lookup->age);
-        TRACE("found DS for %s: age=%x guid=%s\n",
+        TRACE("found DS for %s: age=%lx guid=%s\n",
               pdb_lookup->filename, root->Age, debugstr_guid(&root->guid));
         pdb_load_stream_name_table(pdb_file, &root->names[0], root->cbNames);
 
@@ -3284,7 +3284,7 @@ static void pdb_process_symbol_imports(const struct process* pcs,
                 imp_pdb_lookup.kind = PDB_JG;
                 imp_pdb_lookup.timestamp = imp->TimeDateStamp;
                 imp_pdb_lookup.age = imp->Age;
-                TRACE("got for %s: age=%u ts=%x\n",
+                TRACE("got for %s: age=%lu ts=%lx\n",
                       imp->filename, imp->Age, imp->TimeDateStamp);
                 pdb_process_internal(pcs, msc_dbg, &imp_pdb_lookup, pdb_module_info, i);
             }
@@ -3359,7 +3359,7 @@ static BOOL pdb_process_internal(const struct process* pcs,
         case 19990903:
             break;
         default:
-            ERR("-Unknown symbol info version %d %08x\n",
+            ERR("-Unknown symbol info version %ld %08lx\n",
                 symbols.version, symbols.version);
         }
 
@@ -3377,7 +3377,7 @@ static BOOL pdb_process_internal(const struct process* pcs,
             pdb_file->fpoext_stream = psi->FPO_EXT;
             break;
         default:
-            FIXME("Unknown PDB_STREAM_INDEXES size (%d)\n", symbols.stream_index_size);
+            FIXME("Unknown PDB_STREAM_INDEXES size (%ld)\n", symbols.stream_index_size);
             break;
         }
         files_image = pdb_read_strings(pdb_file);
@@ -3673,7 +3673,7 @@ static BOOL  pev_binop(struct pevaluator* pev, char op)
     case '%': c = v1 % v2; break;
     default: return PEV_ERROR1(pev, "binop: unknown op (%c)", op);
     }
-    snprintf(res, sizeof(res), "%ld", c);
+    snprintf(res, sizeof(res), "%Id", c);
     pev_push(pev, res);
     return TRUE;
 }
@@ -3686,8 +3686,8 @@ static BOOL  pev_deref(struct pevaluator* pev)
 
     if (!pev_pop_val(pev, &v1)) return FALSE;
     if (!sw_read_mem(pev->csw, v1, &v2, pev->csw->cpu->word_size))
-        return PEV_ERROR1(pev, "deref: cannot read mem at %lx\n", v1);
-    snprintf(res, sizeof(res), "%ld", v2);
+        return PEV_ERROR1(pev, "deref: cannot read mem at %Ix\n", v1);
+    snprintf(res, sizeof(res), "%Id", v2);
     pev_push(pev, res);
     return TRUE;
 }
@@ -3802,7 +3802,7 @@ BOOL pdb_virtual_unwind(struct cpu_stack_walk *csw, DWORD_PTR ip,
     if (!module_init_pair(&pair, csw->hProcess, ip)) return FALSE;
     if (!pair.effective->format_info[DFI_PDB]) return FALSE;
     pdb_info = pair.effective->format_info[DFI_PDB]->u.pdb_info;
-    TRACE("searching %lx => %lx\n", ip, ip - (DWORD_PTR)pair.effective->module.BaseOfImage);
+    TRACE("searching %Ix => %Ix\n", ip, ip - (DWORD_PTR)pair.effective->module.BaseOfImage);
     ip -= (DWORD_PTR)pair.effective->module.BaseOfImage;
 
     strbase = pdb_read_strings(&pdb_info->pdb_files[0]);
@@ -3817,7 +3817,7 @@ BOOL pdb_virtual_unwind(struct cpu_stack_walk *csw, DWORD_PTR ip,
         {
             if (fpoext[i].start <= ip && ip < fpoext[i].start + fpoext[i].func_size)
             {
-                TRACE("\t%08x %08x %8x %8x %4x %4x %4x %08x %s\n",
+                TRACE("\t%08lx %08lx %8lx %8lx %4lx %4x %4x %08lx %s\n",
                       fpoext[i].start, fpoext[i].func_size, fpoext[i].locals_size,
                       fpoext[i].params_size, fpoext[i].maxstack_size, fpoext[i].prolog_size,
                       fpoext[i].savedregs_size, fpoext[i].flags,
@@ -3951,7 +3951,7 @@ static BOOL codeview_process_info(const struct process* pcs,
     {
         const OMFSignatureRSDS* rsds = (const OMFSignatureRSDS*)msc_dbg->root;
 
-        TRACE("Got RSDS type of PDB file: guid=%s age=%08x name=%s\n",
+        TRACE("Got RSDS type of PDB file: guid=%s age=%08lx name=%s\n",
               wine_dbgstr_guid(&rsds->guid), rsds->age, rsds->name);
         pdb_lookup.filename = rsds->name;
         pdb_lookup.kind = PDB_DS;
@@ -3961,7 +3961,7 @@ static BOOL codeview_process_info(const struct process* pcs,
         break;
     }
     default:
-        ERR("Unknown CODEVIEW signature %08x in module %s\n",
+        ERR("Unknown CODEVIEW signature %08lx in module %s\n",
             *signature, debugstr_w(msc_dbg->module->modulename));
         break;
     }
diff --git a/dlls/dbghelp/path.c b/dlls/dbghelp/path.c
index f99129eac49..5b4172e4001 100644
--- a/dlls/dbghelp/path.c
+++ b/dlls/dbghelp/path.c
@@ -389,7 +389,7 @@ BOOL WINAPI SymFindFileInPathW(HANDLE hProcess, PCWSTR searchPath, PCWSTR full_p
     WCHAR*              ptr;
     const WCHAR*        filename;
 
-    TRACE("(hProcess = %p, searchPath = %s, full_path = %s, id = %p, two = 0x%08x, three = 0x%08x, flags = 0x%08x, buffer = %p, cb = %p, user = %p)\n",
+    TRACE("(hProcess = %p, searchPath = %s, full_path = %s, id = %p, two = 0x%08lx, three = 0x%08lx, flags = 0x%08lx, buffer = %p, cb = %p, user = %p)\n",
           hProcess, debugstr_w(searchPath), debugstr_w(full_path),
           id, two, three, flags, buffer, cb, user);
 
@@ -617,7 +617,7 @@ BOOL path_find_symbol_file(const struct process* pcs, const struct module* modul
     const WCHAR*        filename;
     WCHAR*              searchPath = pcs->search_path;
 
-    TRACE("(pcs = %p, full_path = %s, guid = %s, dw1 = 0x%08x, dw2 = 0x%08x, buffer = %p)\n",
+    TRACE("(pcs = %p, full_path = %s, guid = %s, dw1 = 0x%08lx, dw2 = 0x%08lx, buffer = %p)\n",
           pcs, debugstr_a(full_path), debugstr_guid(guid), dw1, dw2, buffer);
 
     mf.guid = guid;
diff --git a/dlls/dbghelp/pe_module.c b/dlls/dbghelp/pe_module.c
index e0266db0387..3e697912718 100644
--- a/dlls/dbghelp/pe_module.c
+++ b/dlls/dbghelp/pe_module.c
@@ -87,7 +87,7 @@ static const char* pe_map_section(struct image_section_map* ism)
 
         if (fmap->sect[ism->sidx].shdr.Misc.VirtualSize > fmap->sect[ism->sidx].shdr.SizeOfRawData)
         {
-            FIXME("Section %ld: virtual (0x%x) > raw (0x%x) size - not supported\n",
+            FIXME("Section %Id: virtual (0x%lx) > raw (0x%lx) size - not supported\n",
                   ism->sidx, fmap->sect[ism->sidx].shdr.Misc.VirtualSize,
                   fmap->sect[ism->sidx].shdr.SizeOfRawData);
             return IMAGE_NO_MAP;
@@ -407,7 +407,7 @@ static BOOL pe_locate_with_coff_symbol_table(struct module* module)
                     sym->u.var.kind == loc_absolute &&
                     !strcmp(sym->hash_elt.name, name))
                 {
-                    TRACE("Changing absolute address for %d.%s: %lx -> %s\n",
+                    TRACE("Changing absolute address for %d.%s: %Ix -> %s\n",
                           isym->SectionNumber, name, sym->u.var.offset,
                           wine_dbgstr_longlong(module->module.BaseOfImage +
                                                fmap->u.pe.sect[isym->SectionNumber - 1].shdr.VirtualAddress +
@@ -715,7 +715,7 @@ static BOOL pe_load_export_debug_info(const struct process* pcs, struct module*
                 for (j = 0; j < exports->NumberOfNames; j++)
                     if ((ordinals[j] == i) && names[j]) break;
                 if (j < exports->NumberOfNames) continue;
-                snprintf(buffer, sizeof(buffer), "%d", i + exports->Base);
+                snprintf(buffer, sizeof(buffer), "%ld", i + exports->Base);
                 symt_new_public(module, NULL, buffer, FALSE, base + functions[i], 1);
             }
         }
diff --git a/dlls/dbghelp/source.c b/dlls/dbghelp/source.c
index a78e62a8661..380101f66be 100644
--- a/dlls/dbghelp/source.c
+++ b/dlls/dbghelp/source.c
@@ -293,7 +293,7 @@ BOOL WINAPI SymEnumSourceLines(HANDLE hProcess, ULONG64 base, PCSTR obj,
                                PSYM_ENUMLINES_CALLBACK EnumLinesCallback,
                                PVOID UserContext)
 {
-    FIXME("%p %s %s %s %u %u %p %p: stub!\n",
+    FIXME("%p %s %s %s %lu %lu %p %p: stub!\n",
           hProcess, wine_dbgstr_longlong(base), debugstr_a(obj), debugstr_a(file),
           line, flags, EnumLinesCallback, UserContext);
     SetLastError(ERROR_NOT_SUPPORTED);
@@ -309,7 +309,7 @@ BOOL WINAPI SymEnumSourceLinesW(HANDLE hProcess, ULONG64 base, PCWSTR obj,
                                 PSYM_ENUMLINES_CALLBACKW EnumLinesCallback,
                                 PVOID UserContext)
 {
-    FIXME("%p %s %s %s %u %u %p %p: stub!\n",
+    FIXME("%p %s %s %s %lu %lu %p %p: stub!\n",
           hProcess, wine_dbgstr_longlong(base), debugstr_w(obj), debugstr_w(file),
           line, flags, EnumLinesCallback, UserContext);
     SetLastError(ERROR_NOT_SUPPORTED);
diff --git a/dlls/dbghelp/stabs.c b/dlls/dbghelp/stabs.c
index 931102c4fb3..89ae0951a6a 100644
--- a/dlls/dbghelp/stabs.c
+++ b/dlls/dbghelp/stabs.c
@@ -255,7 +255,7 @@ static struct symt** stabs_find_ref(LONG_PTR filenr, LONG_PTR subnr)
 	}
         ret = &idef->vector[subnr];
     }
-    TRACE("(%ld,%ld) => %p (%p)\n", filenr, subnr, ret, *ret);
+    TRACE("(%Id,%Id) => %p (%p)\n", filenr, subnr, ret, *ret);
     return ret;
 }
 
@@ -974,7 +974,7 @@ static int stabs_pts_read_type_def(struct ParseTypedefData* ptd, const char* typ
 
     *stabs_find_ref(filenr1, subnr1) = *ret_dt = new_dt;
 
-    TRACE("Adding (%ld,%ld) %s\n", filenr1, subnr1, debugstr_a(typename));
+    TRACE("Adding (%Id,%Id) %s\n", filenr1, subnr1, debugstr_a(typename));
 
     return 0;
 }
@@ -1449,7 +1449,7 @@ BOOL stabs_parse(struct module* module, ULONG_PTR load_offset,
                 case 35:
                 case 36: loc.reg = CV_REG_MM0 + n_value - 29; break;
                 default:
-                    FIXME("Unknown register value (%lu)\n", (ULONG_PTR)n_value);
+                    FIXME("Unknown register value (%Iu)\n", (ULONG_PTR)n_value);
                     loc.reg = CV_REG_NONE;
                     break;
                 }
@@ -1609,7 +1609,7 @@ BOOL stabs_parse(struct module* module, ULONG_PTR load_offset,
 	case N_EXCL:
             if (stabs_add_include(stabs_find_include(ptr, n_value)) < 0)
             {
-                ERR("Excluded header not found (%s,%ld)\n", ptr, (ULONG_PTR)n_value);
+                ERR("Excluded header not found (%s,%Id)\n", ptr, (ULONG_PTR)n_value);
                 module_reset_debug_info(module);
                 ret = FALSE;
                 goto done;
@@ -1657,7 +1657,7 @@ BOOL stabs_parse(struct module* module, ULONG_PTR load_offset,
             break;
         }
         stabbuff[0] = '\0';
-        TRACE("0x%02x %lx %s\n",
+        TRACE("0x%02x %Ix %s\n",
               stab_ptr->n_type, (ULONG_PTR)n_value, debugstr_a(strs + stab_ptr->n_strx));
     }
     module->module.SymType = SymDia;
diff --git a/dlls/dbghelp/stack.c b/dlls/dbghelp/stack.c
index 2271612bdd1..6c4047376b7 100644
--- a/dlls/dbghelp/stack.c
+++ b/dlls/dbghelp/stack.c
@@ -147,7 +147,7 @@ BOOL WINAPI StackWalk(DWORD MachineType, HANDLE hProcess, HANDLE hThread,
     BOOL                        ret;
     struct cpu*                 cpu;
 
-    TRACE("(%d, %p, %p, %p, %p, %p, %p, %p, %p)\n",
+    TRACE("(%ld, %p, %p, %p, %p, %p, %p, %p, %p)\n",
           MachineType, hProcess, hThread, frame32, ctx,
           f_read_mem, FunctionTableAccessRoutine,
           GetModuleBaseRoutine, f_xlat_adr);
@@ -217,7 +217,7 @@ BOOL WINAPI StackWalk64(DWORD MachineType, HANDLE hProcess, HANDLE hThread,
     struct cpu_stack_walk       csw;
     struct cpu*                 cpu;
 
-    TRACE("(%d, %p, %p, %p, %p, %p, %p, %p, %p)\n",
+    TRACE("(%ld, %p, %p, %p, %p, %p, %p, %p, %p)\n",
           MachineType, hProcess, hThread, frame, ctx,
           f_read_mem, FunctionTableAccessRoutine,
           GetModuleBaseRoutine, f_xlat_adr);
@@ -276,7 +276,7 @@ BOOL WINAPI StackWalkEx(DWORD MachineType, HANDLE hProcess, HANDLE hThread,
     struct cpu*                 cpu;
     DWORD64                     addr;
 
-    TRACE("(%d, %p, %p, %p, %p, %p, %p, %p, %p, 0x%x)\n",
+    TRACE("(%ld, %p, %p, %p, %p, %p, %p, %p, %p, 0x%lx)\n",
           MachineType, hProcess, hThread, frame, ctx,
           f_read_mem, FunctionTableAccessRoutine,
           GetModuleBaseRoutine, f_xlat_adr, flags);
@@ -293,7 +293,7 @@ BOOL WINAPI StackWalkEx(DWORD MachineType, HANDLE hProcess, HANDLE hThread,
     }
     if (flags != 0)
     {
-        FIXME("Unsupported yet flags 0x%x\n", flags);
+        FIXME("Unsupported yet flags 0x%lx\n", flags);
         SetLastError(ERROR_INVALID_PARAMETER);
         return FALSE;
     }
@@ -315,7 +315,7 @@ BOOL WINAPI StackWalkEx(DWORD MachineType, HANDLE hProcess, HANDLE hThread,
         DWORD depth = symt_get_inlinesite_depth(hProcess, addr);
         if (IFC_DEPTH(frame->InlineFrameContext) + 1 < depth) /* move to next inlined function? */
         {
-            TRACE("found inline ctx: depth=%u current=%u++\n",
+            TRACE("found inline ctx: depth=%lu current=%lu++\n",
                   depth, frame->InlineFrameContext);
             frame->InlineFrameContext++; /* just increase index, FIXME detect overflow */
         }
@@ -331,7 +331,7 @@ BOOL WINAPI StackWalkEx(DWORD MachineType, HANDLE hProcess, HANDLE hThread,
         {
             addr = sw_xlat_addr(&csw, &frame->AddrPC);
             frame->InlineFrameContext = symt_get_inlinesite_depth(hProcess, addr) == 0 ? IFC_MODE_REGULAR : IFC_MODE_INLINE;
-            TRACE("setting IFC mode to %x\n", frame->InlineFrameContext);
+            TRACE("setting IFC mode to %lx\n", frame->InlineFrameContext);
         }
     }
 
diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c
index d3ba4521fa0..49172701405 100644
--- a/dlls/dbghelp/symbol.c
+++ b/dlls/dbghelp/symbol.c
@@ -258,7 +258,7 @@ struct symt_public* symt_new_public(struct module* module,
     struct symt_public* sym;
     struct symt**       p;
 
-    TRACE_(dbghelp_symt)("Adding public symbol %s:%s @%lx\n",
+    TRACE_(dbghelp_symt)("Adding public symbol %s:%s @%Ix\n",
                          debugstr_w(module->modulename), name, address);
     if ((dbghelp_options & SYMOPT_AUTO_PUBLICS) &&
         symt_find_nearest(module, address) != NULL)
@@ -291,7 +291,7 @@ struct symt_data* symt_new_global_variable(struct module* module,
     struct symt**       p;
     DWORD64             tsz;
 
-    TRACE_(dbghelp_symt)("Adding global symbol %s:%s %d@%lx %p\n",
+    TRACE_(dbghelp_symt)("Adding global symbol %s:%s %d@%Ix %p\n",
                          debugstr_w(module->modulename), name, loc.kind, loc.offset, type);
     if ((sym = pool_alloc(&module->pool, sizeof(*sym))))
     {
@@ -304,7 +304,7 @@ struct symt_data* symt_new_global_variable(struct module* module,
         if (type && size && symt_get_info(module, type, TI_GET_LENGTH, &tsz))
         {
             if (tsz != size)
-                FIXME("Size mismatch for %s.%s between type (%s) and src (%lu)\n",
+                FIXME("Size mismatch for %s.%s between type (%s) and src (%Iu)\n",
                       debugstr_w(module->modulename), name,
                       wine_dbgstr_longlong(tsz), size);
         }
@@ -345,7 +345,7 @@ struct symt_function* symt_new_function(struct module* module,
 {
     struct symt_function* sym;
 
-    TRACE_(dbghelp_symt)("Adding global function %s:%s @%lx-%lx\n",
+    TRACE_(dbghelp_symt)("Adding global function %s:%s @%Ix-%Ix\n",
                          debugstr_w(module->modulename), name, addr, addr + size - 1);
     if ((sym = pool_alloc(&module->pool, sizeof(*sym))))
     {
@@ -371,7 +371,7 @@ struct symt_inlinesite* symt_new_inlinesite(struct module* module,
 {
     struct symt_inlinesite* sym;
 
-    TRACE_(dbghelp_symt)("Adding inline site %s @%lx\n", name, addr);
+    TRACE_(dbghelp_symt)("Adding inline site %s @%Ix\n", name, addr);
     if ((sym = pool_alloc(&module->pool, sizeof(*sym))))
     {
         struct symt** p;
@@ -627,7 +627,7 @@ struct symt_thunk* symt_new_thunk(struct module* module,
 {
     struct symt_thunk*  sym;
 
-    TRACE_(dbghelp_symt)("Adding global thunk %s:%s @%lx-%lx\n",
+    TRACE_(dbghelp_symt)("Adding global thunk %s:%s @%Ix-%Ix\n",
                          debugstr_w(module->modulename), name, addr, addr + size - 1);
 
     if ((sym = pool_alloc(&module->pool, sizeof(*sym))))
@@ -889,7 +889,7 @@ static void symt_fill_sym_info(struct module_pair* pair,
     else
         symbol_setname(sym_info, name);
 
-    TRACE_(dbghelp_symt)("%p => %s %u %s\n",
+    TRACE_(dbghelp_symt)("%p => %s %lu %s\n",
                          sym, sym_info->Name, sym_info->Size,
                          wine_dbgstr_longlong(sym_info->Address));
 }
@@ -2186,7 +2186,7 @@ BOOL WINAPI SymUnDName64(PIMAGEHLP_SYMBOL64 sym, PSTR UnDecName, DWORD UnDecName
 DWORD WINAPI UnDecorateSymbolName(const char *decorated_name, char *undecorated_name,
                                   DWORD undecorated_length, DWORD flags)
 {
-    TRACE("(%s, %p, %d, 0x%08x)\n",
+    TRACE("(%s, %p, %ld, 0x%08lx)\n",
           debugstr_a(decorated_name), undecorated_name, undecorated_length, flags);
 
     if (!undecorated_name || !undecorated_length)
@@ -2205,7 +2205,7 @@ DWORD WINAPI UnDecorateSymbolNameW(const WCHAR *decorated_name, WCHAR *undecorat
     char *buf, *ptr;
     int len, ret = 0;
 
-    TRACE("(%s, %p, %d, 0x%08x)\n",
+    TRACE("(%s, %p, %ld, 0x%08lx)\n",
           debugstr_w(decorated_name), undecorated_name, undecorated_length, flags);
 
     if (!undecorated_name || !undecorated_length)
@@ -2410,7 +2410,7 @@ static inline BOOL doSymSearch(HANDLE hProcess, ULONG64 BaseOfDll, DWORD Index,
 
     if (Options != SYMSEARCH_GLOBALSONLY)
     {
-        FIXME("Unsupported searching with options (%x)\n", Options);
+        FIXME("Unsupported searching with options (%lx)\n", Options);
         SetLastError(ERROR_INVALID_PARAMETER);
         return FALSE;
     }
@@ -2436,7 +2436,7 @@ BOOL WINAPI SymSearch(HANDLE hProcess, ULONG64 BaseOfDll, DWORD Index,
     LPWSTR      maskW = NULL;
     BOOLEAN     ret;
 
-    TRACE("(%p %s %u %u %s %s %p %p %x)\n",
+    TRACE("(%p %s %lu %lu %s %s %p %p %lx)\n",
           hProcess, wine_dbgstr_longlong(BaseOfDll), Index, SymTag, Mask,
           wine_dbgstr_longlong(Address), EnumSymbolsCallback,
           UserContext, Options);
@@ -2465,7 +2465,7 @@ BOOL WINAPI SymSearchW(HANDLE hProcess, ULONG64 BaseOfDll, DWORD Index,
 {
     struct sym_enumW    sew;
 
-    TRACE("(%p %s %u %u %s %s %p %p %x)\n",
+    TRACE("(%p %s %lu %lu %s %s %p %p %lx)\n",
           hProcess, wine_dbgstr_longlong(BaseOfDll), Index, SymTag, debugstr_w(Mask),
           wine_dbgstr_longlong(Address), EnumSymbolsCallback,
           UserContext, Options);
@@ -2487,7 +2487,7 @@ BOOL WINAPI SymAddSymbol(HANDLE hProcess, ULONG64 BaseOfDll, PCSTR name,
 {
     struct module_pair  pair;
 
-    TRACE("(%p %s %s %u)\n", hProcess, wine_dbgstr_a(name), wine_dbgstr_longlong(addr), size);
+    TRACE("(%p %s %s %lu)\n", hProcess, wine_dbgstr_a(name), wine_dbgstr_longlong(addr), size);
 
     if (!module_init_pair(&pair, hProcess, BaseOfDll)) return FALSE;
 
@@ -2503,7 +2503,7 @@ BOOL WINAPI SymAddSymbolW(HANDLE hProcess, ULONG64 BaseOfDll, PCWSTR nameW,
 {
     char       name[MAX_SYM_NAME];
 
-    TRACE("(%p %s %s %u)\n", hProcess, wine_dbgstr_w(nameW), wine_dbgstr_longlong(addr), size);
+    TRACE("(%p %s %s %lu)\n", hProcess, wine_dbgstr_w(nameW), wine_dbgstr_longlong(addr), size);
 
     WideCharToMultiByte(CP_ACP, 0, nameW, -1, name, ARRAY_SIZE(name), NULL, NULL);
 
@@ -2583,7 +2583,7 @@ BOOL WINAPI SymEnumLines(HANDLE hProcess, ULONG64 base, PCSTR compiland,
 BOOL WINAPI SymGetLineFromName(HANDLE hProcess, PCSTR ModuleName, PCSTR FileName,
                 DWORD dwLineNumber, PLONG plDisplacement, PIMAGEHLP_LINE Line)
 {
-    FIXME("(%p) (%s, %s, %d %p %p): stub\n", hProcess, ModuleName, FileName,
+    FIXME("(%p) (%s, %s, %ld %p %p): stub\n", hProcess, ModuleName, FileName,
                 dwLineNumber, plDisplacement, Line);
     return FALSE;
 }
@@ -2591,7 +2591,7 @@ BOOL WINAPI SymGetLineFromName(HANDLE hProcess, PCSTR ModuleName, PCSTR FileName
 BOOL WINAPI SymGetLineFromName64(HANDLE hProcess, PCSTR ModuleName, PCSTR FileName,
                 DWORD dwLineNumber, PLONG lpDisplacement, PIMAGEHLP_LINE64 Line)
 {
-    FIXME("(%p) (%s, %s, %d %p %p): stub\n", hProcess, ModuleName, FileName,
+    FIXME("(%p) (%s, %s, %ld %p %p): stub\n", hProcess, ModuleName, FileName,
                 dwLineNumber, lpDisplacement, Line);
     return FALSE;
 }
@@ -2599,7 +2599,7 @@ BOOL WINAPI SymGetLineFromName64(HANDLE hProcess, PCSTR ModuleName, PCSTR FileNa
 BOOL WINAPI SymGetLineFromNameW64(HANDLE hProcess, PCWSTR ModuleName, PCWSTR FileName,
                 DWORD dwLineNumber, PLONG plDisplacement, PIMAGEHLP_LINEW64 Line)
 {
-    FIXME("(%p) (%s, %s, %d %p %p): stub\n", hProcess, debugstr_w(ModuleName), debugstr_w(FileName),
+    FIXME("(%p) (%s, %s, %ld %p %p): stub\n", hProcess, debugstr_w(ModuleName), debugstr_w(FileName),
                 dwLineNumber, plDisplacement, Line);
     return FALSE;
 }
@@ -2610,7 +2610,7 @@ BOOL WINAPI SymGetLineFromNameW64(HANDLE hProcess, PCWSTR ModuleName, PCWSTR Fil
  */
 BOOL WINAPI SymFromIndex(HANDLE hProcess, ULONG64 BaseOfDll, DWORD index, PSYMBOL_INFO symbol)
 {
-    FIXME("hProcess = %p, BaseOfDll = %s, index = %d, symbol = %p\n",
+    FIXME("hProcess = %p, BaseOfDll = %s, index = %ld, symbol = %p\n",
           hProcess, wine_dbgstr_longlong(BaseOfDll), index, symbol);
 
     return FALSE;
@@ -2622,7 +2622,7 @@ BOOL WINAPI SymFromIndex(HANDLE hProcess, ULONG64 BaseOfDll, DWORD index, PSYMBO
  */
 BOOL WINAPI SymFromIndexW(HANDLE hProcess, ULONG64 BaseOfDll, DWORD index, PSYMBOL_INFOW symbol)
 {
-    FIXME("hProcess = %p, BaseOfDll = %s, index = %d, symbol = %p\n",
+    FIXME("hProcess = %p, BaseOfDll = %s, index = %ld, symbol = %p\n",
           hProcess, wine_dbgstr_longlong(BaseOfDll), index, symbol);
 
     return FALSE;
@@ -2659,7 +2659,7 @@ BOOL WINAPI SymFromInlineContext(HANDLE hProcess, DWORD64 addr, ULONG inline_ctx
     struct module_pair pair;
     struct symt_inlinesite* inlined;
 
-    TRACE("(%p, %#I64x, 0x%x, %p, %p)\n", hProcess, addr, inline_ctx, disp, si);
+    TRACE("(%p, %#I64x, 0x%lx, %p, %p)\n", hProcess, addr, inline_ctx, disp, si);
 
     switch (IFC_MODE(inline_ctx))
     {
@@ -2692,7 +2692,7 @@ BOOL WINAPI SymFromInlineContextW(HANDLE hProcess, DWORD64 addr, ULONG inline_ct
     unsigned            len;
     BOOL                ret;
 
-    TRACE("(%p, %#I64x, 0x%x, %p, %p)\n", hProcess, addr, inline_ctx, disp, siW);
+    TRACE("(%p, %#I64x, 0x%lx, %p, %p)\n", hProcess, addr, inline_ctx, disp, siW);
 
     len = sizeof(*si) + siW->MaxNameLen * sizeof(WCHAR);
     si = HeapAlloc(GetProcessHeap(), 0, len);
@@ -2739,7 +2739,7 @@ BOOL WINAPI SymGetLineFromInlineContext(HANDLE hProcess, DWORD64 addr, ULONG inl
 {
     struct internal_line_t intl;
 
-    TRACE("(%p, %#I64x, 0x%x, %#I64x, %p, %p)\n",
+    TRACE("(%p, %#I64x, 0x%lx, %#I64x, %p, %p)\n",
           hProcess, addr, inline_ctx, mod_addr, disp, line);
 
     if (line->SizeOfStruct < sizeof(*line)) return FALSE;
@@ -2757,7 +2757,7 @@ BOOL WINAPI SymGetLineFromInlineContextW(HANDLE hProcess, DWORD64 addr, ULONG in
 {
     struct internal_line_t intl;
 
-    TRACE("(%p, %#I64x, 0x%x, %#I64x, %p, %p)\n",
+    TRACE("(%p, %#I64x, 0x%lx, %#I64x, %p, %p)\n",
           hProcess, addr, inline_ctx, mod_addr, disp, line);
 
     if (line->SizeOfStruct < sizeof(*line)) return FALSE;




More information about the wine-devel mailing list