From: SReddie AT cybec DOT com DOT au (Steven Reddie) Subject: beta18: building gdb gives incomplete import table??? 28 Dec 1997 22:46:59 -0800 Message-ID: <34A7414B.F9935C9E.cygnus.gnu-win32@cybec.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: gnu-win32 AT cygnus DOT com I am attempting to build gdb with beta18. I have the "normal" source, not the cdksrc. [Is this my problem?] I have succeeded in compiling it, but not executing it. To get it to compile, I had to add "-D_MSC_VER -D__WIN32__ -DWIN32" to CFLAGS in Makefile. I also had to add four empty functions (I'll worry about their contents later) to gdb/win32-nat.c -- I think these were: void unix_to_dos_path( char*, char* ); void dos_to_unix_path( char*, char* ); void cygwin32_unix_to_dos_path( char*, char* ); void cygwin32_dos_to_unix_path( char*, char* ); gdb.exe is produced but crashes immediately. Debugging with the gdb supplied with beta18 shows me that the crash happens on a call to GetModuleHandle(). I think this was in the cygwin32 initialisation code (I don't have access to this machine at the moment so I can't check right now). I did a dumpbin (MSVC tool) and noticed that GetModuleHandle() was not listed in the kernel32 import table. I added a call to GetModuleHandle() [in unix_to_dos_path()] and the import table entry was then added by the linker. Executing it again crashed but seemed to make it slightly further, this time crashing on some other function that didn't have an import table entry either. I'm guessing that the linker is somehow screwing up the construction of the import table. Maybe the calls to these functions are in .a files that when linked-in don't bring their import declarations with them. If this has been fixed in a patch or someone knows of a work-around I would very much appreciate to hear about it. Sorry if this question has already been addressed -- I have only just returned to using the cygwin32 port after a length absence. Regards, Steven Reddie - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".