Questions on CommandShell Architecture

Samir Saidani saidani at info.unicaen.fr
Sun Aug 21 15:03:06 UTC 2005


"David T. Lewis" <lewis at mail.msen.com> writes:

> Hi Samir,
>
> On Fri, Aug 19, 2005 at 10:40:01PM +0200, Samir Saidani wrote:
>> Hi,
>> 
>> I'm currently interested by OSProcess and to avoid digging in the
>> code, I would like to know a bit on the CommandShell
>> architecture... Euh, first of all, David, I discovered that there is a
>> little bug when I try to create the OSProcess (the unix one) plugin
>> with the Squeak 3.8 (it works well with Squeak 3.7).
>
> The only bug that I am aware of is that, in the platforms support code
> maintained in Subversion, the layout of the SQFile data structure has
> changed. This breaks some of the OSProcess code that uses the data
> structure, such as attaching to the stdin and stdout streams. The
> platforms source code is still in sort of a transitional state with
> to the move to 64 bit support, so I have not put out the patch for
> this in OSProcess yet. If you are seeing any other problems, please
> let me know.

To reproduce the bug, take a vanilla Squeak 3.8
then squeakmap->OSProcessPlugin->VMMAker->generate UnixOS...Plugin
At the end of the mail, you will find the output of the debugger...

Another problem, I didn't manage to get this command working (see
 http://minnow.cc.gatech.edu/squeak/1914)
 :
CommandShell command: 'Time dateAndTimeNow!! | edit; exit'
CommandShell command: 'Time dateAndTimeNow | edit; exit' also doesn't work.

Cheers,
Samir


From: saidani at info.unicaen.fr
To: squeak-dev at lists.squeakfoundation.org
Subject: [BUG]ByteSymbol(Object)>>doesNotUnderstand: #key

here insert explanation of what you were doing, suspect changes you've made and so forth.

21 August 2005 4:55:49 pm

VM: unix - a SmalltalkImage
Image: Squeak3.8 [latest update: #6665]

SecurityManager state:
Restricted: false
FileAccess: true
SocketAccess: true
Working Dir /home/saidani/squeaknos/squeakvm/Squeak-3.7-7
Trusted Dir /home/saidani/squeaknos/squeakvm/Squeak-3.7-7/secure
Untrusted Dir /home/saidani/squeaknos/squeakvm/Squeak-3.7-7/My Squeak

ByteSymbol(Object)>>doesNotUnderstand: #key
	Receiver: #ifTrue:ifFalse:
	Arguments and temporary variables: 
		aMessage: 	key
	Receiver's instance variables: 
#ifTrue:ifFalse:

MessageNode>>asTranslatorNode
	Receiver: {(pid := self cCode: 'vfork()') = 0
	ifTrue: [workingDir := interpreterProxy stackObjectVa...etc...
	Arguments and temporary variables: 
		sel: 	nil
		args: 	nil
		i: 	nil
	Receiver's instance variables: 
		comment: 	nil
		pc: 	nil
		receiver: 	{(pid := self cCode: 'vfork()') = 0}
		selector: 	#ifTrue:ifFalse:
		precedence: 	3
		special: 	4
		arguments: 	an OrderedCollection({[workingDir := interpreterProxy stackObjectVal...etc...
		sizes: 	#(nil nil)
		equalNode: 	nil
		caseErrorNode: 	nil

[] in BlockNode>>asTranslatorNode {[:s |  newS := s asTranslatorNode.  newS isStmtList   ifTrue: [statementList...]}
	Arguments and temporary variables: 
		statementList: 	an OrderedCollection(self cCode: 'intervalTimer.it_interval.tv_s...etc...
		newS: 	self cCode: 'setitimer (ITIMER_REAL, &intervalTimer, &saveIntervalTimer)'...etc...
		s: 	{(pid := self cCode: 'vfork()') = 0
	ifTrue: [workingDir := interpreterProxy...etc...
		arg: 	nil

OrderedCollection>>do:
	Receiver: an OrderedCollection({self cCode: 'intervalTimer.it_interval.tv_sec = 0'} {self cCode: 'in...etc...
	Arguments and temporary variables: 
		aBlock: 	[] in BlockNode>>asTranslatorNode {[:s |  newS := s asTranslatorNode.  ...etc...
		index: 	8
	Receiver's instance variables: 
		array: 	#(nil nil {self cCode: 'intervalTimer.it_interval.tv_sec = 0'} {self cCo...etc...
		firstIndex: 	3
		lastIndex: 	8


--- The full stack ---
ByteSymbol(Object)>>doesNotUnderstand: #key
MessageNode>>asTranslatorNode
[] in BlockNode>>asTranslatorNode {[:s |  newS := s asTranslatorNode.  newS isStmtList   ifTrue: [statementList...]}
OrderedCollection>>do:
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
BlockNode>>asTranslatorNode
[] in MessageNode>>asTranslatorNode {[:i | (arguments at: i) asTranslatorNode]}
Interval>>collect:
MessageNode>>asTranslatorNode
[] in BlockNode>>asTranslatorNode {[:s |  newS := s asTranslatorNode.  newS isStmtList   ifTrue: [statementList...]}
OrderedCollection>>do:
BlockNode>>asTranslatorNode
TMethod>>setSelector:args:locals:block:primitive:
MethodNode>>asTranslationMethodOfClass:
[] in VMPluginCodeGenerator(CCodeGenerator)>>addClass: {[:sel :i |  bar value: i.  source := aClass sourceCodeAt: sel.  self   addMe...]}
[] in Set>>doWithIndex: {[:item | aBlock2 value: item value: (index := index + 1)]}
Set>>do:
Set>>doWithIndex:
[] in VMPluginCodeGenerator(CCodeGenerator)>>addClass: {[:bar | aClass selectors   doWithIndex: [:sel :i |     bar value: i.    sour...]}
[] in ProgressInitiationException>>defaultMorphicAction {[result := workBlock value: progress]}
BlockContext>>ensure:
ProgressInitiationException>>defaultMorphicAction
ProgressInitiationException>>defaultAction
UndefinedObject>>handleSignal:
MethodContext(ContextPart)>>handleSignal:
MethodContext(ContextPart)>>handleSignal:
ProgressInitiationException(Exception)>>signal
ProgressInitiationException>>display:at:from:to:during:
ProgressInitiationException class>>display:at:from:to:during:
ByteString(String)>>displayProgressAt:from:to:during:
VMPluginCodeGenerator(CCodeGenerator)>>addClass:
UnixOSProcessPluginNoThisSessionAvailable class(InterpreterPlugin class)>>buildCodeGeneratorUpTo:
UnixOSProcessPluginNoThisSessionAvailable class(InterpreterPlugin class)>>translateInDirectory:doInlining:
UnixVMMaker(VMMaker)>>generateExternalPlugin:
[] in VMMakerTool>>generateSelectedExternalPlugin {[vmMaker generateExternalPlugin: plugin]}
BlockContext>>on:do:
VMMakerTool>>generateSelectedExternalPlugin
VMMakerTool>>perform:orSendTo:
[] in MenuItemMorph>>invokeWithEvent: {[(selArgCount := selector numArgs) = 0   ifTrue: [target perform: selector] ...]}
BlockContext>>ensure:
CursorWithMask(Cursor)>>showWhile:
MenuItemMorph>>invokeWithEvent:
MenuItemMorph>>mouseUp:
MenuItemMorph>>handleMouseUp:
MouseButtonEvent>>sentTo:
...etc...




More information about the Squeak-dev mailing list