Search for where std :: out_of_range is selected std :: vector.at ()

Normally I would leave it unprocessed and the debugger (gdb, Eclipse CDT) will show me the call stack. Unfortunately, the code is called by a third-party library that absorbs all exceptions. I can catch the exception in front of the third-party library, but I do not see the call stack (deleting the stack?).

How can I find out where the exception was thrown?

+6
source share
2 answers

Will catchpoints help? You can break whenever an exception is thrown by entering the catch throw command in gdb. In Eclipse, you can do this through the gdb console. See this question .

+5
source

You can put a breakpoint in the constructor for the exception object. Since this happens before the exception is thrown, you get more visibility in the calling code.

+4
source

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


All Articles