Rename gdb macros with _gdb suffix to avoid ns clashes

glib installs a gdb helper file named `glib.py`.
Then the "hook" file updates `sys.path` and does `import glib`.

This will fail if glib has already been imported into gdb, say
using `from gi.repository import GLib`.  This is due to a namespace clash.

One fix would be to rename the gdb helper files to not clash with
other Python modules.  This should be done for all such helper files.

https://bugzilla.gnome.org/show_bug.cgi?id=760186
This commit is contained in:
Tom Tromey
2016-05-23 10:45:55 -04:00
committed by Colin Walters
parent 0ffb21d355
commit b7145a1d72
6 changed files with 7 additions and 7 deletions

View File

@@ -6,5 +6,5 @@ dir_ = '@datadir@/glib-2.0/gdb'
if not dir_ in sys.path:
sys.path.insert(0, dir_)
from gobject import register
from gobject_gdb import register
register (gdb.current_objfile ())