Author Topic: can't debug effectively in win32...  (Read 6943 times)

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
can't debug effectively in win32...
« 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?


Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: can't debug effectively in win32...
« Reply #1 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.

???


Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: can't debug effectively in win32...
« Reply #2 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: can't debug effectively in win32...
« Reply #3 on: June 22, 2007, 02:27:52 pm »
what version of gdb is supported?

Versions 6.x and up are known to work well.
Be patient!
This bug will be fixed soon...

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: can't debug effectively in win32...
« Reply #4 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?

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: can't debug effectively in win32...
« Reply #5 on: June 22, 2007, 02:30:15 pm »
I'll also upgrade...

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: can't debug effectively in win32...
« Reply #6 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: can't debug effectively in win32...
« Reply #7 on: June 22, 2007, 02:35:14 pm »
tried project properties -> debugger search dirs... still doesn't help. must be the gdb version

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: can't debug effectively in win32...
« Reply #8 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

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: can't debug effectively in win32...
« Reply #9 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
Be a part of the solution, not a part of the problem.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: can't debug effectively in win32...
« Reply #10 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?

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: can't debug effectively in win32...
« Reply #11 on: June 22, 2007, 03:07:32 pm »
Workaround:
put a breakpoint in src/src/app.cpp and run again after this one....
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: can't debug effectively in win32...
« Reply #12 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.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: can't debug effectively in win32...
« Reply #13 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.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: can't debug effectively in win32...
« Reply #14 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.
Be patient!
This bug will be fixed soon...