How do I get GDB to break on a GLib assertion failure?

前端 未结 2 1861
无人共我
无人共我 2020-12-28 16:21

Somewhere in a mass of code that I did not write (but I am trying to debug), an assertion fails in the GLib library:

(process:31987): GLib-CRITICAL **: g_has         


        
相关标签:
2条回答
  • 2020-12-28 17:04

    You should add an environment variable like this:

    G_DEBUG=fatal_warnings gdb ...
    
    0 讨论(0)
  • 2020-12-28 17:13

    Break on g_log(). This covers all cases like g_warning(), g_critical(), etc.

    0 讨论(0)
提交回复
热议问题