This is the mail archive of the gdb-prs@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]
Other format: [Raw text]

Re: gdb/1475: chdir(), dlopen() using relative path fails to track module


The following reply was made to PR gdb/1475; it has been noted by GNATS.

From: Kevin Buettner <kevinb@redhat.com>
To: gdb-gnats@sources.redhat.com, n@ml.org
Cc:  
Subject: Re: gdb/1475: chdir(), dlopen() using relative path fails to track module
Date: Fri, 5 Dec 2003 13:13:17 -0700

 On Dec 5,  7:48pm, n@ml.org wrote:
 
 > Create a gcc -shared /tmp/test.so and a simple program that does:
 > chdir("/tmp"); dlopen("./test.so", RTLD_LAZY);
 > Run the simple program in gdb. Changing the dlopen() call to "/tmp/test.so" works as expected.
 
 Interesting.
 
 I don't know of any (easy) way for gdb to track the inferior's notion of
 current working directory.  (I suppose gdb could try to do a getcwd()
 inferior function call, but I would prefer that GDB not make "hidden"
 inferior function calls without the user's knowledge.)
 
 I recommend using ``set solib-search'' to allow gdb to find the shared
 object.
 
 Kevin


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