mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-09 04:15:49 +01:00
gobject_gdb.py: support gsignal fastpath and detect more marshallers
- Commit f02ec2f2de added a gsignal fastpath where g_closure_invoke_va() is directly called from g_signal_emit_valist() skipping signal_emit_unlocked_R() altogether which it's the function used by gobject_gdb.py to detect signal emission. So we update gobject_gdb.py to also detect signals which use this g_closure_invoke_va() fastpath. - We also update the existent code to detect marshallers to also include these: surface_event_marshaller() gdk_surface_event_marshallerv() g_type_class_meta_marshal() g_type_class_meta_marshalv() This allow us that for signal emissions which use those marshallers to keep showing the signal handler frame just after the <emit signal blabla> line.
This commit is contained in:
parent
54d1ebfc37
commit
3e9db78656
@ -287,7 +287,8 @@ class GFrameDecorator:
|
||||
|
||||
def find_signal_emission(self):
|
||||
for i in range(min(len(self.queue), 3)):
|
||||
if frame_name(self.queue[i]) == "signal_emit_unlocked_R":
|
||||
name = frame_name(self.queue[i])
|
||||
if name == "signal_emit_unlocked_R" or name == "_g_closure_invoke_va":
|
||||
return i
|
||||
return -1
|
||||
|
||||
@ -306,7 +307,7 @@ class GFrameDecorator:
|
||||
if start == 0:
|
||||
break
|
||||
prev_name = frame_name(self.queue[start - 1])
|
||||
if prev_name.find("_marshal_") >= 0 or prev_name == "g_closure_invoke":
|
||||
if prev_name.find("_marshal") >= 0 or prev_name == "g_closure_invoke":
|
||||
start = start - 1
|
||||
else:
|
||||
break
|
||||
@ -317,7 +318,6 @@ class GFrameDecorator:
|
||||
"g_signal_emit_valist",
|
||||
"g_signal_emit",
|
||||
"g_signal_emit_by_name",
|
||||
"_g_closure_invoke_va",
|
||||
]:
|
||||
end = end + 1
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user