Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Debugging Python extensions with gdb

Thread Tools

Debugging Python extensions with gdb

Andrew Wilkinson
Posts: n/a

Below is a back trace from a gdb session. If you look at you'll see that
there are some function calls where gdb can't find the name of the
function. I'm pretty sure that those functions are in my extension. I've
got everything compiled with debugging info turned on, so I'm pretty sure
it is related to the "Unable to find dynamic linker breakpoint function"
message. Does anyone know how to get rid of this message? I tried googling,
but nothing useful turned up.

Thanks in advance for any help,
Andrew Wilkinson

andrew@andrew tests $ gdb --args python
GNU gdb 6.1.1
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db
library "/lib/".

(gdb) run
Starting program: /usr/bin/python
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
about to init Devil
No error

Program received signal SIGSEGV, Segmentation fault.
0x4006ea73 in PyObject_GetAttrString () from /usr/lib/
(gdb) bt
#0 0x4006ea73 in PyObject_GetAttrString ()
from /usr/lib/
#1 0x404dc1ed in ?? ()
#2 0x00000000 in ?? ()
#3 0x404eb6cd in ?? ()
#4 0xbfffef5c in ?? ()
#5 0x400f2fbc in __JCR_LIST__ () from /usr/lib/
#6 0x4006a928 in lookdict_string () from /usr/lib/
#7 0x404c7aba in ?? ()
#8 0xbffff07c in ?? ()
#9 0xbffff0ac in ?? ()
#10 0x00000007 in ?? ()
#11 0xbffff07c in ?? ()
#12 0x40061579 in function_call () from /usr/lib/
#13 0x4006cd58 in PyCFunction_Call () from /usr/lib/
#14 0x40094bc3 in call_function () from /usr/lib/
#15 0x40092f8d in eval_frame () from /usr/lib/
#16 0x40093d5f in PyEval_EvalCodeEx () from /usr/lib/
#17 0x40091277 in PyEval_EvalCode () from /usr/lib/
#18 0x400aaf8f in run_node () from /usr/lib/
#19 0x400aa2fe in PyRun_SimpleFileExFlags ()
from /usr/lib/
#20 0x400a9df4 in PyRun_AnyFileExFlags () from /usr/lib/
#21 0x400af3b5 in Py_Main () from /usr/lib/
#22 0x0804867e in main ()

Tis better to be silent and thought a fool, than to open
your mouth and remove all doubt -- Abraham Lincoln

Reply With Quote
Andrew Wilkinson
Posts: n/a
Andrew Wilkinson wrote:

> Hi,

I sorted the problem - all I needed to do was use the 'share' command in gdb
to update the symbol tables before I did a backtrace.


Life's too short for chess.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Debugging with gdb: pystack macro for gdb to show python stack trace Timothy Madden Python 1 09-17-2009 11:47 AM
GDB - no debugging symbols found (GDB Vs GCC?) seba C++ 1 03-22-2007 02:02 PM
Capturing gdb output in pyhton script using gdb -batch -x arguments Surendra Python 0 03-23-2006 02:47 PM
GDB .... no debugging symbols found Hug C++ 6 03-17-2005 03:38 PM
NAN error and debugging with GDB Codas obfuscatus C Programming 10 01-08-2004 10:28 PM