diff options
author | Tom Tromey <tromey@adacore.com> | 2023-07-14 09:35:03 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-07-14 10:35:49 -0600 |
commit | 23e46b680f6fa6fce45aaf6c004cab6be322fbf1 (patch) | |
tree | cf8d3151840382826cc547ba97f702f879f18fee /gdb/utils.h | |
parent | 40e76c4db13274071540d35f3ee1815b90f814e7 (diff) | |
download | gdb-23e46b680f6fa6fce45aaf6c004cab6be322fbf1.zip gdb-23e46b680f6fa6fce45aaf6c004cab6be322fbf1.tar.gz gdb-23e46b680f6fa6fce45aaf6c004cab6be322fbf1.tar.bz2 |
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.
Diffstat (limited to 'gdb/utils.h')
-rw-r--r-- | gdb/utils.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/utils.h b/gdb/utils.h index 3faac20..ad0a867 100644 --- a/gdb/utils.h +++ b/gdb/utils.h @@ -136,6 +136,9 @@ private: extern int gdb_filename_fnmatch (const char *pattern, const char *string, int flags); +extern void substitute_path_component (char **stringp, const char *from, + const char *to); + std::string ldirname (const char *filename); extern int count_path_elements (const char *path); |