Re: [PATCHv3 1/7] gdb: split apart two different types of filename completion

Andrew Burgess
2024-06-17T13:06:02Z

Tom Tromey <tom@tromey.com> writes:

>>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
>
> Andrew> Unfortunately we have two different types of filename completion in
> Andrew> GDB.
>
> I am coming into this thread pretty late, so sorry if this has already
> been discussed -- but did you consider changing gdb to have a single way
> to pass a filename to a command?
>
> It seems to me that a change like this in a major release would be fine.
> And, it would only really affect the minority of users who use weird
> filenames.
>
> I suspect the current unquoted filename cases can't really handle
> everything correctly. For instance, IIRC the gdb command processor
> removes trailing whitespace -- so files like that are impossible to give
> to some commands.

Yes. My plan would be to merge this patch which means that commands
that accept quoted filenames will correctly complete quoted filenames,
and commands that don't accept quoted filenames will continue to offer
completion, but with some improvements though still not perfect.

With that done I can then move forward on multiple fronts, I'll work
towards adding filename options to GDB's option system, this will make
use of quoted filename completion.

In parallel I was going to start moving all the commands that accept
filenames over to accept quoted filenames. I didn't do this first as I
really didn't know how much push back there was going to be on such a
change.

If you're rather see all the commands updated first then I can for sure
get that done. Just let me now.

Thanks,
Andrew