gdb: cleanup command creation in infcmd.c
authorAndrew Burgess <aburgess@redhat.com>
Tue, 4 Apr 2023 08:34:54 +0000 (09:34 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Fri, 28 Apr 2023 21:50:46 +0000 (22:50 +0100)
commit33c054b015b99e92dcfba1b997a25b7ae8e01e0b
tree19bda6a4e52d228aac161679e3805f298dfdea71
parent2a740b3ba4c9f39c86dd75e0914ee00942cab471
gdb: cleanup command creation in infcmd.c

In infcmd.c, in order to add command completion to some of the 'set'
commands, we are currently creating the command, then looking up the
command by calling lookup_cmd.

This is no longer necessary, we already return the relevant
cmd_list_element object when the set/show command is created, and we
can use that to set the command completion callback.

I don't know if there's actually any tests for completion of these
commands, but I manually checked, and each command still appears to
offer the expected filename completion.

There should be no user visible changes after this commit.

Reviewed-By: Tom Tromey <tom@tromey.com>
gdb/infcmd.c