Debugging DLL's under Windows [message #93097] |
Mon, 02 February 2004 05:10  |
Eclipse User |
|
|
|
Well, using Eclipse and CDT now for about a year, I'm very impressed
about the CDT2.0 comings. What I still have problems is debugging a DLL
in Windows. I'm using Eclipse 3.0M6/CDT2.0M6 and also the builds, or
2.1.2 and 1.2.1, MinGW (gcc/g++ 3.2.3) with gdb 5.2.1.
My project is a bigger standard make project building all subcomponents
within their subdirs in a tmp-directory, then build the libs and dlls in
a lib-dir. After the build process, each subcomponents target is copied
into a central dir libs/lib. This project includes one static lib, used
by the subcomponents, one target DLL, and 2 DLL's which get loaded at
runtime using LoadLibrary("XYZ").
A second project using managed make is my test application. The include
dirs are set to the first projects include dirs, and also the path to
the libraries export file is added.
What I have problems on is now, that debugging the test application
doesnt allow me to stop in the DLL. I have some breakpoints and
everything is build with -O0 -g3 -gstabs. The debugger (GNU Debugger)
won't stop in the DLL. Adding search path to the debugger tab page, it
says solib-search-path is unknown. Therefore I added the
<full_path>/libs/lib directory to my enironment variables, but still no
luck.
If someone could give me a hint, how to debug a DLL, I would be happy.
|
|
|
Re: Debugging DLL's under Windows [message #93168 is a reply to message #93097] |
Mon, 02 February 2004 11:07  |
Eclipse User |
|
|
|
Originally posted by: mikhailk.qnx.com
A breakpoint in DLL can be set if the symbol information of DLL is loaded in
gdb. On Windows this happens when DLL is loaded.
The CDT uses the "stop-on-solib-events" command of gdb to catch the moment
when DLL is loaded and tries to plant the breakpoints that belong the
project or the reference projects. This all is transparent for user.
As far as I know (but I am not 100% sure) this option
("stop-on-solib-events") is not supported by gdb on Windows.
What you can do is to stop after your DLL is loaded and then set a
breakpoint in it.
"kesselhaus" <kesselhaus@gmx.net> wrote in message
news:bvl7j8$as2$1@eclipse.org...
> Well, using Eclipse and CDT now for about a year, I'm very impressed
> about the CDT2.0 comings. What I still have problems is debugging a DLL
> in Windows. I'm using Eclipse 3.0M6/CDT2.0M6 and also the builds, or
> 2.1.2 and 1.2.1, MinGW (gcc/g++ 3.2.3) with gdb 5.2.1.
>
> My project is a bigger standard make project building all subcomponents
> within their subdirs in a tmp-directory, then build the libs and dlls in
> a lib-dir. After the build process, each subcomponents target is copied
> into a central dir libs/lib. This project includes one static lib, used
> by the subcomponents, one target DLL, and 2 DLL's which get loaded at
> runtime using LoadLibrary("XYZ").
>
> A second project using managed make is my test application. The include
> dirs are set to the first projects include dirs, and also the path to
> the libraries export file is added.
>
> What I have problems on is now, that debugging the test application
> doesnt allow me to stop in the DLL. I have some breakpoints and
> everything is build with -O0 -g3 -gstabs. The debugger (GNU Debugger)
> won't stop in the DLL. Adding search path to the debugger tab page, it
> says solib-search-path is unknown. Therefore I added the
> <full_path>/libs/lib directory to my enironment variables, but still no
> luck.
>
> If someone could give me a hint, how to debug a DLL, I would be happy.
|
|
|
Powered by
FUDForum. Page generated in 0.43432 seconds