From: Danylo Piliaiev Date: Thu, 26 Mar 2020 12:07:46 +0000 (+0200) Subject: intel/aub_viewer: Fix format specifier for uint64_t X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2d0599b1b46968dda34953118e92d8720875162c;p=mesa.git intel/aub_viewer: Fix format specifier for uint64_t Use PRIx64 instead of lx for uint64_t Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2692 Signed-off-by: Danylo Piliaiev Reviewed-by: Sagar Ghuge Tested-by: Marge Bot Part-of: --- diff --git a/src/intel/tools/aubinator_viewer.cpp b/src/intel/tools/aubinator_viewer.cpp index d3ed1948c9e..140cde5bbbc 100644 --- a/src/intel/tools/aubinator_viewer.cpp +++ b/src/intel/tools/aubinator_viewer.cpp @@ -380,7 +380,7 @@ new_shader_window(struct aub_mem *mem, uint64_t address, const char *desc) struct shader_window *window = xtzalloc(*window); snprintf(window->base.name, sizeof(window->base.name), - "%s (0x%lx)##%p", desc, address, window); + "%s (0x%" PRIx64 ")##%p", desc, address, window); list_inithead(&window->base.parent_link); window->base.position = ImVec2(-1, -1); @@ -443,7 +443,7 @@ new_urb_window(struct aub_viewer_decode_ctx *decode_ctx, uint64_t address) struct urb_window *window = xtzalloc(*window); snprintf(window->base.name, sizeof(window->base.name), - "URB view (0x%lx)##%p", address, window); + "URB view (0x%" PRIx64 ")##%p", address, window); list_inithead(&window->base.parent_link); window->base.position = ImVec2(-1, -1); @@ -495,7 +495,7 @@ display_edit_window(struct window *win) window->address); ImGui::EndChild(); } else { - ImGui::Text("Memory view at 0x%lx not available", window->address); + ImGui::Text("Memory view at 0x%" PRIx64 " not available", window->address); } } @@ -515,7 +515,7 @@ new_edit_window(struct aub_mem *mem, uint64_t address, uint32_t len) struct edit_window *window = xtzalloc(*window); snprintf(window->base.name, sizeof(window->base.name), - "Editing aub at 0x%lx##%p", address, window); + "Editing aub at 0x%" PRIx64 "##%p", address, window); list_inithead(&window->base.parent_link); window->base.position = ImVec2(-1, -1); @@ -577,7 +577,7 @@ display_pml4_level(struct aub_mem *mem, uint64_t table_addr, uint64_t table_virt uint64_t entry_virt_addr = table_virt_addr + e * addr_increment; if (!available) continue; - ImGui::Text("Entry%03i - phys_addr=0x%lx - virt_addr=0x%lx", + ImGui::Text("Entry%03i - phys_addr=0x%" PRIx64 " - virt_addr=0x%" PRIx64, e, table[e], entry_virt_addr); } } else { @@ -587,7 +587,7 @@ display_pml4_level(struct aub_mem *mem, uint64_t table_addr, uint64_t table_virt if (available && ImGui::TreeNodeEx(&table[e], available ? ImGuiTreeNodeFlags_Framed : 0, - "Entry%03i - phys_addr=0x%lx - virt_addr=0x%lx", + "Entry%03i - phys_addr=0x%" PRIx64 " - virt_addr=0x%" PRIx64, e, table[e], entry_virt_addr)) { display_pml4_level(mem, table[e] & ~0xffful, entry_virt_addr, level -1); ImGui::TreePop(); @@ -601,7 +601,7 @@ display_pml4_window(struct window *win) { struct pml4_window *window = (struct pml4_window *) win; - ImGui::Text("pml4: %lx", window->mem->pml4); + ImGui::Text("pml4: %" PRIx64, window->mem->pml4); ImGui::BeginChild(ImGui::GetID("##block")); display_pml4_level(window->mem, window->mem->pml4, 0, 4); ImGui::EndChild();