stepping off the end of the debug stack

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

stepping off the end of the debug stack

Ben Coman

I imagine a newcomer exploring the system could easily step off the end of the debug stack like this...
 
(1 printString)   "debugIt"  
then StepOver six times where the image hangs at "Processor terminateActive"

This could have a strong impact against first impressions.
What would it take to guard against this?

cheers -ben
Reply | Threaded
Open this post in threaded view
|

Re: stepping off the end of the debug stack

Ben Coman


On Sat, Apr 8, 2017 at 12:32 PM, Ben Coman <[hidden email]> wrote:

I imagine a newcomer exploring the system could easily step off the end of the debug stack like this...
 
(1 printString)   "debugIt"  
then StepOver six times where the image hangs at "Processor terminateActive"

This could have a strong impact against first impressions.
What would it take to guard against this?

cheers -ben

As an immediate stop-gap I'm adding the following comment to  BlockClosure>>newProcess

"IMPORTANT! Debug stepping this deep infrastructure may lock your Image"
"If you are not sure what you are doing, close the debugger now." 

cheers -ben
Reply | Threaded
Open this post in threaded view
|

Re: stepping off the end of the debug stack

Nicolai Hess-3-2


2017-04-08 6:46 GMT+02:00 Ben Coman <[hidden email]>:


On Sat, Apr 8, 2017 at 12:32 PM, Ben Coman <[hidden email]> wrote:

I imagine a newcomer exploring the system could easily step off the end of the debug stack like this...
 
(1 printString)   "debugIt"  
then StepOver six times where the image hangs at "Processor terminateActive"

This could have a strong impact against first impressions.
What would it take to guard against this?

cheers -ben

As an immediate stop-gap I'm adding the following comment to  BlockClosure>>newProcess

"IMPORTANT! Debug stepping this deep infrastructure may lock your Image"
"If you are not sure what you are doing, close the debugger now." 

cheers -ben


+1

Reply | Threaded
Open this post in threaded view
|

Re: stepping off the end of the debug stack

Eliot Miranda-2
Hi Ben,

    hmmm, good thought.  Seems to me that the right solution is in the primitive simulations in Context>>tryPrimitive... or Context>>doPrimitive... (*) so that the debugger process isn't terminated, but the process being debugged is.


(* at my phone right now so don't have the code to look at to answer the correct selectors)
_,,,^..^,,,_ (phone)

On Apr 8, 2017, at 7:23 AM, Nicolai Hess <[hidden email]> wrote:



2017-04-08 6:46 GMT+02:00 Ben Coman <[hidden email]>:


On Sat, Apr 8, 2017 at 12:32 PM, Ben Coman <[hidden email]> wrote:

I imagine a newcomer exploring the system could easily step off the end of the debug stack like this...
 
(1 printString)   "debugIt"  
then StepOver six times where the image hangs at "Processor terminateActive"

This could have a strong impact against first impressions.
What would it take to guard against this?

cheers -ben

As an immediate stop-gap I'm adding the following comment to  BlockClosure>>newProcess

"IMPORTANT! Debug stepping this deep infrastructure may lock your Image"
"If you are not sure what you are doing, close the debugger now." 

cheers -ben


+1

Reply | Threaded
Open this post in threaded view
|

Re: stepping off the end of the debug stack

Denis Kudriashov
In reply to this post by Ben Coman
Hi Ben,

2017-04-08 6:32 GMT+02:00 Ben Coman <[hidden email]>:
I imagine a newcomer exploring the system could easily step off the end of the debug stack like this...
 
(1 printString)   "debugIt"  
then StepOver six times where the image hangs at "Processor terminateActive"

This could have a strong impact against first impressions.
What would it take to guard against this?

I opened issue 19928. (I not found yours, right?)
Reply | Threaded
Open this post in threaded view
|

Re: stepping off the end of the debug stack

Denis Kudriashov
In reply to this post by Ben Coman

2017-04-08 6:46 GMT+02:00 Ben Coman <[hidden email]>:
As an immediate stop-gap I'm adding the following comment to  BlockClosure>>newProcess

"IMPORTANT! Debug stepping this deep infrastructure may lock your Image"
"If you are not sure what you are doing, close the debugger now." 

And issue for this part 19929
Reply | Threaded
Open this post in threaded view
|

Re: stepping off the end of the debug stack

Eliot Miranda-2
In reply to this post by Ben Coman
Hi Ben,

On Fri, Apr 7, 2017 at 9:32 PM, Ben Coman <[hidden email]> wrote:

I imagine a newcomer exploring the system could easily step off the end of the debug stack like this...
 
(1 printString)   "debugIt"  
then StepOver six times where the image hangs at "Processor terminateActive"

This could have a strong impact against first impressions.
What would it take to guard against this?

I just took a look at this in Squeak and fixed it there.  All I had to do was fix Process>>completeStep: and arrange that the Debugger wasn't confused when it got back the nil suspendedContext of a terminated process and that it disabled its into/over/through buttons on process termination.  You can see the Squeak changes in these two commits:


cheers -ben

HTH
_,,,^..^,,,_
best, Eliot