pythonic backtrace with gdb

Discussion in 'Python' started by Hynek Hanke, Jan 23, 2008.

  1. Hynek Hanke

    Hynek Hanke Guest

    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_macros:The_Macros: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
     
    Hynek Hanke, Jan 23, 2008
    #1
    1. Advertising

  2. Hynek Hanke <> 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_macros:The_Macros: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
     
    Dieter Maurer, Jan 24, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Carl J. Van Arsdall
    Replies:
    4
    Views:
    502
    Bruno Desthuilliers
    Feb 7, 2006
  2. Surendra
    Replies:
    0
    Views:
    512
    Surendra
    Mar 23, 2006
  3. Paolo Pantaleo

    Getting backtrace on an axception

    Paolo Pantaleo, Jun 10, 2006, in forum: Python
    Replies:
    0
    Views:
    323
    Paolo Pantaleo
    Jun 10, 2006
  4. seba
    Replies:
    1
    Views:
    1,449
    mlimber
    Mar 22, 2007
  5. Timothy Madden
    Replies:
    1
    Views:
    1,637
    Timothy Madden
    Sep 17, 2009
Loading...

Share This Page