[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 03/21/14 10:38, Ian Campbell wrote:
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.

No not 100, but it does exceed 80 and from a previous email:

-------- Original Message --------
Subject:        Re: [PATCH v2 03/12] xenctx: Output ascii version of stack also.
Date:   Thu, 7 Nov 2013 12:43:14 +0000
From:   Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Organization:   Citrix Systems, Inc.
To:     Jan Beulich <JBeulich@xxxxxxxx>
CC: Don Slutz <dslutz@xxxxxxxxxxx>, Don Slutz <Don@xxxxxxxxxxxxxxx>, "George Dunlap" <george.dunlap@xxxxxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>

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?


                  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)

I could, but you also need to include the test some how (and as an "if"
is almost the same).  And for code that is only ever run a few times in
a developer tool, I do not see that the speed or output "breakage" make
a big difference.  But if you really want this...

At some point in the future perhaps
will be widespread enoguh that we can all stop with this sort of

Well, I wish them good luck.  Getting the right terminal width to happen
100% of the time when going through many remote hops, just does not
happen to me. (local stuff is just so much simpler.)

Also getting a table to look right with variable spacing and variable sized
"characters" is very hard.  Last I knew the technical writers
still are hand adjusting things even now.

   -Don Slutz


Xen-devel mailing list



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