PDP debugger fails to debug through some exception handlers

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

PDP debugger fails to debug through some exception handlers

Andres Valloud-6
Hello,

I just isolated this bug that I've known for quite a while.  The problem
is that, while debugging through some exception handlers, PDP fails with
MNU #step.  To reproduce, do as follows.

1.  Create a new class called Test.

2.  In this new class, add the following instance methods.

testMethod
        "self new testMethod"

        [String new readStream next]
                on: EndOfStreamNotification
                do: [:ex | self reactTo: ex]


reactTo: anException

        anException pass


3.  In the testMethod above, select the comment and debug it.

4.  Step over new and into testMethod.

5.  Step over once, this gets you inside the guarded block.

6.  Step over three times, this gets you in the exception handler block.

7.  Step over the reactTo: send.  MNU #step, see stack below.

Does anyone know how to fix this issue?

Thanks!
Andres.

Message not understood: #step
UndefinedObject(Object)>>doesNotUnderstand:
optimized [] in Context>>pdpCompleteCallee:
BlockClosure>>on:do:
BlockContext(Context)>>pdpCompleteCallee:
DebuggerService>>byteStep
optimized [] in DebuggerService>>privateStepIntoBlock
BlockClosure>>on:do:
DebuggerService>>privateStepIntoBlock
optimized [] in DebuggerService>>basicStepIntoBlock
optimized [] in [] in [] in DebuggerService>>performDebugOperation:
BlockClosure>>on:do:
optimized [] in [] in DebuggerService>>performDebugOperation:
BlockClosure>>on:do:
optimized [] in DebuggerService>>performDebugOperation:
optimized [] in [] in ProcessHandle>>performDebugOperation:
BlockClosure>>on:do:
optimized [] in ProcessHandle>>performDebugOperation:

----------------------------------------------------------------------
UndefinedObject(Object)>>doesNotUnderstand:
Receiver:
        an UndefinedObject
Arguments:
        aMessage = a Message with selector: #step and arguments: #()
Temporaries:
        excpt = a MessageNotUnderstood
        resumeValue = nil
Context PC = 25

----------------------------------------------------------------------
optimized [] in Context>>pdpCompleteCallee:
Receiver:
        an UndefinedObject
Temporaries:
        currentContext = nil
        previousContext = nil
        .self = optimized [] in Test>>testMethod
Context PC = 34

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in Context>>pdpCompleteCallee:
        outerContext = nil
        copiedValues = an Array[2]
Arguments:
        anExceptionSelector = GetBaseContextForException
        handlerBlock = BlockClosure [] in Context>>pdpCompleteCallee:
Context PC = 18

----------------------------------------------------------------------
BlockContext(Context)>>pdpCompleteCallee:
Receiver:
        a BlockContext
Instance Variables:
        method = CompiledBlock [] in Test>>testMethod
        pc = 7
        sender = EndOfStreamNotification(GenericException)>>performHandler:
        receiver = BlockClosure [] in Test>>testMethod
        stackp = 2
        stack = an Array[12]
Arguments:
        aContext = nil
Temporaries:
        currentContext = nil
        previousContext = nil
Context PC = 28

----------------------------------------------------------------------
DebuggerService>>byteStep
Receiver:
        a DebuggerService
Instance Variables:
        dependents = a DebuggerClient
        processHandle = a ProcessHandle
        oldCursor = Cursor normal
        receiverInspector = a PrimitiveObjectInspector
        contextInspector = a ContextInspector
        stackInspector = a StackInspector
        sourceMap = a SortedCollection[2]
        currentContext = optimized [] in Test>>testMethod
        pendingEvents = a Set[0]
        continueInDebuggerCtx = a WeakArray[1]
        finishBlock = nil
        selector = #testMethod
        tags = a PDPWeakCollection[0]
        stepProbes = an OrderedCollection[0]
        label = 'CraftedSmalltalk.StepIntoBlockNotification'
        serviceProcess = a Process in Semaphore>>wait
        selectionRange = nil
        contextStackPolicy = a ContextListPolicy
        dontUpdateInspectors = true
        doSend = false
        doSendLoop = false
        doStepIntoBlock = true
        debugOperationIsActive = true
        doItProcess = nil
Temporaries:
        currContext = nil
Context PC = 5

----------------------------------------------------------------------
optimized [] in DebuggerService>>privateStepIntoBlock
Receiver:
        an UndefinedObject
Temporaries:
        startContext = optimized [] in Test>>testMethod
        currContext = nil
        .self = a DebuggerService
Context PC = 17

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in DebuggerService>>privateStepIntoBlock
        outerContext = nil
        copiedValues = a DebuggerService
Arguments:
        anExceptionSelector = an ExceptionSet[2]
        handlerBlock = BlockClosure [] in DebuggerService>>privateStepIntoBlock
Context PC = 18

----------------------------------------------------------------------
DebuggerService>>privateStepIntoBlock
Receiver:
        a DebuggerService
Instance Variables:
        dependents = a DebuggerClient
        processHandle = a ProcessHandle
        oldCursor = Cursor normal
        receiverInspector = a PrimitiveObjectInspector
        contextInspector = a ContextInspector
        stackInspector = a StackInspector
        sourceMap = a SortedCollection[2]
        currentContext = optimized [] in Test>>testMethod
        pendingEvents = a Set[0]
        continueInDebuggerCtx = a WeakArray[1]
        finishBlock = nil
        selector = #testMethod
        tags = a PDPWeakCollection[0]
        stepProbes = an OrderedCollection[0]
        label = 'CraftedSmalltalk.StepIntoBlockNotification'
        serviceProcess = a Process in Semaphore>>wait
        selectionRange = nil
        contextStackPolicy = a ContextListPolicy
        dontUpdateInspectors = true
        doSend = false
        doSendLoop = false
        doStepIntoBlock = true
        debugOperationIsActive = true
        doItProcess = nil
Temporaries:
        closures = an OrderedCollection[0]
        origMethod = CompiledMethod Test>>testMethod
Context PC = 67

----------------------------------------------------------------------
optimized [] in DebuggerService>>basicStepIntoBlock
Receiver:
        an UndefinedObject
Temporaries:
        .self = a DebuggerService
Context PC = 6

----------------------------------------------------------------------
optimized [] in [] in [] in DebuggerService>>performDebugOperation:
Receiver:
        an UndefinedObject
Temporaries:
        .operationBlock = BlockClosure [] in DebuggerService>>basicStepIntoBlock
Context PC = 5

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in [] in [] in
DebuggerService>>performDebugOperation:
        outerContext = nil
        copiedValues = BlockClosure [] in DebuggerService>>basicStepIntoBlock
Arguments:
        anExceptionSelector = an ExceptionSet[2]
        handlerBlock = BlockClosure [] in [] in [] in
DebuggerService>>performDebugOperation:
Context PC = 18

----------------------------------------------------------------------
optimized [] in [] in DebuggerService>>performDebugOperation:
Receiver:
        an UndefinedObject
Temporaries:
        .operationBlock = BlockClosure [] in DebuggerService>>basicStepIntoBlock
        .self = a DebuggerService
Context PC = 16

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in [] in DebuggerService>>performDebugOperation:
        outerContext = nil
        copiedValues = an Array[2]
Arguments:
        anExceptionSelector = Error
        handlerBlock = BlockClosure [] in [] in
DebuggerService>>performDebugOperation:
Context PC = 18

----------------------------------------------------------------------
optimized [] in DebuggerService>>performDebugOperation:
Receiver:
        an UndefinedObject
Temporaries:
        .operationBlock = BlockClosure [] in DebuggerService>>basicStepIntoBlock
        .self = a DebuggerService
        exp = a MessageNotUnderstood
Context PC = 16

----------------------------------------------------------------------
optimized [] in [] in ProcessHandle>>performDebugOperation:
Receiver:
        an UndefinedObject
Temporaries:
        .operationBlock = BlockClosure [] in
DebuggerService>>performDebugOperation:
Context PC = 5

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in [] in ProcessHandle>>performDebugOperation:
        outerContext = nil
        copiedValues = BlockClosure [] in DebuggerService>>performDebugOperation:
Arguments:
        anExceptionSelector = ProcessTerminatedDuringSimulation
        handlerBlock = BlockClosure [] in [] in
ProcessHandle>>performDebugOperation:
Context PC = 18

----------------------------------------------------------------------
optimized [] in ProcessHandle>>performDebugOperation:
Receiver:
        an UndefinedObject
Temporaries:
        .operationBlock = BlockClosure [] in
DebuggerService>>performDebugOperation:
        terminateBlock = nil
        .completedSem = a Semaphore[1]
Context PC = 14
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: PDP debugger fails to debug through some exception handlers

Andres Valloud-6
Karsten sent me some notes, and while trying to follow them I messed up
with the way I was doing things and discovered an additional bug
resulting in MNU #pc.

1.  Debug the method comment (self new testMethod).

2.  Step into testMethod.

3.  At the on:do:, step in once.

4.  Go to the enclosing frame (the testMethod invocation).

5.  Click on step, stepping over blocks.

6.  MNU #pc.

Andres.

On 12/28/2010 7:32 PM, Andres Valloud wrote:

>
> Hello,
>
> I just isolated this bug that I've known for quite a while. The problem
> is that, while debugging through some exception handlers, PDP fails with
> MNU #step. To reproduce, do as follows.
>
> 1. Create a new class called Test.
>
> 2. In this new class, add the following instance methods.
>
> testMethod
> "self new testMethod"
>
> [String new readStream next]
> on: EndOfStreamNotification
> do: [:ex | self reactTo: ex]
>
>
> reactTo: anException
>
> anException pass
>
>
> 3. In the testMethod above, select the comment and debug it.
>
> 4. Step over new and into testMethod.
>
> 5. Step over once, this gets you inside the guarded block.
>
> 6. Step over three times, this gets you in the exception handler block.
>
> 7. Step over the reactTo: send. MNU #step, see stack below.
>
> Does anyone know how to fix this issue?
>
> Thanks!
> Andres.
>
> Message not understood: #step
> UndefinedObject(Object)>>doesNotUnderstand:
> optimized [] in Context>>pdpCompleteCallee:
> BlockClosure>>on:do:
> BlockContext(Context)>>pdpCompleteCallee:
> DebuggerService>>byteStep
> optimized [] in DebuggerService>>privateStepIntoBlock
> BlockClosure>>on:do:
> DebuggerService>>privateStepIntoBlock
> optimized [] in DebuggerService>>basicStepIntoBlock
> optimized [] in [] in [] in DebuggerService>>performDebugOperation:
> BlockClosure>>on:do:
> optimized [] in [] in DebuggerService>>performDebugOperation:
> BlockClosure>>on:do:
> optimized [] in DebuggerService>>performDebugOperation:
> optimized [] in [] in ProcessHandle>>performDebugOperation:
> BlockClosure>>on:do:
> optimized [] in ProcessHandle>>performDebugOperation:
>
> ----------------------------------------------------------------------
> UndefinedObject(Object)>>doesNotUnderstand:
> Receiver:
> an UndefinedObject
> Arguments:
> aMessage = a Message with selector: #step and arguments: #()
> Temporaries:
> excpt = a MessageNotUnderstood
> resumeValue = nil
> Context PC = 25
>
> ----------------------------------------------------------------------
> optimized [] in Context>>pdpCompleteCallee:
> Receiver:
> an UndefinedObject
> Temporaries:
> currentContext = nil
> previousContext = nil
> .self = optimized [] in Test>>testMethod
> Context PC = 34
>
> ----------------------------------------------------------------------
> BlockClosure>>on:do:
> Receiver:
> a BlockClosure
> Instance Variables:
> method = CompiledBlock [] in Context>>pdpCompleteCallee:
> outerContext = nil
> copiedValues = an Array[2]
> Arguments:
> anExceptionSelector = GetBaseContextForException
> handlerBlock = BlockClosure [] in Context>>pdpCompleteCallee:
> Context PC = 18
>
> ----------------------------------------------------------------------
> BlockContext(Context)>>pdpCompleteCallee:
> Receiver:
> a BlockContext
> Instance Variables:
> method = CompiledBlock [] in Test>>testMethod
> pc = 7
> sender = EndOfStreamNotification(GenericException)>>performHandler:
> receiver = BlockClosure [] in Test>>testMethod
> stackp = 2
> stack = an Array[12]
> Arguments:
> aContext = nil
> Temporaries:
> currentContext = nil
> previousContext = nil
> Context PC = 28
>
> ----------------------------------------------------------------------
> DebuggerService>>byteStep
> Receiver:
> a DebuggerService
> Instance Variables:
> dependents = a DebuggerClient
> processHandle = a ProcessHandle
> oldCursor = Cursor normal
> receiverInspector = a PrimitiveObjectInspector
> contextInspector = a ContextInspector
> stackInspector = a StackInspector
> sourceMap = a SortedCollection[2]
> currentContext = optimized [] in Test>>testMethod
> pendingEvents = a Set[0]
> continueInDebuggerCtx = a WeakArray[1]
> finishBlock = nil
> selector = #testMethod
> tags = a PDPWeakCollection[0]
> stepProbes = an OrderedCollection[0]
> label = 'CraftedSmalltalk.StepIntoBlockNotification'
> serviceProcess = a Process in Semaphore>>wait
> selectionRange = nil
> contextStackPolicy = a ContextListPolicy
> dontUpdateInspectors = true
> doSend = false
> doSendLoop = false
> doStepIntoBlock = true
> debugOperationIsActive = true
> doItProcess = nil
> Temporaries:
> currContext = nil
> Context PC = 5
>
> ----------------------------------------------------------------------
> optimized [] in DebuggerService>>privateStepIntoBlock
> Receiver:
> an UndefinedObject
> Temporaries:
> startContext = optimized [] in Test>>testMethod
> currContext = nil
> .self = a DebuggerService
> Context PC = 17
>
> ----------------------------------------------------------------------
> BlockClosure>>on:do:
> Receiver:
> a BlockClosure
> Instance Variables:
> method = CompiledBlock [] in DebuggerService>>privateStepIntoBlock
> outerContext = nil
> copiedValues = a DebuggerService
> Arguments:
> anExceptionSelector = an ExceptionSet[2]
> handlerBlock = BlockClosure [] in DebuggerService>>privateStepIntoBlock
> Context PC = 18
>
> ----------------------------------------------------------------------
> DebuggerService>>privateStepIntoBlock
> Receiver:
> a DebuggerService
> Instance Variables:
> dependents = a DebuggerClient
> processHandle = a ProcessHandle
> oldCursor = Cursor normal
> receiverInspector = a PrimitiveObjectInspector
> contextInspector = a ContextInspector
> stackInspector = a StackInspector
> sourceMap = a SortedCollection[2]
> currentContext = optimized [] in Test>>testMethod
> pendingEvents = a Set[0]
> continueInDebuggerCtx = a WeakArray[1]
> finishBlock = nil
> selector = #testMethod
> tags = a PDPWeakCollection[0]
> stepProbes = an OrderedCollection[0]
> label = 'CraftedSmalltalk.StepIntoBlockNotification'
> serviceProcess = a Process in Semaphore>>wait
> selectionRange = nil
> contextStackPolicy = a ContextListPolicy
> dontUpdateInspectors = true
> doSend = false
> doSendLoop = false
> doStepIntoBlock = true
> debugOperationIsActive = true
> doItProcess = nil
> Temporaries:
> closures = an OrderedCollection[0]
> origMethod = CompiledMethod Test>>testMethod
> Context PC = 67
>
> ----------------------------------------------------------------------
> optimized [] in DebuggerService>>basicStepIntoBlock
> Receiver:
> an UndefinedObject
> Temporaries:
> .self = a DebuggerService
> Context PC = 6
>
> ----------------------------------------------------------------------
> optimized [] in [] in [] in DebuggerService>>performDebugOperation:
> Receiver:
> an UndefinedObject
> Temporaries:
> .operationBlock = BlockClosure [] in DebuggerService>>basicStepIntoBlock
> Context PC = 5
>
> ----------------------------------------------------------------------
> BlockClosure>>on:do:
> Receiver:
> a BlockClosure
> Instance Variables:
> method = CompiledBlock [] in [] in [] in
> DebuggerService>>performDebugOperation:
> outerContext = nil
> copiedValues = BlockClosure [] in DebuggerService>>basicStepIntoBlock
> Arguments:
> anExceptionSelector = an ExceptionSet[2]
> handlerBlock = BlockClosure [] in [] in [] in
> DebuggerService>>performDebugOperation:
> Context PC = 18
>
> ----------------------------------------------------------------------
> optimized [] in [] in DebuggerService>>performDebugOperation:
> Receiver:
> an UndefinedObject
> Temporaries:
> .operationBlock = BlockClosure [] in DebuggerService>>basicStepIntoBlock
> .self = a DebuggerService
> Context PC = 16
>
> ----------------------------------------------------------------------
> BlockClosure>>on:do:
> Receiver:
> a BlockClosure
> Instance Variables:
> method = CompiledBlock [] in [] in DebuggerService>>performDebugOperation:
> outerContext = nil
> copiedValues = an Array[2]
> Arguments:
> anExceptionSelector = Error
> handlerBlock = BlockClosure [] in [] in
> DebuggerService>>performDebugOperation:
> Context PC = 18
>
> ----------------------------------------------------------------------
> optimized [] in DebuggerService>>performDebugOperation:
> Receiver:
> an UndefinedObject
> Temporaries:
> .operationBlock = BlockClosure [] in DebuggerService>>basicStepIntoBlock
> .self = a DebuggerService
> exp = a MessageNotUnderstood
> Context PC = 16
>
> ----------------------------------------------------------------------
> optimized [] in [] in ProcessHandle>>performDebugOperation:
> Receiver:
> an UndefinedObject
> Temporaries:
> .operationBlock = BlockClosure [] in
> DebuggerService>>performDebugOperation:
> Context PC = 5
>
> ----------------------------------------------------------------------
> BlockClosure>>on:do:
> Receiver:
> a BlockClosure
> Instance Variables:
> method = CompiledBlock [] in [] in ProcessHandle>>performDebugOperation:
> outerContext = nil
> copiedValues = BlockClosure [] in DebuggerService>>performDebugOperation:
> Arguments:
> anExceptionSelector = ProcessTerminatedDuringSimulation
> handlerBlock = BlockClosure [] in [] in
> ProcessHandle>>performDebugOperation:
> Context PC = 18
>
> ----------------------------------------------------------------------
> optimized [] in ProcessHandle>>performDebugOperation:
> Receiver:
> an UndefinedObject
> Temporaries:
> .operationBlock = BlockClosure [] in
> DebuggerService>>performDebugOperation:
> terminateBlock = nil
> .completedSem = a Semaphore[1]
> Context PC = 14
>
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc