Re: [PATCH 13/24] Make "print" and "compile print" support -OPT options

Andreas Schwab
2019-05-25T10:37:04Z

On Mai 25 2019, Pedro Alves <palves@redhat.com> wrote:

> BTW, one command that currently accepts "-" options _and_ works with
> arbitrary expressions is the watch command:
>
> (gdb) help watch
> Set a watchpoint for an expression.
> Usage: watch [-l|-location] EXPRESSION
>
> Note how it's impossible to watch an expression named "-l".
> We could solve that by supporting "--" in the watch command, so
> you'd type:
>
> (gdb) watch -- -l

Or watch (-l)

Andreas.

--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."