Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > pythonic backtrace with gdb

Reply
Thread Tools

pythonic backtrace with gdb

 
 
Hynek Hanke
Guest
Posts: n/a
 
      01-23-2008

Hello,

please, I'm trying to obtain a pythonic backtrace via gdb to be able to
debug deadlock situations in a multi-threaded program by attaching to
the running process.

I'm running the program under python2.4-dbg, When I try to load the
..gdbinit script obtained at http://wiki.python.org/moin/DebuggingWithGdb
, gdb crashes however with the following error (full session listing):

(gdb) attach 10753
Attaching to program: /usr/bin/python, process 10753
warning: no loadable sections found in added symbol-file system-supplied
DSO at 0x7fff575fd000
0x00002b33537177fb in ?? () from /lib64/ld-linux-x86-64.so.2
(gdb) pystack
/tmp/buildd/gdb-6.6.dfsg.90.20070912/gdb/regcache.c:164: internal-error:
register_type: Assertion `regnum >= 0 && regnum <
descr->nr_cooked_registers' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) [answered Y; input not from terminal]
/tmp/buildd/gdb-6.6.dfsg.90.20070912/gdb/regcache.c:164: internal-error:
register_type: Assertion `regnum >= 0 && regnum <
descr->nr_cooked_registers' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) [answered Y; input not from terminal]
Neúspěšně ukončen (SIGABRT)

I've also tried to use the backtrace script here
http://mashebali.com/?Python_GDB_mac...cros:Backtrace
But I get a different error:
(gdb) pbt
Invalid type combination in ordering comparison.

I'm using GDB version 6.6.90.

Could you please suggest what can I do to be able to get the backtrace?

Thank you,
Hynek Hanke


 
Reply With Quote
 
 
 
 
Dieter Maurer
Guest
Posts: n/a
 
      01-24-2008
Hynek Hanke <(E-Mail Removed)> writes on Wed, 23 Jan 2008 14:30:22 +0100:
> ...
> I've also tried to use the backtrace script here
> http://mashebali.com/?Python_GDB_mac...cros:Backtrace
> But I get a different error:
> (gdb) pbt
> Invalid type combination in ordering comparison.
>
> I'm using GDB version 6.6.90.


I expect that your GDB version is too new and has introduced
some safety checks (which now break).

It will probably help when you add explicite type casts to "long"
around the comparisons in the definition of "pbt".

Dieter
 
Reply With Quote
 
 
 
Reply

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
backtrace forwarded email's recipients septer2006@hotmail.com Computer Security 0 05-23-2006 03:40 PM
Capturing gdb output in pyhton script using gdb -batch -x arguments Surendra Python 0 03-23-2006 02:47 PM
Object Oriented vs Pythonic Code, and Pythonic standards Carl J. Van Arsdall Python 4 02-07-2006 10:15 PM



Advertisments