This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
DOS/Windows-specific code: top.c
* top.c:
#ifdef __MSDOS__
void
do_chdir_cleanup (void *old_dir)
{
chdir (old_dir);
xfree (old_dir);
}
#endif
See the next snippet.
* top.c:gdb_init()
#ifdef __MSDOS__
/* Make sure we return to the original directory upon exit, come
what may, since the OS doesn't do that for us. */
make_final_cleanup (do_chdir_cleanup, xstrdup (current_directory));
#endif
This is the same issue as with cli-cmds.c:shell_escape(), and the same
solution will do here.
* top.c:init_history()
#ifdef __MSDOS__
/* No leading dots in file names are allowed on MSDOS. */
history_filename = concat (current_directory, "/_gdb_history", NULL);
#else
history_filename = concat (current_directory, "/.gdb_history", NULL);
#endif
`
Should we have a NO_LEADING_DOTS_IN_FILENAMES macro?