2009/1/18 Christian Jaeger christian@pflanze.mine.nu:
David Rush wrote:
So I've recently been bringing some old code up to speed on current Gambit (4.4.0) and I seem to be running afoul of some combination of the REPL changes and the debugger that have me totally blocked.
When I run the compiled version of the program, I get the *no* output from the program and the following:
*** ERROR IN call-with-values -- (Argument 2) LIST expected (apply '#<procedure #2> '#<unknown>)
...
Without seeing the code or a stripped-down version of it it's difficult to tell.
Well it's 22KLOC and moderately inbred with heavy use of an unholy hybrid of call/cc and call-with-values to implement a wacky tail-recursive pattern matcher. Oh yeah, and lots of anonymous functions. This is really more a question about how the debug REPL works (or fails to).
What's going on here? And how can I get to the debugger to try and find the culprit call-with-values?
- put (step) at some good place before the problematic part into your code
I have no idea where that is. This is why I'm trying to get a backtrace from the actual error location.
- if your program can afford it memory-wise, try
(generate-proper-tail-calls #f)
That is an option I'd forgotten. Will it help (as in get me a stack dump) with the compiled code? After further testing, the problem appears to simply not arise under the interpreter.
If you've got difficulties finding the right spot in your program, you can also capture continuations while the program is running and use them to go back once you got the exception;
This (now) is essentially the problem. I don't get an exception running under the REPL. I'd like to get a stack dump while running compiled, actually
david rush