[TECH] Pb with primtive definition

Bergel Alexandre bergel at iam.unibe.ch
Thu Jan 10 10:44:26 UTC 2002


Hello,

I have tried to set up a primtive as it was explain in Andrew C. Greenberg article ("Extending the Squeak Virtual Machine"). 
So I define a method foo in a class TestPlugin derived from InterpreterPlugin.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
TestPlugin >> foo
	self export: true.
	interpreterProxy
		pop: 1
	thenPush: (interpreterProxy booleanValueOf: true).
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Then I try :

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
TestPlugin translate.
InterpreterSupportCode writePluginSupportFiles.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Followed by a compilation as :
gcc -shared -o libTestPlugin.so TestPlugin.c -DHAVE_CONFIG_H -DUNIX

Of course the variable LD_LIBRARY_PATH is set up correctly.
When I try to perform :

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
testPrimitive
	<primitive: 'foo' module: 'TestPlugin'>
	self primitiveFailed.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

I have a very nice Segmentation fault.

I anyone could help me...

Thanks,
Alexandre




More information about the Squeak-dev mailing list