How do I find where an exception was thrown in C++?

后端 未结 7 1316
[愿得一人]
[愿得一人] 2020-11-28 18:55

I have a program that throws an uncaught exception somewhere. All I get is a report of an exception being thrown, and no information as to where it was thrown. It seems illo

7条回答
  •  野性不改
    2020-11-28 19:33

    I've got code to do this in Windows/Visual Studio, let me know if you want an outline. Don't know how to do it for dwarf2 code though, a quick google suggests that there's a function _Unwind_Backtrace in libgcc that probably is part of what you need.

提交回复
热议问题