Code::Blocks Forums

User forums => Help => Topic started by: dmoore on June 22, 2007, 01:16:02 pm

Title: can't debug effectively in win32...
Post by: dmoore on June 22, 2007, 01:16:02 pm
because breakpoints refuse to set.

Code
Debugger name and version: GNU gdb 5.2.1
No source file named C:/source/codeblocks_src/trunk/src/plugins/classwizard/classwizard.cpp.

before I start posting more detailed debug logs etc. what version of gdb is supported?

Title: Re: can't debug effectively in win32...
Post by: dmoore on June 22, 2007, 02:20:47 pm
from the debugger (debug) log

Code
>>>>>>cb_gdb:
> directory C:/source/codeblocks_src/trunk/src/
>>>>>>cb_gdb:
> set args --debug-log --no-check-associations
>>>>>>cb_gdb:
> break "C:/source/codeblocks_src/trunk/src/sdk/cbeditor.cpp:1162"
No source file named C:/source/codeblocks_src/trunk/src/sdk/cbeditor.cpp.
>>>>>>cb_gdb:
> break "C:/source/codeblocks_src/trunk/src/sdk/editormanager.cpp:464"
No source file named C:/source/codeblocks_src/trunk/src/sdk/editormanager.cpp.
>>>>>>cb_gdb:
> break "C:/source/codeblocks_src/trunk/src/sdk/editormanager.cpp:455"
No source file named C:/source/codeblocks_src/trunk/src/sdk/editormanager.cpp.
>>>>>>cb_gdb:
> break "C:/source/codeblocks_src/trunk/src/src/compilersettingsdlg.cpp:129"
Breakpoint 1 at 0x410708: file C:/source/codeblocks_src/trunk/src/src/compilersettingsdlg.cpp, line 129.
>>>>>>cb_gdb:
> break "C:/source/codeblocks_src/trunk/src/src/dlgabout.cpp:78"
Breakpoint 2 at 0x41410c: file C:/source/codeblocks_src/trunk/src/src/dlgabout.cpp, line 78.
...

can't add breakpoints for any of the sdk. now trigger a breakpoint and add a breakpoint to an sdk file

Code
Breakpoint 1, CompilerSettingsDlg::AddPluginPanels() (this=0x22f41c) at C:/source/codeblocks_src/trunk/src/src/compilersettingsdlg.cpp:129
C:/source/codeblocks_src/trunk/src/src/compilersettingsdlg.cpp:129:4470:beg:0x410708
Current language:  auto; currently c++
>>>>>>cb_gdb:
> break "C:/source/codeblocks_src/trunk/src/sdk/editormanager.cpp:456"
Breakpoint 3 at 0x6054a4a0: file C:/source/codeblocks_src/trunk/src/sdk/editormanager.cpp, line 456.

???

Title: Re: can't debug effectively in win32...
Post by: MortenMacFly on June 22, 2007, 02:26:22 pm
Code
Debugger name and version: GNU gdb 5.2.1
before I start posting more detailed debug logs etc. what version of gdb is supported?
Search the forum - It's 6.3.2 IMHO (at least it's better not to use 5.x).
With regards, Morten.
Title: Re: can't debug effectively in win32...
Post by: mandrav on June 22, 2007, 02:27:52 pm
what version of gdb is supported?

Versions 6.x and up are known to work well.
Title: Re: can't debug effectively in win32...
Post by: dmoore on June 22, 2007, 02:29:11 pm
thanks morten.

I suspect this 5.x version works ok...

Code
Adding source dir: C:\source\codeblocks_src\trunk\src\

how do i add additional directories?
Title: Re: can't debug effectively in win32...
Post by: dmoore on June 22, 2007, 02:30:15 pm
I'll also upgrade...
Title: Re: can't debug effectively in win32...
Post by: MortenMacFly on June 22, 2007, 02:34:38 pm
how do i add additional directories?
Either via debugger initialisation commands or maybe the following is enough:
Settings -> Compiler and debugger -> Debugger settings ->
Enable "Add other project's path in the debuggers search list".
With regards, Morten.
Title: Re: can't debug effectively in win32...
Post by: dmoore on June 22, 2007, 02:35:14 pm
tried project properties -> debugger search dirs... still doesn't help. must be the gdb version
Title: Re: can't debug effectively in win32...
Post by: dmoore on June 22, 2007, 02:45:55 pm
ok, really stupid question, where do i get the latest stable gdb from? the mingw package that I found only contains v5.2
Title: Re: can't debug effectively in win32...
Post by: Biplab on June 22, 2007, 02:49:01 pm
Read the following thread for the latest GDB snapshot link. :)
Quote
http://forums.codeblocks.org/index.php/topic,6224.0.html
Title: Re: can't debug effectively in win32...
Post by: dmoore on June 22, 2007, 03:00:08 pm
thanks biplab - the mingw sourceforge site is a bit of a mess...

new version installed:

Code
> break "C:/source/codeblocks_src/trunk/src/sdk/cbeditor.cpp:1162"
No source file named C:/source/codeblocks_src/trunk/src/sdk/cbeditor.cpp.
Breakpoint 1 ("C:/source/codeblocks_src/trunk/src/sdk/cbeditor.cpp:1162) pending.

the 6.x series must force the breakpoints?
Title: Re: can't debug effectively in win32...
Post by: David Perfors on June 22, 2007, 03:07:32 pm
Workaround:
put a breakpoint in src/src/app.cpp and run again after this one....
Title: Re: can't debug effectively in win32...
Post by: TDragon on June 22, 2007, 03:27:18 pm
Note that that message doesn't necessarily indicate an error, or that the breakpoint won't be hit; I see it all the time, but still break at those breakpoints.
Title: Re: can't debug effectively in win32...
Post by: dmoore on June 22, 2007, 03:39:37 pm
i should clarify -- with 6.x the breakpoint is set despite the "No source file named..." whereas in 5.x the breakpoint doesn't get set.
Title: Re: can't debug effectively in win32...
Post by: mandrav on June 22, 2007, 03:40:36 pm
thanks biplab - the mingw sourceforge site is a bit of a mess...

new version installed:

Code
> break "C:/source/codeblocks_src/trunk/src/sdk/cbeditor.cpp:1162"
No source file named C:/source/codeblocks_src/trunk/src/sdk/cbeditor.cpp.
Breakpoint 1 ("C:/source/codeblocks_src/trunk/src/sdk/cbeditor.cpp:1162) pending.

the 6.x series must force the breakpoints?


This message is normal when you put breakpoints in files existing inside DLLs. That's what the message is telling you: it will try to resolve the breakpoint when each DLL is loaded.