[Vm-dev] Strange 'bug' in debugger while under Cog

Igor Stasenko siguctua at gmail.com
Wed Sep 29 00:19:35 UTC 2010


I trying to debug the following method:

discoverPlatformId
	
	| platId |
	
	"should not use it, if Current already set"
	self assert: (Current isNil).

	platId := self platformId.

	self allSubclassesDo: [:class |
		class targetPlatformId = platId ifTrue: [
			class new  " should set Current during initialization"
	]].

	^ Current
	

when i step over 'self platformId.' it sets platId to false,
however, when i evaluating (self platformId) it answers 3, as it
should be, because this number is hardcoded in plugin and never
changes,
also, even if this primitive fails (no plugin available), the method
should answer nil, but not false:

platformId

	<primitive: 'primitivePlatformId' module: 'NativeBoostPlugin'>
	
	" do not fail, answer nil instead"
	^ nil

Here the source code of primitive:

primitivePlatformId
	<export: true>

	"return a platform id code"
	interpreterProxy pop: interpreterProxy methodArgumentCount + 1 thenPush:
		( interpreterProxy integerObjectOf: PlatformId ).
	

Any ideas, where this 'false' comes from?



-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Vm-dev mailing list