mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
Fix gdb script for new quark variable names
... and don't spam stderr with exceptions if someone renames things again. Last but not least, keep the old names as a fallback, so that LD_PRELOAD with an older libglib still works.
This commit is contained in:
parent
3d45854a58
commit
685259dfea
11
glib/glib.py
11
glib/glib.py
@ -10,8 +10,15 @@ def g_quark_to_string (quark):
|
||||
quark = long(quark)
|
||||
if quark == 0:
|
||||
return None
|
||||
val = read_global_var ("g_quarks")
|
||||
max_q = long(read_global_var ("g_quark_seq_id"))
|
||||
try:
|
||||
val = read_global_var ("quarks")
|
||||
max_q = long(read_global_var ("quark_seq_id"))
|
||||
except:
|
||||
try:
|
||||
val = read_global_var ("g_quarks")
|
||||
max_q = long(read_global_var ("g_quark_seq_id"))
|
||||
except:
|
||||
return None;
|
||||
if quark < max_q:
|
||||
return val[quark].string()
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user