public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Ruslan Kabatsayev <b7.10110111@gmail.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Make tests expect [ \t]+ pattern instead of \t for "info reg" command
Date: Thu, 18 Jan 2018 15:42:00 -0000	[thread overview]
Message-ID: <CAHEcG96cc8-QRStEyuUYJ3QByAZLue8aypAM+kJKKV07nbff8A@mail.gmail.com> (raw)
In-Reply-To: <863733fb5p.fsf@gmail.com>

On 18 January 2018 at 18:18, Yao Qi <qiyaoltc@gmail.com> wrote:
> Ruslan Kabatsayev <b7.10110111@gmail.com> writes:
>
>> This will allow to format output of "info reg" command as we wish,
>
> What output format do you wish?
>
>> without breaking the tests. In particular, it'll let us correctly align
>> raw and natural values of the registers using spaces instead of current
>> badly-working approach with tabs.
>
> Why alignment with tabs is "badly-working"?  Do you have some other
> patches to change the output of "info reg"?

For your questions of "what format" and "why current is bad" please
see my previously sent (but not applied) patch:
https://sourceware.org/ml/gdb-patches/2017-07/msg00046.html
(and its follow-up version 2:
https://sourceware.org/ml/gdb-patches/2017-07/msg00406.html ).
In short, "info reg" prints three columns, and the third one is
aligned by a single tab. This works well only in two cases: all
registers have short hex values (i.e. less than 8 chars wide), or all
have long values. Then the tab shifts the third column of values to
the same terminal character column.
Initially (in the patch linked above) I wanted to preserve the tab and
only pad it with subsequent spaces to a fixed column, thus avoiding
breaking the tests, but after the discussion I understood that it's
too hacky to be a solution, and it's better to fix the tests and then
use space-only alignment, similarly to what is done with the second
column.

As for "some other patches", I don't have any particular change in
mind currently.

>
> --
> Yao (齐尧)

  reply	other threads:[~2018-01-18 15:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-07 22:19 Ruslan Kabatsayev
2018-01-08  4:25 ` Joel Brobecker
2018-01-08  6:42   ` Ruslan Kabatsayev
2018-01-08  7:33     ` Joel Brobecker
2018-01-18 15:18 ` Yao Qi
2018-01-18 15:42   ` Ruslan Kabatsayev [this message]
2018-01-18 21:12     ` Yao Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHEcG96cc8-QRStEyuUYJ3QByAZLue8aypAM+kJKKV07nbff8A@mail.gmail.com \
    --to=b7.10110111@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=qiyaoltc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).