User forums > Help
Problem with debugging
Piotrek_16:
It doesn't work or I do something wrong.
ollydbg:
--- Quote from: Piotrek_16 on July 04, 2013, 05:56:01 pm ---It doesn't work or I do something wrong.
--- End quote ---
Then you can provide a minimal test code snippet, so I can build it on my PC and debug it to see whether I have the same issue.
G-Shadow:
I have similar issue. Debugger hangs when I try to step or use breakpoints and no way to stop it except closing whole C::B or killing gdb process.
I wasted some time and found that problem appears when I using Linux line endings in the .cpp file (C::B is running under Windows).
If I convert .cpp to the Windows line endings, problem disappears.
Now I have a question, is I really have to use Windows line endings to debug under Windows, or there is some options could help me?
If I have to use Windows line endings, then how about Linux? Will debugger / gdb work fine with Windows line endings under the Linux?
PS: Don`t sure if it usefull, but my system is: Win8 x64, C::B 12.11 release, GNU gdb (GDB) 7.5 (installed with C::B). Also tried nightly C::B build.
oBFusCATed:
--- Quote from: G-Shadow on July 20, 2013, 12:04:10 am ---If I convert .cpp to the Windows line endings, problem disappears.
--- End quote ---
This is quite strange.
Please post the full log from the debugger in code tags.
G-Shadow:
I`m sorry, looks like I was wrong, it is not Linux line endings. The problem is when CR (0x0D) line endings are used in source file. So, my question about Linux is meaningless. But may be topic starter still has same problem with CR line ends.
--- Code: ---Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: E:\DENIS\Projects\zzzzzzzzzzzz\
Adding source dir: E:\DENIS\Projects\zzzzzzzzzzzz\
Adding file: E:\DENIS\Projects\zzzzzzzzzzzz\bin\Debug\zzzzzzzzzzzz.exe
Changing directory to: E:/DENIS/Projects/zzzzzzzzzzzz/.
Set variable: PATH=.;C:\Program Files (x86)\CodeBlocks\MinGW\bin;C:\Program Files (x86)\CodeBlocks\MinGW;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Resource\bin;C:\Program Files\TortoiseSVN\bin
[debug]Command-line: C:\Program Files (x86)\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname -quiet -args E:/DENIS/Projects/zzzzzzzzzzzz/bin/Debug/zzzzzzzzzzzz.exe
[debug]Working dir : E:\DENIS\Projects\zzzzzzzzzzzz
Starting debugger: C:\Program Files (x86)\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname -quiet -args E:/DENIS/Projects/zzzzzzzzzzzz/bin/Debug/zzzzzzzzzzzz.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 E:\DENIS\Projects\zzzzzzzzzzzz\bin\Debug\zzzzzzzzzzzz.exe...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 new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source C:\Program Files (x86)\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory E:/DENIS/Projects/zzzzzzzzzzzz/
[debug]Source directories searched: E:/DENIS/Projects/zzzzzzzzzzzz;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "E:/DENIS/Projects/zzzzzzzzzzzz/main.cpp:7"
[debug]Breakpoint 2 at 0x40134a: file E:\DENIS\Projects\zzzzzzzzzzzz\main.cpp, line 7.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: E:\DENIS\Projects\zzzzzzzzzzzz\bin\Debug\zzzzzzzzzzzz.exe
Child process PID: 732
[debug][New Thread 732.0x12c8]
[debug]Breakpoint 2, main () at E:\DENIS\Projects\zzzzzzzzzzzz\main.cpp:7
[debug]>>>>>>cb_gdb:
--- End code ---
And in case of good source file, changes are only in those last lines:
--- Code: ---Child process PID: 4820
[debug][New Thread 4820.0xf70]
[debug]Breakpoint 2, main () at E:\DENIS\Projects\zzzzzzzzzzzz\main.cpp:7
[debug]E:\DENIS\Projects\zzzzzzzzzzzz\main.cpp:7:62:beg:0x40134a
[debug]>>>>>>cb_gdb:
At E:\DENIS\Projects\zzzzzzzzzzzz\main.cpp:7
--- End code ---
So, added only one line "... main.cpp:7:62:beg:0x40134a", and successfull "at ...\main.cpp:7" in the end.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version