Skip to content

Commit

Permalink
visualgst: Handle process termination in the debugger
Browse files Browse the repository at this point in the history
Handle process termination: when context of process is set to
nil the debugger is no more blocked.

2013-10-21  Gwenael Casaccio  <gwenael.casaccio@gmail.com>

	* DebugTools.st: Add slowNext stepping command.

2014-01-29  Gwenael Casaccio  <gwenael.casaccio@gmail.com>

	* Debugger/GtkDebugger.st: Handle process termination.
  • Loading branch information
Gwenael Casaccio authored and zecke committed Feb 1, 2014
1 parent 7baade4 commit 89bd17b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/debug/ChangeLog
@@ -1,5 +1,9 @@
2013-10-21 Gwenael Casaccio <gwenael.casaccio@gmail.com>


* DebugTools.st: Add slowNext stepping command.

2013-10-21 Gwenael Casaccio <gwenael.casaccio@gmail.com>

* debugtests.st: Add test for >>#restart.
* DebugTools.st: Restart a execution of a context (useful it the method is updated).

Expand Down
17 changes: 17 additions & 0 deletions packages/debug/DebugTools.st
Expand Up @@ -191,6 +191,23 @@ pointer bytecodes to line numbers.'>
whileTrue
]

slowNext [
"Run to the end of the current line in the inferior process, skipping
over message sends."

<category: 'stepping commands'>
| context line |
context := self suspendedContext.
line := self currentLine.

[self stepBytecode.
(self suspendedContext notNil
and: [self suspendedContext parentContext == context])
ifTrue: [self slowFinish: self suspendedContext].
self suspendedContext == context and: [line = self currentLine]]
whileTrue
]

next [
"Run to the end of the current line in the inferior process, skipping
over message sends."
Expand Down
4 changes: 4 additions & 0 deletions packages/visualgst/ChangeLog
@@ -1,3 +1,7 @@
2014-01-29 Gwenael Casaccio <gwenael.casaccio@gmail.com>

* Debugger/GtkDebugger.st: Handle process termination.

2014-01-24 Holger Hans Peter Freyther <holger@moiji-mobile.com>

* SUnit/GtkSUnit.st: Ask TestCase for testcases.
Expand Down
4 changes: 3 additions & 1 deletion packages/visualgst/Debugger/GtkDebugger.st
Expand Up @@ -221,6 +221,7 @@ GtkBrowsingTool subclass: GtkDebugger [
updateContextWidget [
<category: 'context'>

debugger suspendedContext ifNil: [ ^ self close ].
contextWidget
context: debugger suspendedContext;
selectFirstContext.
Expand Down Expand Up @@ -293,7 +294,7 @@ GtkBrowsingTool subclass: GtkDebugger [
stepOver [
<category: 'execute events'>

self debugWith: [ debugger next ]
self debugWith: [ debugger slowNext ]
]

stepOut [
Expand All @@ -315,6 +316,7 @@ GtkBrowsingTool subclass: GtkDebugger [
<category: 'execute events'>

self close.
debugger suspendedContext ifNil: [ ^ self ].
debugger continue
]

Expand Down

0 comments on commit 89bd17b

Please sign in to comment.