Strange 'bug' in debugger while under Cog

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Strange 'bug' in debugger while under Cog

Igor Stasenko
 
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.