This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: gdb/1475: chdir(), dlopen() using relative path fails to track module
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 5 Dec 2003 21:18:01 -0000
- Subject: Re: gdb/1475: chdir(), dlopen() using relative path fails to track module
- Reply-to: Daniel Jacobowitz <drow at mvista dot com>
The following reply was made to PR gdb/1475; it has been noted by GNATS.
From: Daniel Jacobowitz <drow@mvista.com>
To: Daniel Reed <n@ml.org>, gdb-gnats@sources.redhat.com
Cc:
Subject: Re: gdb/1475: chdir(), dlopen() using relative path fails to track module
Date: Fri, 5 Dec 2003 16:10:15 -0500
On Fri, Dec 05, 2003 at 09:08:00PM -0000, Daniel Reed wrote:
> That would surely work if I knew what my working directory would be
> beforehand (i.e. naim always chdir()s to $HOME at start). For the general
> case, however, would it be possible to catch chdir() and track CWD that way?
Not really. A better option might be to check the maps file in /proc
to convert the relative pathname to the full pathname. Getting that
right is a bit tricky...
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer