[glib/py3] Make gdb pretty-printers compatible with Python3
- From: Tim Lunn <timl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/py3] Make gdb pretty-printers compatible with Python3
- Date: Tue, 17 Dec 2013 22:46:29 +0000 (UTC)
commit d33f72097fa21aade43e273d049e2a7105e99ad5
Author: Tim Lunn <tim feathertop org>
Date: Wed Dec 18 07:14:38 2013 +1100
Make gdb pretty-printers compatible with Python3
On some systems gdb is linked against python3 where "long" no longer
exists. In this case should be using int.
https://bugzilla.gnome.org/show_bug.cgi?id=720635
glib/glib.py | 4 ++++
gobject/gobject.py | 5 +++++
2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/glib/glib.py b/glib/glib.py
index 64459b3..f7fe22b 100644
--- a/glib/glib.py
+++ b/glib/glib.py
@@ -1,4 +1,8 @@
import gdb
+import sys
+
+if sys.version_info[0] >= 3:
+ long = int
# This is not quite right, as local vars may override symname
def read_global_var (symname):
diff --git a/gobject/gobject.py b/gobject/gobject.py
index ce2a7f7..7bb3cbe 100644
--- a/gobject/gobject.py
+++ b/gobject/gobject.py
@@ -1,6 +1,11 @@
import os.path
import gdb
import glib
+import sys
+
+if sys.version_info[0] >= 3:
+ long = int
+
try:
import gdb.backtrace
import gdb.command.backtrace
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]