From: Ian Campbell Subject: Re: [PATCH] xenctx: Add an option to output more registers. Date: Fri, 18 Oct 2013 10:23:31 +0100 Message-ID: <1382088211.18128.96.camel@kazak.uk.xensource.com> References: <1382035281-12912-1-git-send-email-dslutz@terremark.com> <526106A502000078000FBFDB@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VX6HR-0004zQ-43 for xen-devel@lists.xenproject.org; Fri, 18 Oct 2013 09:23:37 +0000 In-Reply-To: <526106A502000078000FBFDB@nat28.tlf.novell.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: Jan Beulich Cc: Stefano Stabellini , George Dunlap , Don Slutz , Ian Jackson , Don Slutz , xen-devel List-Id: xen-devel@lists.xenproject.org On Fri, 2013-10-18 at 09:00 +0100, Jan Beulich wrote: > It remains entirely unclear what distinguishes the return values > 1 and 2. This needs not just an explanation in the commit message, > but rather a code comment... > > > @@ -143,11 +152,11 @@ static struct symbol *lookup_symbol(guest_word_t address) > > return s->next && s->next->address <= address ? s->next : s; > > } > > > > -static void print_symbol(guest_word_t addr) > > +static void print_symbol(guest_word_t addr, int type) > > { > > struct symbol *s; > > > > - if (!is_kernel_text(addr)) > > + if (is_kernel_text(addr) < type) > > ... or, with this usage model, perhaps the return value should > rather be a self describing enum. I think this would be preferable to a comment. Also is_kernel_addr likely needs to become type_of_addr or something of that nature since it is no longer returning a true/false result. Ian.