diff options
author | José Fonseca <[email protected]> | 2009-12-05 05:43:53 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2009-12-05 05:43:53 +0000 |
commit | 501989bbcd159f8b44148a22151bb46c4800d298 (patch) | |
tree | dfa2886a6b2304bc3238bc7ac163c93e0949ceec /src/gallium | |
parent | dd51b4f9091abf762e470f0cd4c802215a108290 (diff) |
llvmpipe: Tweak disassembly to match gdb.
Helps verifying udis86 output.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_bld_debug.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_debug.c b/src/gallium/drivers/llvmpipe/lp_bld_debug.c index 354b3af49e1..39dfc51e503 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_debug.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_debug.c @@ -77,10 +77,10 @@ lp_disassemble(const void* func) while (ud_disassemble(&ud_obj)) { #ifdef PIPE_ARCH_X86 - debug_printf("%08lx: ", (unsigned long)ud_insn_off(&ud_obj)); + debug_printf("0x%08lx:\t", (unsigned long)ud_insn_off(&ud_obj)); #endif #ifdef PIPE_ARCH_X86_64 - debug_printf("%016llx: ", (unsigned long long)ud_insn_off(&ud_obj)); + debug_printf("0x%016llx:\t", (unsigned long long)ud_insn_off(&ud_obj)); #endif #if 0 @@ -119,6 +119,12 @@ lp_disassemble(const void* func) ud_obj.mnemonic == UD_Iinvalid) break; } + +#if 0 + /* Print GDB command, useful to verify udis86 output */ + debug_printf("disassemble %p %p\n", func, (void*)(uintptr_t)ud_obj.pc); +#endif + debug_printf("\n"); #else (void)func; |