From: Earnie <ea...@us...> - 2011-08-29 14:30:53
|
Ruben Van Boxem wrote: > 2011/8/29 Earnie <ea...@us...> > >> Ruben Van Boxem wrote: >> >>> I have an idea: try removing the python27.dll file in >>> mingw32/bin. I put it in there for gdb's python support, and it >>> might interfere with the Python you're using to do your stuff. >>> I'll see if I can't move the dll to mingw32/bin/lib and have gdb >>> search for lib/python27.dll (import library magic?), if this >>> solves your issue of course. >> >> Ruben, you are aware of the .local directory method of dll >> side-by-side assemblies, correct? >> http://msdn.microsoft.com/en-us/library/dd408052(v=VS.85).aspx >> <http://msdn.microsoft.com/en-us/library/dd408052%28v=VS.85%29.aspx> >> >> >> So basically create a gdb.exe.local in the same location as gdb.exe and >> put the dll in it. >> > > Does it work for preloaded (ie no LoadLibrary involved) DLLs? I > gathered it didn't. I also figured that renaming the dll before I did > the gendef+dlltool steps should work equally effictively. > This statement, "The contents of a redirection file are ignored, but its presence causes Windows to check the application directory first whenever it loads a DLL," from http://msdn.microsoft.com/en-us/library/ms682600(v=vs.85).aspx <http://msdn.microsoft.com/en-us/library/ms682600%28v=vs.85%29.aspx> makes me believe so. But the page is LoadLibrary explicit. But see also http://msdn.microsoft.com/en-us/library/ms682586(v=vs.85).aspx <http://msdn.microsoft.com/en-us/library/ms682586%28v=vs.85%29.aspx> regarding DLL search order. Hmm, this is an interesting statement "An import library supplies the system with the information needed to load the DLL and locate the exported DLL functions when the application is loaded." from http://msdn.microsoft.com/en-us/library/ms681914(v=VS.85).aspx <http://msdn.microsoft.com/en-us/library/ms681914%28v=VS.85%29.aspx> is it possible to use a relative path to the DLL such that your idea of bin/lib/foo.dll works? You set the DLL name as lib/foo.dll in the import library and it works? If so, then having gdb.exe.local/python.dll would be just has effective and have another purpose for LoadLibrary should you need it later. Earnie |