lidedongsn
lidedongsn

Reputation: 135

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?

Upvotes: 2

Views: 2249

Answers (1)

Mathieu_Du
Mathieu_Du

Reputation: 827

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!

Upvotes: 3

Related Questions