delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/07/23/11:30:45

From: sjs AT navio DOT com (Steve Shepard)
Subject: Re: msvc dll / LoadLibrary and GDB
23 Jul 1997 11:30:45 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <199707231641.JAA21941.cygnus.gnu-win32@gw.navio.com>
Original-To: btuysser AT qualcomm DOT com
Original-CC: gnu-win32 AT cygnus DOT com
In-reply-to: <3.0.1.32.19970722200602.009753e0@smtphost-co.qualcomm.com>
(message from Bijan Tuysserkani on Tue, 22 Jul 1997 20: 06:02 -0600)
Original-Sender: owner-gnu-win32 AT cygnus DOT com

> I try to implement a remote extension for GDB and use 
> a DLL (produced with msvc) for the windows functionality.
> 
> These are my steps so far :
> 
> 1.) I have foo.dll, foo.def
> 2.) build foo.a with dlltool --def foo.def --dllname foo.dll --output-lib
> foo.a
> 3.) gcc -o test_prg test_prg.c foo.a
> 
> This compiles fine, but when I try to run it I get a memory reference error 
> from windows NT. I ran it under GDB and Windows gives me that error when
> the dll library gets implicitly loaded.
> 
> So I used an alternative :
> 
> 1.) Use LoadLibrary to load the dll explicitly
> 2.) Use GetProcAddress to get function pointers to the dll-functions
> 
> That works fine for my test_prg.c, but if I include that in the remote-xxx.c 
> of my GDB extension, GDB will work fine, execute the right functions correct
> and hang up if you try to leave GDB. I do only have to use LoadLibrary to 
> make GDB hang after typing 'quit'.
> 
> Does anybody have any comments or solutions to the stuff above?

Under B18, I had to use Sergey's new cygwin.dll to get my dll
(compiled with msvc) to work. I also had to use the "-k" option to
dlltool.

-Steve

-
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".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019