guile-user
[Top][All Lists]
Advanced

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

Re: guile-debugging and breakpoints


From: Neil Jerram
Subject: Re: guile-debugging and breakpoints
Date: Sun, 14 Jan 2007 01:01:09 +0000
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Volkan YAZICI <address@hidden> writes:

> Here are the steps to reproduce the same unexpected behaviour: [...]

If this is with Guile 1.6.x, I think the behaviour is caused by losing
source properties when an `if' expression is memoized.  To investigate
this, can you see if the following patch solves the problem?

--- libguile/eval.c     2 Oct 2006 20:22:49 -0000       1.234.2.12
+++ libguile/eval.c     14 Jan 2007 00:54:06 -0000
@@ -544,7 +544,8 @@
 {
   long len = scm_ilength (SCM_CDR (xorig));
   SCM_ASSYNT (len >= 2 && len <= 3, scm_s_expression, "if");
-  return scm_cons (SCM_IM_IF, SCM_CDR (xorig));
+  SCM_SETCAR (xorig, SCM_IM_IF);
+  return xorig;
 }

With Guile 1.8 or CVS, I find that the breakpoint doesn't even work
the first time!  I'm still looking into that.

> 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.

Where did you place the new breakpoint?

> 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.

OK, you've persuaded me on this - but I'm not sure it addresses the
whole problem.  I still think it might be useful to be able to set a
breakpoint on a procedure by doing C-x SPC anywhere in the procedure's
definition - which conflicts with your backward-up-list
interpretation.  What do you recommend?

> (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.

I agree with on these two points.

Regards,
     Neil





reply via email to

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