How to get backtrace information from exception in googletest?

后端 未结 2 1479
独厮守ぢ
独厮守ぢ 2021-01-06 14:32

I\'m trying to do some semi test driven design, and occasionally when I implement a new feature, it will have an exception somewhere. All gtest tells me is what the excepti

2条回答
  •  囚心锁ツ
    2021-01-06 15:08

    Use catch throw gdb command to set special breakpoint before your exception is thrown. When it is hit you can see backtrace as usual by command bt. See https://sourceware.org/gdb/onlinedocs/gdb/Set-Catchpoints.html.

提交回复
热议问题