public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug cli/27175] New: Incorrect skip command example presented in the manual
@ 2021-01-12 18:01 kimi.h.kuparinen at gmail dot com
  0 siblings, 0 replies; only message in thread
From: kimi.h.kuparinen at gmail dot com @ 2021-01-12 18:01 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=27175

            Bug ID: 27175
           Summary: Incorrect skip command example presented in the manual
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: cli
          Assignee: unassigned at sourceware dot org
          Reporter: kimi.h.kuparinen at gmail dot com
  Target Milestone: ---

Trying to run examples in the manual such as:

skip -rfu ^std::(allocator|basic_string)<.*>::~?\1 *\(

from chapter 5.3 errors out with `Invalid argument: *(`, and trying to quote
the regex:

skip -rfu 'std::(allocator|basic_string)<.*>::~?\1 *\('

errors out with `regexp: Unmatched ( or \(`. To get an a working regex
expression you have to escape the backslashes inside the quotes:

skip -rfu 'std::(allocator|basic_string)<.*>::~?\\1 *\\('

As far as I can tell, all commands that utilise gdb_argv for parsing commands
suffer from the same issue, because buildargv() in libiberty/argv.c escapes all
backslashes it finds, quoted or not.

Preferably the user shouldn't have to escape backslashes inside a quoted
expression, but it should at least be mentioned in the manual.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

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

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12 18:01 [Bug cli/27175] New: Incorrect skip command example presented in the manual kimi.h.kuparinen at gmail dot com

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