[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] libelf: fix printing of pointers



Printing them as decimal number, the more with 0x prefix, is confusing
and presumably relatively useless to most of us.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/include/xen/libelf.h
+++ b/xen/include/xen/libelf.h
@@ -82,13 +82,13 @@ typedef uintptr_t elf_ptrval;
   /* Provides a type declaration for a HANDLE. */
 
 #ifdef __XEN__
-# define ELF_PRPTRVAL "lu"
+# define ELF_PRPTRVAL "lx"
   /*
-   * PRIuPTR is misdefined in xen/include/xen/inttypes.h, on 32-bit,
-   * to "u", when in fact uintptr_t is an unsigned long.
+   * PRIxPTR is misdefined in xen/include/xen/inttypes.h, on 32-bit,
+   * to "x", when in fact uintptr_t is an unsigned long.
    */
 #else
-# define ELF_PRPTRVAL PRIuPTR
+# define ELF_PRPTRVAL PRIxPTR
 #endif
   /* printf format a la PRId... for a PTRVAL */
 



Attachment: libelf-pointer-printing.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.