Purpose of gobject_gdb.py file?

I noticed the gobject_gdb.py file in Glib repo, and wondered what’s useful for, so two questions:

  • Is it to help debugging C glib programs? like eg. having GDB printing signal names in backtraces
  • Or is it to help debugging Python glib programs?

If it’s the former do you know how to use it in GDB? it would make my life so much easier if GDB backtraces can show GSignal names for example…

I tried to search GLib docs for this but with no luck.

Thanks :slight_smile:

gobject_gdb.py is a GDB script that helps when debugging GObject code—regardless of language. It contains frame decorators for prettifying the signal emission chain, if you break into it.

GLib also has a glib_gdb.py which adds a gforeach command that can be used to pretty print the contents of a GList*, GSList*, or GHashTable* references.

The existence of these extensions is documented in the GLib reference, but I’ve realised I missed the section’s title, so I’ve just fixed it.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.