Can't load debugger

CodeLite installation/troubleshooting forum
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Can't load debugger

Post by eranif »

goosey wrote:wxWidgets requires about 2,5 gigabytes of disk space
well, looks like a bug in the installer not with wxWidgets...

Will do it from scratch:

download the wxWidgets sources from here:
http://prdownloads.sourceforge.net/wxwi ... -Setup.exe (installer is about 12MB)

install it under C:\wxWidgets-2.8.7 or something similar, as long you install it on a path with no space in it

Once extracted, you will need to compile it (assuming wxWidgets was installed under C:\wxWidgets-2.8.7):

Code: Select all

cd C:\wxWidgets-2.8.7\build\msw
mingw32-make -f makefile.gcc BUILD=release UNICODE=1 MONOLITHIC=1 SHARED=1
once compiled, make sure that WXWIN is pointing to the correct path of the installation

EDIT: when I come to think about it, it make sense that the installer requires that much, since it provides all builds configurations available for wxWidgets (Unicode, ASNI, multi-lib, monolithic, debug,release) - so it only make sense why it is that big, I will contact the maintainer of wxPack (who recently joined CodeLite team) to think of a better solution (maybe providing several installers per-configuration)



Eran
Make sure you have read the HOW TO POST thread
goosey
CodeLite Enthusiast
Posts: 14
Joined: Sat May 31, 2008 2:37 pm
Contact:

Re: Can't load debugger

Post by goosey »

Alright, I've successfully compiled CodeLite...what's next?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Can't load debugger

Post by eranif »

goosey wrote:Alright, I've successfully compiled CodeLite...what's next?
Close CodeLite.
go to trunk\Runtime\

edit the batch script update.bat to fit your paths (.i.e replace C:\Program Files\CodeLite\ with the path to your CodeLite installation)
and run it.

Star CodeLite again, and check if the debugger loaded.

Eran
Make sure you have read the HOW TO POST thread
goosey
CodeLite Enthusiast
Posts: 14
Joined: Sat May 31, 2008 2:37 pm
Contact:

Re: Can't load debugger

Post by goosey »

eranif wrote:Star CodeLite again, and check if the debugger loaded.
CodeLite still prints the same error message:
11:41:11: Failed to load debugger's dll: h:\CodeLite\debuggers\Debugger.dll
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Can't load debugger

Post by eranif »

Download dependency walker from here: http://www.dependencywalker.com/
(If you are not familiar with this tool, this tools checks for dependencies missing for DLLs)

the downloaded zip contains 3 files: depends.exe, dll and chm file.
Launch the depends.exe and open the 'Debugger.dll'
Now, on my machine, the only missing DLL is DWMAPI.DLL but this is OK.

What are the errors that you get when trying to load it under your machine?

Eran
Make sure you have read the HOW TO POST thread
goosey
CodeLite Enthusiast
Posts: 14
Joined: Sat May 31, 2008 2:37 pm
Contact:

Re: Can't load debugger

Post by goosey »

The first time I ran Dependency Walker on Debugger.dll it complained that the file
APPHELP.DLL is missing, so I downloaded it from dll-files.com. After the second
run it produced the following output:

Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.


In the module dependency tree the following DLL files are highlighted in red:
KERNEL32.DLL
NTDLL.DLL
MPR.DLL

In the file KERNEL32.DLL, the function AttachConsole is marked as unresolved (red).

Now, if I understand the module dependency tree correctly, APPHELP.DLL calls NTDLL.DLL.

In NTDLL.DLL the functions RtlDuplicateUnicodeString, RtlNtPathNameToDosPathName,
RtlpEnsureBufferSize are marked as unresolved.

APPHELP.DLL also calls KERNEL32.DLL, in which the functions BaseCheckAppcompatCache, BaseDumpAppcompatCache, BaseFlushAppcompatCache and
BaseUpdateAppcompatCache are marked as unresolved.

in MPR.DLL the function WNetRestoreConnectionA is marked as unresolved.

Hope this helps.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Can't load debugger

Post by eranif »

goosey wrote:In the file KERNEL32.DLL, the function AttachConsole is marked as unresolved (red).
this error is directly related to the debugger. I thought that AtttachConsole is part of the Win 2000 SDK...

Clearly I was wrong.
Now that you have the sources: do SVN update, build CodeLite again, and run update.bat script.

Did it help?

Eran
Make sure you have read the HOW TO POST thread
goosey
CodeLite Enthusiast
Posts: 14
Joined: Sat May 31, 2008 2:37 pm
Contact:

Re: Can't load debugger

Post by goosey »

eranif wrote:Did it help?
Yes. CodeLite loaded the debugger :)

One more thing though: I tried inserting breakpoints and then debugging a program,
but the debugger did not stop at the breakpoints. Why is that?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Can't load debugger

Post by eranif »

- Did u build your program with debugging symbols?
- Are u trying to place a break point at a code which is dynamically loaded using dlopen/LoadLibrary?
- Which version of GDB are u using

and finally, can u please paste the debugger log? (the output that u get from at the 'Debug' tab)

Eran
Make sure you have read the HOW TO POST thread
goosey
CodeLite Enthusiast
Posts: 14
Joined: Sat May 31, 2008 2:37 pm
Contact:

Re: Can't load debugger

Post by goosey »

eranif wrote:- Did u build your program with debugging symbols?
Yes. The "-g" flag is specified in Compiler Options.
eranif wrote: - Are u trying to place a break point at a code which is dynamically loaded using dlopen/LoadLibrary?
No...
eranif wrote:- Which version of GDB are u using
gdb 5.2.1
eranif wrote: and finally, can u please paste the debugger log? (the output that u get from at the 'Debug' tab)

Code: Select all

Debug session started successfully!
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...
set  new-console on
set unwindonsignal on
set auto-solib-add on
No symbol "auto" in current context.
^error,msg="No symbol \"auto\" in current context."
set stop-on-solib-events 1
set width 0
set height 0
No source file named H:/CodeLite/projects/tetris/tetris.cpp.
Continuing...
Debuggee process ID: 728
Program exited normally.
Debug session ended

The line "No source file named H:/CodeLite/projects/tetris/tetris.cpp." looks bizarre,
because there definitely exists a source file with that name and I can open it.
Post Reply