* Re: guile debugging (was: Missing ice-9 debugger breakpoints)
@ 2006-09-15 2:16 Carlos Pita
2006-09-15 9:48 ` Neil Jerram
0 siblings, 1 reply; 7+ messages in thread
From: Carlos Pita @ 2006-09-15 2:16 UTC (permalink / raw)
Mhhh, then I found out these lines in the changelog
for ice-9/debugger:
2005-07-09 Neil Jerram <neil@ossau.uklinux.net>
* debugger.scm: Remove comments which are now
incorrect.
breakpoints.scm, behaviour.scm, trap-hooks.scm.
(SUBDIRS): Removed.
[....]
and also discovered the guile-debugging gna project.
What is the way to go? This is pretty confusing for a
newcomer like me. Would guile-debugging be eventually
merged with guile core? Perhaps the manual should be
updated, shouldn't it? Anyway, how is a breakpoint
established?
Best regards,
Carlos
--- Carlos Pita <carlosjosepita@yahoo.com.ar>
escribió:
> Hi all!
>
> I've just installed guile-1.8 (stable) but I'm not
> able to import the ice-9 debugger breakpoints module
> as the reference manual suggests (in fact, the
> module
> isn't there):
>
> (use-modules (ice-9 debugger breakpoints))
>
>
> Backtrace:
> In current input:
> 1: 0* (use-modules (ice-9 debugger breakpoints))
> 1: 1 (eval-case (# # *unspecified*) (else #))
> 1: 2 (begin (process-use-modules (list (list
> #)))
> *unspecified*)
> ?: 3* [process-use-modules (((ice-9 debugger
> breakpoints)))]
>
> <unnamed port>: In procedure process-use-modules in
> expression (process-use-modules (list #)):
> <unnamed port>: no code for module (ice-9 debugger
> breakpoints)
> ABORT: (misc-error)
>
>
> memeplex:/tmp/guile-1.8.0$ ls
>
>
/site/install/guile-1.8.0/share/guile/1.8/ice-9/debugger*
>
>
/site/install/guile-1.8.0/share/guile/1.8/ice-9/debugger.scm
>
>
/site/install/guile-1.8.0/share/guile/1.8/ice-9/debugger:
> command-loop.scm commands.scm state.scm trc.scm
> utils.scm
>
> What is missing here?
>
> Thank you in advance.
> Regards,
> Carlos
>
>
>
>
>
> __________________________________________________
> Preguntá. Respondé. Descubrí.
> Todo lo que querías saber, y lo que ni imaginabas,
> está en Yahoo! Respuestas (Beta).
> ¡Probalo ya!
> http://www.yahoo.com.ar/respuestas
>
>
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: guile debugging (was: Missing ice-9 debugger breakpoints)
2006-09-15 2:16 guile debugging (was: Missing ice-9 debugger breakpoints) Carlos Pita
@ 2006-09-15 9:48 ` Neil Jerram
2006-09-15 15:16 ` Carlos Pita
0 siblings, 1 reply; 7+ messages in thread
From: Neil Jerram @ 2006-09-15 9:48 UTC (permalink / raw)
Cc: guile-user
Carlos Pita <carlosjosepita@yahoo.com.ar> writes:
> Mhhh, then I found out these lines in the changelog
> for ice-9/debugger:
>
> 2005-07-09 Neil Jerram <neil@ossau.uklinux.net>
> * debugger.scm: Remove comments which are now
> incorrect.
> breakpoints.scm, behaviour.scm, trap-hooks.scm.
> (SUBDIRS): Removed.
> [....]
>
> and also discovered the guile-debugging gna project.
>
> What is the way to go? This is pretty confusing for a
> newcomer like me.
Sorry for the confusion. In 1.8.0 the documentation on breakpoints is
out of date and the required Scheme modules are not actually present.
For 1.8.0 you should download the guile-debugging package from Gna
(via the latest news item), and also refer to the documentation in the
same place, which should be correct.
> Would guile-debugging be eventually merged with guile core?
Yes, this is in progress right now. I don't think it will be in time
for the next stable release (1.8.1), though.
> Perhaps the manual should be updated, shouldn't it?
Yes, I am working on this at part of the merge.
> Anyway, how is a breakpoint established?
See the Gna doc at
http://download.gna.org/guile-debugging/guile-debugging.html. You can
ignore anything with "gds" in the name if you're only interested in
setting breakpoints programmatically. This doc should be correct (for
the guile-debugging package), so if anything here doesn't work, please
let me know.
Regards,
Neil
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: guile debugging (was: Missing ice-9 debugger breakpoints)
2006-09-15 9:48 ` Neil Jerram
@ 2006-09-15 15:16 ` Carlos Pita
2006-09-15 15:55 ` Carlos Pita
2006-09-23 7:27 ` Neil Jerram
0 siblings, 2 replies; 7+ messages in thread
From: Carlos Pita @ 2006-09-15 15:16 UTC (permalink / raw)
Cc: guile-user
> > Would guile-debugging be eventually merged with
> guile core?
>
> Yes, this is in progress right now. I don't think
> it will be in time
> for the next stable release (1.8.1), though.
Great! I've tried the CVS version, but throws some
errors when debug-trapping (quoted below), so I guess
I'll give a try to the package in gna + 1.8.0, as you
suggest. By the way, isn't there a simple way to
invoke the debugger from an arbitrary point of code?
(debug) requires that an error have happened. I do a
lot of that kind of debugging when programming python,
entering the interactive debugger by simply inserting
an invocation to it in a relevant point of my code:
pdb.set_trace(). It's not very sophisticated, it
requires source code modification, but its handy most
of the time and afaik seems to be pretty easy to
implement (but perhaps there are good reasons to limit
(debug) invokations to post-error scenarios, I don't
know). Please don't misunderstand me, I don't mean
that all the trap and breakpoint stuff is pointless,
your work looks very promising and I crave for it
being integrated to the next stable release. Just that
it seems so easy to extend (debug) or smoething
similar to be invoked from arbitrary places... (even
if the interactive debugger didn't provide a stepper,
it would still be pretty useful). Perhaps a macro that
simple replaces itself by (/ 1 0) will do the trick
:).
Thank you for your prompt answer.
Best regards,
Carlos
guile> (use-modules (ice-9 debugger)
... (ice-9 debugging
ice-9-debugger-extensions)
... (ice-9 debugging
breakpoints))
guile> (define (f x y) (+ x y))
guile> (set! (default-breakpoint-behaviour)
debug-trap)
guile> (break-in 'f)
$1 = #<<break-in> a7aff6f0>
guile> (f 2 3)
This is the Guile debugger -- for help, type `help'.
There are 2 frames on the stack.
Frame 1 at unknown source location
[f 2 3]
ERROR: Unbound variable: read-and-dispatch-commands
ABORT: (unbound-variable)
guile>
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: guile debugging (was: Missing ice-9 debugger breakpoints)
2006-09-15 15:16 ` Carlos Pita
@ 2006-09-15 15:55 ` Carlos Pita
2006-09-23 21:58 ` Neil Jerram
2006-09-23 7:27 ` Neil Jerram
1 sibling, 1 reply; 7+ messages in thread
From: Carlos Pita @ 2006-09-15 15:55 UTC (permalink / raw)
Cc: guile-user
> I'll give a try to the package in gna + 1.8.0, as
> you suggest.
Mhhh, same problem:
> ERROR: Unbound variable: read-and-dispatch-commands
> ABORT: (unbound-variable)
I'm using guile 1.8.0 and guile-debugging-0.12 (ie
latest from gna).
read-and-dispatch-commands is defined by
command-loop.scm but not exported. Then there is an
invocation from ossau/ice-9-debugger-extensions.scm,
which I guess is spoiling the game.
Best regards,
Carlos
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: guile debugging (was: Missing ice-9 debugger breakpoints)
2006-09-15 15:16 ` Carlos Pita
2006-09-15 15:55 ` Carlos Pita
@ 2006-09-23 7:27 ` Neil Jerram
1 sibling, 0 replies; 7+ messages in thread
From: Neil Jerram @ 2006-09-23 7:27 UTC (permalink / raw)
Cc: guile-user
Carlos Pita <carlosjosepita@yahoo.com.ar> writes:
>> > Would guile-debugging be eventually merged with
>> guile core?
>>
>> Yes, this is in progress right now. I don't think
>> it will be in time
>> for the next stable release (1.8.1), though.
>
> Great! I've tried the CVS version, but throws some
> errors when debug-trapping (quoted below),
I'll reply to your other email about this.
> By the way, isn't there a simple way to
> invoke the debugger from an arbitrary point of code?
Try something like this:
(debug-stack (make-stack #t)
#:with-introduction
#:continuable)
(You can of course put this code into a utility procedure called
`debug-here', for more convenience.)
Does this do what you are looking for?
> (debug) requires that an error have happened. I do a
> lot of that kind of debugging when programming python,
> entering the interactive debugger by simply inserting
> an invocation to it in a relevant point of my code:
> pdb.set_trace().
Interesting; from the name, this sounds like it is creating a
breakpoint at the current position, which is not quite the same as
calling the debugger directly (as debug-stack does).
I used to have something like this in guile-debugging. There was a
`trap-here' macro (which is still documented, wrongly) and before that
a `##' read extension. I removed them because I thought having to
modify the code was undesirable. Perhaps I should put one of these
back?
> know). Please don't misunderstand me, I don't mean
> that all the trap and breakpoint stuff is pointless,
> your work looks very promising and I crave for it
> being integrated to the next stable release.
Understood! :-)
> Just that
> it seems so easy to extend (debug) or smoething
> similar to be invoked from arbitrary places... (even
> if the interactive debugger didn't provide a stepper,
> it would still be pretty useful).
Yes, agreed.
> Perhaps a macro that
> simple replaces itself by (/ 1 0) will do the trick
> :).
Well it might do, but only if used together with `debug-on-error' in
(ice-9 debugger), and debug-on-error just does the debug-stack call
that I mentioned above.
Regards,
Neil
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: guile debugging (was: Missing ice-9 debugger breakpoints)
2006-09-15 15:55 ` Carlos Pita
@ 2006-09-23 21:58 ` Neil Jerram
2006-09-30 17:23 ` Neil Jerram
0 siblings, 1 reply; 7+ messages in thread
From: Neil Jerram @ 2006-09-23 21:58 UTC (permalink / raw)
Cc: guile-user
Carlos Pita <carlosjosepita@yahoo.com.ar> writes:
>> I'll give a try to the package in gna + 1.8.0, as
>> you suggest.
>
> Mhhh, same problem:
>
>> ERROR: Unbound variable: read-and-dispatch-commands
>> ABORT: (unbound-variable)
>
> I'm using guile 1.8.0 and guile-debugging-0.12 (ie
> latest from gna).
>
> read-and-dispatch-commands is defined by
> command-loop.scm but not exported. Then there is an
> invocation from ossau/ice-9-debugger-extensions.scm,
> which I guess is spoiling the game.
Yes, thanks for looking into this.
For a quick solution for 1.8.x/CVS, can you try changing
(read-and-dispatch-commands state (current-input-port)))))
in ice-9-debugger-extensions.scm to
(debugger-command-loop state))))
and let me know if it works?
(This isn't the complete solution because it will break 1.6.x, and I'm
currently trying to support both 1.6.x and 1.8.x/CVS from the same
codebase. I'll work out the 1.6.x details later.)
Regards,
Neil
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: guile debugging (was: Missing ice-9 debugger breakpoints)
2006-09-23 21:58 ` Neil Jerram
@ 2006-09-30 17:23 ` Neil Jerram
0 siblings, 0 replies; 7+ messages in thread
From: Neil Jerram @ 2006-09-30 17:23 UTC (permalink / raw)
Cc: guile-user
Neil Jerram <neil@ossau.uklinux.net> writes:
> Carlos Pita <carlosjosepita@yahoo.com.ar> writes:
>
>> read-and-dispatch-commands is defined by
>> command-loop.scm but not exported. Then there is an
>> invocation from ossau/ice-9-debugger-extensions.scm,
>> which I guess is spoiling the game.
>
> Yes, thanks for looking into this.
>
> For a quick solution for 1.8.x/CVS, can you try changing
>
> (read-and-dispatch-commands state (current-input-port)))))
>
> in ice-9-debugger-extensions.scm to
>
> (debugger-command-loop state))))
>
> and let me know if it works?
>
> (This isn't the complete solution because it will break 1.6.x, and I'm
> currently trying to support both 1.6.x and 1.8.x/CVS from the same
> codebase. I'll work out the 1.6.x details later.)
The full fix for this in now in Guile CVS, and will be in
guile-debugging 0.14 (when that is released, tbd). Please shout if it
still doesn't work for you!
Regards,
Neil
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-09-30 17:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-15 2:16 guile debugging (was: Missing ice-9 debugger breakpoints) Carlos Pita
2006-09-15 9:48 ` Neil Jerram
2006-09-15 15:16 ` Carlos Pita
2006-09-15 15:55 ` Carlos Pita
2006-09-23 21:58 ` Neil Jerram
2006-09-30 17:23 ` Neil Jerram
2006-09-23 7:27 ` Neil Jerram
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).