Author Topic: Debugging not working  (Read 778 times)

Offline codinglexernewbie

  • Multiple posting newcomer
  • *
  • Posts: 12
Debugging not working
« on: February 25, 2023, 06:27:00 am »
I've tried it for a while, but it just doesnt work and ends with [debug]>>>>>>cb_gdb:
And it doesn't even show the arrows
i've checked the tutorials and copied them exactly but, doesnt seem to work
using the tdm-gcc32 bit

Offline codinglexernewbie

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Debugging not working
« Reply #1 on: February 25, 2023, 07:02:42 am »
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Users\Owner\test\
Adding source dir: C:\Users\Owner\test\
Adding file: C:\Users\Owner\test\bin\Debug\test.exe
Changing directory to: C:/Users/Owner/test/.
Set variable: PATH=.;C:\TDM-GCC-32\bin;C:\TDM-GCC-32;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;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:\TDM-GCC-64\bin;C:\Program Files\Git\cmd;C:\Program Files\dotnet;C:\Users\Owner\AppData\Local\Microsoft\WindowsApps

[debug]Command-line: C:\Program Files\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname -quiet  -args C:/Users/Owner/test/bin/Debug/test.exe
[debug]Working dir : C:\Users\Owner\test

Starting debugger: C:\Program Files\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname -quiet  -args C:/Users/Owner/test/bin/Debug/test.exe
done

[debug]Reading symbols from C:/Users/Owner/test/bin/Debug/test.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:/Users/Owner/test/
[debug]Source directories searched: C:/Users/Owner/test;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "C:/Users/Owner/test/main.cpp:1"
[debug]Breakpoint 2 at 0x401396: file C:\Users\Owner\test\main.cpp, line 1.
[debug]>>>>>>cb_gdb:
[debug]> break "C:/Users/Owner/test/main.cpp:18"
[debug]Breakpoint 3 at 0x4013cb: C:/Users/Owner/test/main.cpp:18. (3 locations)
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: C:\Users\Owner\test\bin\Debug\test.exe

Child process PID: 13712

[debug][New Thread 13712.0x30d0]
[debug][New Thread 13712.0x1574]
[debug]Thread 1 received signal ?, Unknown signal.
[debug]0x0009df58 in ?? ()
[debug]>>>>>>cb_gdb:

In ?? () ()

[debug]> bt 30
[debug]#0  0x0009df58 in ?? ()
[debug]#1  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
debug log i get

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7465
    • My Best Post
Re: Debugging not working
« Reply #2 on: February 25, 2023, 07:06:26 pm »
For awhile there was a issue where the gdb and Code::Blocks had to be the same bit size as in both 64 bit or both 32 bit.

I have no idea if/when that issue was fixed.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org