Gdb doesn't give a stack with a simple std :: string exception

im a little new to gdb, so here:

Im working on a cpp block testing operation right now. I am trying to build string objects with invalid parameters such as null_char, but the program is expected to throw exceptions :). When I try to debug an application using gdb, I type bt after a crash, but it does not give me a stack message. Any ideas why this might happen? Thanks in advance.

+3
source share
2 answers

Add a parameter -gto the compiler command line to add debug symbols. It helps a lot with gdb.

+1
source

, , ? gdb:

catch throw

, .

catch catch

, .

+2

Source: https://habr.com/ru/post/1759474/


All Articles