public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* skip -rfu, have to escape backlashes even inside quotes
@ 2021-01-12 11:45 Kim Kuparinen
  0 siblings, 0 replies; only message in thread
From: Kim Kuparinen @ 2021-01-12 11:45 UTC (permalink / raw)
  To: gdb

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-12 11:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12 11:45 skip -rfu, have to escape backlashes even inside quotes Kim Kuparinen

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).