Hello, :ADDPATCH source.c: Here is a second crack at implementing the substitute-path feature taking into account all suggestions made so far (hopefully). It also includes Eli's suggestion to have "show substitute-path FROM". I have added a first attempt at making a test. It only tests the manipulation of the list of substitution rules, but not the applying of them while debugging a program, because I am not sure how to do that without resorting to shell commands such as mkdir et al. It's still better than nothing, though. Documentatio will be revised as soon as the code goes it. It's a waste of time to have Eli review it if anything during the review changes the feature in such a way that the documentation needs to be updated. 2006-07-14 Joel Brobecker * source.c: #include gdb_assert.h. (substitute_path_rule): New struct. (substitute_path_rules): New static global variable. (substitute_path_rule_matches): New function. (get_substitute_path_rule): New function. (rewrite_source_path): New function. (find_and_open_source): Add source path rewriting support. (strip_trailing_directory_separator): New function. (make_cleanup_argv): New function. (add_substitute_path_rule): New function. (delete_substitute_path_rule): New function. (show_substitute_path_command): New function. (unset_substitute_path_command): New function. (set_substitute_path_command): New function. (_initialize_source): Add new substitute-path commands. 2006-07-14 Joel Brobecker * gdb.base/subst.exp: New testcase. OK to commit? Thanks, -- Joel