emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple debugging sessions


From: Stefan Monnier
Subject: Re: Multiple debugging sessions
Date: Thu, 10 Nov 2005 23:34:41 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> > Retrofitting such a feature is probably a lot harder than simply being
>> > a bit careful to keep things well-parameterized from the beginning
>> > (well i guess it's too late now, but ...).
>> 
>> The main problem (based on my experience making it possible to have multiple
>> PCL-CVS buffers) is that you need both to understand the code you're
>> changing and to understand how to use buffer-local variables to their best
>> advantage.

> I've only just started using pcl-cvs, but doesn't it just use one buffer?  A
> debugging session with gdb can comprise many buffers: stack, locals,
> breakpoints etc.

I'm not claiming PCL-CVS is as complex as gdba.  But yes, PCL-CVS uses more
than one buffer: one *cvs* buffer for the display, a *cvs-tmp* for the
output of the process (not shown to the user), then some others like
*cvs-info* to show cvs log or cvs status output (the cvs status output is
also parsed, just like the *cvs-tmp* output), ...

> There is only one GUD buffer per session, so maybe variables
> could be local to that and some sort of indirection used, but it would be
> more complicated.

That's whay I do it in PCL-CVS: each one of those buffers has a buffer-local
variable `cvs-buffer' which points to the *cvs* buffer where all the
relevant info is kept.  So a process can find the corresponding info by
checking its buffer's `cvs-buffer' variable, and then looking up the info in
that buffer.

It requires a bit of discipline, but really nothing too terrible.
It actually all becomes fairly intuitive when you start thinking in terms of
the most general/scary case rather than in terms of the "normal" case.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]