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

Re: [Xen-devel] [PATCH] xenctx: Add an option to output more registers.



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.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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