mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
gdb: Fix iterating GstStructure fields
This broke with 1b568fa01f
where we inlined the array
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/479>
This commit is contained in:
parent
70469b4a4c
commit
7a7cd9de6c
1 changed files with 4 additions and 3 deletions
|
@ -478,11 +478,12 @@ class GdbGstStructure:
|
||||||
|
|
||||||
@save_memory_access(0)
|
@save_memory_access(0)
|
||||||
def size(self):
|
def size(self):
|
||||||
return int(self.val["fields"]["len"])
|
return int(self.val["fields_len"])
|
||||||
|
|
||||||
def values(self):
|
def values(self):
|
||||||
for f in _g_array_iter(self.val["fields"],
|
item = self.val["fields"].cast(gdb.lookup_type("GstStructureField").pointer())
|
||||||
gdb.lookup_type("GstStructureField")):
|
for i in range(self.size()):
|
||||||
|
f = item[i]
|
||||||
key = g_quark_to_string(f["name"])
|
key = g_quark_to_string(f["name"])
|
||||||
value = GdbGValue(f["value"])
|
value = GdbGValue(f["value"])
|
||||||
yield(key, value)
|
yield(key, value)
|
||||||
|
|
Loading…
Reference in a new issue