Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Cygwin DLL
Cygwin DLL [message #157561] Wed, 09 November 2005 12:17 Go to next message
Eclipse UserFriend
Originally posted by: divis1969.mail.ru

Hi,

I've got a problem with DLL generated by cygwin (I'm working with Eclipse
and I suppose this is enough to ask this question here :-)

It looks that DLL that was produced by cygwin causes crash of the
application that tries to use it: for example, I've got plugin for Total
Commander that can show DLL info - it crashes when I try to see that info.

Also, I'm unable to use this DLL in the application that this DLL was
developed for: it also crashes. Note that there is no warning messages
that Windows shows for crashed apps. Nothing. Application just disappears!

But! When debugging this app with Eclipse I could see some segmentation
fault.

DLL was produced by the following command:
g++ -L../xmod/src/Debug/ -shared -ocppactor.dll
utf.win32.cygwin.win32/Allocable.o utf.win32.cygwin.win32/ActorMain.o
utf.win32.cygwin.win32/TestActor.o -lxmod

Can anybody help me?

Thank you,
Dmitry
Re: Cygwin DLL [message #157570 is a reply to message #157561] Wed, 09 November 2005 12:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: divis1969.mail.ru

BTW, if I produce DLL from the same sources by MSVC compiler - everything
works fine...
Re: Cygwin DLL [message #157682 is a reply to message #157570] Thu, 10 November 2005 12:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: divis1969.mail.ru

Well, I've found the workaround. Maybe it will be usefull for someone too..

Just use -mno_cygwin option in linker!

Dependency walker from MSVC does not show cygwin1.dll anymore...

But I've got new problem related to debugging: look like GDB does not
support dynamically loadable DLLs. Neither Eclipse nor GDB (command-line)
is able to set the breakpoint.

I've even tried to use
>gdb <exe_that_will_load_my_dll>
(gdb)dll <my_dll>
(gdb)b <my_func>
Cannot access memory at address 0x100013c0

So, GDB does not load DLL into address space and I did not find a way to
force it to do this.

Can anyone help me with this problem?

Dmitry
Re: Cygwin DLL [message #157752 is a reply to message #157682] Fri, 11 November 2005 03:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: euphoria.web.de

Dmitry Smirnov wrote:
> But I've got new problem related to debugging: look like GDB does not
> support dynamically loadable DLLs. Neither Eclipse nor GDB
> (command-line) is able to set the breakpoint.

I remember some GDB-FAQ regarding that topic.
But I am not quite sure whether it exactly covers your problem.

Florian
Re: Cygwin DLL [message #157759 is a reply to message #157752] Fri, 11 November 2005 06:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: divis1969.mail.ru

Florian Boelstler wrote:

> I remember some GDB-FAQ regarding that topic.
> But I am not quite sure whether it exactly covers your problem.

> Florian

Thanks. I just was inattentive when read it...

The right way to load DLL into process address space before program start
or for dynamically loaded DLLs is to use -readnow option:

dll-symbols <my_DLL> -readnow

To use it in Eclipse developer should use 'GDB command file' with this
command. (See debugger configuration).

Dmitry
Re: Cygwin DLL [message #157915 is a reply to message #157759] Mon, 14 November 2005 08:55 Go to previous message
Eclipse UserFriend
Originally posted by: euphoria.web.de

Dmitry Smirnov wrote:
> The right way to load DLL into process address space before program
> start or for dynamically loaded DLLs is to use -readnow option:
>
> dll-symbols <my_DLL> -readnow
>
> To use it in Eclipse developer should use 'GDB command file' with this
> command. (See debugger configuration).

Good to know.

Thanks,

Florian
Previous Topic:Eclipse under Windows compiling for AIX?
Next Topic:Is the JRE problem fixed in CDT 3.0.1?
Goto Forum:
  


Current Time: Fri Jul 25 04:50:54 EDT 2025

Powered by FUDForum. Page generated in 0.03665 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top