From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH 3/7] common/vsprintf: Add %ps and %pS format specifier support Date: Tue, 5 Nov 2013 10:43:48 +0000 Message-ID: <5278CBE4.7010605@citrix.com> References: <1383600624-6345-1-git-send-email-andrew.cooper3@citrix.com> <1383600624-6345-4-git-send-email-andrew.cooper3@citrix.com> <1383647992.13961.42.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1383647992.13961.42.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Keir Fraser , Jan Beulich , Xen-devel List-Id: xen-devel@lists.xenproject.org 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? ok > >> + 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. ~Andrew