User forums > Help
Problem with debugging
oBFusCATed:
--- Quote from: Piotrek_16 on June 30, 2013, 06:05:58 pm ---Where can I find target options?
--- End quote ---
Project -> Build options -> Your target in the tree
--- Quote from: Piotrek_16 on June 30, 2013, 06:05:58 pm ---From the command line I used command
--- Code: ---c++ main.cpp -o file
--- End code ---
I obtain executable file which worked.
--- End quote ---
This is not related to the debugger. The debugger is gdb. Search for a command line tutorial.
Also make sure you've setup your project correctly.
See here for details: http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks
Piotrek_16:
--- Code: ---Microsoft Windows [Wersja 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Wszelkie prawa zastrzeżone.
C:\Users\Piotrek>cd ..
C:\Users>cd ..
C:\>cd CodeBlocks
C:\CodeBlocks>cd MinGW
C:\CodeBlocks\MinGW>cd bin
C:\CodeBlocks\MinGW\bin>gdb
GNU gdb (GDB) 7.5
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) file plik
Reading symbols from C:\CodeBlocks\MinGW\bin\plik.exe...done.
(gdb) break main
Breakpoint 1 at 0x401342
(gdb) run > outfile.txt
Starting program: C:\CodeBlocks\MinGW\bin\plik.exe > outfile.txt
[New Thread 1664.0x1eec]
Breakpoint 1, 0x00401342 in main ()
(gdb) next
Single stepping until exit from function main,
which has no line number information.
0x004496d4 in std::ostream::operator<<(double) ()
(gdb) next
Single stepping until exit from function _ZNSolsEd,
which has no line number information.
0x00448028 in std::ostream& std::ostream::_M_insert<double>(double) ()
(gdb) next
Single stepping until exit from function _ZNSo9_M_insertIdEERSoT_,
which has no line number information.
_Unwind_SjLj_Register (fc=0x28fe8c)
at ../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c:127
127 ../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c: No such file or director
y.
(gdb) next
129 in ../../../../src/gcc-4.7.1/libgcc/unwind-sjlj.c
--- End code ---
I have something like that.
Now I'm going to build options:
I have set on in Debug and Release:
- Produce debugging symbols [-g]
- Enable all compiler warnings [-Wall]
- Have g++ follow the C++11 ISO bla bla bla [-std=c++11]
Nothing more.
I will try on my laptop. If there will be the same issue I don't know what will should I do.
On laptop the same problem. So I don't know what's going on.
ollydbg:
--- Quote from: Piotrek_16 on June 30, 2013, 07:00:58 pm ---
--- Code: ---...
(gdb) file plik
Reading symbols from C:\CodeBlocks\MinGW\bin\plik.exe...done.
(gdb) break main
Breakpoint 1 at 0x401342
(gdb) run > outfile.txt
Starting program: C:\CodeBlocks\MinGW\bin\plik.exe > outfile.txt
[New Thread 1664.0x1eec]
Breakpoint 1, 0x00401342 in main ()
(gdb) next
Single stepping until exit from function main,
which has no line number information.
0x004496d4 in std::ostream::operator<<(double) ()
...
--- End code ---
--- End quote ---
Looks like a GDB issue, isn't it? Try a newer GDB?
--- Quote ---- Produce debugging symbols [-s]
--- End quote ---
Typo? should be -g.
Piotrek_16:
--- Quote ---Typo? should be -g.
--- End quote ---
Yeah. There should be -g. My fault.
I have gdb which is added to this codeblocks-12.11mingw-setup.exe from codeblocks.org/download so is it possible to be down?
Maybe someone of you can propose me from which source I have to download new gdb ? Any link ?
ollydbg:
[OT] unofficial MinGW GDB gdb with python released
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version