Re: [PATCH 2/2] gdb: Allow parenthesis to group arguments to user-defined commands

Tom Tromey
2018-08-30T02:19:37Z

>>>>> "Andrew" == Andrew Burgess <andrew.burgess@embecosm.com> writes:

Andrew> In general I'm happy to rework this part of GDB, but ideally I'd like
Andrew> some feedback from a global maintainer that such a change, which might
Andrew> would break backward compatibility, would be acceptable...

My philosophy has generally been to avoid incompatibility when possible
and when there seems to be some likelihood that the behavior is actually
used.

So, for example, I felt ok changing the parsing of "bt" arguments,
because I felt the implementation was simply buggy and that nobody would
be using its weird corner cases.

On the other hand, back in the day I changed the parsing of
"disassemble" and heard complaints for quite some time. I guess this
informed my view.

Sometimes this leads to bad results, like how users should nearly always
use "watch -location", but it isn't the default.

This is why I think the paren grouping idea is fine: the examples I can
think of all seem useless.

That said, upthread you mentioned the idea of passing a flag to "define"
to change how arguments are parsed. I would be ok with this as well.
However I think that in this case it would be good to work out the
details beforehand, including looking through bugzilla to see if there
are other unmet needs.

Tom