Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 08:15 Go to next message
Martin Fernau is currently offline Martin FernauFriend
Messages: 13
Registered: July 2009
Junior Member
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 08:37 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
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.


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: mingw/gdb: Problems debugging dll from another project [message #543376 is a reply to message #543356] Tue, 29 June 2010 09:14 Go to previous messageGo to next message
Martin Fernau is currently offline Martin FernauFriend
Messages: 13
Registered: July 2009
Junior Member
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 11:23 Go to previous messageGo to next message
Uwe Kindler is currently offline Uwe KindlerFriend
Messages: 5
Registered: June 2010
Location: Germany
Junior Member
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 11:40 Go to previous messageGo to next message
Martin Fernau is currently offline Martin FernauFriend
Messages: 13
Registered: July 2009
Junior Member
No success
Re: mingw/gdb: Problems debugging dll from another project [message #543629 is a reply to message #543419] Wed, 30 June 2010 06:42 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
The there might be another DLL missing. Is mingw.dll in your path?

Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: mingw/gdb: Problems debugging dll from another project [message #543638 is a reply to message #543356] Wed, 30 June 2010 07:16 Go to previous messageGo to next message
Martin Fernau is currently offline Martin FernauFriend
Messages: 13
Registered: July 2009
Junior Member
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 09:26 Go to previous messageGo to next message
nosound is currently offline nosoundFriend
Messages: 3
Registered: April 2010
Junior Member
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 12:08 Go to previous messageGo to next message
Martin Fernau is currently offline Martin FernauFriend
Messages: 13
Registered: July 2009
Junior Member
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 06:14 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
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


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google

[Updated on: Thu, 01 July 2010 07:33]

Report message to a moderator

Re: mingw/gdb: Problems debugging dll from another project [message #635773 is a reply to message #543917] Thu, 28 October 2010 04:10 Go to previous message
No real name is currently offline No real nameFriend
Messages: 1
Registered: October 2010
Junior Member
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: Fri Aug 23 07:03:19 GMT 2019

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

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

Back to the top