Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Ruslan Kabatsayev <b7.10110111@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Make tests expect [ \t]+ pattern instead of \t for "info reg" command
Date: Mon, 08 Jan 2018 07:33:00 -0000	[thread overview]
Message-ID: <20180108073344.epy4aqmylu2f5ck7@adacore.com> (raw)
In-Reply-To: <CAHEcG96snuVzqnb5jpZXCDn6x=t_ek+9SnLK=5g-A1_qfOMgPA@mail.gmail.com>

> >> gdb/testsuite/ChangeLog:
> >>
> >>       * gdb.arch/powerpc-d128-regs.exp: Replace expected "\[\t\]*" from
> >>       "info reg" with "\[ \t\]*".
> >>       * gdb.arch/altivec-regs.exp: Replace expected "\t" from "info reg" with
> >>       "\[ \t\]+".
> >>       * gdb.arch/s390-multiarch.exp: Ditto.
> >>       * gdb.base/pc-fp.exp: Ditto.
> >>       * gdb.reverse/i386-precsave.exp: Ditto.
> >>       * gdb.reverse/i386-reverse.exp: Ditto.
> >>       * gdb.reverse/i387-env-reverse.exp: Ditto.
> >>       * gdb.reverse/i387-stack-reverse.exp: Ditto.
> >
> > No objection on my end. I might have used \\s instead of \[ \t\],
> > but perhaps there was a reason not to; and even if not, no point
> > in redoing it all now.
> 
> \\s would also allow newlines, form feeds etc., which doesn't look
> like a good idea here.

Hmmm, true. Forgot about newlines in particular.

> >> -    "pc +${valueof_pc}\t${valueof_pc} <.*>\[\r\n\]+fp +${valueof_fp}\t${valueof_fp}\[\r\n\]+"
> >> +    "pc +${valueof_pc}\[ \t\]+${valueof_pc} <.*>\[\r\n\]+fp +${valueof_fp}\[ \t\]+${valueof_fp}\[\r\n\]+"
> >
> > This change looks like it's doing more than just allowing spaces
> > on top of tabs...
> 
> Well it allows _multiple_ spaces/tabs instead of exactly one tab —
> exactly what we need to be compatible with space-alignment. In other
> respects I don't see what else it does.

My mistake. I was seeing 2 new lines, because one of the '+' lined up
exactly at the start of the next line when wraparound gets involved.
Upon re-examination, the change looks fine indeed.

-- 
Joel


  reply	other threads:[~2018-01-08  7:33 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 [this message]
2018-01-18 15:18 ` Yao Qi
2018-01-18 15:42   ` Ruslan Kabatsayev
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=20180108073344.epy4aqmylu2f5ck7@adacore.com \
    --to=brobecker@adacore.com \
    --cc=b7.10110111@gmail.com \
    --cc=gdb-patches@sourceware.org \
    /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