[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] Add shortcuts to the visualgst/debugger
From: |
Paolo Bonzini |
Subject: |
Re: [Help-smalltalk] Add shortcuts to the visualgst/debugger |
Date: |
Thu, 03 Oct 2013 18:40:21 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9 |
Il 30/09/2013 11:33, Holger Hans Peter Freyther ha scritto:
> On Mon, Sep 30, 2013 at 10:47:31AM +0200, Holger Hans Peter Freyther wrote:
>
> Hi,
>
> and one more information:
>
>> So I think what is happening is the following:
>>
>> * We are in the glib mainloop
>> * We get an event (F7.. keyboard)
>> * We use gst_nvmsg_send which will create a new Process (call-in)
>> * We dispatch GtkDebugger>>#stepOver
>> * We want to step/resume another process..
>> * We wait on a semaphore..
>> * The debugged process doesn't run (for whatever reason)
>> * The call-in is waiting on a Semaphore as well
>
> to make it worse.. the call-in will be suspended because it is
> launching a debugger...
>
> 'Invalid index 13: index out of range'
> SystemExceptions.IndexOutOfRange(Exception)>>signal (ExcHandling.st:254)
> SystemExceptions.IndexOutOfRange class>>signalOn:withIndex: (SysExcept.st:665)
> String(Object)>>checkIndexableBounds: (Object.st:798)
> String>>at: (String.st:312)
> String(SequenceableCollection)>>replaceFrom:to:with:startingAt:
> (SeqCollect.st:554)
> String>>replaceFrom:to:with:startingAt: (String.st:296)
> String(ArrayedCollection)>>copyFrom:to: (ArrayColl.st:236)
> ReadStream(PositionableStream)>>copyFrom:to: (PosStream.st:156)
> STInST.RBParser>>errorLine (Parser.star#VFS.ZipFile/RBParser.st:183)
> STInST.RBParser>>parserError: (Parser.star#VFS.ZipFile/RBParser.st:207)
> STInST.RBParser>>parseExpression (Parser.star#VFS.ZipFile/RBParser.st:153)
> STInST.RBParser class>>parseExpression:onError:
> (Parser.star#VFS.ZipFile/RBParser.st:35)
> STInST.RBParser class>>parseExpression:
> (Parser.star#VFS.ZipFile/RBParser.st:26)
> UndefinedObject>>executeStatements (a String:1)
> 6 ^self activateHandler: (onDoBlock isNil and: [ self
> isResumable ])
>
> The question is.. is this a VisualGST issue or should the VM
> be more robust against such deadlocks? I think we could have
> a couple of
>
> if (cur_state == STATE_DISPATCHING && blocking)
> {
> event_loop_unlock ();
> return;
> }
>
> in the vm, like in gst_interpret?
>
> comments?
After some debugging with Holger, I think the problem is that VisualGST
is not handling the DebuggerReentered exception.
All invocations of #step, #finish: etc. should be wrapped with a
DebuggerReentered exception handler. You can look at how MiniDebugger
does it. MiniDebugger (and the Blox debugger too) creates a new
command-loop, but perhaps VisualGST can just change the window title or
something like that.
Paolo
- Re: [Help-smalltalk] Add shortcuts to the visualgst/debugger,
Paolo Bonzini <=