User forums > Using Code::Blocks

Debug will not stop when exception 'std::out_of_range' appears

<< < (2/2)

syheliel:
here is the debug log: :P

--- Code: ---[debug]Reading symbols from D:/git/codeblock/bin/Debug/codeblock.exe...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 D:/git/codeblock/
[debug]Source directories searched: D:/git/codeblock;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: D:\git\codeblock\bin\Debug\codeblock.exe

Child process PID: 14676

[debug][New Thread 14676.0x6bf8]
[debug][New Thread 14676.0x8b4c]
[debug][New Thread 14676.0x65ac]
[debug][New Thread 14676.0x8dfc]
[debug]Thread 1 hit Catchpoint 1 (exception thrown), 0x000000006fd41c08 in libstdc++-6!.cxa_throw () from D:\Program Files (x86)\scoop\apps\gcc\current\bin\libstdc++-6.dll
[debug]>>>>>>cb_gdb:
[debug]> info frame

Debugger finished with status 1

--- End code ---

BlueHazzard:
Sadly the debugger (gdb) shipped with the latest codeblocks has some strange bugs and crashes from time to time. You sadly hit one of this bugs and your gdb is crashing....

So you have to update gdb to a newer version...
An easy way to do it:
Download the compiler from http://www.winlibs.com/ (for example https://github.com/brechtsanders/winlibs_mingw/releases/download/10.3.0-11.1.0-8.0.0-r2/winlibs-x86_64-posix-seh-gcc-10.3.0-mingw-w64-8.0.0-r2.zip )

extract it and replace the gdb.exe on your system with the gdb.exe from this archive.

Sadly this gdb is not python enabled... I have not found any newer gdb for windows with enabled python...

gd_on:

--- Quote ---Sadly this gdb is not python enabled... I have not found any newer gdb for windows with enabled python...
--- End quote ---
And the one distributed in Msys2, does-it has enabled python ?

BlueHazzard:
yes msys2 has python support. Nice!

--- Code: ---$ gdb
GNU gdb (GDB) 9.2
Copyright (C) 2020 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 "x86_64-pc-msys".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Traceback (most recent call last):
  File "<string>", line 3, in <module>
ModuleNotFoundError: No module named 'libstdcxx'
/etc/gdbinit:6: Error in sourced command file:
Error while executing Python code.
(gdb) python
>


--- End code ---

syheliel:

--- Quote from: BlueHazzard on May 04, 2021, 05:20:25 pm ---Sadly the debugger (gdb) shipped with the latest codeblocks has some strange bugs and crashes from time to time. You sadly hit one of this bugs and your gdb is crashing....

So you have to update gdb to a newer version...
An easy way to do it:
Download the compiler from http://www.winlibs.com/ (for example https://github.com/brechtsanders/winlibs_mingw/releases/download/10.3.0-11.1.0-8.0.0-r2/winlibs-x86_64-posix-seh-gcc-10.3.0-mingw-w64-8.0.0-r2.zip )

extract it and replace the gdb.exe on your system with the gdb.exe from this archive.

Sadly this gdb is not python enabled... I have not found any newer gdb for windows with enabled python...

--- End quote ---
Thank you! It really works!

Navigation

[0] Message Index

[*] Previous page

Go to full version