|
From: Nicholas N. <nj...@cs...> - 2007-10-05 01:14:35
|
On Thu, 4 Oct 2007, Dirk Mueller wrote:
> On Wednesday, 3. October 2007, Julian Seward wrote:
>
>> Addr/Word/UWord args with %p formats, either by casting the arg to void*
>> or changing the format to 0x%lx.
>
> I'm currently unable to decide which route to take. We can represent Addr in
> two ways:
>
> VG_(printf)("%#lx", ..)
>
> or
> VG_(printf)("%p", (void*)..)
>
> I would prefer the first, given that it is shorter. Any comments? I'll make
> sure that I change it consistently (in a new branch, like requested).
I prefer the second, because I find it easier to remember. Also, AFAICT
Valgrind's 'printf' doesn't handle '#'.
Nick
|