This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2] gdb: Allow parenthesis to group arguments to user-defined commands
* Tom Tromey <tom@tromey.com> [2018-08-28 09:53:52 -0600]:
> >>>>> "Andrew" == Andrew Burgess <andrew.burgess@embecosm.com> writes:
>
> Andrew> So, my suggestion deliberately avoids using quotes or backslashes as
> Andrew> these are bogged down in the existing code. And using (...) is fairly
> Andrew> intuitive given GDBs C like expression handling, personally I'd rather
> Andrew> write:
> Andrew> my_command ({unsigned long long} &global_var)
> Andrew> than:
> Andrew> my_command {unsigned\ long\ long}\ &global_var
>
> FWIW I tend to agree with your logic here.
>
> User-defined argument parsing is broken (and I think there's at least
> one bug in bugzilla about this), but at the same time, making breaking
> changes seems unfriendly. Your approach doesn't seem to be breaking
> anything that is likely to be actually used.
Given that the argument passing for user-defined functions is pretty
self contained we could, conceivably, implement a whole new system and
have a switch to select between them... the existing code does seem
rather odd.
But ideally, I'd like that to be a project for another day.
Thanks,
Andrew