This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Initialize the correct cwd for the child


> Eli Zaretskii wrote:
> > 
> > Thanks for the patch.  However, I wonder: what would be the cwd of an
> > inferior on Unix, after the following commands:
> > 
> >          gdb foo
> >          cd bar
> >          run
> > 
> > I think the DJGPP port should, as much as possible, behave the same
> > way as GDB does on Unix.
> 
> I'm pretty sure the cwd would be bar, so the patch
> would make djgpp behave more like unix does.
> 

At first I tried it under Linux, and there the child got the directory after the
cd command.

The problem here is only the DJGPP situation, where we
need to save (and restore) the childs cwd, since on unix the child runs
as a separate thred (or process), where the OS does the job for remembering
the cwd.

******************************************************
* email:   Robert Hoehne <robert.hoehne@gmx.net>     *
* Post:    Am Berg 3, D-09573 Dittmannsdorf, Germany *
* WWW:     http://www.tu-chemnitz.de/~sho/rho        *
******************************************************

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]