gdb/
* NEWS (--with-auto-load-dir): Prepend $debugdir to the default path. Describe it. * auto-load.c (auto_load_expand_dir_vars): New function. (auto_load_safe_path_vec_update): Use it, remove the substitute_path_component call thanks to it. (auto_load_objfile_script): Remove the debug_file_directory processing. Use auto_load_expand_dir_vars, remove the substitute_path_component call thanks to it. * configure: Regenerate. * configure.ac (--with-auto-load-dir): Prepend $debugdir to the default path. Escape $ also for $debugdir. (--with_auto_load_safe_path): Escape $ also for $debugdir. * utils.c (substitute_path_component): Accept also DIRNAME_SEPARATOR. gdb/doc/ * gdb.texinfo (Separate Debug Files): New anchor debug-file-directory. Mention also --with-separate-debug-dir. (Auto-loading): Prepend $debugdir in the sample output. (Auto-loading safe path): Likewise. Mention also $debugdir for the auto-load safe-path variable. (objfile-gdb.py file): Remove the extra debug-file-directory paragraph. Mention also $debugdir for 'set auto-load scripts-directory'.
This commit is contained in:
parent
a3ec0bb1c4
commit
1564a2618d
8 changed files with 101 additions and 89 deletions
10
gdb/utils.c
10
gdb/utils.c
|
@ -3726,8 +3726,8 @@ dirnames_to_char_ptr_vec (const char *dirnames)
|
|||
|
||||
/* Substitute all occurences of string FROM by string TO in *STRINGP. *STRINGP
|
||||
must come from xrealloc-compatible allocator and it may be updated. FROM
|
||||
needs to be delimited by IS_DIR_SEPARATOR (or be located at the start or
|
||||
end of *STRINGP. */
|
||||
needs to be delimited by IS_DIR_SEPARATOR or DIRNAME_SEPARATOR (or be
|
||||
located at the start or end of *STRINGP. */
|
||||
|
||||
void
|
||||
substitute_path_component (char **stringp, const char *from, const char *to)
|
||||
|
@ -3742,8 +3742,10 @@ substitute_path_component (char **stringp, const char *from, const char *to)
|
|||
if (s == NULL)
|
||||
break;
|
||||
|
||||
if ((s == string || IS_DIR_SEPARATOR (s[-1]))
|
||||
&& (s[from_len] == '\0' || IS_DIR_SEPARATOR (s[from_len])))
|
||||
if ((s == string || IS_DIR_SEPARATOR (s[-1])
|
||||
|| s[-1] == DIRNAME_SEPARATOR)
|
||||
&& (s[from_len] == '\0' || IS_DIR_SEPARATOR (s[from_len])
|
||||
|| s[from_len] == DIRNAME_SEPARATOR))
|
||||
{
|
||||
char *string_new;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue