[squeak-dev] Re: Cannot debug from Process browser

Chris Muller asqueaker at gmail.com
Wed Dec 5 20:19:44 UTC 2012


Indeed yes.  But I also found that the cycle is being created by
primitive 87; Process>>#primitiveResume.

Question:  Is this valid behavior by the VM?  Oh, this is the standard
Linux interpreter VM 4.4.7-2357.

So, if I hack ProcessBrowser class>>#debugProcess: to simply "undo the
damage" wrought by primitiveResume like:

ProcessBrowser class>>#debugProcess:
	| formerNextLink |
	formerNextLink := aProcess nextLink.
	self resumeProcess: aProcess.
	aProcess nextLink: formerNextLink.
	aProcess debugWithTitle: 'Interrupted from the Process Browser'

then I can also debug regardless of the logDebuggerStackToFile setting.

I hope someone in the VM community will weigh in; is it valid to
create a cycle in the linked-list of one Process?


On Wed, Dec 5, 2012 at 2:06 PM, Bob Arning <arning315 at comcast.net> wrote:
> If you set Preferences logDebuggerStackToFile to false, do things work ok
> after that?
>
>
> On 12/5/12 2:46 PM, Chris Muller wrote:
>
> Printing this before pressing Command+d on the Process browser:
>
>   Link allSubInstances count: [ : e | e nextLink==e]
>
> reports 0.
>
> AFTER I press Command+d, I have to press Command+. to interrupt the
> infinite recursion, which exposes the debugger which is trying to open
> the debugger on the process I selected (see below for the stack).  NOW
>
>   Link allSubInstances count: [ : e | e nextLink==e]
>
> reports 1, and the one instance is the Process I was trying to debug.
>
> So, I overrode Process>>#nextLink: setter to guard against setting it
> to himself and repeating the test.  The guard was never hit, but the
> same condition ('nextLink' referring to itself) still formed.  This is
> impossible since that's the only writer of that variable unless the VM
> or other low-level mechanism is setting the Process' nextLink.
>
> ================
> Here's the stack of trying to invoke 'debug' from the Process Browser.
>  A MethodContext is just trying to render its printString as part of
> Debugger operations but it can't because of the cycle.  Any ideas?
>
>
>
>
>


More information about the Squeak-dev mailing list