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

Re: [Xen-devel] [PATCH v2 03/12] xenctx: Output ascii version of stack also.



On Thu, 2013-11-07 at 08:09 +0000, Jan Beulich wrote:
> >>> On 06.11.13 at 21:08, Don Slutz <dslutz@xxxxxxxxxxx> wrote:
> 
> Why? I personally don't see a need - there's rarely much useful
> ASCII data on the stack.

This is true IME

> So afaic: If at all, then only via command
> line option defaulting to off.

Well, assuming it doesn't make the output >80 columns (which I can't
tell from here) it seems harmless enough?

>        ");
> > +        for (k = 0; k < j; k++) {
> > +            int l;
> > +
> > +            bytep = (unsigned char*)&ascii[k];
> > +            for (l = 0; l < width; l++) {
> > +                if ((*bytep < 127) && (*bytep >= 32))

is there not a ctype.h function which deals with this? isprint seems
like a good candidate...

> > +                    printf("%c", *bytep);
> > +                else
> > +                    printf(".");
> > +                bytep++;
> > +            }
> > +        }
> >          printf("\n");
> >      }
> >      printf("\n");
> > -- 
> > 1.7.1
> 
> 
> 



_______________________________________________
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®.