1155 ! |
1155 ! |
1156 |
1156 |
1157 stepOrNext |
1157 stepOrNext |
1158 |where here s isWrap method lastWrappedConAddr wrappedMethod |
1158 |where here s isWrap method lastWrappedConAddr wrappedMethod |
1159 inBlock left ignore contextBelow lastWrappedContext |
1159 inBlock left ignore contextBelow lastWrappedContext |
1160 leftWrap enteredWrap| |
1160 leftWrap enteredWrap anyStepBlocks belowSteppedContext| |
1161 |
1161 |
1162 "/ DebuggingDebugger := true |
1162 "/ DebuggingDebugger := true |
1163 |
1163 |
1164 skipLineNr == #return ifTrue:[ |
1164 skipLineNr == #return ifTrue:[ |
1165 name := Processor activeProcess nameOrId. |
1165 name := Processor activeProcess nameOrId. |
1305 |
1306 |
1306 "/where print. ' ' print. ((ObjectMemory addressOf:where)printStringRadix:16) printCR. |
1307 "/where print. ' ' print. ((ObjectMemory addressOf:where)printStringRadix:16) printCR. |
1307 "/steppedContext print. ' ' print. ((ObjectMemory addressOf:steppedContext)printStringRadix:16) printCR. |
1308 "/steppedContext print. ' ' print. ((ObjectMemory addressOf:steppedContext)printStringRadix:16) printCR. |
1308 |
1309 |
1309 where == steppedContext ifFalse:[ |
1310 where == steppedContext ifFalse:[ |
1310 " |
1311 |
1311 check if we are in a context below steppedContext |
1312 "/ check if we are in a context below steppedContext |
1312 (i.e. if steppedContext can be reached from |
1313 "/ (i.e. if steppedContext can be reached from |
1313 interrupted context. Not using context-ref but its |
1314 "/ interrupted context. Not using context-ref but its |
1314 address to avoid creation of many useless contexts.) |
1315 "/ address to avoid creation of many useless contexts.) |
1315 " |
1316 |
1316 inBlock ifFalse:[ |
1317 inBlock ifFalse:[ |
1317 [where notNil] whileTrue:[ |
1318 [where notNil] whileTrue:[ |
|
1319 |
|
1320 "/ if either the receiver or any arg of this context |
|
1321 "/ is a block of the steppedContext, we must really |
|
1322 "/ do a single step. Otherwise, stepping through a |
|
1323 "/ do:-loop would be very difficult. |
|
1324 |
|
1325 (where receiver isBlock |
|
1326 and:[where receiver home == steppedContext]) |
|
1327 ifTrue:[ |
|
1328 anyStepBlocks := true. |
|
1329 ] ifFalse:[ |
|
1330 where args do:[:arg | |
|
1331 (arg isBlock |
|
1332 and:[arg home == steppedContext]) |
|
1333 ifTrue:[ |
|
1334 anyStepBlocks := true. |
|
1335 ] |
|
1336 ] |
|
1337 ]. |
1318 |
1338 |
1319 DebuggingDebugger == true ifTrue:[ |
1339 DebuggingDebugger == true ifTrue:[ |
1320 ((ObjectMemory addressOf:where) printStringRadix:16)print. ' ' print. |
1340 ((ObjectMemory addressOf:where) printStringRadix:16)print. ' ' print. |
1321 where selector printNL. |
1341 where selector printNL. |
1322 ]. |
1342 ]. |
1334 yes, a context below |
1354 yes, a context below |
1335 - continue and schedule another stepInterrupt. |
1355 - continue and schedule another stepInterrupt. |
1336 Must flush caches since optimized methods not always |
1356 Must flush caches since optimized methods not always |
1337 look for pending interrupts |
1357 look for pending interrupts |
1338 " |
1358 " |
1339 ObjectMemory flushInlineCaches. |
1359 '---' printCR. |
1340 (contextBelow notNil |
1360 contextBelow printCR. |
1341 and:[inBlock not]) ifTrue:[ |
1361 inBlock printCR. |
|
1362 |
|
1363 contextBelow notNil ifTrue:[ |
1342 "/ 'prepare for unwind-catch' printNL. |
1364 "/ 'prepare for unwind-catch' printNL. |
1343 "/ 'con= ' print. contextBelow printCR. |
1365 "/ 'con= ' print. contextBelow printCR. |
1344 contextBelow selector notNil ifTrue:[ |
1366 contextBelow selector notNil ifTrue:[ |
1345 self label:'single stepping - please wait ...(' , contextBelow selector , ')'. |
1367 self label:'single stepping - please wait ...(' , contextBelow selector , ')'. |
1346 ]. |
1368 ]. |
1350 contextBelow printCR. |
1372 contextBelow printCR. |
1351 ]. |
1373 ]. |
1352 Processor activeProcess forceInterruptOnReturnOf:contextBelow. |
1374 Processor activeProcess forceInterruptOnReturnOf:contextBelow. |
1353 StepInterruptPending := nil. |
1375 StepInterruptPending := nil. |
1354 ] ifFalse:[ |
1376 ] ifFalse:[ |
|
1377 ObjectMemory flushInlineCaches. |
|
1378 |
1355 here selector notNil ifTrue:[ |
1379 here selector notNil ifTrue:[ |
1356 self label:'single stepping - please wait ...(' , here selector , ')'. |
1380 self label:'single stepping - please wait ...(' , here selector , ')'. |
1357 ]. |
1381 ]. |
1358 |
1382 |
1359 DebuggingDebugger == true ifTrue:[ |
1383 DebuggingDebugger == true ifTrue:[ |