Bug 14198 - gdb can't load module backtrace
Summary: gdb can't load module backtrace
Status: RESOLVED INVALID
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: 7.4
: P2 critical
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-04 14:41 UTC by Jan Lieven
Modified: 2014-06-06 08:59 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lieven 2012-06-04 14:41:36 UTC
When debuging any crash gdb throws an exception stating that there is no module named backtrace.
Ignoring the error message and running bt results in an infinite loop.

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib/libgobject-2.0.so.0.3200.3-gdb.py", line 9, in <module>
    from gobject import register
  File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
ImportError: No module named backtrace
[New Thread 0x7fffe59e3700 (LWP 15897)]
Comment 1 Tom Tromey 2012-06-12 19:43:02 UTC
This isn't a gdb bug per se.
Fedora gdb ships with some extra python modules that aren't upstreamed yet.
The libgobject python code there is trying to use these modules.
But, if you built the standard gdb, you don't have these.
The libgobject code could be more adaptive here.
Eventually the features appearing in those Fedora modules will make it
to the FSF gdb (we're working on it now),but in a different form.
Comment 2 Dieter P 2012-08-06 10:43:45 UTC
it's still a bug because it writes error messages, which are apparently not relevant.  for a user who doesn't know these inner workings it looks like the program is broken.
Comment 3 Tom Tromey 2012-08-06 14:02:50 UTC
If it is a bug, it is in the python code distributed with glib.

There isn't much that gdb can do about it.
We can't disable the error messages because then we get complaints
that gdb swallows error messages from python scripts.
Comment 4 David Faure 2014-06-06 08:59:15 UTC
In case anyone ends up here: the bug report for glib is at https://bugzilla.gnome.org/show_bug.cgi?id=623552