skip -rfu, have to escape backlashes even inside quotes

Kim Kuparinen kimi.h.kuparinen@gmail.com
Tue Jan 12 11:45:09 GMT 2021


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.


More information about the Gdb mailing list