Author Topic: GDB not setting breakpoints (path separator issue?)  (Read 6014 times)

Offline atomix1040

  • Single posting newcomer
  • *
  • Posts: 3
GDB not setting breakpoints (path separator issue?)
« on: April 09, 2013, 03:25:03 pm »
The "break" command sent to gdb fails, although the file is there on the disk (since it gets build).
Is there something i can do to get this working?

I use C::B "svn 8598" built on nov 20.2012
Code
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\devel\ctrlr\Source
Adding source dir: C:\devel\ctrlr\Builds\Generated\Windows\StandaloneCB\
Adding source dir: C:\devel\
Adding file: C:\devel\ctrlr\Builds\Generated\Windows\StandaloneCB\bin\Debug\Ctrlr-Debug.exe
Changing directory to: C:/devel/ctrlr/Builds/Generated/Windows/StandaloneCB/.
Set variable: PATH=.;C:\MinGW\bin;C:\MinGW;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\QuickTime\QTSystem;C:\MinGW\libexec\gcc\mingw32\4.7.2;C:\Program Files (x86)\Java\jre1.6.0_35\bin;C:\msvc\bin;C:\msvc\Tools

[debug]Command-line: C:\MinGW\bin\gdb.exe -nx -fullname  -quiet  -args C:/devel/ctrlr/Builds/Generated/Windows/StandaloneCB/bin/Debug/Ctrlr-Debug.exe
[debug]Working dir : C:\devel\ctrlr\Builds\Generated\Windows\StandaloneCB

Starting debugger: C:\MinGW\bin\gdb.exe -nx -fullname  -quiet  -args C:/devel/ctrlr/Builds/Generated/Windows/StandaloneCB/bin/Debug/Ctrlr-Debug.exe
done

[debug]> set prompt >>>>>>cb_gdb:

Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints

[debug]Reading symbols from C:\devel\ctrlr\Builds\Generated\Windows\StandaloneCB\bin\Debug\Ctrlr-Debug.exe...
[debug]done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.5
[debug]Copyright (C) 2012 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "i686-pc-mingw32".
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off

Debugger name and version: GNU gdb (GDB) 7.5

[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source C:\Users\rk09631\Programs\Codeblocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory c:\devel\ctrlr\Source
[debug]Source directories searched: c:develctrlrSource;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> directory C:/devel/ctrlr/Source
[debug]Source directories searched: C:/devel/ctrlr/Source;c:develctrlrSource;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> directory C:/devel/ctrlr/Builds/Generated/Windows/StandaloneCB/
[debug]Source directories searched: C:/devel/ctrlr/Builds/Generated/Windows/StandaloneCB;C:/devel/ctrlr/Source;c:develctrlrSource;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> directory C:/devel/
[debug]Source directories searched: C:/devel;C:/devel/ctrlr/Builds/Generated/Windows/StandaloneCB;C:/devel/ctrlr/Source;c:develctrlrSource;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "C:/devel/ctrlr/Source/Plugin/CtrlrProcessor.cpp:20"
[debug]No source file named C:/devel/ctrlr/Source/Plugin/CtrlrProcessor.cpp.
[debug]Breakpoint 2 ("C:/devel/ctrlr/Source/Plugin/CtrlrProcessor.cpp:20") pending.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: C:\devel\ctrlr\Builds\Generated\Windows\StandaloneCB\bin\Debug\Ctrlr-Debug.exe

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: GDB not setting breakpoints (path separator issue?)
« Reply #1 on: April 09, 2013, 03:45:31 pm »
Is this file part of a DLL?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline atomix1040

  • Single posting newcomer
  • *
  • Posts: 3
Re: GDB not setting breakpoints (path separator issue?)
« Reply #2 on: April 09, 2013, 04:15:41 pm »
No it's a normal native standalone EXE file.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: GDB not setting breakpoints (path separator issue?)
« Reply #3 on: April 09, 2013, 04:30:32 pm »
Does it work if you execute:
Code
break C:/devel/ctrlr/Source/Plugin/CtrlrProcessor.cpp:20
or
Code
break "C:\devel\ctrlr\Source\Plugin\CtrlrProcessor.cpp:20"

To execute these commands hit the pause button and type them in the combo box below the log file.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline atomix1040

  • Single posting newcomer
  • *
  • Posts: 3
Re: GDB not setting breakpoints (path separator issue?)
« Reply #4 on: April 09, 2013, 04:54:53 pm »
Well it looks like it automagicly fixed itself (i helped a little by re-creating the project from scratch using an application that's bundled with JUCE called Introjucer, it manages your project and spits out APP-specific project files for XCode VS and now C::B). The breakpoint is getting hit on start, you can close this thread if you want.

Anyway now the output is:
Code
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\devel\ctrlr\Builds\Generated\Windows\StandaloneCB\
Adding source dir: C:\devel\
Adding file: C:\devel\ctrlr\Builds\Generated\Windows\StandaloneCB\bin\Debug\Ctrlr-Debug.exe
Changing directory to: C:/devel/ctrlr/Builds/Generated/Windows/StandaloneCB/.
Set variable: PATH=.;C:\MinGW\bin;C:\MinGW;c:\msvc\bin;c:\msvc;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\QuickTime\QTSystem;C:\MinGW\libexec\gcc\mingw32\4.7.2;C:\Program Files (x86)\Java\jre1.6.0_35\bin;C:\msvc\bin;C:\msvc\Tools

[debug]Command-line: C:\MinGW\bin\gdb.exe -nx -fullname  -quiet  -args C:/devel/ctrlr/Builds/Generated/Windows/StandaloneCB/bin/Debug/Ctrlr-Debug.exe
[debug]Working dir : C:\devel\ctrlr\Builds\Generated\Windows\StandaloneCB

Starting debugger: C:\MinGW\bin\gdb.exe -nx -fullname  -quiet  -args C:/devel/ctrlr/Builds/Generated/Windows/StandaloneCB/bin/Debug/Ctrlr-Debug.exe
done

[debug]> set prompt >>>>>>cb_gdb:

Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints

[debug]Reading symbols from C:\devel\ctrlr\Builds\Generated\Windows\StandaloneCB\bin\Debug\Ctrlr-Debug.exe...
[debug]done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.5
[debug]Copyright (C) 2012 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "i686-pc-mingw32".
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off

Debugger name and version: GNU gdb (GDB) 7.5

[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source C:\Users\rk09631\Programs\Codeblocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory C:/devel/ctrlr/Builds/Generated/Windows/StandaloneCB/
[debug]Source directories searched: C:/devel/ctrlr/Builds/Generated/Windows/StandaloneCB;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> directory C:/devel/
[debug]Source directories searched: C:/devel;C:/devel/ctrlr/Builds/Generated/Windows/StandaloneCB;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "C:/devel/ctrlr/Source/Plugin/CtrlrProcessor.cpp:20"
[debug]Breakpoint 2 at 0xa19922: file C:\devel\ctrlr\Source\Plugin\CtrlrProcessor.cpp, line 20.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: C:\devel\ctrlr\Builds\Generated\Windows\StandaloneCB\bin\Debug\Ctrlr-Debug.exe

Child process PID: 6936

[debug][New Thread 6936.0x1340]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: GDB not setting breakpoints (path separator issue?)
« Reply #5 on: April 09, 2013, 05:19:35 pm »
Sometimes this happens when you've not build your project with debugging symbols correctly.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]