This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: DOS/Windows-specific code: cli-cmds.c
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: DOS/Windows-specific code: cli-cmds.c
- From: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Date: Wed, 9 May 2001 13:04:56 +0300 (IDT)
- cc: gdb at sources dot redhat dot com
On Tue, 8 May 2001, Andrew Cagney wrote:
> > * cli-cmds.c:shell_escape()
> >
> > #ifdef __DJGPP__
> > /* Make sure to return to the directory GDB thinks it is, in case the
> > shell command we just ran changed it. */
> > chdir (current_directory);
> > #endif
> >
> > This code is there because the current working directory is a global
> > notion (as opposed to being private to each process on Posix
> > systems). Windows ports, at least the non-Cygwin ones, probably want
> > this as well. Suggestions how to test this, anyone? Should we define
> > a GLOBAL_CURDIR macro (zero by default)?
>
>
> GDB, may its self, one day need some similar notion of current directory.
>
> Consider a debug environment containing:
>
> o core/lib-gdb
> o a GUI/MI
> o a CLI
>
> Should the user entering CLI commands that change the GDB processes
> apparent directory affect the GUI?
Are you saying that it is okay to make the code above be compiled
unconditionally? (That would involve some additional overhead of
issuing a system call on Posix platforms, but otherwise is a no-op, so
it doesn't hurt too much.) If this will allow future extensions, I'm
happy with such a change.