guile-user
[Top][All Lists]
Advanced

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

Re: guile-debugging and breakpoints


From: Volkan YAZICI
Subject: Re: guile-debugging and breakpoints
Date: Wed, 10 Jan 2007 17:33:37 +0200
User-agent: Mutt/1.4.2.1i

Hi,

[Excuse me for the late reply. I was quite busy with setting up the
furnitures and just found chance to put my computer on a suitable
table.]

On Dec 29 02:29, Neil Jerram wrote:
> Volkan YAZICI <address@hidden> writes:
> > While executing an s-exp with some breakpoints, everything goes
> > fine. But after I finish the execution and want to re-execute the code
> > with same breakpoints, this time gds just returns the result. It doesn't
> > pop-up a stack window for stepping as it did previously. Has anybody
> > ever experienced a similar problem? How can I fix this?
> 
> No, I haven't experienced this.  Can you provide more details so I can
> try to reproduce it?

Here are the steps to reproduce the same unexpected behaviour:

Installation Steps:
-------------------
  cd guile-debugging-0.15
  ./configure --prefix=/opt && make && make install
  mkdir ~/.emacs.d/gds
  cp emacs/*.el ~/.emacs.d/gds/
  cat >>~/.emacs <<EOF
;;; GDS (Guile Debugging Server)
(add-to-list 'load-path "~/.emacs.d/gds")
(setq gds-scheme-directory "/opt/share/guile")
(require 'gds)
EOF

Triggering Exception:
---------------------
Step 0: Opened below Scheme file:
        (define (cons-rat a b)
          (* (expt 2 a)
             (expt 3 b)))

        (define (expt-power n m k)
          (if (not (= 0 (remainder n m))) k
              (expt-power (/ n m) m (+ k 1))))

        (define (car-rat n)
          (expt-power n 2 0))

        (define (cdr-rat n)
          (expt-power n 3 0))

        (car-rat (cons-rat 5 7))

Step 1: Placed a breakpoint in `(if...' of `expt-power' definition.
Step 2: Selected whole file and executed the region. (C-c C-r)
Step 3: Everything worked fine and I stepped with `o' and `g' keys
        till I see the return value.
Step 4: I tried to re-execute the `(car-rat (cons-rat 5 7))' s-exp but
        this time it just outputed the result. (No stepping this
        time.) Furthermore, when I place a new breakpoint and executed
        a new s-exp that triggers the newly set breakpoint, it again
        just dumped the result. No stepping.

> > BTW, I think, requirement of a region to set/delete a breakpoint is
> > quite inconvenient. Therefore I've written two small emacs functions
> > which sets/deletes the breakpoint in the backward-up-list. (At least
> > it's better than manually searching with (search-forwards "(") as
> > current guile-debugging does.) I attached them with the post, in case of
> > anybody would be interested in.
> 
> Thanks, I'll take a look at the patch.  Conceptually, however, the
> issue is how this would interact with the existing behaviour of C-x
> SPC when there is no region, namely to set a breakpoint on the
> procedure whose definition contains point.  Do you have any suggestion
> for that?

I don't think there's any use case for setting many breakpoints in a
region. Because, once user gets stopped in the first breakpoint of the
beginning of a region of breakpoints, he/she can move forward by
stepping. There's no need to stop at the next s-exp. (But this
doesn't mean gds-delete-breakpoints is useless. It's quite feasible to
think somebody removing breakpoints in some region of the code.)
Therefore, I think setting breakpoint manually one by one for every
s-exp is a better choice.

> > guile-debugging is an awesome project. I hope its development won't stop
> > and be as stable/functional as guile.
> 
> Thanks; it's an ongoing project, as far as I'm concerned.

I'm not a much Scheme/Guile (nor Emacs) guru, but I'd be happy to help
you in any subject I can.


Regards.




reply via email to

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