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 <danylo.piliaiev@globallogic.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4331>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4331>
This commit is contained in:
Danylo Piliaiev 2020-03-26 14:07:46 +02:00 committed by Marge Bot
parent 7b9f1b6ef7
commit 2d0599b1b4
1 changed files with 7 additions and 7 deletions

View File

@ -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();