GNOME Bugzilla – Bug 794895
gobject_gdb.py: add pretty printer for GType and GtypeClass*
Last modified: 2018-04-11 13:36:48 UTC
Created attachment 370436 [details] [review] gobject_gdb.py: add pretty printer for GType and GtypeClass* This is useful for printing GValues and the content of GObjects (not the pointer).
Review of attachment 370436 [details] [review]: Nitpick: s/GtypeClass/GTypeClass/ in the commit message. I’ll fix that when pushing it though. Do you have an example of the output this produces?
Without this patch: (gdb) print *pad $1 = { object = { object = { g_type_instance = { g_class = 0x55555577a540 }, ref_count = 3, qdata = 0x0 }, [...] (gdb) print field.value $2 = { g_type = 64, data = {{ v_int = -402635184, [...] With this patch: (gdb) print *pad $1 = { object = { object = { g_type_instance = { g_class = 0x55555577a400 [g_type: GstPad/GstObject/GInitiallyUnowned] }, ref_count = 3, qdata = 0x0 }, [...] (gdb) print field.value $2 = { g_type = 0x40 [gchararray], data = {{ v_int = -402635264, [...]
Pushed to master as d2c49106a459fe5887ba3e3907ed7fa5f57035d3, thanks!