News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

GDB not setting breakpoints (path separator issue?)

Started by atomix1040, April 09, 2013, 03:25:03 PM

Previous topic - Next topic

atomix1040

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

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

oBFusCATed

(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!]

atomix1040


oBFusCATed

Does it work if you execute:
break C:/devel/ctrlr/Source/Plugin/CtrlrProcessor.cpp:20
or
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!]

atomix1040

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:

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]

oBFusCATed

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