473,326 Members | 2,090 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Debugging Python extensions with gdb

Hi,

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,
Regards,
Andrew Wilkinson

andrew@andrew tests $ gdb --args python cg.py
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
conditions.
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/libthread_db.so.1".

(gdb) run
Starting program: /usr/bin/python cg.py
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/libpython2.3.so.1.0
(gdb) bt
#0 0x4006ea73 in PyObject_GetAttrString ()
from /usr/lib/libpython2.3.so.1.0
#1 0x404dc1ed in ?? ()
#2 0x00000000 in ?? ()
#3 0x404eb6cd in ?? ()
#4 0xbfffef5c in ?? ()
#5 0x400f2fbc in __JCR_LIST__ () from /usr/lib/libpython2.3.so.1.0
#6 0x4006a928 in lookdict_string () from /usr/lib/libpython2.3.so.1.0
#7 0x404c7aba in ?? ()
#8 0xbffff07c in ?? ()
#9 0xbffff0ac in ?? ()
#10 0x00000007 in ?? ()
#11 0xbffff07c in ?? ()
#12 0x40061579 in function_call () from /usr/lib/libpython2.3.so.1.0
#13 0x4006cd58 in PyCFunction_Call () from /usr/lib/libpython2.3.so.1.0
#14 0x40094bc3 in call_function () from /usr/lib/libpython2.3.so.1.0
#15 0x40092f8d in eval_frame () from /usr/lib/libpython2.3.so.1.0
#16 0x40093d5f in PyEval_EvalCodeEx () from /usr/lib/libpython2.3.so.1.0
#17 0x40091277 in PyEval_EvalCode () from /usr/lib/libpython2.3.so.1.0
#18 0x400aaf8f in run_node () from /usr/lib/libpython2.3.so.1.0
#19 0x400aa2fe in PyRun_SimpleFileExFlags ()
from /usr/lib/libpython2.3.so.1.0
#20 0x400a9df4 in PyRun_AnyFileExFlags () from /usr/lib/libpython2.3.so.1.0
#21 0x400af3b5 in Py_Main () from /usr/lib/libpython2.3.so.1.0
#22 0x0804867e in main ()

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

Jul 18 '05 #1
1 2712
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.

Andrew

--
Life's too short for chess.
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ju-Lian Kwan | last post by:
Does anyone know how to get this to work? I've done a fair bit of searching with Google and couldn't turn up anything. I just want to get debugging to work so I've built a DLL using VC7 and it runs...
4
by: Jesper Olsen | last post by:
Hi, I have a C-extention build with distutils that I would like to debug. How can I specify to distuils to pass option "-g" and not "-O2" along to the compiler (gcc)? Jesper
0
by: peter | last post by:
Hello all, I would like to debug my python libraries, written in c++, with GDB (gnu debugger) I'm using the mingw compiler in a windows environment. As development environment I use eclipse...
0
by: karmadharma | last post by:
Hello everybody I am trying to make sure that my (non trivial) C module is cleaning up properly after itself, and consequently I've built python with --py-debug which, besides allowing me to use...
0
by: David Coffin | last post by:
Hi, Is there any documentation concerning the Python debugging builds beyond section 1.5 in the Python/C API reference manual and Misc/ SpecialBuilds.txt file in the source code? I'd like to...
9
by: Fulvio | last post by:
*********************** Your mail has been scanned by InterScan MSS. *********************** Hello, I'm trying out a small utility and my method uses PDB for debugging. I tried to read...
2
by: marco_347 | last post by:
hi all, I have a python program that calls a dll through ctypes (py2.5). In some (reproducible) conditions the program crashes with an error in ctypes module. How can I trace down the problem? I...
1
by: chewie54 | last post by:
Hi All, Has anyone used eclipse to develop and debug c or c++ extensions for python? Is it possible to you PyDev and CDT with eclipes to get an integrated environment in which I could debug...
3
by: SteveD | last post by:
Hi guys, http://luaforge.net/frs/?group_id=327 pgdb.zip is an addition to scite-debug, which adds source debugging to the popular SciTE programmer's editor. gdbpy.zip is a standalone version...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.