16 receiverInspector contextInspector |
16 receiverInspector contextInspector |
17 contextArray selectedContext |
17 contextArray selectedContext |
18 catchBlock grabber traceView tracing |
18 catchBlock grabber traceView tracing |
19 bigStep steppedContextAddress canAbort |
19 bigStep steppedContextAddress canAbort |
20 abortButton terminateButton continueButton |
20 abortButton terminateButton continueButton |
21 stepButton sendButton |
21 stepButton sendButton resumeButton restartButton |
22 exclusive' |
22 exclusive' |
23 classVariableNames:'CachedDebugger' |
23 classVariableNames:'CachedDebugger' |
24 poolDictionaries:'' |
24 poolDictionaries:'' |
25 category:'Interface-Debugger' |
25 category:'Interface-Debugger' |
26 ! |
26 ! |
35 stopping it from further event processing. |
35 stopping it from further event processing. |
36 The exception is when an error occurs within the dispatcher process |
36 The exception is when an error occurs within the dispatcher process |
37 or in one of the eventhandler processes - in this case, the debugger |
37 or in one of the eventhandler processes - in this case, the debugger |
38 will sit on an exclusive display connection. |
38 will sit on an exclusive display connection. |
39 |
39 |
40 $Header: /cvs/stx/stx/libtool/DebugView.st,v 1.8 1994-01-08 17:22:57 claus Exp $ |
40 $Header: /cvs/stx/stx/libtool/DebugView.st,v 1.9 1994-01-13 00:14:55 claus Exp $ |
41 |
41 |
42 written spring/summer 89 by claus |
42 written spring/summer 89 by claus |
43 '! |
43 '! |
44 |
44 |
45 !DebugView class methodsFor:'instance creation'! |
45 !DebugView class methodsFor:'instance creation'! |
169 in:self. |
169 in:self. |
170 bpanel layout:#left. |
170 bpanel layout:#left. |
171 |
171 |
172 terminateButton := Button |
172 terminateButton := Button |
173 label:(resources at:'terminate') |
173 label:(resources at:'terminate') |
174 action:[abortButton turnOffWithoutRedraw. self doTerminate] |
174 action:[terminateButton turnOffWithoutRedraw. self doTerminate] |
175 in:bpanel. |
175 in:bpanel. |
176 abortButton := Button |
176 abortButton := Button |
177 label:(resources at:'abort') |
177 label:(resources at:'abort') |
178 action:[abortButton turnOffWithoutRedraw. self doAbort] |
178 action:[abortButton turnOffWithoutRedraw. self doAbort] |
179 in:bpanel. |
179 in:bpanel. |
|
180 resumeButton := Button |
|
181 label:(resources at:'resume') |
|
182 action:[resumeButton turnOff. self doResume] |
|
183 in:bpanel. |
|
184 |
|
185 restartButton := Button |
|
186 label:(resources at:'restart') |
|
187 action:[restartButton turnOff. self doRestart] |
|
188 in:bpanel. |
|
189 |
180 continueButton := Button |
190 continueButton := Button |
181 label:(resources at:'continue') |
191 label:(resources at:'continue') |
182 action:[continueButton turnOffWithoutRedraw. self doContinue] |
192 action:[continueButton turnOffWithoutRedraw. self doContinue] |
183 in:bpanel. |
193 in:bpanel. |
184 stepButton := Button |
194 stepButton := Button |
489 (exitAction == #resume) ifTrue:[ |
499 (exitAction == #resume) ifTrue:[ |
490 selectedContext notNil ifTrue:[ |
500 selectedContext notNil ifTrue:[ |
491 con := selectedContext. |
501 con := selectedContext. |
492 selectedContext := nil. |
502 selectedContext := nil. |
493 InInterrupt := nil. |
503 InInterrupt := nil. |
|
504 busy := false. |
494 con unwind. |
505 con unwind. |
495 'cannot resume selected context' printNewline |
506 'cannot resume selected context' printNewline |
496 ] |
507 ] |
497 ] ifFalse:[ |
508 ] ifFalse:[ |
498 (exitAction == #restart) ifTrue:[ |
509 (exitAction == #restart) ifTrue:[ |
499 selectedContext notNil ifTrue:[ |
510 selectedContext notNil ifTrue:[ |
500 con := selectedContext. |
511 con := selectedContext. |
501 selectedContext := nil. |
512 selectedContext := nil. |
502 InInterrupt := nil. |
513 InInterrupt := nil. |
|
514 busy := false. |
503 con restart. |
515 con restart. |
504 'cannot restart selected context' printNewline |
516 'cannot restart selected context' printNewline |
505 ] |
517 ] |
506 ] ifFalse:[ |
518 ] ifFalse:[ |
507 (exitAction == #terminate) ifTrue:[ |
519 (exitAction == #terminate) ifTrue:[ |
508 selectedContext := nil. |
520 selectedContext := nil. |
509 InInterrupt := nil. |
521 InInterrupt := nil. |
|
522 busy := false. |
510 Processor activeProcess terminate. |
523 Processor activeProcess terminate. |
511 'cannot terminate process' printNewline |
524 'cannot terminate process' printNewline |
512 ] |
525 ] |
513 ] |
526 ] |
514 ] |
527 ] |
529 |
542 |
530 ObjectMemory stepInterruptHandler:self. |
543 ObjectMemory stepInterruptHandler:self. |
531 StepInterruptPending := true. |
544 StepInterruptPending := true. |
532 InterruptPending := true. |
545 InterruptPending := true. |
533 InStepInterrupt := nil |
546 InStepInterrupt := nil |
|
547 ] ifFalse:[ |
|
548 busy := false |
534 ] |
549 ] |
535 ! |
550 ! |
536 |
551 |
537 openOn:aProcess |
552 openOn:aProcess |
538 "enter the debugger on a process - |
553 "enter the debugger on a process - |
544 | con selection| |
559 | con selection| |
545 |
560 |
546 busy := true. |
561 busy := true. |
547 bigStep := false. |
562 bigStep := false. |
548 |
563 |
|
564 "can only look into process - context chain is not active" |
549 abortButton disable. |
565 abortButton disable. |
550 sendButton disable. |
566 sendButton disable. |
551 stepButton disable. |
567 stepButton disable. |
552 continueButton disable. |
568 continueButton disable. |
|
569 resumeButton disable. |
|
570 restartButton disable. |
553 |
571 |
554 self initializeMiddleButtonMenu. |
572 self initializeMiddleButtonMenu. |
555 contextView middleButtonMenu disable:#doAbort. |
573 contextView middleButtonMenu disable:#doAbort. |
556 contextView middleButtonMenu disable:#doSend. |
574 contextView middleButtonMenu disable:#doSend. |
557 contextView middleButtonMenu disable:#doStep. |
575 contextView middleButtonMenu disable:#doStep. |
841 steppedContextAddress := nil. |
859 steppedContextAddress := nil. |
842 haveControl := false. |
860 haveControl := false. |
843 exitAction := #abort. |
861 exitAction := #abort. |
844 ProcessorScheduler isPureEventDriven ifFalse:[ |
862 ProcessorScheduler isPureEventDriven ifFalse:[ |
845 "exit private event-loop" |
863 "exit private event-loop" |
846 catchBlock value |
864 catchBlock notNil ifTrue:[ |
|
865 catchBlock value |
|
866 ] |
847 ]. |
867 ]. |
848 ^ self. |
868 ^ self. |
849 |
869 |
850 "obsolete ..." |
870 "obsolete ..." |
851 Processor activeProcess id == 0 ifTrue:[ |
871 Processor activeProcess id == 0 ifTrue:[ |