-=[Pdb Improvements]=- -=[Author: Matt Fleming ]=- -=[Mentor: Robert L. Bernstein]=- -=[Abstract]=- This project is part of a Google Summer of Code 2006 project. Many people have stated that they would like to see improvements in pdb. This projects aims to fulfill this wish. -=[TODO]=- * Write more unit tests * Write a signal handler that scripts can import from mpdb that, when the signal is received, start remote debugging. * info [target/threads] set debug threads [on|off] show debug threads, command needs to be written. * Implement thread debugging, commands to switch between threads. - Because the 'main' thread may exit unexpectedly we need to keep any other threads that we're debugging alive. This may mean that we have to write some code when the main debugger exits to check for any threads being debugged and not exit until all threads have finished (or at least ask if they're sure they wanna leave). * Lightweight and heavyweight mechanism for setting up threads - The reason we want a lightweight mechanism is so that we can place mpdb.set_trace() inside a script so that we can debug the script. It has to be lighweight because the programmer might not want all the features of an MPdb instance, if for example they only care about debugging this one thread instance. - We need a heavyweight mechanism to allow a programmer to inspect and control all threads. * Provide a proper top-level methods including, set_trace(), post_mortem(), run(), remote_sighandler() (for allowing a signal to start remote debugging) * Clean up FIFO output (too many newlines) * mconnection should use the exceptions that have been introduced and mpdb should check for these exceptions being raised. * Write documentation - Debugger commands - Debugger model/architecture: - Debugging outside a process - Debugging remotely - Debugging threads * We can switch between threads (like in gdb) with 'thread ', but this currently has _no_ effect. We should at some point be able to switch threads and from them on not have to use the 'thread apply ' syntax, but just '' which would be applied to the current thread. * Allow reading commands from .mpdbrc file * Changed the name of the default history file from ~/.pydbhist to ~/.mpdbhist * do_return inherited from pydb.gdb.Gdb doesn't use self.stdin for reading input from the user and doesn't work remotely. * pdbserver using a TCP connection uses setsockopt() REUSEADDR by default. Need some way to make this configurable. `set reuseaddr' ? * The style in which mpdb.py is written is too 'amorphous'. Need to at least separate process, thread and communication code out. -=[FIXED]=- * Can restart program remotely with new arguments. * Allow thread debugging to be turned on with a command line switch. * Decide on a way to execute commands for a specific thread. ('thread' command) * Provide a command to distinguish between 'server' and 'client', because at the moment 'info target' only tells the user whether they are local or remote, and not whether they are the local/remote server or local/remote client - target attr is either 'remote-client' or 'remote-pdbserver'.