| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 05/17] xenctx: Add command line option -D (--decode-as-ascii)
 On Thu, 2014-03-20 at 15:06 -0400, Don Slutz wrote:
> If specified, output ascii version of stack also.
I suppose this is optional because the result is >100 chars wide?
Otherwise making it unconditional would be a nobrainer.
>                  printf(" ");
>                  print_stack_word(word, width);
>                  stack += width;
>              }
> +            if ( xenctx.decode_as_ascii )
> +            {
> +                /*
> +                 * Line up ascii output if less than bytes_per_line
> +                 * were printed.
> +                 */
> +                for (k = j; k < xenctx.bytes_per_line / width; k++)
> +                    printf(" %*s", width * 2, "");
Avoid the loop by using width*2*((xenctx.bytes_per_line / width)-j) ?
(or whatever the sums are)
At some point in the future perhaps 
https://plus.google.com/111319147897550904359/posts/cZ6QVUAMAhT
will be widespread enoguh that we can all stop with this sort of
thing...
Ian
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
 
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |