"Improving Pdb" Google Summer of Code project

0 views
Skip to first unread message

mattjf...@googlemail.com

unread,
Jun 2, 2006, 5:08:43 PM6/2/06
to pyxides
Hi, me and my mentor (Rocky Bernstein) have been in discussion about
our project's design and I was hoping to get some community feedback.

In case anyone's missed it, the proposal for this project can be found
at http://pyxides.stani.be/Members/mattfleming

Firstly, we want the way that a debugger connects to a 'target' to be
independent from the commands and interface that the debugger provides.
Basically, this project will care about two types of classes. The first
is the command set of the debugger. The second is the communucation
mechansim by which a debugger console can communication with a target.
A target is the execution environment occupied by your program. For
example, you can attach a debugger to a 'remote target'. The protocol
that a target uses can be created by combining the target interface (an
abstract class) from MPdb and any server class, such as TCPServer from
the SocketServer module. Also, you could combine the target class from
MPdb and SimpleXMLRPCServer to produce a target that used XML RPC.
Since Pdb (which is what this project builds on) in the trunk branch of
Python, viewable at http://svn.python.org/view/python/trunk/, now uses
an instance variable named self.stdout to print all messages to.
Therefore, the communication mechanism needs only provide a replace for
this instance variable (a file-object) but does in no way specifiy how
that object works. self.stdout could point to a socket (or more
correctly, a file-object create with the socket method makefile()) or a
regular old file-object which allows the use of serials lines, for
example.

The second point is, I was wondering whether any of you that have
designed front-ends for debuggers have considered techniques for
verifying that the source code you present to the programmer matches
the source code the debugger is working on, for instance, the current
line of a program being executed. It is my understanding that most (if
not all) front-ends require the source of the program being degugged to
be local to the front-end, so that you can do your own keyword
colouring, etc. What techniques do people currently use to keep these
two files in-sync, do you need the entire source file locally? These
are some of the things I'm very interested in finding out!

I'm sorry if this post has been vague on other details, it's just that
these are the main things im pondering at the moment. If you have any
questions please ask away.

Thanks, Matt

Reply all
Reply to author
Forward
0 new messages