Simplify auto_load_expand_dir_vars and remove substitute_path_component
authorTom Tromey <tom@tromey.com>
Tue, 4 Apr 2023 18:50:03 +0000 (12:50 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 5 May 2023 13:49:43 +0000 (07:49 -0600)
commit02601231fdd91a7bd4837ce202906ea2ce661489
treec9745539b4869c0f70b698b8ac0e4366618154c1
parent4891c459927d9a9c0f516c35e2d9d4ce212dd06e
Simplify auto_load_expand_dir_vars and remove substitute_path_component

This simplifies auto_load_expand_dir_vars to first split the string,
then do any needed substitutions.  This was suggested by Simon, and is
much simpler than the current approach.

Then this patch also removes substitute_path_component, as it is no
longer called.  This is nice because it helps with the long term goal
of removing utils.h.

Regression tested on x86-64 Fedora 36.
gdb/Makefile.in
gdb/auto-load.c
gdb/unittests/utils-selftests.c [deleted file]
gdb/utils.c
gdb/utils.h