User forums > Help
gdb doesn't link to source
BlueHazzard:
And the log with a breakpoint?
sydnytt:
oh sorry:
--- Code: ---Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\codeblocks\prj\work\
Adding source dir: C:\codeblocks\prj\work\
Adding source dir: C:\codeblocks\prj\example\
Adding source dir: C:\codeblocks\prj\example\
Adding file: C:\codeblocks\prj\example\bin\Debug\example.exe
Changing directory to: C:/codeblocks/prj/example/.
Set variable: PATH=.;C:\Program Files (x86)\CodeBlocks\MinGW\bin;C:\Program Files (x86)\CodeBlocks\MinGW;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\ia32\compiler;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Common Files\Propellerhead Software\ReWire;C:\Program Files\Common Files\Propellerhead Software\ReWire;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Program Files\Microsoft SQL Server\120\DTS\Binn;C:\Users\alex\AppData\Local\Microsoft\WindowsApps
[debug]Command-line: C:\codeblocks\MinGW\bin\gdb.exe -nx -fullname -quiet -args C:/codeblocks/prj/example/bin/Debug/example.exe
[debug]Working dir : C:\codeblocks\prj\example
Starting debugger: C:\codeblocks\MinGW\bin\gdb.exe -nx -fullname -quiet -args C:/codeblocks/prj/example/bin/Debug/example.exe
done
[debug]Reading symbols from C:/codeblocks/prj/example/bin/Debug/example.exe...
[debug]done.
[debug](gdb)
[debug]> set prompt >>>>>>cb_gdb:
Setting breakpoints
[debug]>>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 8.1
[debug]Copyright (C) 2018 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 "x86_64-w64-mingw32".
[debug]Type "show configuration" for configuration details.
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]Find the GDB manual and other documentation resources online at:
[debug]<http://www.gnu.org/software/gdb/documentation/>.
[debug]For help, type "help".
[debug]Type "apropos word" to search for commands related to "word".
[debug]>>>>>>cb_gdb:
[debug]> set confirm off
Debugger name and version: GNU gdb (GDB) 8.1
[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 200
[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]> directory C:/codeblocks/prj/work/
[debug]Source directories searched: C:/codeblocks/prj/work;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> directory C:/codeblocks/prj/example/
[debug]Source directories searched: C:/codeblocks/prj/example;C:/codeblocks/prj/work;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "C:/codeblocks/prj/example/main.cpp:7"
[debug]Breakpoint 2 at 0x401366: file C:\codeblocks\prj\example\main.cpp, line 7.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: C:\codeblocks\prj\example\bin\Debug\example.exe
Child process PID: 2768
[debug][New Thread 2768.0x3088]
[debug][New Thread 2768.0x1d20]
[debug]Thread 1 received signal ?, Unknown signal.
[debug]0x0009df38 in ?? ()
[debug]>>>>>>cb_gdb:
In ?? () ()
[debug]> bt 30
[debug]#0 0x0009df38 in ?? ()
[debug]#1 0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
Continuing...
[debug]> cont
[debug]Continuing.
[debug][Thread 2768.0x1d20 exited with code 1073741855]
[debug][Inferior 1 (process 2768) exited with code 010000000037]
[debug]>>>>>>cb_gdb:
[Inferior 1 (process 2768) exited with code 010000000037]
[debug]> quit
Debugger finished with status 0
--- End code ---
BlueHazzard:
Hmmm.... all i can find have two root causes:
1) Bug in GDB (I know that version 8.1 is buggy as hell, i use 8.3 )
2) Bitness of executable and gdb do not match...
I do not understand how 2) can happen in an compiler installation with codeblocks... We never had this problem before and quite some people use GDB+ Codeblocks with the standard installation. It should compile to 64 bit without the -m64 bit flag... The same is for 1)...
Have you installed your own compiler?
maybe someone else can help you here...
You can try to update gdb to 8.3 and newer and/or you can try to use the same bitness for everything...
You can also try to install your own compiler: http://mingw-w64.org/doku.php/download/mingw-builds
--- Code: ---[debug]Thread 1 received signal ?, Unknown signal.
--- End code ---
i really think this has to do with bitness.. gdb should know the break signal for a breakpoint...
sydnytt:
Haven't installed any other compiler than the one included in the package. Will try updating GDB, then getting mingw64, will post results.
And it couldn't be a permissions thing? it would let me know if file access denied etc?
Thanks for your help!
BlueHazzard:
--- Quote ---And it couldn't be a permissions thing? it would let me know if file access denied etc?
--- End quote ---
Yes.. you would not come this far...
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version