public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Kim Kuparinen <kimi.h.kuparinen@gmail.com>
To: gdb@sourceware.org
Subject: skip -rfu, have to escape backlashes even inside quotes
Date: Tue, 12 Jan 2021 13:45:09 +0200	[thread overview]
Message-ID: <CABD-7MwAy-q_3QagCE=DD-11D+T6tbHnPVjXO0oBaSn28Yo6og@mail.gmail.com> (raw)

Hi, first time using a mailing list, sorry if I mess something up.

I noticed that when trying to use skip -rfu REGEX, I had to escape
backslashes even if I quoted the regex. So

skip -rfu '\('

errors out with

regexp: umatched ( or \(

I dug around a bit and found out that the issue seems to be in
libiberty/argv.c, in the function buildargv(). The function seems to always
strip backslashes, because in the if/else if/else chain, the backslash
character is checked(and as such, removed) before squote or dquote. I got
gdb to do what I wanted to by moving the check for a backslash behind the
checks for squote and dquote.

That being said, is this intended behaviour? Seems sort of counter
intuitive.

                 reply	other threads:[~2021-01-12 11:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='CABD-7MwAy-q_3QagCE=DD-11D+T6tbHnPVjXO0oBaSn28Yo6og@mail.gmail.com' \
    --to=kimi.h.kuparinen@gmail.com \
    --cc=gdb@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).