DOS/Windows-specific code: top.c
Eli Zaretskii
eliz@is.elta.co.il
Tue May 8 04:50:00 GMT 2001
* 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?
More information about the Gdb
mailing list