简体   繁体   中英

How can I debug gstreamer with gdb?

I create gst pipeline whith c code. Now, I want the debug info of gstreamer with GDB. How can I get the error or warning info from the pipeline?

To run gdb against your program, simply use :

gdb --args your_program and its args

If you want to break on the g_warnings and g_criticals, simply run gdb this way:

G_DEBUG=fatal-warnings gdb --args your_program and its args

The GLib will then emit SIGTRAP, allowing you to see the stack when the warning / critical was emitted.

You can also use fatal-criticals if you only want SIGTRAP to be sent on critical errors.

Cheers!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM