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

Re: [Xen-devel] [PATCH 3/7] common/vsprintf: Add %ps and %pS format specifier support

On 05/11/13 10:39, Ian Campbell wrote:
> On Mon, 2013-11-04 at 21:30 +0000, Andrew Cooper wrote:
>> +All parameters to a %p option should be enclosed with the _p() macro
> For numerical arguments, sure. Why for things that are already pointers?

GCC seemed funny about implicitly casting pointers to void* as far as
formatting went.  I will verify what the behaviour is on something modern.

>> +Symbol/Function pointers:
>> +
>> +       %ps     Symbol name only
>> +       %pS     Symbol name + offset / function length
> Perhaps give examples?


>> +       In the case that an appropriate symbol name can't be found, %p[sS] 
>> will
>> +       fall back to '%p' and print the address in hex.
> In the common case the hex value will already be printed previously, but
> I suppose this is harmless.
> Ian.

print_symbol() would result in "???" if it failed to get a name.  Now,
we fall through to printing the hex address instead.


Xen-devel mailing list



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