Tom Tromey 23e46b680f Revert "Simplify auto_load_expand_dir_vars and remove substitute_path_component"
This reverts commit 02601231fdd91a7bd4837ce202906ea2ce661489.

This commit was a refactoring to remove an xrealloc and simplify
utils.[ch].  However, it has a flaw -- it mishandles a substitution
like "$datadir/subdir".

I am backing out the patch in the interests of fixing the regression
before GDB 14.  It can be reinstated (with modifications) later if we
like.

Regression tested on x86-64 Fedora 36.
2023-07-14 10:35:49 -06:00
..
2023-06-03 22:43:57 +02:00
2023-06-03 22:43:57 +02:00