Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » mingw/gdb: Problems debugging dll from another project
mingw/gdb: Problems debugging dll from another project [message #543356] Tue, 29 June 2010 04:15 Go to next message
Eclipse UserFriend
Hello all,

I've problems debugging a dll from another project within eclipse.

What I do is the following:

ProjectA: My main project. I develop a dll for my co-worker in my company
ProjectB: Only a test-client which usees the dll from ProjectA and executes the exported functions.

In ProjectB I've added the "Debug" Directory from ProjrectA to the library search path (-L) and added the dll to the imported libraries (-l). Executing the generated .exe from ProjectB is no problem. But if I want to start the debugger I only get an
Quote:
[New Thread 2540.0x94c]
gdb: unknown target exception 0xc0000135 at 0x7c9766c6

in the Console-View. (See detailed gdb messages here: http://tinypaste.com/cfdb4)

What do I wrong?

I use gcc-3.4.5 with gdb-7.1 from mingw-5.1.6
cdt-6.0.2 on eclipse-3.5.2
Re: mingw/gdb: Problems debugging dll from another project [message #543368 is a reply to message #543356] Tue, 29 June 2010 04:37 Go to previous messageGo to next message
Eclipse UserFriend
Quote:
...to the library search path (-L) and added the dll to the imported libraries (-l)...

This directive is only used by the linker.

Quote:
But if I want to start the debugger...

The dll must be in your PATH. In the Debug Launch Configuration you can modify the environment variables for the debugger. Add the path of your dll to the PATH variable.
Re: mingw/gdb: Problems debugging dll from another project [message #543376 is a reply to message #543356] Tue, 29 June 2010 05:14 Go to previous messageGo to next message
Eclipse UserFriend
unfortunately I already did that. The error message still appears
Re: mingw/gdb: Problems debugging dll from another project [message #543415 is a reply to message #543356] Tue, 29 June 2010 07:23 Go to previous messageGo to next message
Eclipse UserFriend
Try to copy your dll into the folder of your debug application exe.
Re: mingw/gdb: Problems debugging dll from another project [message #543419 is a reply to message #543356] Tue, 29 June 2010 07:40 Go to previous messageGo to next message
Eclipse UserFriend
No success
Re: mingw/gdb: Problems debugging dll from another project [message #543629 is a reply to message #543419] Wed, 30 June 2010 02:42 Go to previous messageGo to next message
Eclipse UserFriend
The there might be another DLL missing. Is mingw.dll in your path?
Re: mingw/gdb: Problems debugging dll from another project [message #543638 is a reply to message #543356] Wed, 30 June 2010 03:16 Go to previous messageGo to next message
Eclipse UserFriend
I can debug other projects. I think gdb can't find the dll from ProjectA but I can't find out why...
Re: mingw/gdb: Problems debugging dll from another project [message #543676 is a reply to message #543638] Wed, 30 June 2010 05:26 Go to previous messageGo to next message
Eclipse UserFriend
Hi all

I have the very same problem:
gdb: unknown target exception 0xc0000135 at 0x7c9666c6

This seems related to this:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=312422

See also:
http://dev.omnetpp.org/bugs/view.php?id=161

The cryptic message seems to mean "Hey can't found a DLL bro, guess which one!".

(I wonder *why* this message has to be *soo* cryptic).

Problem seems that MinGW/gdb 7.1 fails to set the environment variables set through the IDE.

My solution is to launch an MSYS shell, set the env there, and launch eclipse from there, this way it will inherit the MSYS environment.

Alternatively you may consider to downgrade your gdb.

HTH, regards.
Re: mingw/gdb: Problems debugging dll from another project [message #543718 is a reply to message #543356] Wed, 30 June 2010 08:08 Go to previous messageGo to next message
Eclipse UserFriend
exactly! It seems that this bug is related to my problem.

Thanks for pointing me to this bugreport!
Re: mingw/gdb: Problems debugging dll from another project [message #543917 is a reply to message #543676] Thu, 01 July 2010 02:14 Go to previous messageGo to next message
Eclipse UserFriend
Quote:
This seems related to this:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=312422

He, that's good to know. I always advised people to set the environment correctly and was wondering why it still didn't work (unless you set the environment outside of Eclipse). Thanks for the hint.

Quote:
The cryptic message seems to mean "Hey can't found a DLL bro, guess which one!".

(I wonder *why* this message has to be *soo* cryptic).

Oh yeah, the message is so well understandable Smile


I added this to the CDT FAQ Wiki
http://wiki.eclipse.org/CDT/User/FAQ#I_get_the_message_.22gd b:_unknown_target_exception_0xc0000135_at_0x7c9766c6.22

[Updated on: Thu, 01 July 2010 03:33] by Moderator

Re: mingw/gdb: Problems debugging dll from another project [message #635773 is a reply to message #543917] Thu, 28 October 2010 00:10 Go to previous message
Eclipse UserFriend
I'm sure most of you have worked around this but... Juuuust in case... the simple workaround the IDE is to;

Set the environment variable manually (right click My Computer > Properties > Advanced > Environment Variables).

I added a user variable the env variable: PATH (case-sensitive, different from Path).

Restarted Eclipse and started jamming with my F11 key.

Cheers.
Previous Topic:Remote C development
Next Topic:ADOBE FLEX+Eclipse CDT
Goto Forum:
  


Current Time: Tue Mar 11 13:56:01 EDT 2025

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

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

Back to the top