Hello!
I have an application that uses 2 threads where my second thread silently dies, without having any errors reported or debugger kicking in. What is the simplest way to have a debug repl pop up when I thread dies?
I've read on the mailing list that it was possible to have a new xterm window pop up (https://webmail.iro.umontreal.ca/pipermail/gambit-list/2007-August/001671.ht...) but is it possible to simply have the debugger pop up in the current repl?
Thanks!
David
Afficher les réponses par date
On 25-Apr-08, at 10:38 AM, David St-Hilaire wrote:
Hello!
I have an application that uses 2 threads where my second thread silently dies, without having any errors reported or debugger kicking in. What is the simplest way to have a debug repl pop up when I thread dies?
I've read on the mailing list that it was possible to have a new xterm window pop up (https://webmail.iro.umontreal.ca/pipermail/gambit-list/2007-August/001671.ht... ) but is it possible to simply have the debugger pop up in the current repl?
You need to start gsi with the -:dar option. Note that each thread has its own REPL but there is only one console, so the accesses to the console are serialized. In other words, if thread #1's REPL is currently active then if thread #2 encounters an error its REPL will wait until the user has entered something at thread #1's REPL. It is sometimes useful to force this switch from one REPL to the other by entering a dummy expression.
Marc
On Fri, Apr 25, 2008 at 10:51:37AM -0400, Marc Feeley wrote:
Note that each thread
has its own REPL but there is only one console, so the accesses to the console are serialized.
It is
sometimes useful to force this switch from one REPL to the other by entering a dummy expression.
Hopefully we can continue this discussion here, or on the Wiki, to flesh out the documentation.
Aside from the quitting and exception-handling behaviors described in the manual, does the primordial thread have any special properties?
Do REPL level changes affect the thread state (the things you describe -- number of threads, current or future ownership of console, etc.) in any way? I mean the level changes themselves, not the errors or interrupts that cause them.
Using the Java REPL and a program I wrote to test exception handling, sometimes I've seen ^C interrupts start a debugger in the thread I want, and sometimes I've seen them switch threads or possibly start a new thread. What might affect ^C's behavior like this? I can send you some test cases but it will be a few days (I'm out of town).
-- Derek