From: "Jan Beulich" Subject: Re: [PATCH] common/symbols: Drop '+0/' when printing function pointer symbols. Date: Fri, 04 Oct 2013 11:15:11 +0100 Message-ID: <524EB14F02000078000F8D18@nat28.tlf.novell.com> References: <1380880953-20453-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VS2Pi-0001tG-Ro for xen-devel@lists.xenproject.org; Fri, 04 Oct 2013 10:15:14 +0000 In-Reply-To: <1380880953-20453-1-git-send-email-andrew.cooper3@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: xen-devel , Keir Fraser List-Id: xen-devel@lists.xenproject.org >>> On 04.10.13 at 12:02, Andrew Cooper wrote: > Introduce print_function() with the same semantics as print_symbol(). The > underlying __print_symbol() now takes an extra boolean indicating whether we > are expecting to print a function pointer. In the case that we are > expecting > a function pointer, and the offset is 0, drop the offset and length. > > The requirement for offset being 0 is for the (hopefully never, but we > really > want to know if it does happen) case where a Xen function pointer is not > actually pointing at the start of a function. > > The relevent print_symbol() functions are updated to print_function() There's no reason why the same couldn't apply to data symbols. Rather than doing it this way (and with a mis-named function), I'd much prefer going the printk() format string extensions route that Linux went. This would at once allow re-combining the broken up printing when symbols are involved into single invocations of printk(). This has been on my (mental) to-do list for quite some time, but hasn't been important enough for me to ever get to it. Jan