Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

18391-Debugger must guard against actions on process termination #409

Merged
merged 1 commit into from Oct 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -2,9 +2,11 @@ context
pcRangeForContext: aContext
"Answer the indices in the source code for the method corresponding to
aContext's program counter value."

aContext isDead ifTrue:
(aContext isNil) ifTrue: [
self terminate.
] ifFalse: [
(aContext isDead) ifTrue:
[^1 to: 0].
^aContext debuggerMap
rangeForPC: aContext pc
contextIsActiveContext: (self isLatestContext: aContext)
contextIsActiveContext: (self isLatestContext: aContext) ]
Expand Up @@ -3,6 +3,10 @@ updateBrowser
| browserPane session |

session := self session.
session interruptedContext ifNil: [
self close.
UIManager default inform: 'End of debugged execution'.
] ifNotNil: [
browserPane := self browser pane.
(browserPane port: #entity) silentValue: nil.
(browserPane port: #entity) value: session.
(browserPane port: #entity) value: session. ]
Expand Up @@ -26,7 +26,7 @@ runUntilErrorOrReturnFrom: aSender
"Control resumes here once above ensure block or exception handler is executed"
^ error ifNil: [
"No error was raised, remove ensure context by stepping until popped"
[context isDead] whileFalse: [topContext := topContext stepToCallee].
[(context isDead)or: [ topContext isNil ]] whileFalse: [topContext := topContext stepToCallee].
{topContext. nil}

] ifNotNil: [
Expand Down
1 change: 0 additions & 1 deletion src/Kernel.package/Process.class/instance/terminate.st
Expand Up @@ -6,7 +6,6 @@ terminate
terminating := self isTerminating
ifTrue: [ ^ ProcessAlreadyTerminating signal ]
ifFalse: [ true ].

self isActiveProcess
ifTrue: [
ctxt := thisContext.
Expand Down