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.


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


>>>>>>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


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
Quote from: dmoore on June 22, 2007, 01:16:02 PM

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
Quote from: dmoore on June 22, 2007, 01:16:02 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...


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
Quote from: dmoore on June 22, 2007, 02:29:11 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. :)
Quotehttp://forums.next.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:


> 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
Quote from: dmoore on June 22, 2007, 03:00:08 PM
thanks biplab - the mingw sourceforge site is a bit of a mess...

new version installed:


> 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.