Forcing a stack trace from the command line?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Willie Walker

    #1

    Forcing a stack trace from the command line?

    Hi:

    I'm working on Orca, a screen reader for the GNOME platform,
    and it's being done in Python. Python is working really for
    us right now and I'm quite happy with many aspects of it.

    Is there a function like CTRL-Backspace in Python? There is
    a hang in my code somewhere and I'm unable to find it. When
    the hang occurs, all "print" commands seem to stop and I can
    only recover by killing the app via Ctrl-Z and kill. In these
    cases, Ctrl-C doesn't work even though I've registered signal
    handlers:

    signal.signal(s ignal.SIGINT, shutdownAndExit )
    signal.signal(s ignal.SIGQUIT, shutdownAndExit )

    What I'd really like to be able to do is to use something like
    Java's CTRL-Backspace to dump a stack trace in these instances
    just to give me a clue about where my code is during the hang.

    I've tried using sys.settrace() to track things, but it seems
    to introduce something into the system that prevents me from
    being able to reproduce the hang.

    Any advice would be greatly appreciated.

    Thanks!

    Will

  • Maciej Dziardziel

    #2
    Re: Forcing a stack trace from the command line?

    Willie Walker wrote:
    [color=blue]
    > Any advice would be greatly appreciated.[/color]

    Perhaps strace will tell you something.

    --
    Maciej "Fiedzia" Dziardziel (fiedzia (at) fiedzia (dot) prv (dot) pl)


    'Not all who wander are lost.' - J.R.R. Tolkien, The Fellowship of the Ring

    Comment

    Working...