gdb: Fix the way we wrap segments

Without that we end up with a reference to a GBoxed instead of the actual segment making the rest of the code fail

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5986>
This commit is contained in:
Thibault Saunier 2023-08-31 18:55:58 -04:00 committed by GStreamer Marge Bot
parent f09da2db0e
commit 9afab6107f

View file

@ -525,12 +525,13 @@ class GdbGstStructure:
else:
_gdb_write(indent, "%s:" % (self.name()))
for (key, value) in self.values():
_gdb_write(indent + 1, "%s: %s" % (key, str(value)))
_gdb_write(indent+1, "%s: %s" % (key, str(value)))
class GdbGstSegment:
def __init__(self, val):
self.val = val
t = gdb.lookup_type("GstSegment").pointer().pointer()
self.val = val.cast(t).dereference()
self.fmt = str(self.val["format"]).split("_")[-1].lower()
def format_value(self, n):