DebugView.st
author Claus Gittinger <cg@exept.de>
Fri, 18 Apr 1997 15:22:53 +0200
changeset 1148 d53ae051fa82
parent 1136 f6805687a65c
child 1179 e927f0c09298
permissions -rw-r--r--
defaultIcon improved
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
     1
"
4
77d8e96499b2 *** empty log message ***
claus
parents: 2
diff changeset
     2
 COPYRIGHT (c) 1989 by Claus Gittinger
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
     3
	      All Rights Reserved
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
     4
571fd5eee315 Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
571fd5eee315 Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
571fd5eee315 Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
571fd5eee315 Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
571fd5eee315 Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
571fd5eee315 Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
571fd5eee315 Initial revision
claus
parents:
diff changeset
    11
"
571fd5eee315 Initial revision
claus
parents:
diff changeset
    12
571fd5eee315 Initial revision
claus
parents:
diff changeset
    13
StandardSystemView subclass:#DebugView
300
027ffcadd12d keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents: 299
diff changeset
    14
	instanceVariableNames:'busy haveControl exitAction canContinue contextView codeView
027ffcadd12d keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents: 299
diff changeset
    15
		receiverInspector contextInspector contextArray selectedContext
027ffcadd12d keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents: 299
diff changeset
    16
		catchBlock grabber traceView tracing bigStep skipLineNr
027ffcadd12d keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents: 299
diff changeset
    17
		steppedContextAddress canAbort abortButton terminateButton
1063
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
    18
		continueButton stepButton nextButton nextOverButton nextOutButton
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
    19
		sendButton returnButton restartButton exclusive inspecting
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
    20
		nChainShown inspectedProcess updateProcess stopButton
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
    21
		updateButton monitorToggle stepping steppedContextLineno
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
    22
		stepForReturn actualContext inWrap stackInspector steppedContext
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
    23
		wrapperContext verboseBacktrace firstContext stepHow'
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
    24
	classVariableNames:'CachedDebugger CachedExclusive OpenDebuggers MoreDebuggingDetail
1092
059c29fac604 made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
    25
		DebuggingDebugger VerboseBacktraceDefault DefaultIcon
059c29fac604 made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
    26
		InitialNCHAINShown'
300
027ffcadd12d keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents: 299
diff changeset
    27
	poolDictionaries:''
027ffcadd12d keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents: 299
diff changeset
    28
	category:'Interface-Debugger'
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
    29
!
571fd5eee315 Initial revision
claus
parents:
diff changeset
    30
778
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
    31
!DebugView class methodsFor:'documentation'!
29
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    32
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    33
copyright
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    34
"
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    35
 COPYRIGHT (c) 1989 by Claus Gittinger
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
    36
	      All Rights Reserved
29
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    37
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    38
 This software is furnished under a license and may be used
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    39
 only in accordance with the terms of that license and with the
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    40
 inclusion of the above copyright notice.   This software may not
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    41
 be provided or otherwise made available to, or used by, any
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    42
 other person.  No title to or ownership of the software is
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    43
 hereby transferred.
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    44
"
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    45
!
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
    46
29
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    47
documentation
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    48
"
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    49
    this class implements a graphical debugger interface.
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    50
    The debugger usually sits on top of the faulting process,
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    51
    taking over its event processing. Thus only the 'stopped' process is affected;
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    52
    other processes continue to respond to events.
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    53
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    54
    The one exception is when an error occurs within the dispatcher process
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    55
    or in one of the eventhandler processes - in this case, the debugger
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    56
    will sit on an exclusive display connection.
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    57
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    58
    The whole debugging will be changed, once the required process primitives
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    59
    are available, which allow control of another processes execution
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    60
    (i.e. single-step, restart & return). The setup will be changed then,
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    61
    to have the debugger control the debuggee (i.e. two processes)
35
cd5cb075fd6a *** empty log message ***
claus
parents: 29
diff changeset
    62
cd5cb075fd6a *** empty log message ***
claus
parents: 29
diff changeset
    63
    See additional information in 'doc/misc/debugger.doc'.
53
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
    64
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
    65
    Notice: the DebugView class caches the last used debugger in a class
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
    66
    variable. It may happen, that a malfunctioning debugger (for example,
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
    67
    a halfway destoyed one) is kept there. You will notice this, if a
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
    68
    debugger comes up without showing any contents. In this case, close
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
    69
    (or destroy) the broken debugView, and execute
508
8d2ab732fca5 documentation
Claus Gittinger <cg@exept.de>
parents: 494
diff changeset
    70
        Debugger newDebugger
53
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
    71
    which removes the cached debugger and forces creation of a new one the
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
    72
    next time. This is a temporary workaround - the debugger will be fixed to
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
    73
    avoid this problem.
508
8d2ab732fca5 documentation
Claus Gittinger <cg@exept.de>
parents: 494
diff changeset
    74
8d2ab732fca5 documentation
Claus Gittinger <cg@exept.de>
parents: 494
diff changeset
    75
    [author:]
8d2ab732fca5 documentation
Claus Gittinger <cg@exept.de>
parents: 494
diff changeset
    76
        Claus Gittinger
8d2ab732fca5 documentation
Claus Gittinger <cg@exept.de>
parents: 494
diff changeset
    77
8d2ab732fca5 documentation
Claus Gittinger <cg@exept.de>
parents: 494
diff changeset
    78
    [see also:]
8d2ab732fca5 documentation
Claus Gittinger <cg@exept.de>
parents: 494
diff changeset
    79
        Exception Signal
8d2ab732fca5 documentation
Claus Gittinger <cg@exept.de>
parents: 494
diff changeset
    80
        Process
29
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    81
"
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
    82
! !
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
    83
778
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
    84
!DebugView class methodsFor:'initialization'!
243
4cdc71d87dd4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 212
diff changeset
    85
1092
059c29fac604 made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
    86
initialize
059c29fac604 made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
    87
    InitialNCHAINShown := 20.
059c29fac604 made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
    88
059c29fac604 made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
    89
    "Created: 20.3.1997 / 16:53:37 / cg"
059c29fac604 made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
    90
    "Modified: 20.3.1997 / 16:54:32 / cg"
059c29fac604 made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
    91
!
059c29fac604 made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
    92
243
4cdc71d87dd4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 212
diff changeset
    93
reinitialize
4cdc71d87dd4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 212
diff changeset
    94
    self newDebugger
4cdc71d87dd4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 212
diff changeset
    95
! !
4cdc71d87dd4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 212
diff changeset
    96
778
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
    97
!DebugView class methodsFor:'instance creation'!
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
    98
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    99
enter
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   100
    "another way of entering the debugger"
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   101
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   102
    ^ self enter:(thisContext sender) withMessage:'Debugger'
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   103
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   104
    "Debugger enter"
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   105
!
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   106
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   107
enter:aContext
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   108
    "enter the debugger on aContext"
29
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
   109
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   110
    ^ self enter:aContext withMessage:'Debugger'
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
   111
!
571fd5eee315 Initial revision
claus
parents:
diff changeset
   112
29
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
   113
enter:aContext withMessage:aString
53
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
   114
    "enter a debugger; if this is a recursive invocation, enter
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
   115
     a MiniDebugger instead.
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
   116
     This is the standard way of entering the debugger;
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
   117
     sent from error- and halt messages."
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
   118
745
89a242c66cda handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents: 687
diff changeset
   119
    |active found c|
93
claus
parents: 92
diff changeset
   120
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
   121
    StepInterruptPending := nil.
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
   122
62
8ee283ae48b2 *** empty log message ***
claus
parents: 61
diff changeset
   123
    thisContext isRecursive ifTrue:[
745
89a242c66cda handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents: 687
diff changeset
   124
        "/ care for the special case, were the Debugger was autoloaded.
89a242c66cda handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents: 687
diff changeset
   125
        "/ in this case, thisContext IS recursive, but thats no error
89a242c66cda handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents: 687
diff changeset
   126
        "/ condition.
89a242c66cda handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents: 687
diff changeset
   127
        found := false.
89a242c66cda handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents: 687
diff changeset
   128
        c := thisContext sender.
89a242c66cda handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents: 687
diff changeset
   129
        [found not
89a242c66cda handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents: 687
diff changeset
   130
         and:[c notNil 
89a242c66cda handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents: 687
diff changeset
   131
         and:[c selector ~~ #enter:withMessage:]]] whileTrue:[
89a242c66cda handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents: 687
diff changeset
   132
            c selector == #noByteCode ifTrue:[
89a242c66cda handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents: 687
diff changeset
   133
                found := true
89a242c66cda handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents: 687
diff changeset
   134
            ].
89a242c66cda handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents: 687
diff changeset
   135
            c := c sender
89a242c66cda handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents: 687
diff changeset
   136
        ].
89a242c66cda handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents: 687
diff changeset
   137
89a242c66cda handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents: 687
diff changeset
   138
        found ifFalse:[
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
   139
            ('DebugView [warning]: reentered with: ', aString) errorPrintCR.
941
3e25ae37eb56 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 940
diff changeset
   140
            ^ MiniDebugger 
3e25ae37eb56 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 940
diff changeset
   141
                enterWithMessage:'DebugView [error]: recursive error (in debugger)'.
745
89a242c66cda handle autoloaded debugger case
Claus Gittinger <cg@exept.de>
parents: 687
diff changeset
   142
        ]
62
8ee283ae48b2 *** empty log message ***
claus
parents: 61
diff changeset
   143
    ].
8ee283ae48b2 *** empty log message ***
claus
parents: 61
diff changeset
   144
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
   145
    "
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
   146
     well, it could be a stepping or sending debugger up there;
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
   147
     in this case, return to it. This happens, when a stepping process
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
   148
     runs into an error (for example, a halt). In this case, we want the
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
   149
     stepping debugger to come up again instead of a new one.
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
   150
    "
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
   151
    OpenDebuggers notNil ifTrue:[
526
8be290d825d6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 508
diff changeset
   152
        active := Processor activeProcess.
8be290d825d6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 508
diff changeset
   153
        OpenDebuggers do:[:aDebugger |
775
f741dc4afe19 changed WeakArray to set emptied slots to zero
Claus Gittinger <cg@exept.de>
parents: 755
diff changeset
   154
            (aDebugger notNil and:[aDebugger ~~ 0]) ifTrue:[
526
8be290d825d6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 508
diff changeset
   155
                (aDebugger inspectedProcess == active) ifTrue:[
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
   156
"/ 'entering stepping debugger again' printNL.
526
8be290d825d6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 508
diff changeset
   157
                    aDebugger unstep.
8be290d825d6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 508
diff changeset
   158
                    aDebugger setLabelFor:aString in:active.
8be290d825d6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 508
diff changeset
   159
                    ^ aDebugger enter:aContext.
8be290d825d6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 508
diff changeset
   160
                ]
8be290d825d6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 508
diff changeset
   161
            ]
8be290d825d6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 508
diff changeset
   162
        ]
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
   163
    ].
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
   164
53
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
   165
    ^ self enterUnconditional:aContext withMessage:aString
526
8be290d825d6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 508
diff changeset
   166
1101
4db36b95dac4 dont mark contexts nonLifo
Claus Gittinger <cg@exept.de>
parents: 1092
diff changeset
   167
    "Modified: 27.3.1997 / 18:25:44 / cg"
53
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
   168
!
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
   169
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   170
enterUnconditional:aContext withMessage:aString
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   171
    "enter a debugger - do not check for recursive invocation"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   172
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   173
    |aDebugger|
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   174
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   175
    StepInterruptPending := nil.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   176
    aDebugger := self new.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   177
    aDebugger setLabelFor:aString in:Processor activeProcess.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   178
    aDebugger enter:aContext.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   179
    ^ nil
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   180
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   181
    "nil halt"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   182
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   183
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   184
enterWithMessage:aString
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   185
    "the standard way of entering the debugger - sent from Objects
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   186
     error- and halt messages"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   187
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   188
    ^ self enter:(thisContext sender) withMessage:aString
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   189
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   190
    "Debugger enterWithMessage:'hi there'"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   191
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   192
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   193
new
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   194
    "return a new DebugView - return a cached debugger if it already
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   195
     exists"
53
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
   196
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   197
    |debugger|
14
e07eee5d93ca *** empty log message ***
claus
parents: 13
diff changeset
   198
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   199
    "
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   200
     need a blocking debugger if no processes or 
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   201
     or if its a timing/interrupt process 
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   202
     (because otherwise we would not get any events here ...
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   203
    "
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   204
    Processor activeProcessIsSystemProcess ifTrue:[
959
f1faf693f0d7 only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents: 952
diff changeset
   205
        (CachedExclusive isNil 
f1faf693f0d7 only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents: 952
diff changeset
   206
        or:[CachedExclusive device ~~ Screen current]) ifTrue:[
875
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   207
            debugger := self newExclusive
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   208
        ] ifFalse:[
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   209
            debugger := CachedExclusive.
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   210
            CachedExclusive := nil.
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   211
        ].
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   212
    ] ifFalse:[
1136
f6805687a65c avoid creating a debugger on a closed display device
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   213
        CachedDebugger notNil ifTrue:[
f6805687a65c avoid creating a debugger on a closed display device
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   214
            (CachedDebugger device ~~ Screen current 
f6805687a65c avoid creating a debugger on a closed display device
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   215
            or:[CachedDebugger device isOpen not]) ifTrue:[
f6805687a65c avoid creating a debugger on a closed display device
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   216
                CachedDebugger := nil
f6805687a65c avoid creating a debugger on a closed display device
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   217
            ]
959
f1faf693f0d7 only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents: 952
diff changeset
   218
        ].
1136
f6805687a65c avoid creating a debugger on a closed display device
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   219
f6805687a65c avoid creating a debugger on a closed display device
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   220
        CachedDebugger isNil ifTrue:[
f6805687a65c avoid creating a debugger on a closed display device
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   221
            Screen current isOpen ifFalse:[
f6805687a65c avoid creating a debugger on a closed display device
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   222
                DeviceWorkstation currentScreenQuerySignal handle:[:ex |
f6805687a65c avoid creating a debugger on a closed display device
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   223
                    ex proceedWith:Display
f6805687a65c avoid creating a debugger on a closed display device
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   224
                ] do:[
f6805687a65c avoid creating a debugger on a closed display device
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   225
                    debugger := super new.
f6805687a65c avoid creating a debugger on a closed display device
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   226
                ]
f6805687a65c avoid creating a debugger on a closed display device
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   227
            ] ifTrue:[
f6805687a65c avoid creating a debugger on a closed display device
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   228
                debugger := super new.
f6805687a65c avoid creating a debugger on a closed display device
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   229
            ].
875
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   230
            debugger label:'Debugger'.
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   231
            debugger icon:self defaultIcon.
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   232
        ] ifFalse:[
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   233
            debugger := CachedDebugger.
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   234
            CachedDebugger := nil.
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   235
        ]
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   236
    ].
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   237
    ^ debugger
875
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   238
1136
f6805687a65c avoid creating a debugger on a closed display device
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   239
    "Modified: 14.4.1997 / 18:18:30 / cg"
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   240
!
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
   241
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   242
newExclusive
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   243
    "return a debugger for exclusive display access"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   244
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   245
    |debugger|
105
claus
parents: 101
diff changeset
   246
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   247
    debugger := super new.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   248
    debugger label:'Debugger'.
875
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   249
    debugger icon:self defaultIcon.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   250
    debugger exclusive:true.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   251
    ^ debugger
875
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   252
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   253
    "Modified: 1.1.1970 / 23:27:06 / cg"
105
claus
parents: 101
diff changeset
   254
!
claus
parents: 101
diff changeset
   255
29
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
   256
openOn:aProcess
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
   257
    "start a  debugger on aProcess
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
   258
     (actually not more than a good-looking inspector)"
15
7fc8fcef7bc6 *** empty log message ***
claus
parents: 14
diff changeset
   259
52
7b48409ae088 *** empty log message ***
claus
parents: 48
diff changeset
   260
    |aDebugger label nm|
15
7fc8fcef7bc6 *** empty log message ***
claus
parents: 14
diff changeset
   261
7fc8fcef7bc6 *** empty log message ***
claus
parents: 14
diff changeset
   262
    aDebugger := super new.
875
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   263
    aDebugger icon:self defaultIcon.
29
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
   264
    aProcess notNil ifTrue:[
875
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   265
        nm := aProcess name.
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   266
        nm notNil ifTrue:[
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   267
            nm := (nm contractTo:17) , '-' , aProcess id printString
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   268
        ] ifFalse:[
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   269
            nm := aProcess id printString
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   270
        ].
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   271
        label := 'Debugger [' , nm , ']'.
29
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
   272
    ] ifFalse:[
875
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   273
        label := 'no process'
29
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
   274
    ].
1114
c663a9b0a1dc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1101
diff changeset
   275
    aDebugger label:label iconLabel:'Debugger'.
15
7fc8fcef7bc6 *** empty log message ***
claus
parents: 14
diff changeset
   276
    aDebugger openOn:aProcess.
7fc8fcef7bc6 *** empty log message ***
claus
parents: 14
diff changeset
   277
    ^ nil
875
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   278
1114
c663a9b0a1dc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1101
diff changeset
   279
    "Modified: 4.4.1997 / 16:22:36 / cg"
126
claus
parents: 124
diff changeset
   280
! !
claus
parents: 124
diff changeset
   281
778
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   282
!DebugView class methodsFor:'cleanup'!
485
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   283
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   284
lowSpaceCleanup 
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   285
    "in low memory situations, give up cached debuggers"
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   286
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   287
    CachedDebugger := nil.
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   288
    CachedExclusive := nil.
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   289
    OpenDebuggers := nil.
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   290
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   291
    "
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   292
     DebugView lowSpaceCleanup
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   293
    "
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   294
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   295
    "Modified: 18.4.1996 / 16:48:03 / cg"
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   296
!
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   297
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   298
newDebugger
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   299
    "force creation of a new debugger"
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   300
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   301
    CachedDebugger := nil.
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   302
    CachedExclusive := nil.
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   303
    OpenDebuggers := nil.
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   304
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   305
    "
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   306
     DebugView newDebugger
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   307
    "
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   308
! !
e9a0636c4fca category rename
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   309
875
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   310
!DebugView class methodsFor:'defaults'!
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   311
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   312
defaultIcon
1148
d53ae051fa82 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1136
diff changeset
   313
    "return the debuggers default window icon"
d53ae051fa82 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1136
diff changeset
   314
d53ae051fa82 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1136
diff changeset
   315
    <resource: #style (#ICON #ICON_FILE)>
d53ae051fa82 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1136
diff changeset
   316
d53ae051fa82 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1136
diff changeset
   317
    |nm i|
d53ae051fa82 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1136
diff changeset
   318
d53ae051fa82 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1136
diff changeset
   319
    (i := DefaultIcon) isNil ifTrue:[
d53ae051fa82 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1136
diff changeset
   320
        i := self classResources at:'ICON' default:nil.
d53ae051fa82 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1136
diff changeset
   321
        i isNil ifTrue:[
d53ae051fa82 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1136
diff changeset
   322
            nm := ClassResources at:'ICON_FILE' default:'Debugger.xbm'.
d53ae051fa82 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1136
diff changeset
   323
            i := Image fromFile:nm resolution:100.
d53ae051fa82 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1136
diff changeset
   324
            i isNil ifTrue:[
d53ae051fa82 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1136
diff changeset
   325
                i := Image fromFile:('bitmaps/' , nm) resolution:100.
d53ae051fa82 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1136
diff changeset
   326
                i isNil ifTrue:[
d53ae051fa82 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1136
diff changeset
   327
                    i := StandardSystemView defaultIcon
d53ae051fa82 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1136
diff changeset
   328
                ]
d53ae051fa82 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1136
diff changeset
   329
            ]
1082
72cac7557903 cache defaultIcon
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
   330
        ].
1148
d53ae051fa82 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1136
diff changeset
   331
        i notNil ifTrue:[
d53ae051fa82 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1136
diff changeset
   332
            DefaultIcon := i := i on:Display
1082
72cac7557903 cache defaultIcon
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
   333
        ]
72cac7557903 cache defaultIcon
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
   334
    ].
1148
d53ae051fa82 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1136
diff changeset
   335
    ^ i
d53ae051fa82 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1136
diff changeset
   336
d53ae051fa82 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1136
diff changeset
   337
    "Modified: 19.3.1997 / 20:48:34 / ca"
d53ae051fa82 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1136
diff changeset
   338
    "Modified: 18.4.1997 / 15:16:27 / cg"
937
e1520a0db57e added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents: 936
diff changeset
   339
!
e1520a0db57e added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents: 936
diff changeset
   340
e1520a0db57e added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents: 936
diff changeset
   341
defaultVerboseBacktrace
e1520a0db57e added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents: 936
diff changeset
   342
    ^ VerboseBacktraceDefault
e1520a0db57e added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents: 936
diff changeset
   343
e1520a0db57e added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents: 936
diff changeset
   344
    "Created: 11.1.1997 / 12:14:35 / cg"
e1520a0db57e added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents: 936
diff changeset
   345
!
e1520a0db57e added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents: 936
diff changeset
   346
e1520a0db57e added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents: 936
diff changeset
   347
defaultVerboseBacktrace:aBoolean
e1520a0db57e added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents: 936
diff changeset
   348
    VerboseBacktraceDefault := aBoolean
e1520a0db57e added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents: 936
diff changeset
   349
e1520a0db57e added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents: 936
diff changeset
   350
    "Created: 11.1.1997 / 12:14:44 / cg"
875
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   351
! !
f8ee393ca634 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   352
913
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   353
!DebugView class methodsFor:'misc'!
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   354
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   355
interestingContextFrom:aContext
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   356
    "return an interesting contexts offset, or nil.
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   357
     This is the context initially shown in the walkback.
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   358
     We move up the calling chain, skipping all intermediate Signal
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   359
     and Exception contexts, to present the context in which the error
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   360
     actually occured.
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   361
     Just for your convenience :-)"
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   362
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   363
    |delta con|
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   364
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   365
    delta := self interestingContextIndexFrom:aContext.
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   366
    con := aContext.
944
680cc407240d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
   367
    [con notNil and:[delta > 1]] whileTrue:[
913
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   368
        con := con sender.
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   369
        delta := delta - 1.
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   370
    ].
944
680cc407240d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
   371
    con isNil ifTrue:[
680cc407240d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
   372
        ^ aContext
680cc407240d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
   373
    ].
913
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   374
    ^ con
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   375
944
680cc407240d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
   376
    "Modified: 11.1.1997 / 17:58:44 / cg"
913
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   377
!
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   378
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   379
interestingContextIndexFrom:aContext
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   380
    "return an interesting contexts offset, or nil.
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   381
     This is the context initially shown in the walkback.
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   382
     We move up the calling chain, skipping all intermediate Signal
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   383
     and Exception contexts, to present the context in which the error
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   384
     actually occured.
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   385
     Just for your convenience :-)"
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   386
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   387
    |c found offset sel prev ex|
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   388
998
8740ae8fa5fe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 959
diff changeset
   389
    aContext isNil ifTrue:[^ 1].
913
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   390
    aContext isBlockContext ifTrue:[^ 1].
944
680cc407240d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
   391
    VerboseBacktraceDefault == true ifTrue:[^ 1].
680cc407240d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
   392
680cc407240d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
   393
    "/ somewhere, at the bottom, there must be a raise ...
680cc407240d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
   394
    "/ find the exception
913
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   395
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   396
    c := aContext.
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   397
    1 to:5 do:[:i |
944
680cc407240d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
   398
        c isNil ifTrue:[^ 1].
913
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   399
        sel := c selector.
923
3878260918ee better skip raiseRequest as well
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   400
        ((sel == #raise) 
3878260918ee better skip raiseRequest as well
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   401
        or:[sel == #raiseRequest]) ifTrue:[
913
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   402
            (c receiver isKindOf:Exception) ifTrue:[
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   403
                ex := c receiver.
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   404
                offset := i.
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   405
                found := c
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   406
            ] ifFalse:[
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   407
                (c receiver isSignal) ifTrue:[
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   408
                    offset := i.
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   409
                    found := c
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   410
                ]
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   411
            ]
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   412
        ].
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   413
        c := c sender.
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   414
    ].
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   415
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   416
    "
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   417
     if this is a noHandler exception, skip forward
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   418
     to the erronous context
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   419
    "
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   420
    ex notNil ifTrue:[
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   421
        ex signal == Signal noHandlerSignal ifTrue:[
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   422
            c := ex suspendedContext
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   423
        ]
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   424
    ].
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   425
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   426
    (c := found) isNil ifTrue:[
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   427
        "/ this is a kludge, but convenient.
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   428
        "/ show the place where the divisionByZero happend,
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   429
        "/ not where the signal was raised.
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   430
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   431
        sel := aContext selector.
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   432
        (sel == #//      
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   433
        or:[sel == #/
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   434
        or:[sel == #\\]]) ifTrue:[
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   435
            ^ 2
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   436
        ].
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   437
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   438
        ^ 1
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   439
    ].
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   440
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   441
    "
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   442
     got it; move up, skipping all intermediate Signal and
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   443
     Exception contexts
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   444
    "
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   445
    prev := nil.
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   446
    [   
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   447
        ((c receiver isSignal)
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   448
        or:[(c receiver isKindOf:Exception)])
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   449
    ] whileTrue:[
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   450
        prev := c.
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   451
        (c := c sender) isNil ifTrue:[^ offset].
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   452
        offset := offset + 1.
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   453
    ].
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   454
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   455
    "
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   456
     now, we are one above the raising context
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   457
    "
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   458
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   459
    "
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   460
     if the sender-method of the raise is one of objects error methods ...
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   461
    "
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   462
    ( #( halt halt: 
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   463
         error error: 
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   464
         doesNotUnderstand: 
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   465
         subclassResponsibility 
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   466
         primitiveFailed) includes:c selector) 
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   467
    ifTrue:[
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   468
        c selector == #doesNotUnderstand: ifTrue:[
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   469
            "
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   470
             one more up, to get to the originating context
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   471
            "
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   472
            (c := c sender) isNil ifTrue:[^ offset].
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   473
            offset := offset + 1.
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   474
        ].
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   475
        (c := c sender) isNil ifTrue:[^ offset].
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   476
        offset := offset + 1.
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   477
    ] ifFalse:[
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   478
        "
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   479
         ok, got the raise - if its a BreakPoint, look for the sender
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   480
        "
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   481
        (MessageTracer notNil and:[prev receiver == MessageTracer breakpointSignal]) ifTrue:[
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   482
            offset := offset + 1
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   483
        ].
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   484
    ].
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   485
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   486
    ^ offset
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   487
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   488
    "Created: 7.1.1997 / 21:26:05 / cg"
1101
4db36b95dac4 dont mark contexts nonLifo
Claus Gittinger <cg@exept.de>
parents: 1092
diff changeset
   489
    "Modified: 27.3.1997 / 18:24:59 / cg"
913
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   490
! !
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   491
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   492
!DebugView methodsFor:'basic'!
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   493
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   494
enter
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   495
    "enter the debugger - on the sending context"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   496
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   497
    |where|
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   498
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   499
    busy := true.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   500
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   501
    where := thisContext.      "enter"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   502
    where := where sender.     "the calling context"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   503
    where notNil ifTrue:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   504
	(where receiver == DebugView) ifTrue:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   505
	    where := where sender
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   506
	]
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   507
	"where is now interrupted methods context"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   508
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   509
    ^ self enter:where
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   510
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
   511
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   512
enter:aContext
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   513
    "enter the debugger - get and display the context, then start an
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   514
     exclusive event loop on top of eveything else"
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   515
1049
3223853742a4 fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   516
    |con selection m idx retval enteredByInterrupt sel con1 con2|
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   517
939
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
   518
    verboseBacktrace := VerboseBacktraceDefault ? false.
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
   519
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   520
    busy := true.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   521
    inspecting := false.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   522
    inspectedProcess := Processor activeProcess.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   523
    stepping := false.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   524
    bigStep := false.
1063
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
   525
    stepHow := nil.
1092
059c29fac604 made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   526
    nChainShown := InitialNCHAINShown.
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   527
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   528
    "if debugger is entered while a box has grabbed the
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   529
     pointer, we must ungrab - otherwise X wont talk to
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   530
     us here
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   531
    "
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   532
    (grabber := device activePointerGrab) notNil ifTrue:[
425
92f7a92f5c44 ungrab keyboard when entering debugger
Claus Gittinger <cg@exept.de>
parents: 407
diff changeset
   533
        device ungrabPointer.
92f7a92f5c44 ungrab keyboard when entering debugger
Claus Gittinger <cg@exept.de>
parents: 407
diff changeset
   534
        device ungrabKeyboard.
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   535
    ].
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   536
1004
cb182425a977 oops - dont disable terminateButton
Claus Gittinger <cg@exept.de>
parents: 998
diff changeset
   537
    ("inspectedProcess suspendedContext isNil 
cb182425a977 oops - dont disable terminateButton
Claus Gittinger <cg@exept.de>
parents: 998
diff changeset
   538
    or:["Processor isSystemProcess:inspectedProcess"]") ifTrue:[
cb182425a977 oops - dont disable terminateButton
Claus Gittinger <cg@exept.de>
parents: 998
diff changeset
   539
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   540
        terminateButton disable.
316
7d529dfe8a99 disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
   541
    ] ifFalse:[
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   542
        terminateButton enable.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   543
        abortButton enable.
316
7d529dfe8a99 disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
   544
    ].
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   545
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   546
    drawableId notNil ifTrue:[
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   547
        "
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   548
         not the first time - disable buttons & menus
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   549
         from previous life
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   550
        "
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   551
        terminateButton turnOffWithoutRedraw.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   552
        continueButton turnOffWithoutRedraw.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   553
        returnButton turnOffWithoutRedraw.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   554
        restartButton turnOffWithoutRedraw.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   555
        abortButton turnOffWithoutRedraw.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   556
        nextButton turnOffWithoutRedraw.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   557
        stepButton turnOffWithoutRedraw.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   558
        sendButton turnOffWithoutRedraw.
300
027ffcadd12d keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents: 299
diff changeset
   559
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   560
        m := contextView middleButtonMenu.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   561
        m notNil ifTrue:[
939
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
   562
            m disableAll:#(showMore skip skipForReturn inspectContext).
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
   563
        ].
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
   564
        verboseBacktrace 
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
   565
            ifTrue:[self showVerboseBacktrace]
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
   566
            ifFalse:[self showDenseBacktrace].
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   567
    ] ifFalse:[
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   568
        self iconLabel:'Debugger'.
132
claus
parents: 127
diff changeset
   569
    ].
claus
parents: 127
diff changeset
   570
210
947f9a23b06a better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents: 193
diff changeset
   571
    windowGroup isNil ifTrue:[
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   572
        windowGroup := WindowGroup new.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   573
        windowGroup addTopView:self.
210
947f9a23b06a better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents: 193
diff changeset
   574
    ].
132
claus
parents: 127
diff changeset
   575
    exclusive ifFalse:[
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   576
        "/ create a (modal) windowGroup for myself
132
claus
parents: 127
diff changeset
   577
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   578
        windowGroup setModal:true.
210
947f9a23b06a better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents: 193
diff changeset
   579
    ] ifTrue:[
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   580
        "/ create a windowGroup with a synchronous sensor for me
210
947f9a23b06a better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents: 193
diff changeset
   581
579
d461478b2ac2 device is not needed in SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents: 563
diff changeset
   582
        windowGroup sensor:(SynchronousWindowSensor new).
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   583
    ].
210
947f9a23b06a better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents: 193
diff changeset
   584
    windowGroup setProcess:Processor activeProcess.
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   585
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   586
    "
300
027ffcadd12d keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents: 299
diff changeset
   587
     get the walkback list; clear inspectors if we did not come here by single stepping)
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   588
    "
300
027ffcadd12d keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents: 299
diff changeset
   589
    self setContext:aContext releaseInspectors:(exitAction ~~ #step).
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   590
1049
3223853742a4 fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   591
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   592
    "
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   593
     and find the one context to show initially
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   594
     - if we came here by a send (single step), its the top context;
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   595
     - if we came here by a step (i.e. bigStep), its the top context
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   596
       (for ifs and whiles) or the sender (for regular sends).
303
1d94813f1977 interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents: 301
diff changeset
   597
     - otherwise, we came here by some signal raise, and we are interested
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   598
       in the context where the raise actually occured.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   599
    "
1049
3223853742a4 fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   600
    con1 := (contextArray at:1 ifAbsent:nil).
3223853742a4 fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   601
    con2 := (contextArray at:2 ifAbsent:nil).
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   602
    exitAction == #step ifTrue:[
1049
3223853742a4 fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   603
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   604
        selection := 1.
781
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   605
        steppedContext notNil ifTrue:[
1049
3223853742a4 fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   606
        
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   607
            "
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   608
             if we came here by a big-step, show the method where we are
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   609
            "
1049
3223853742a4 fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   610
            con1 == steppedContext ifTrue:[
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   611
                selection := 1
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   612
            ] ifFalse:[
1049
3223853742a4 fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   613
                con2 == steppedContext ifTrue:[
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   614
                    selection := 2
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   615
                ]
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   616
            ].
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   617
            "
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   618
             for bigStep, we could also be in a block below the actual method ...
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   619
            "
1049
3223853742a4 fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   620
            (con1 home notNil 
3223853742a4 fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   621
             and:[con1 home == steppedContext]) ifTrue:[
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   622
                selection := 1
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   623
            ] ifFalse:[
1049
3223853742a4 fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   624
                (con2 home notNil 
3223853742a4 fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   625
                and:[con2 home == steppedContext]) ifTrue:[
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   626
                    selection := 2
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   627
                ]
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   628
            ].
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   629
        ]
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   630
    ] ifFalse:[
781
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   631
        steppedContext isNil ifTrue:[
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   632
            "
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   633
             preselect a more interesting context, (where halt/raise was ...)
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   634
            "
913
6460993f73a3 made interestingContextFrom: public - its useful in
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   635
            selection := self class interestingContextIndexFrom:aContext.
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   636
        ] ifFalse:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   637
            "
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   638
             if we came here by a big-step, show the method where we are
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   639
            "
1049
3223853742a4 fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   640
            con1 == steppedContext ifTrue:[
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   641
                selection := 1
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   642
            ] ifFalse:[
1049
3223853742a4 fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   643
                con2 == steppedContext ifTrue:[
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   644
                    selection := 2
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   645
                ]
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   646
            ]
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   647
        ]
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   648
    ].
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   649
1049
3223853742a4 fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   650
    con1 := nil.
3223853742a4 fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   651
    con2 := nil.
3223853742a4 fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   652
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   653
    selection notNil ifTrue:[
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   654
        self showSelection:selection.
563
93633e3ff304 selection: / setSelection:
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
   655
        contextView setSelection:selection.
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   656
        selection > 1 ifTrue:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   657
            contextView scrollToLine:(selection - 1)
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   658
        ]
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   659
    ].
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   660
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   661
    m := contextView middleButtonMenu.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   662
    m notNil ifTrue:[
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   663
        canAbort := inspecting or:[Object abortSignal isHandled].
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   664
        canAbort ifTrue:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   665
            abortButton enable.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   666
            m enable:#doAbort.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   667
        ] ifFalse:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   668
            abortButton disable.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   669
            m disable:#doAbort.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   670
        ].
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   671
        exclusive ifTrue:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   672
            terminateButton disable.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   673
            m disable:#doTerminate.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   674
        ] ifFalse:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   675
            terminateButton enable.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   676
            m enable:#doTerminate.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   677
        ]
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   678
    ].
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   679
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   680
    "
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   681
     drawableId is nil, if this is a new debugger. Then do a realize.
528
a5ba1a3d0b45 Rename unrealize-->unmap, rerealize-->map.
Stefan Vogel <sv@exept.de>
parents: 527
diff changeset
   682
     Otherwise, its probably better to do a map, which shows the
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   683
     view at the previous position, without a need for the user to set the
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   684
     position again
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   685
    "
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   686
    drawableId notNil ifTrue:[
545
99d0cac830ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   687
        self remap.
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   688
    ] ifFalse:[
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   689
        self realize.
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   690
    ].
870
63e82f3b6940 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 824
diff changeset
   691
    self realizeAllSubViews.
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   692
210
947f9a23b06a better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents: 193
diff changeset
   693
    exclusive ifTrue:[
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   694
        self showError:'
210
947f9a23b06a better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents: 193
diff changeset
   695
Debugging system process `' , (inspectedProcess nameOrId) printString , '''.
947f9a23b06a better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents: 193
diff changeset
   696
947f9a23b06a better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents: 193
diff changeset
   697
This is a modal debugger - all event processing is stopped..
947f9a23b06a better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents: 193
diff changeset
   698
Therefore, you cannot interact with other views or 
947f9a23b06a better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents: 193
diff changeset
   699
open any other tools while this debugger is active.
947f9a23b06a better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents: 193
diff changeset
   700
947f9a23b06a better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents: 193
diff changeset
   701
Also, there is no event processing (redraw) for other views.'
947f9a23b06a better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents: 193
diff changeset
   702
    ].
947f9a23b06a better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents: 193
diff changeset
   703
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   704
    "
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   705
     bring us to the top
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   706
    "
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   707
    self raise.
105
claus
parents: 101
diff changeset
   708
    device flush.
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   709
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   710
    canContinue := true.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   711
    exitAction := nil.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   712
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   713
    "
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   714
     enter private event handling loop. This is left (and we come back here again)
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   715
     when any button was pressed which requires continuation of the debuggee or
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   716
     closedown of the debugger.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   717
    "
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   718
132
claus
parents: 127
diff changeset
   719
    [self controlLoop] valueOnUnwindDo:[
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   720
        windowGroup notNil ifTrue:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   721
            windowGroup setProcess:nil.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   722
        ].
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   723
        self destroy
132
claus
parents: 127
diff changeset
   724
    ].
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   725
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   726
    "
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   727
     release all context stuff.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   728
     This is required to avoid keeping references to the debuggees objects
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   729
     forever. (since the debugger is reused for faster startup next time)
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   730
    "
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   731
    contextArray := nil.
942
25d4f244abbe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 941
diff changeset
   732
    contextView contents:nil.
25d4f244abbe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 941
diff changeset
   733
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   734
    codeView acceptAction:nil.
942
25d4f244abbe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 941
diff changeset
   735
    codeView doItAction:nil.
25d4f244abbe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 941
diff changeset
   736
    codeView contents:nil.
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   737
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   738
    (exitAction ~~ #step) ifTrue:[
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   739
        receiverInspector release.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   740
        contextInspector release.
300
027ffcadd12d keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents: 299
diff changeset
   741
528
a5ba1a3d0b45 Rename unrealize-->unmap, rerealize-->map.
Stefan Vogel <sv@exept.de>
parents: 527
diff changeset
   742
        self unmap.
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   743
        device flush.
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   744
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   745
        (exitAction == #abort) ifTrue:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   746
            self cacheMyself.
942
25d4f244abbe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 941
diff changeset
   747
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   748
            "
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   749
             have to catch errors occuring in unwind-blocks
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   750
            "
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   751
            ErrorSignal handle:[:ex |
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
   752
                'DebugView [info]: ignored error while unwinding: ' infoPrint.
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
   753
                ex errorString infoPrintCR.
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
   754
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   755
                ex proceed
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   756
            ] do:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   757
                Object abortSignal raise.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   758
            ].
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
   759
            'DebugView [warning]: abort failed' errorPrintCR
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   760
        ].
61
cb5e3560bd82 *** empty log message ***
claus
parents: 58
diff changeset
   761
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   762
        (exitAction == #return) ifTrue:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   763
            selectedContext notNil ifTrue:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   764
                "
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   765
                 if there is a selection in the codeView,
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   766
                 evaluate it and use the result as return value
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   767
                "
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   768
"/ disabled for now, there is almost always a selection (the current line)
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   769
"/ and that is syntactically incorrect ...
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   770
"/ ... leading to a popup warning from the codeView
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   771
"/
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   772
"/                codeView hasSelection ifTrue:[
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   773
"/                    Object errorSignal handle:[:ex |
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
   774
"/                        'DebugView [warning]: error - returning nil' errorPrintCR.
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   775
"/                        retval := nil.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   776
"/                        ex return
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   777
"/                    ] do:[
687
a70b72319d51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 669
diff changeset
   778
"/                        |s|
657
aa1816733b59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 655
diff changeset
   779
"/
aa1816733b59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 655
diff changeset
   780
"/                        s := codeView selection asString.
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   781
"/                        retval := codeView doItAction value:s.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   782
"/                    ].
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   783
"/                ].
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   784
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   785
                con := selectedContext.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   786
                self cacheMyself.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   787
                "
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   788
                 have to catch errors occuring in unwind-blocks
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   789
                "
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   790
                Object errorSignal handle:[:ex |
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
   791
                    'DebugView [info]: ignored error while unwinding: ' errorPrint.
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
   792
                    ex errorString errorPrintCR.
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   793
                    ex proceed
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   794
                ] do:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   795
                    con unwind:retval.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   796
                ].
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
   797
                'DebugView [warning]: cannot return from selected context' errorPrintCR
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   798
            ]
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   799
        ].
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   800
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   801
        (exitAction == #restart) ifTrue:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   802
            selectedContext notNil ifTrue:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   803
                con := selectedContext.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   804
                self cacheMyself.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   805
                "
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   806
                 have to catch errors occuring in unwind-blocks
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   807
                "
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   808
                Object errorSignal handle:[:ex |
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
   809
                    'DebugView [info]: ignored error while unwinding: ' infoPrint.
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
   810
                    ex errorString infoPrintCR.
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   811
                    ex proceed
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   812
                ] do:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   813
                    con unwindAndRestart.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   814
                ].
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
   815
                'DebugView [warning]: cannot restart selected context' errorPrintCR
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   816
            ]
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   817
        ].
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   818
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   819
        (exitAction == #quickTerminate) ifTrue:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   820
            self cacheMyself.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   821
            Processor activeProcess terminateNoSignal
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   822
        ].
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   823
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   824
        (exitAction == #terminate) ifTrue:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   825
            self cacheMyself.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   826
            "
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   827
             have to catch errors occuring in unwind-blocks
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   828
            "
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   829
            Object errorSignal handle:[:ex |
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
   830
                'DebugView [info]: ignored error while unwinding: ' infoPrint.
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
   831
                ex errorString infoPrintCR.
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   832
                ex proceed
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   833
            ] do:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   834
                Processor activeProcess terminate.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   835
            ].
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
   836
            'DebugView [warning]: cannot terminate process' errorPrintCR
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   837
        ]
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   838
    ].
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   839
940
b27a64095304 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   840
    selectedContext := actualContext := firstContext := nil.
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   841
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   842
    grabber notNil ifTrue:[
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   843
        device grabPointerInView:grabber.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   844
        grabber := nil.
61
cb5e3560bd82 *** empty log message ***
claus
parents: 58
diff changeset
   845
    ].
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   846
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   847
    (exitAction == #step) ifTrue:[
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   848
        "
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   849
         schedule another stepInterrupt
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   850
         - must enter myself into the collection of open debuggers,
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   851
           in case the stepping process comes back again via a halt or signal
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   852
           before the step is finished. In this case, the stepping debugger should
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   853
           come up (instead of a new one)
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   854
         - must flush caches since optimized methods not always
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   855
           look for pending interrupts
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   856
        "
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   857
        OpenDebuggers isNil ifTrue:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   858
            OpenDebuggers := WeakArray with:self
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   859
        ] ifFalse:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   860
            (OpenDebuggers includes:self) ifFalse:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   861
                idx := OpenDebuggers identityIndexOf:nil.
775
f741dc4afe19 changed WeakArray to set emptied slots to zero
Claus Gittinger <cg@exept.de>
parents: 755
diff changeset
   862
                idx == 0 ifTrue:[
778
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   863
                    idx := OpenDebuggers identityIndexOf:0
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   864
                ].
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   865
                idx ~~ 0 ifTrue:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   866
                    OpenDebuggers at:idx put:self
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   867
                ] ifFalse:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   868
                    OpenDebuggers := OpenDebuggers copyWith:self
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   869
                ]
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   870
            ]
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   871
        ].
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   872
        self label:'single stepping - please wait ...'.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   873
        stepping := true.
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   874
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   875
        ObjectMemory stepInterruptHandler:self.
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
   876
        Context singleStepInterruptRequest isHandled ifTrue:[
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
   877
            "bigStep" steppedContextLineno notNil ifTrue:[   
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
   878
                Context singleStepInterruptRequest raiseWith:#next
529
57a78164dae5 allow different implementations of singleStep (JAVA support)
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   879
            ] ifFalse:[
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
   880
                Context singleStepInterruptRequest raiseWith:#step
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
   881
            ]
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
   882
        ] ifFalse:[
778
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   883
            "/ see if we came here through an interrupt-action
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   884
            "/ (i.e. aProcess interruptWith:...)
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   885
        
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   886
            enteredByInterrupt := false.
1101
4db36b95dac4 dont mark contexts nonLifo
Claus Gittinger <cg@exept.de>
parents: 1092
diff changeset
   887
            con := thisContext findNextContextWithSelector:#timerInterrupt or:#ioInterrupt.
778
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   888
            [enteredByInterrupt not
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   889
             and:[con notNil 
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   890
             and:[con ~~ aContext]]] whileTrue:[
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   891
                ((sel := con selector) == #timerInterrupt
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   892
                or:[sel == #ioInterrupt]) ifTrue:[
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   893
                    enteredByInterrupt := true.
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   894
                ] ifFalse:[
1101
4db36b95dac4 dont mark contexts nonLifo
Claus Gittinger <cg@exept.de>
parents: 1092
diff changeset
   895
                    con := con findNextContextWithSelector:#timerInterrupt or:#ioInterrupt.
778
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   896
                ].
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   897
            ].
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   898
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
   899
            ObjectMemory flushInlineCaches.
778
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   900
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   901
            enteredByInterrupt ifTrue:[
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   902
                "/ dont want to step through all intermediate
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   903
                "/ (scheduler-) contexts; place a return-trap on the
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   904
                "/ one right below the interresting one
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   905
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   906
"/                'special unwind return' printCR.
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   907
                con unwindThenDo:[
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   908
                                  ObjectMemory stepInterruptHandler:self.
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   909
                                  InStepInterrupt := nil.
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   910
                                  StepInterruptPending := 1.
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   911
                                  InterruptPending := 1].
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
   912
            ] ifFalse:[
778
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   913
"/                'normal step return' printCR.
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   914
                skipLineNr ~~ #return ifTrue:[
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   915
                    StepInterruptPending := 1.
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   916
                    InterruptPending := 1.
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   917
                ] ifFalse:[
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   918
"/                    'step for return' printCR.
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   919
                ]
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
   920
            ].
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
   921
            InStepInterrupt := nil
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   922
        ]
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   923
    ] ifFalse:[
374
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   924
        OpenDebuggers notNil ifTrue:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   925
            idx := OpenDebuggers identityIndexOf:self.
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   926
            idx ~~ 0 ifTrue:[
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   927
                OpenDebuggers at:idx put:nil
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   928
            ]
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   929
        ].
1b9bc0f019c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 334
diff changeset
   930
        self cacheMyself.
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   931
    ]
210
947f9a23b06a better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents: 193
diff changeset
   932
947f9a23b06a better error handling in modal debugger - use new SynchronousWindowSensor
Claus Gittinger <cg@exept.de>
parents: 193
diff changeset
   933
    "Created: 24.11.1995 / 19:52:54 / cg"
528
a5ba1a3d0b45 Rename unrealize-->unmap, rerealize-->map.
Stefan Vogel <sv@exept.de>
parents: 527
diff changeset
   934
    "Modified: 3.5.1996 / 23:58:16 / stefan"
1101
4db36b95dac4 dont mark contexts nonLifo
Claus Gittinger <cg@exept.de>
parents: 1092
diff changeset
   935
    "Modified: 27.3.1997 / 18:28:43 / cg"
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   936
!
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   937
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   938
openOn:aProcess
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   939
    "enter the debugger on a process - 
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   940
     in this case, we are just inspecting the context chain of the process,
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   941
     not running on top of the debugged process, but as a separate
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   942
     one. (think of it as an inspector showing more detail, and offering
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   943
     some more control operations)"
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   944
127
claus
parents: 126
diff changeset
   945
    |bpanel dummy|
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   946
939
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
   947
    verboseBacktrace := VerboseBacktraceDefault ? false.
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
   948
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   949
    busy := true.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   950
    bigStep := false.
1063
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
   951
    stepHow := nil.
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   952
    inspecting := true.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   953
    inspectedProcess := aProcess.
1092
059c29fac604 made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   954
    nChainShown := InitialNCHAINShown.
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   955
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   956
    bpanel := abortButton superView.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   957
779
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   958
"/    stopButton := Button new.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   959
"/    stopButton label:(resources at:'stop');
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   960
"/               action:[self doStop].
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   961
"/    bpanel addSubView:stopButton after:continueButton.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   962
"/
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   963
    bpanel elementsChangeSize:true.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   964
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   965
    aProcess state == #run ifTrue:[
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   966
        device hasColors ifTrue:[
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   967
            continueButton foregroundColor:Color red darkened.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   968
        ].
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   969
        continueButton label:(resources at:'stop').
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   970
        continueButton action:[self doStop].
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   971
        returnButton disable.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   972
        restartButton disable.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   973
    ] ifFalse:[
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   974
        device hasColors ifTrue:[
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   975
            continueButton foregroundColor:Color green darkened darkened.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   976
        ].
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   977
        continueButton label:(resources at:'continue').
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   978
        continueButton action:[self doContinue].
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   979
        returnButton enable.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   980
        restartButton enable.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   981
    ].
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   982
92
claus
parents: 90
diff changeset
   983
    dummy := View extent:(10 @ 5) in:bpanel.
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   984
    dummy borderWidth:0; level:0.
61
cb5e3560bd82 *** empty log message ***
claus
parents: 58
diff changeset
   985
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   986
"/    stepButton destroy.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   987
"/    sendButton destroy.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   988
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   989
    updateButton := Button
779
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   990
                        label:(resources at:'update')
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   991
                        action:[self updateContext]
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   992
                        in:bpanel.
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   993
    monitorToggle := Toggle in:bpanel.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   994
    monitorToggle label:(resources at:'monitor').
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   995
    monitorToggle pressAction:[self autoUpdateOn].
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   996
    monitorToggle releaseAction:[self autoUpdateOff].
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   997
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   998
    "can only look into process - context chain is not active"
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
   999
    canContinue := true.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
  1000
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
  1001
    terminateButton enable.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
  1002
    abortButton enable.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
  1003
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
  1004
    sendButton disable.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
  1005
    stepButton disable.
78
037323660c45 *** empty log message ***
claus
parents: 75
diff changeset
  1006
    nextButton disable.
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
  1007
"/    continueButton disable.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
  1008
"/    returnButton disable.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
  1009
"/    restartButton disable.
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
  1010
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
  1011
    aProcess isNil ifTrue:[
779
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1012
        terminateButton disable.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1013
        abortButton disable.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1014
        continueButton disable.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1015
        returnButton disable.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1016
        restartButton disable.
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
  1017
    ] ifFalse:[
779
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1018
        (aProcess suspendedContext isNil 
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1019
        or:[Processor isSystemProcess:aProcess]) ifTrue:[
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1020
            terminateButton disable.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1021
        ].
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1022
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1023
        self setContextSkippingInterruptContexts:aProcess suspendedContext.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1024
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1025
        catchBlock := [
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1026
            catchBlock := nil.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1027
            contextArray := nil.
940
b27a64095304 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
  1028
            selectedContext := actualContext := firstContext := nil.
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1029
            steppedContext := wrapperContext := nil.
781
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1030
779
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1031
            (exitAction == #terminate) ifTrue:[
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1032
                aProcess terminate.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1033
            ].
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1034
            (exitAction == #quickTerminate) ifTrue:[
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1035
                aProcess terminateNoSignal.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1036
            ].
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1037
            super destroy
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1038
        ].
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
  1039
    ].
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
  1040
    self open
316
7d529dfe8a99 disable abort & terminate for system processes
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  1041
1092
059c29fac604 made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
  1042
    "Modified: 20.3.1997 / 16:53:56 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1043
! !
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1044
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1045
!DebugView methodsFor:'help'!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1046
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1047
helpTextFor:aComponent
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1048
    |s|
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1049
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1050
    aComponent == abortButton ifTrue:[
612
986e371232a2 isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents: 583
diff changeset
  1051
        s := 'HELP_ABORT'
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1052
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1053
    aComponent == terminateButton ifTrue:[
612
986e371232a2 isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents: 583
diff changeset
  1054
        s := 'HELP_TERMINATE'
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1055
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1056
    aComponent == continueButton ifTrue:[
779
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1057
        continueButton label = (resources string:'stop') ifTrue:[
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1058
            s := 'HELP_STOP'
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1059
        ] ifFalse:[
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1060
            s := 'HELP_CONTINUE'
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1061
        ]
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1062
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1063
    aComponent == stepButton ifTrue:[
612
986e371232a2 isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents: 583
diff changeset
  1064
        s := 'HELP_STEP'
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1065
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1066
    aComponent == nextButton ifTrue:[
612
986e371232a2 isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents: 583
diff changeset
  1067
        s := 'HELP_NEXT'
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1068
    ].
1065
feacf3883438 active help messages
Claus Gittinger <cg@exept.de>
parents: 1064
diff changeset
  1069
    aComponent == nextOverButton ifTrue:[
feacf3883438 active help messages
Claus Gittinger <cg@exept.de>
parents: 1064
diff changeset
  1070
        s := 'HELP_NEXTOVER'
feacf3883438 active help messages
Claus Gittinger <cg@exept.de>
parents: 1064
diff changeset
  1071
    ].
feacf3883438 active help messages
Claus Gittinger <cg@exept.de>
parents: 1064
diff changeset
  1072
    aComponent == nextOutButton ifTrue:[
feacf3883438 active help messages
Claus Gittinger <cg@exept.de>
parents: 1064
diff changeset
  1073
        s := 'HELP_NEXTOUT'
feacf3883438 active help messages
Claus Gittinger <cg@exept.de>
parents: 1064
diff changeset
  1074
    ].
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1075
    aComponent == stepButton ifTrue:[
612
986e371232a2 isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents: 583
diff changeset
  1076
        s := 'HELP_STEP'
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1077
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1078
    aComponent == sendButton ifTrue:[
612
986e371232a2 isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents: 583
diff changeset
  1079
        s := 'HELP_SEND'
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1080
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1081
    aComponent == returnButton ifTrue:[
612
986e371232a2 isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents: 583
diff changeset
  1082
        s := 'HELP_RETURN'
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1083
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1084
    aComponent == restartButton ifTrue:[
612
986e371232a2 isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents: 583
diff changeset
  1085
        s := 'HELP_RESTART'
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1086
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1087
    aComponent == contextView ifTrue:[
612
986e371232a2 isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents: 583
diff changeset
  1088
        s := 'HELP_WALKBACK'
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1089
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1090
    aComponent == codeView ifTrue:[
612
986e371232a2 isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents: 583
diff changeset
  1091
        s := 'HELP_CODEVIEW'
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1092
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1093
    aComponent == monitorToggle ifTrue:[
612
986e371232a2 isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents: 583
diff changeset
  1094
        s := 'HELP_MONITOR'
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1095
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1096
    aComponent == updateButton ifTrue:[
612
986e371232a2 isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents: 583
diff changeset
  1097
        s := 'HELP_UPDATE'
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1098
    ].
779
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1099
"/    aComponent == stopButton ifTrue:[
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1100
"/        s := 'HELP_STOP'
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  1101
"/    ].
612
986e371232a2 isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents: 583
diff changeset
  1102
    (aComponent isComponentOf:receiverInspector) ifTrue:[
986e371232a2 isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents: 583
diff changeset
  1103
        s := 'HELP_REC_INSP'
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1104
    ].
612
986e371232a2 isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents: 583
diff changeset
  1105
    (aComponent isComponentOf:contextInspector) ifTrue:[
986e371232a2 isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents: 583
diff changeset
  1106
        s := 'HELP_CON_INSP'
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1107
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1108
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1109
    s notNil ifTrue:[
612
986e371232a2 isSubViewOf: -> isComponentOf:
Claus Gittinger <cg@exept.de>
parents: 583
diff changeset
  1110
        ^ resources string:s
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1111
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1112
    ^ nil
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1113
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1114
    "Modified: 29.8.1995 / 23:38:54 / claus"
1065
feacf3883438 active help messages
Claus Gittinger <cg@exept.de>
parents: 1064
diff changeset
  1115
    "Modified: 4.3.1997 / 01:54:03 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1116
! !
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1117
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1118
!DebugView methodsFor:'initialization'!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1119
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1120
addToCurrentProject
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1121
    "ignored here"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1122
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1123
    ^ self
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1124
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1125
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1126
initialize
1063
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1127
    |v panel hpanel bpanel separator img|
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1128
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1129
    super initialize.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1130
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1131
    font := font on:device.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1132
937
e1520a0db57e added VerboseBacktraceDefault classVar
Claus Gittinger <cg@exept.de>
parents: 936
diff changeset
  1133
    verboseBacktrace := VerboseBacktraceDefault ? false.
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  1134
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1135
    busy := false.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1136
    exclusive := false.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1137
    inspecting := false.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1138
    exitAction := nil.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1139
    bigStep := false.
1063
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1140
    stepHow := nil.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1141
    canContinue := false.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1142
    canAbort := false.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1143
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1144
    bpanel := HorizontalPanelView
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1145
"/                        origin:(0.0 @ 0.0)
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1146
"/                        extent:(1.0 @ (font height * 2))
494
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1147
                            in:self.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1148
    bpanel horizontalLayout:#leftSpace.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1149
    bpanel verticalSpace:ViewSpacing // 2.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1150
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1151
    terminateButton := Button
494
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1152
                        label:(resources at:'terminate')
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1153
                        action:[terminateButton turnOffWithoutRedraw. self doTerminate]
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1154
                        in:bpanel.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1155
    separator := View extent:(10 @ 5) in:bpanel.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1156
    separator borderWidth:0; level:0.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1157
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1158
    abortButton := Button
494
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1159
                        label:(resources at:'abort')
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1160
                        action:[abortButton turnOffWithoutRedraw. self doAbort]
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1161
                        in:bpanel.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1162
    returnButton := Button
494
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1163
                        label:(resources at:'return')
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1164
                        action:[returnButton turnOff. self doReturn]
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1165
                        in:bpanel.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1166
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1167
    restartButton := Button
494
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1168
                        label:(resources at:'restart')
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1169
                        action:[restartButton turnOff. self doRestart]
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1170
                        in:bpanel.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1171
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1172
    separator := View extent:(10 @ 5) in:bpanel.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1173
    separator borderWidth:0; level:0.
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
  1174
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1175
    continueButton := Button
494
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1176
                        label:(resources at:'continue')
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1177
                        action:[continueButton turnOffWithoutRedraw. self doContinue]
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1178
                        in:bpanel.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1179
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1180
    separator := View extent:(10 @ 5) in:bpanel.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1181
    separator borderWidth:0; level:0.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1182
1063
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1183
    img := Image fromFile:'bitmaps/stepIn.xpm'.
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1184
    img isNil ifTrue:[
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1185
        img := (resources at:'next')
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1186
    ].
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1187
    nextButton := Button
1063
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1188
                        label:img
494
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1189
                        action:[stepButton turnOff. self doNext]
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1190
                        in:bpanel.
1063
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1191
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1192
    img := Image fromFile:'bitmaps/stepOver.xpm'.
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1193
    img isNil ifTrue:[
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1194
        img := (resources at:'over')
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1195
    ].
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1196
    nextOverButton := Button
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1197
                        label:img
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1198
                        action:[stepButton turnOff. self doNextOver]
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1199
                        in:bpanel.
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1200
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1201
    img := Image fromFile:'bitmaps/stepOut.xpm'.
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1202
    img isNil ifTrue:[
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1203
        img := (resources at:'out')
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1204
    ].
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1205
    nextOutButton := Button
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1206
                        label:img
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1207
                        action:[stepButton turnOff. self doNextOut]
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1208
                        in:bpanel.
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1209
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1210
    stepButton := Button
494
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1211
                        label:(resources at:'step')
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1212
                        action:[stepButton turnOff. self doStep]
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1213
                        in:bpanel.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1214
    sendButton := Button
494
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1215
                        label:(resources at:'send')
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1216
                        action:[sendButton turnOff. self doSend]
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1217
                        in:bpanel.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1218
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1219
    bpanel origin:(0.0 @ 0.0)
494
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1220
           extent:(1.0 @ (bpanel preferredExtent y)).
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
  1221
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1222
    panel := VariableVerticalPanel
494
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1223
                        origin:(0.0 @ bpanel height)
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1224
                        corner:(1.0 @ 1.0)
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1225
                            in:self.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1226
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1227
    v := ScrollableView for:SelectionInListView in:panel.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1228
    v origin:(0.0 @ 0.0) corner:(1.0 @ 0.25).
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1229
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1230
    contextView := v scrolledView.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1231
    contextView action:[:lineNr | self showSelection:lineNr].
494
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1232
    contextView doubleClickAction:[:line | self browse].
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1233
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1234
    v := ScrollableView for:CodeView in:panel.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1235
    v origin:(0.0 @ 0.25) corner:(1.0 @ 0.75).
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1236
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1237
    codeView := v scrolledView.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1238
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1239
    hpanel := VariableHorizontalPanel in:panel.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1240
    hpanel origin:(0.0 @ 0.75) corner:(1.0 @ 1.0).
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1241
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1242
    receiverInspector := InspectorView
494
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1243
                                origin:(0.0 @ 0.0) corner:(0.5 @ 1.0)
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1244
                                    in:hpanel.
646
04dafb2560bf added labels 'receiver' & 'context';
Claus Gittinger <cg@exept.de>
parents: 642
diff changeset
  1245
    receiverInspector label:'receiver'.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1246
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1247
    contextInspector := ContextInspectorView
494
0d35a48c45bc double click on a context line opens a browser
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1248
                                origin:(0.5 @ 0.0) corner:(1.0 @ 1.0)
646
04dafb2560bf added labels 'receiver' & 'context';
Claus Gittinger <cg@exept.de>
parents: 642
diff changeset
  1249
                                    in:hpanel.
04dafb2560bf added labels 'receiver' & 'context';
Claus Gittinger <cg@exept.de>
parents: 642
diff changeset
  1250
    contextInspector label:'context'.
04dafb2560bf added labels 'receiver' & 'context';
Claus Gittinger <cg@exept.de>
parents: 642
diff changeset
  1251
1063
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1252
    "Modified: 3.3.1997 / 21:32:55 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1253
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1254
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1255
initializeMiddleButtonMenu
407
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1256
    |labels selectors m|
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1257
407
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1258
    exclusive ifTrue:[
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1259
        labels := resources array:#(
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1260
                                    'show more'
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  1261
                                    'show verbose backtrace'
407
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1262
                                    '-'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1263
                                    'remove breakpoint'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1264
                                    'remove all trace & breakpoints'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1265
                                    '-'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1266
                                    'copy walkback text'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1267
                                    '-'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1268
                                    'quickTerminate'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1269
                                    '='
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1270
                                    'exit smalltalk (no confirmation)'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1271
                                  ).
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1272
        selectors := #(
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1273
                                 showMore
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  1274
                                 showVerboseBacktrace
407
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1275
                                 nil
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1276
                                 removeBreakpoint
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1277
                                 removeAllBreakpoints
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1278
                                 nil
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1279
                                 copyWalkbackText
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1280
                                 nil
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1281
                                 quickTerminate
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1282
                                 nil
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1283
                                 exit
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1284
                      )
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1285
    ] ifFalse:[
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1286
        labels := resources array:#(
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1287
                                    'show more'
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  1288
                                    'show verbose backtrace'
407
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1289
                                    '-'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1290
                                    'skip'
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1291
                                    'step out'
407
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1292
                                    '-'
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1293
"
407
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1294
                                    'continue'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1295
                                    'terminate'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1296
                                    'abort'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1297
                                    '-'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1298
                                    'step'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1299
                                    'send'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1300
                                    '-'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1301
                                    'return'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1302
                                    'restart'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1303
                                    '-'
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1304
"
407
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1305
                                    'remove breakpoint'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1306
                                    'remove all trace & breakpoints'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1307
                                    '-'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1308
                                    'browse'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1309
                                    'browse class'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1310
                                    'browse class hierarchy'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1311
                                    'browse full class protocol'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1312
                                    'implementors'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1313
                                    'senders'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1314
                                    '-'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1315
                                    'inspect context'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1316
                                    'copy walkback text'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1317
                                    '-'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1318
                                    'quickTerminate'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1319
                                    '='
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1320
                                    'exit smalltalk (no confirmation)'
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1321
                              ).
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1322
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1323
        selectors := #(
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1324
                                         showMore
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  1325
                                         showVerboseBacktrace
407
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1326
                                         nil
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1327
                                         skip
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1328
                                         skipForReturn
407
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1329
                                         nil
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1330
"
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1331
                                         doContinue
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1332
                                         doTerminate
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1333
                                         doAbort
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1334
                                         nil
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1335
                                         doStep
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1336
                                         doSend
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1337
                                         nil
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1338
                                         doReturn
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1339
                                         doRestart
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1340
                                         nil
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1341
"
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1342
                                         removeBreakpoint
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1343
                                         removeAllBreakpoints
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1344
                                         nil
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1345
                                         browse
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1346
                                         browseClass
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1347
                                         browseClassHierarchy
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1348
                                         browseFullClassProtocol
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1349
                                         implementors
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1350
                                         senders
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1351
                                         nil
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1352
                                         inspectContext
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1353
                                         copyWalkbackText
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1354
                                         nil
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1355
                                         quickTerminate
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1356
                                         nil
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1357
                                         exit
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1358
        ).
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1359
    ].
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1360
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1361
    m := PopUpMenu 
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  1362
                labels:(resources array:labels)
407
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1363
             selectors:selectors
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1364
              receiver:self
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1365
                   for:contextView.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1366
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  1367
    verboseBacktrace ifTrue:[
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  1368
        m labelAt:#showVerboseBacktrace put:(resources string:'show dense backtrace').
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  1369
        m selectorAt:#showVerboseBacktrace put:#showDenseBacktrace
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  1370
    ].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  1371
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1372
    contextView middleButtonMenu:m. 
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1373
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1374
    inspecting ifTrue:[
407
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1375
        m notNil ifTrue:[
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1376
            m disableAll:#(doTraceStep removeBreakpoint browse browseClass
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1377
                           browseClassHierarchy browseFullClassProtocol
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1378
                           implementors senders inspectContext skip doStepOut).
407
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  1379
        ].
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1380
    ]
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1381
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  1382
    "Modified: 10.1.1997 / 21:35:36 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1383
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1384
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1385
realize
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1386
    super realize.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1387
"/    exclusive ifTrue:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1388
"/        windowGroup := nil
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1389
"/    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1390
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1391
    inspecting ifTrue:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1392
	inspectedProcess notNil ifTrue:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1393
	    "
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1394
	     set prio somewhat higher (by 2, to allow walkBack-update process
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1395
	     to run between mine and the debugged processes prio)
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1396
	    "
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1397
	    Processor activeProcess 
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1398
		priority:(inspectedProcess priority + 2 min:16).
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
  1399
	]
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1400
    ]
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1401
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1402
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1403
setLabelFor:aMessage in:aProcess
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1404
    |l nm|
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1405
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1406
    l := aMessage , ' ('.
1030
1a1ee0356c1b catch errors while extracting processes name
ca
parents: 1019
diff changeset
  1407
    Object errorSignal handle:[:ex |
1a1ee0356c1b catch errors while extracting processes name
ca
parents: 1019
diff changeset
  1408
        l := l , '???'
1a1ee0356c1b catch errors while extracting processes name
ca
parents: 1019
diff changeset
  1409
    ] do:[
1a1ee0356c1b catch errors while extracting processes name
ca
parents: 1019
diff changeset
  1410
        nm := aProcess name.
1a1ee0356c1b catch errors while extracting processes name
ca
parents: 1019
diff changeset
  1411
        nm notNil ifTrue:[
1a1ee0356c1b catch errors while extracting processes name
ca
parents: 1019
diff changeset
  1412
            l := l , (nm contractTo:17) , ''.
1a1ee0356c1b catch errors while extracting processes name
ca
parents: 1019
diff changeset
  1413
        ].
1a1ee0356c1b catch errors while extracting processes name
ca
parents: 1019
diff changeset
  1414
        l := l , '[' , aProcess id printString , ']'.
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
  1415
    ].
1030
1a1ee0356c1b catch errors while extracting processes name
ca
parents: 1019
diff changeset
  1416
    l := l , ')'.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1417
    self label:l.
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
  1418
! !
571fd5eee315 Initial revision
claus
parents:
diff changeset
  1419
571fd5eee315 Initial revision
claus
parents:
diff changeset
  1420
!DebugView methodsFor:'interrupt handling'!
571fd5eee315 Initial revision
claus
parents:
diff changeset
  1421
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1422
contextInterrupt
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1423
    DebuggingDebugger == true ifTrue:[
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1424
        'contextIRQ' printCR.
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1425
    ].
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1426
    ^ self stepOrNext
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1427
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1428
    "Modified: 14.10.1996 / 13:30:47 / cg"
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1429
!
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1430
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
  1431
stepInterrupt
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1432
    DebuggingDebugger == true ifTrue:[
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1433
        'stepIRQ' printCR.
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1434
    ].
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1435
    ^ self stepOrNext
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1436
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1437
    "Modified: 14.10.1996 / 13:30:56 / cg"
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1438
!
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1439
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1440
stepOrNext
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1441
    |where here s isWrap method lastWrappedConAddr wrappedMethod 
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1442
     inBlock left ignore contextBelow lastWrappedContext
803
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1443
     leftWrap enteredWrap anyStepBlocks belowSteppedContext|
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1444
789
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  1445
    "/ DebuggingDebugger := true
1049
3223853742a4 fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
  1446
    "/ DebuggingDebugger := false
789
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  1447
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1448
    skipLineNr == #return ifTrue:[
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1449
        name := Processor activeProcess nameOrId.
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1450
        self label:('context returned ' , ' (process: ' , name , ')').
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1451
        here := thisContext sender sender.
755
94705dbabfe0 stepOut enhanced / fixed
Claus Gittinger <cg@exept.de>
parents: 754
diff changeset
  1452
        here setLineNumber:nil.
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1453
        here := nil.
755
94705dbabfe0 stepOut enhanced / fixed
Claus Gittinger <cg@exept.de>
parents: 754
diff changeset
  1454
        self enter:thisContext sender sender sender.
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1455
        ^ self
300
027ffcadd12d keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents: 299
diff changeset
  1456
    ].
027ffcadd12d keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents: 299
diff changeset
  1457
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1458
"/    "/
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1459
"/    "/ should no longer happen
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1460
"/    "/
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1461
"/    stepForReturn == true ifTrue:[
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1462
"/"/'stepForreturn' printCR.
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1463
"/        self enter:thisContext sender.
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1464
"/        ^ self
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1465
"/    ].
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1466
52
7b48409ae088 *** empty log message ***
claus
parents: 48
diff changeset
  1467
    Processor activeProcess ~~ inspectedProcess ifTrue:[
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
  1468
        'DebugView [info]: stray step interrupt' infoPrintCR.
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1469
        ^ self
52
7b48409ae088 *** empty log message ***
claus
parents: 48
diff changeset
  1470
    ].
7b48409ae088 *** empty log message ***
claus
parents: 48
diff changeset
  1471
29
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
  1472
    here := thisContext.        "stepInterrupt"
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1473
    here := here sender.        "the caller; step- or contextIRQ"  
29
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
  1474
    here := here sender.        "the interrupted context"  
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
  1475
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1476
    DebuggingDebugger == true ifTrue:[
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1477
        '*******' printNL.
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1478
        'here in ' print.
786
429c3146c03d better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents: 781
diff changeset
  1479
        inWrap ifTrue:['(wrap) ' print.].
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1480
        ((ObjectMemory addressOf:here) printStringRadix:16) print. ' ' print.
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1481
        here selector printNL.
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1482
    ].
10
46e0d4f2079f *** empty log message ***
claus
parents: 7
diff changeset
  1483
781
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1484
    "
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1485
     kludge to hide breakpoint wrappers in the context list: 
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1486
         check if we are in a wrapper methods hidden setup-sequence
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1487
         if so, ignore the interrupt and continue single sending
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1488
    "
29
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
  1489
    isWrap := false.
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1490
    left := false.
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1491
    leftWrap := enteredWrap := false.
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1492
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1493
    where := here.
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1494
    inWrap ifTrue:[
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1495
        wrappedMethod := nil.
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1496
        5 timesRepeat:[
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1497
            (where notNil and:[where isBlockContext not]) ifTrue:[
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1498
                method := where method.
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1499
                (method notNil and:[method isWrapped]) ifTrue:[
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1500
                    "
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1501
                     in a wrapper method
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1502
                    "
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1503
                    wrappedMethod ~~ method ifTrue:[
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1504
                        wrappedMethod := method.
781
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1505
                        lastWrappedContext := where.
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1506
                        where sender receiver == method originalMethod ifFalse:[
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1507
                            isWrap := true.
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1508
                        ]
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1509
                    ] ifFalse:[
781
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1510
                        where == steppedContext ifTrue:[
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1511
789
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  1512
                            DebuggingDebugger == true ifTrue:[
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1513
                                'change stepCon from: ' print.
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1514
                                steppedContext print.
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1515
                                ' to lastWrapped: ' print.
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1516
                                lastWrappedContext printNL.
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1517
                            ].
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1518
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1519
                            inWrap := false.
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1520
                            leftWrap := true.
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1521
                            wrapperContext := steppedContext.
781
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1522
                            steppedContext := lastWrappedContext
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1523
                        ]
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1524
                    ]
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1525
                ].
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1526
                where := where sender
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1527
            ]
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1528
        ].
29
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
  1529
    ].
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
  1530
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
  1531
    isWrap ifTrue:[
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1532
        DebuggingDebugger == true ifTrue:[
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1533
            'ignore wrap' printNL.
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1534
        ].
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1535
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1536
        "/
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1537
        "/ ignore, while in wrappers hidden setup
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1538
        "/
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1539
        where := nil. here := nil.
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1540
        ObjectMemory flushInlineCaches.
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1541
        
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1542
        skipLineNr == #return ifTrue:[
789
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  1543
            DebuggingDebugger == true ifTrue:[
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1544
                'skipRet in wrap' printCR.
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1545
            ]
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1546
        ].
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1547
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1548
        StepInterruptPending := 1.
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1549
        InterruptPending := 1.
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1550
        InStepInterrupt := nil.
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1551
        ^ nil
29
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
  1552
    ].
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
  1553
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1554
    inBlock := false.
803
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1555
    anyStepBlocks := false.
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1556
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1557
    "/
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1558
    "/ is this for a send or a step/next ?
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1559
    "/
787
dab2fdc4a811 care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents: 786
diff changeset
  1560
    (bigStep 
dab2fdc4a811 care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents: 786
diff changeset
  1561
    and:[steppedContext notNil]) ifTrue:[
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1562
        "
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1563
         a step or next - ignore all contexts below the interesting one
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1564
        "
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1565
        where := here.      "the interrupted context"
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1566
        contextBelow := nil.
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1567
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1568
        where home notNil ifTrue:[
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1569
            "/
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1570
            "/ in a block called by 'our' context ?
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1571
            "/
781
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1572
            where home == steppedContext ifTrue:[
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1573
"/ '*block*' printNL.
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1574
                inBlock := true
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1575
            ]
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1576
        ].
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1577
781
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1578
        where == steppedContext ifFalse:[
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1579
            where := where sender.
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1580
781
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1581
            where notNil ifTrue:[
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1582
                where home == steppedContext ifTrue:[
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1583
"/ '*block*' printNL.
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1584
                    inBlock := true.
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1585
                ]
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1586
            ].
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1587
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1588
"/ 'looking for ' print.
29
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
  1589
"/  (steppedContextAddress printStringRadix:16)print. '' printNL.
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1590
786
429c3146c03d better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents: 781
diff changeset
  1591
"/where print. ' ' print. ((ObjectMemory addressOf:where)printStringRadix:16) printCR.
429c3146c03d better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents: 781
diff changeset
  1592
"/steppedContext print. ' ' print. ((ObjectMemory addressOf:steppedContext)printStringRadix:16) printCR.
429c3146c03d better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents: 781
diff changeset
  1593
781
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1594
            where == steppedContext ifFalse:[
803
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1595
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1596
                "/ check if we are in a context below steppedContext
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1597
                "/ (i.e. if steppedContext can be reached from
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1598
                "/  interrupted context. Not using context-ref but its
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1599
                "/  address to avoid creation of many useless contexts.)
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1600
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1601
                inBlock ifFalse:[
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1602
                    [where notNil] whileTrue:[
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1603
803
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1604
                        "/ if either the receiver or any arg of this context
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1605
                        "/ is a block of the steppedContext, we must really
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1606
                        "/ do a single step. Otherwise, stepping through a
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1607
                        "/ do:-loop would be very difficult.
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1608
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1609
                        (where receiver isBlock
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1610
                        and:[where receiver home == steppedContext])
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1611
                        ifTrue:[
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1612
                            anyStepBlocks := true.
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1613
                        ] ifFalse:[
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1614
                            where args do:[:arg |
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1615
                                (arg isBlock
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1616
                                and:[arg home == steppedContext])
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1617
                                ifTrue:[
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1618
                                    anyStepBlocks := true.
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1619
                                ]
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1620
                            ]
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1621
                        ].
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1622
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1623
                        DebuggingDebugger == true ifTrue:[
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1624
                            ((ObjectMemory addressOf:where) printStringRadix:16)print. ' ' print.
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1625
                            where selector printNL.
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1626
                        ].
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1627
781
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1628
                        where == steppedContext ifTrue:[
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1629
"/ 'found it - below; ignore' printNL.
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1630
                            "
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1631
                             found the interesting context somwehere up in the
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1632
                             chain. We seem to be still below the interesting one ...
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1633
                            "
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1634
                            tracing == true ifTrue:[
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1635
                                here printString printCR
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1636
                            ].
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1637
                            "
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1638
                              yes, a context below
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1639
                              - continue and schedule another stepInterrupt.
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1640
                              Must flush caches since optimized methods not always
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1641
                              look for pending interrupts
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1642
                            "
803
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1643
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1644
                            contextBelow notNil ifTrue:[
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1645
"/ 'prepare for unwind-catch' printNL.
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1646
"/ 'con= ' print. contextBelow printCR.
787
dab2fdc4a811 care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents: 786
diff changeset
  1647
                                contextBelow selector notNil ifTrue:[
dab2fdc4a811 care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents: 786
diff changeset
  1648
                                    self label:'single stepping - please wait ...(' , contextBelow selector , ')'.
dab2fdc4a811 care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents: 786
diff changeset
  1649
                                ].
dab2fdc4a811 care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents: 786
diff changeset
  1650
781
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1651
                                DebuggingDebugger == true ifTrue:[
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1652
                                    'below stepCon; continue until unwind of: ' print.
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1653
                                    contextBelow printCR.
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1654
                                ].
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1655
                                Processor activeProcess forceInterruptOnReturnOf:contextBelow.
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1656
                                StepInterruptPending := nil.
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1657
                            ] ifFalse:[
803
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1658
                                ObjectMemory flushInlineCaches.
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1659
787
dab2fdc4a811 care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents: 786
diff changeset
  1660
                                here selector notNil ifTrue:[
dab2fdc4a811 care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents: 786
diff changeset
  1661
                                    self label:'single stepping - please wait ...(' , here selector , ')'.
dab2fdc4a811 care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents: 786
diff changeset
  1662
                                ].
dab2fdc4a811 care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents: 786
diff changeset
  1663
781
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1664
                                DebuggingDebugger == true ifTrue:[
787
dab2fdc4a811 care for degenerated stepInterrupt
Claus Gittinger <cg@exept.de>
parents: 786
diff changeset
  1665
                                    'in stepCon; continue single stepping' printCR.
781
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1666
                                ].
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1667
                                StepInterruptPending := 1.
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1668
                                InterruptPending := 1.
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1669
                            ].
789
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  1670
                            where := nil. here := nil.
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1671
                            InStepInterrupt := nil.
781
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1672
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1673
                            ^ nil
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1674
                        ].
781
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1675
803
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1676
                        where methodHome == steppedContext methodHome ifTrue:[
781
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1677
                            inBlock := true.
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1678
                        ].
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1679
803
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1680
                        anyStepBlocks ifFalse:[
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1681
                            inBlock ifFalse:[
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1682
                                contextBelow := where
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1683
                            ]
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1684
                        ].
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1685
                        where := where sender
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1686
                    ].
799
6544afd4e2e5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 790
diff changeset
  1687
                    s := 'context returned'.
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1688
                    left := true.
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1689
                ].
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1690
            ] ifTrue:[
29
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
  1691
"/ 'found it right in sender' printNL.
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1692
                s := 'after step'
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1693
            ].
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1694
        ] ifTrue:[
29
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
  1695
"/ 'found it right away' printNL.
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1696
            s := 'after step'
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1697
        ].
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
  1698
    ] ifFalse:[
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1699
"/ ' send' printNL.
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1700
        "
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1701
         a send
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1702
        "
789
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  1703
        DebuggingDebugger == true ifTrue:[
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1704
            'clear steppedContext' printCR.
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1705
        ].
781
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1706
        steppedContext := nil.
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1707
        s := 'after send'
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
  1708
    ].
7
92b82578c88c *** empty log message ***
claus
parents: 4
diff changeset
  1709
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1710
    ignore := false.
1063
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1711
    (inBlock and:[stepHow == #nextOver or:[stepHow == #nextOut]]) ifTrue:[
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1712
        ignore := true.
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1713
    ].
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1714
790
6a166894d5e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
  1715
    "/ handle the case, when a subBlock leaves;
6a166894d5e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
  1716
    "/ continue stepping in the home context.
6a166894d5e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
  1717
6a166894d5e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
  1718
    left ifTrue:[
6a166894d5e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
  1719
        steppedContext home notNil ifTrue:[
6a166894d5e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
  1720
            steppedContext := steppedContext home.
6a166894d5e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
  1721
            s := 'after step'.
6a166894d5e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
  1722
            left := false.
803
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1723
"/ DebugView enterUnconditional:thisContext withMessage:'debug'.
f8371812c789 fast next in subcontext of subblock
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
  1724
790
6a166894d5e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
  1725
        ]
6a166894d5e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
  1726
    ].
6a166894d5e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
  1727
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1728
    "
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1729
     kludge to hide breakpoint wrappers in the context list: 
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1730
         check if we are in a wrapper methods hidden exit-sequence
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1731
         if so, ignore the interrupt and continue single sending
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1732
    "
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1733
    (where isNil 
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1734
    and:[wrapperContext notNil])
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1735
    ifTrue:[
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1736
        "/ did not find our steppedContext along the chain;
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1737
        "/ could be in a wrappedMethods exitBlock ...
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1738
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1739
        leftWrap ifFalse:[
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1740
            where := here.
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1741
            wrappedMethod := nil.
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1742
            5 timesRepeat:[
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1743
                where notNil ifTrue:[
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1744
                    where isBlockContext ifFalse:[
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1745
                        method := where method.
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1746
                        (method notNil and:[method isWrapped]) ifTrue:[
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1747
                            where == wrapperContext ifTrue:[
789
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  1748
                                DebuggingDebugger == true ifTrue:[
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1749
                                    'change stepCon fromWrapped: ' print.
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1750
                                    steppedContext print.
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1751
                                    ' to: ' print.
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1752
                                    wrapperContext printNL.
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1753
                                ].
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1754
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1755
                                inWrap := true.
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1756
                                enteredWrap := true.
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1757
                                steppedContext := wrapperContext.
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1758
                                wrapperContext := nil.
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1759
                            ]
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1760
                        ].
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1761
                    ].
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1762
                    where := where sender
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1763
                ]
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1764
            ].
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1765
        ].
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1766
        enteredWrap ifTrue:[
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1767
            ignore := true
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1768
        ]
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1769
    ].
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1770
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1771
    "/
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1772
786
429c3146c03d better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents: 781
diff changeset
  1773
    left ifTrue:[
429c3146c03d better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents: 781
diff changeset
  1774
        "/ special care for stepInterrupt in send,
429c3146c03d better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents: 781
diff changeset
  1775
        "/ when created a dummy context (lineNr == 1)
429c3146c03d better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents: 781
diff changeset
  1776
429c3146c03d better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents: 781
diff changeset
  1777
        steppedContext lineNumber isNil ifTrue:[
429c3146c03d better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents: 781
diff changeset
  1778
            steppedContext selector == here sender selector ifTrue:[
429c3146c03d better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents: 781
diff changeset
  1779
                left := false.
429c3146c03d better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents: 781
diff changeset
  1780
                s := 'after step'.
429c3146c03d better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents: 781
diff changeset
  1781
                steppedContext := here sender.
429c3146c03d better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents: 781
diff changeset
  1782
            ].
429c3146c03d better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents: 781
diff changeset
  1783
        ]
429c3146c03d better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents: 781
diff changeset
  1784
    ].
429c3146c03d better stepping over stepped send (dummy context in send.c)
Claus Gittinger <cg@exept.de>
parents: 781
diff changeset
  1785
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1786
    inBlock ifTrue:[
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1787
"/ 'inBlock' printNL.
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1788
        s := 'in block'.
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1789
    ].
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1790
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1791
    DebuggingDebugger == true ifTrue:[
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1792
        where notNil ifTrue:[
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1793
            '(' print. steppedContextLineno print. ') ' print.
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1794
            where print.
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1795
            '[' print. where lineNumber print. ']' printNL.
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1796
        ].
654
dac2634ce5ec better support for alien context single stepping
Claus Gittinger <cg@exept.de>
parents: 651
diff changeset
  1797
    ].
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1798
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1799
    ignore ifFalse:[
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1800
        (bigStep 
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1801
        and:[steppedContextLineno notNil 
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1802
        and:[where notNil 
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1803
        and:[where lineNumber == steppedContextLineno]]]) ifTrue:[
789
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  1804
            (here isBlockContext 
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  1805
            and:[(here methodHome == steppedContext)
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  1806
                 or:[here home == steppedContext]]) ifTrue:[
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  1807
                DebuggingDebugger == true ifTrue:[
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  1808
                    'same line but in block' printNL.
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  1809
                ].
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  1810
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  1811
                steppedContext := actualContext := here.
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  1812
                steppedContextLineno := here lineNumber.
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  1813
            ] ifFalse:[    
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  1814
                DebuggingDebugger == true ifTrue:[
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  1815
                    'same line - ignored' printNL.
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  1816
                ].
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  1817
                ignore := true
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1818
            ].
781
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1819
        ].
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1820
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1821
        (left not 
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1822
        and:[skipLineNr notNil 
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1823
        and:[where notNil
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1824
        and:[where lineNumber < skipLineNr]]]) ifTrue:[
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1825
            DebuggingDebugger == true ifTrue:[
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1826
                'skip (' print. skipLineNr print. ' unreached - ignored' printNL.
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1827
            ].
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1828
            ignore := true
781
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1829
        ].
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1830
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1831
        (steppedContextLineno isNil 
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1832
        and:[skipLineNr isNil
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1833
        and:[thisContext sender selector == #contextInterrupt]]) ifTrue:[
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1834
            DebuggingDebugger == true ifTrue:[
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1835
                'same line2 (after conIRQ) - ignored' printNL.
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1836
            ].
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1837
            ignore := true
781
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1838
        ].
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1839
    ].
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1840
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1841
    ignore ifTrue:[
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1842
"/' ' printNL.
554
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1843
        where := nil. here := nil.
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1844
        "
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1845
         yes, a context below
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1846
          - continue and schedule another stepInterrupt.
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1847
          Must flush caches since optimized methods not always
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1848
          look for pending interrupts
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1849
        "
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1850
        ObjectMemory flushInlineCaches.
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1851
        StepInterruptPending := 1.
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1852
        InterruptPending := 1.
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1853
        InStepInterrupt := nil.
0f8303e1fdfd printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 545
diff changeset
  1854
        ^ nil
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1855
    ].
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1856
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1857
"/ ' ' printNL.
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1858
29
8a72e10043f6 *** empty log message ***
claus
parents: 22
diff changeset
  1859
    name := Processor activeProcess nameOrId.
7
92b82578c88c *** empty log message ***
claus
parents: 4
diff changeset
  1860
    self label:(s , ' (process: ' , name , ')').
92b82578c88c *** empty log message ***
claus
parents: 4
diff changeset
  1861
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1862
    tracing := false.
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1863
    bigStep := false.
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1864
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
  1865
    "release refs to context"
571fd5eee315 Initial revision
claus
parents:
diff changeset
  1866
    where := nil. here := nil.
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1867
"/'enter' printCR.
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1868
1049
3223853742a4 fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
  1869
    DebuggingDebugger == true ifTrue:[
3223853742a4 fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
  1870
        '==> enter on: ' print. thisContext sender sender printCR.
3223853742a4 fixed initial selection after stepping with non-verbose
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
  1871
    ].
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1872
    self enter:thisContext sender sender
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1873
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  1874
    "Created: 14.10.1996 / 12:53:39 / cg"
1063
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  1875
    "Modified: 3.3.1997 / 21:36:35 / cg"
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
  1876
! !
571fd5eee315 Initial revision
claus
parents:
diff changeset
  1877
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1878
!DebugView methodsFor:'menu / button actions'!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1879
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1880
autoUpdateOff
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1881
    "stop the update process"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1882
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1883
    updateProcess notNil ifTrue:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1884
	monitorToggle lampColor:(Color yellow).
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1885
	updateProcess terminate.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1886
	updateProcess := nil
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1887
    ]
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1888
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1889
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1890
autoUpdateOn
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1891
    "fork a subprocess which updates the contextList in regular intervals"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1892
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1893
    updateProcess isNil ifTrue:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1894
	updateProcess := 
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1895
	    [
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1896
		[true] whileTrue:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1897
		    monitorToggle showLamp ifTrue:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1898
			monitorToggle lampColor:(Color yellow).
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1899
		    ] ifFalse:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1900
			monitorToggle activeForegroundColor:Color black.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1901
		    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1902
		    (Delay forSeconds:0.25) wait.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1903
		    self updateContext.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1904
		    monitorToggle showLamp ifTrue:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1905
			monitorToggle lampColor:(Color red).
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1906
		    ] ifFalse:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1907
			monitorToggle activeForegroundColor:Color red.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1908
		    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1909
		    (Delay forSeconds:0.25) wait.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1910
		    self updateContext.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1911
		]
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1912
	    ] forkAt:(Processor activePriority - 1)
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1913
    ]
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1914
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1915
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1916
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1917
browse
824
099fa90db8aa use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 804
diff changeset
  1918
    |mthd who sel cls|
651
b8a14e281c24 fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents: 646
diff changeset
  1919
b8a14e281c24 fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents: 646
diff changeset
  1920
    mthd := selectedContext method.
b8a14e281c24 fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents: 646
diff changeset
  1921
    mthd notNil ifTrue:[
824
099fa90db8aa use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 804
diff changeset
  1922
        who := selectedContext method who.
099fa90db8aa use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 804
diff changeset
  1923
        who notNil ifTrue:[
099fa90db8aa use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 804
diff changeset
  1924
            cls := who methodClass.
099fa90db8aa use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 804
diff changeset
  1925
            sel := who methodSelector.
651
b8a14e281c24 fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents: 646
diff changeset
  1926
        ]
b8a14e281c24 fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents: 646
diff changeset
  1927
    ].
b8a14e281c24 fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents: 646
diff changeset
  1928
    cls isNil ifTrue:[
b8a14e281c24 fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents: 646
diff changeset
  1929
        "/ class not found - try receiver
b8a14e281c24 fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents: 646
diff changeset
  1930
        cls := selectedContext receiver class
b8a14e281c24 fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents: 646
diff changeset
  1931
    ].
b8a14e281c24 fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents: 646
diff changeset
  1932
b8a14e281c24 fixed browse, if there is nothing to browse
Claus Gittinger <cg@exept.de>
parents: 646
diff changeset
  1933
    cls browserClass openInClass:cls selector:sel.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1934
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1935
    "Created: 22.11.1995 / 21:27:01 / cg"
824
099fa90db8aa use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 804
diff changeset
  1936
    "Modified: 1.11.1996 / 16:22:13 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1937
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1938
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1939
browseClass
824
099fa90db8aa use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 804
diff changeset
  1940
    |cls|
099fa90db8aa use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 804
diff changeset
  1941
099fa90db8aa use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 804
diff changeset
  1942
    cls := selectedContext method containingClass.
527
2faba0c6ab96 ask class for browserClass
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
  1943
    cls browserClass browseClass:cls
2faba0c6ab96 ask class for browserClass
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
  1944
824
099fa90db8aa use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 804
diff changeset
  1945
    "Modified: 1.11.1996 / 16:34:19 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1946
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1947
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1948
browseClassHierarchy
824
099fa90db8aa use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 804
diff changeset
  1949
    |cls|
099fa90db8aa use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 804
diff changeset
  1950
099fa90db8aa use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 804
diff changeset
  1951
    cls := selectedContext method containingClass.
527
2faba0c6ab96 ask class for browserClass
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
  1952
    cls browserClass browseClassHierarchy:cls.
2faba0c6ab96 ask class for browserClass
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
  1953
824
099fa90db8aa use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 804
diff changeset
  1954
    "Modified: 1.11.1996 / 16:34:31 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1955
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1956
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1957
browseFullClassProtocol
824
099fa90db8aa use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 804
diff changeset
  1958
    |cls|
099fa90db8aa use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 804
diff changeset
  1959
099fa90db8aa use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 804
diff changeset
  1960
    cls := selectedContext method containingClass.
527
2faba0c6ab96 ask class for browserClass
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
  1961
    cls browserClass browseFullClassProtocol:cls.
2faba0c6ab96 ask class for browserClass
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
  1962
824
099fa90db8aa use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 804
diff changeset
  1963
    "Modified: 1.11.1996 / 16:34:41 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1964
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1965
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1966
copyWalkbackText
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1967
    "place the contents of the walkback view into the copy-paste buffer.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1968
     This allows pasting it into some other view for printing ..."
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1969
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1970
    self setTextSelection:(contextArray collect:[:con | con fullPrintString]) asStringCollection
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1971
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1972
    "Modified: 28.8.1995 / 15:31:59 / claus"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1973
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1974
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1975
doAbort
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1976
    "abort - send Object>>abortSignal, which is usually cought
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1977
     at save places (for example: in the event loop) and returns back
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1978
     from whatever the process is doing, but does not terminate it."
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1979
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1980
    inspecting ifTrue:[
477
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  1981
        inspectedProcess isDead ifTrue:[
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  1982
            self showTerminated.
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  1983
            ^ self
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  1984
        ].
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  1985
        (Object abortSignal isHandledIn:inspectedProcess suspendedContext) ifFalse:[
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  1986
            self showError:'** the process does not handle the abort signal **'
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  1987
        ] ifTrue:[
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  1988
            self interruptProcessWith:[Object abortSignal raise].
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  1989
        ].
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  1990
        ^ self
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1991
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1992
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  1993
    steppedContext := wrapperContext := nil.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1994
    haveControl := false.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  1995
    exitAction := #abort.
581
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  1996
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  1997
    "exit private event-loop"
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  1998
    catchBlock notNil ifTrue:[
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  1999
        abortButton turnOff.
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2000
        catchBlock value.
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2001
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2002
        "/ not reached
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
  2003
        'DebugView [warning]: abort failed' errorPrintCR.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2004
    ].
581
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2005
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2006
    ^ self.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2007
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
  2008
    "Modified: 10.1.1997 / 17:38:28 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2009
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2010
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2011
doContinue
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2012
    "continue from menu"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2013
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2014
    inspecting ifTrue:[
779
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2015
        device hasColors ifTrue:[
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2016
            continueButton foregroundColor:Color red darkened.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2017
        ].
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2018
        continueButton label:(resources string:'stop').
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2019
        continueButton action:[self doStop].
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2020
477
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2021
        self processPerform:#resume.
779
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2022
477
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2023
        ^ self
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2024
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2025
    canContinue ifTrue:[
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  2026
        steppedContext := wrapperContext := nil.
477
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2027
        tracing := false.
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2028
        haveControl := false.
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2029
        exitAction := #continue.
581
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2030
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2031
        "exit private event-loop"
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2032
        catchBlock notNil ifTrue:[catchBlock value].
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2033
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2034
        "/ not reached.
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
  2035
        'DebugView [warning]: continue failed' errorPrintCR.
581
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2036
        continueButton turnOff.
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2037
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2038
    ] ifFalse:[
477
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2039
        inspecting ifFalse:[
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
  2040
            'DebugView [info]: resuming top context' infoPrintCR.
477
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2041
            self showSelection:1.
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2042
            self doReturn
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2043
        ]
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2044
    ]
477
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2045
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
  2046
    "Modified: 10.1.1997 / 17:38:34 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2047
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2048
1067
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2049
doMicroSend
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2050
    "single send; reenter with next message send"
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2051
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2052
    inspecting ifTrue:[^ self].
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2053
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2054
    canContinue ifTrue:[
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2055
        steppedContext := wrapperContext := nil.
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2056
        haveControl := false.
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2057
        exitAction := #step.
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2058
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2059
        "exit private event-loop"
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2060
        catchBlock notNil ifTrue:[catchBlock value].
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2061
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2062
        "/ not reached
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2063
        'DebugView [warning]: send failed' errorPrintCR.
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2064
        sendButton turnOff.
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2065
    ]
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2066
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2067
    "Modified: 10.1.1997 / 17:38:41 / cg"
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2068
    "Created: 6.3.1997 / 21:09:36 / cg"
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2069
!
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2070
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2071
doNext
1072
50366cfc181a step vs send
Claus Gittinger <cg@exept.de>
parents: 1069
diff changeset
  2072
    "skip for next source-code line; entering blocks"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2073
1063
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  2074
    stepHow := #nextIn.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2075
    self doStep:nil
790
6a166894d5e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
  2076
1072
50366cfc181a step vs send
Claus Gittinger <cg@exept.de>
parents: 1069
diff changeset
  2077
    "Modified: 7.3.1997 / 18:38:41 / cg"
1063
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  2078
!
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  2079
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  2080
doNextOut
1072
50366cfc181a step vs send
Claus Gittinger <cg@exept.de>
parents: 1069
diff changeset
  2081
    "skip for next source-code line; leaving blocks"
1063
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  2082
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  2083
    stepHow := #nextOut.
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  2084
    self doStep:nil
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  2085
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  2086
    "Created: 3.3.1997 / 21:31:22 / cg"
1072
50366cfc181a step vs send
Claus Gittinger <cg@exept.de>
parents: 1069
diff changeset
  2087
    "Modified: 7.3.1997 / 18:38:49 / cg"
1063
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  2088
!
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  2089
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  2090
doNextOver
1072
50366cfc181a step vs send
Claus Gittinger <cg@exept.de>
parents: 1069
diff changeset
  2091
    "skip for next source-code line; skip over blocks"
1063
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  2092
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  2093
    stepHow := #nextOver.
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  2094
    self doStep:nil
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  2095
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  2096
    "Created: 3.3.1997 / 20:50:38 / cg"
1072
50366cfc181a step vs send
Claus Gittinger <cg@exept.de>
parents: 1069
diff changeset
  2097
    "Modified: 7.3.1997 / 18:39:00 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2098
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2099
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2100
doNoTrace
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2101
    traceView notNil ifTrue:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2102
	traceView topView destroy.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2103
	traceView := nil.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2104
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2105
    tracing := false
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2106
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2107
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2108
doRestart
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2109
    "restart - the selected context will be restarted"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2110
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2111
    inspecting ifTrue:[
477
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2112
        selectedContext isNil ifTrue:[
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2113
            ^ self showError:'** select a context first **'
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2114
        ].
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2115
        self interruptProcessWith:[selectedContext unwindAndRestart].
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2116
        ^ self
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2117
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2118
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  2119
    steppedContext := wrapperContext := nil.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2120
    haveControl := false.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2121
    exitAction := #restart.
581
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2122
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2123
    "exit private event-loop"
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2124
    catchBlock notNil ifTrue:[catchBlock value].
477
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2125
581
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2126
    "/ not reached
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
  2127
    'DebugView [warning]: restart failed' errorPrintCR.
581
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2128
    restartButton turnOff.
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2129
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
  2130
    "Modified: 10.1.1997 / 17:38:36 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2131
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2132
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2133
doReturn
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2134
    "return - the selected context will do a ^nil"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2135
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2136
    inspecting ifTrue:[
477
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2137
        selectedContext isNil ifTrue:[
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2138
            ^ self showError:'** select a context first **'
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2139
        ].
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2140
        self interruptProcessWith:[selectedContext unwind].
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2141
        ^ self
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2142
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2143
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  2144
    steppedContext := wrapperContext := nil.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2145
    haveControl := false.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2146
    exitAction := #return.
581
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2147
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2148
    "exit private event-loop"
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2149
    catchBlock notNil ifTrue:[catchBlock value].
477
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2150
581
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2151
    "/ not reached
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
  2152
    'DebugView [warning]: return failed' errorPrintCR.
581
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2153
    returnButton turnOff.
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2154
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
  2155
    "Modified: 10.1.1997 / 17:38:39 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2156
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2157
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2158
doSend
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2159
    "single send; reenter with next message send"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2160
1072
50366cfc181a step vs send
Claus Gittinger <cg@exept.de>
parents: 1069
diff changeset
  2161
    stepHow := #send.
1067
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2162
    self doStep:-1
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2163
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2164
"/    inspecting ifTrue:[^ self].
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2165
"/
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2166
"/    canContinue ifTrue:[
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2167
"/        steppedContext := wrapperContext := nil.
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2168
"/        haveControl := false.
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2169
"/        exitAction := #step.
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2170
"/
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2171
"/        "exit private event-loop"
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2172
"/        catchBlock notNil ifTrue:[catchBlock value].
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2173
"/
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2174
"/        "/ not reached
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2175
"/        'DebugView [warning]: send failed' errorPrintCR.
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2176
"/        sendButton turnOff.
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2177
"/    ]
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2178
1072
50366cfc181a step vs send
Claus Gittinger <cg@exept.de>
parents: 1069
diff changeset
  2179
    "Modified: 7.3.1997 / 18:41:26 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2180
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2181
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2182
doStep
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2183
    "skip for next send in selected method"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2184
1063
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  2185
    stepHow := #step.
790
6a166894d5e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
  2186
    self doStep:-1
6a166894d5e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
  2187
1072
50366cfc181a step vs send
Claus Gittinger <cg@exept.de>
parents: 1069
diff changeset
  2188
    "Modified: 7.3.1997 / 18:46:49 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2189
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2190
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2191
doStep:lineNr
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  2192
    "common helper for step, skip & next.
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  2193
     Arrange for single-steppping until we pass lineNr (if nonNil) 
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  2194
     or to next line (if nil) or to next send (if -1)"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2195
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2196
    |con method|
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2197
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2198
    inspecting ifTrue:[^ self].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2199
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2200
    canContinue ifTrue:[
477
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2201
        selectedContext notNil ifTrue:[
789
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  2202
            con := actualContext. "/ selectedContext.
477
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2203
            steppedContextLineno := actualContext lineNumber.
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2204
        ] ifFalse:[
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2205
            con := contextArray at:2.
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2206
            steppedContextLineno := con lineNumber.
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2207
        ].
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  2208
477
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2209
        skipLineNr := lineNr.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2210
477
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2211
        lineNr == -1 ifTrue:[
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2212
            steppedContextLineno := skipLineNr := nil.
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2213
        ].
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2214
1067
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2215
        stepHow == #send ifTrue:[
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2216
            steppedContext := contextArray at:1.
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2217
            stepHow := #nextIn.
1063
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  2218
        ] ifFalse:[
1067
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2219
            stepHow == #nextOut ifTrue:[
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2220
                steppedContext := con home.
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2221
            ] ifFalse:[
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2222
                steppedContext := con.
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2223
            ].
1063
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  2224
        ].
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  2225
        wrapperContext := nil.
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  2226
789
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  2227
"/ ' step con:' print. (ObjectMemory addressOf:steppedContext) printHex. ' ' print. steppedContext printCR.
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  2228
477
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2229
        "
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2230
         if we step in a wrapped method,
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2231
         prepare to skip the prolog ...
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2232
        "
789
a9595b71a8fa improved next-stepping in blocks
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
  2233
477
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2234
        inWrap := false.
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2235
        method := con method.
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2236
        (method notNil and:[method isWrapped]) ifTrue:[
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2237
            inWrap := true
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2238
        ].
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2239
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  2240
        lineNr == #return ifTrue:[
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  2241
            Processor activeProcess forceInterruptOnReturnOf:con.
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  2242
        ].
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  2243
477
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2244
        con := nil.
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2245
        bigStep := true.
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2246
        haveControl := false.
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2247
        exitAction := #step.
581
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2248
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2249
        "exit private event-loop"
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2250
        catchBlock notNil ifTrue:[catchBlock value].
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2251
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2252
        "/ not reached
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
  2253
        'DebugView [warning]: step failed' errorPrintCR.
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
  2254
        stepButton turnOff. nextButton turnOff. sendButton turnOff.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2255
    ]
477
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2256
1067
e6d52091b3af old: SEND executed debuggee up to the next send
Claus Gittinger <cg@exept.de>
parents: 1065
diff changeset
  2257
    "Modified: 6.3.1997 / 21:11:38 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2258
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2259
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2260
doStop
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2261
    "stop the process (if its running, otherwise this is a no-op)"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2262
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2263
    inspecting ifTrue:[
779
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2264
        device hasColors ifTrue:[
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2265
            continueButton foregroundColor:Color green darkened darkened.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2266
        ].
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2267
        continueButton label:(resources string:'continue').
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2268
        continueButton action:[self doContinue].
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2269
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2270
        self processPerform:#stop.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2271
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2272
        ^ self
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2273
    ].
779
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2274
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2275
    "Modified: 20.10.1996 / 18:30:48 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2276
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2277
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2278
doTerminate
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2279
    "terminate - the process has a chance for cleanup"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2280
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2281
    inspecting ifTrue:[
477
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2282
        self processPerform:#terminate.
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2283
        ^ self
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2284
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2285
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  2286
    steppedContext := wrapperContext := nil.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2287
    haveControl := false.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2288
    exitAction := #terminate. 
581
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2289
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2290
    "exit private event-loop"
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2291
    catchBlock notNil ifTrue:[catchBlock value].
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2292
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2293
    "/ not reached (normally)
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2294
    inspecting ifFalse:[
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
  2295
        'DebugView [warning]: terminate failed' errorPrintCR.
581
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2296
        self warn:'terminate failed'.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2297
    ].
581
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2298
    terminateButton turnOff.
477
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2299
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
  2300
    "Modified: 10.1.1997 / 17:38:22 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2301
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2302
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2303
doTrace
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2304
    "tracing - not really implemented ..."
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2305
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2306
    self warn:'this function is not yet implemented'.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2307
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2308
"/    |v b|
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2309
"/
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2310
"/    traceView isNil ifTrue:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2311
"/        v := StandardSystemView on:Display.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2312
"/        v label:'Debugger-Trace'.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2313
"/        v icon:icon.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2314
"/
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2315
"/        b := Button label:'untrace' in:v.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2316
"/        b origin:(0 @ 0) extent:(1.0 @ (b height)).
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2317
"/        b action:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2318
"/            StepInterruptPending := nil.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2319
"/            tracing := false.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2320
"/            v unrealize.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2321
"/            traceView := nil
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2322
"/        ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2323
"/        traceView := ScrollableView for:TextCollector in:v.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2324
"/        traceView origin:(0 @ (b height))
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2325
"/                  extent:[v width @ (v height - b height)]
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2326
"/    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2327
"/    v realize.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2328
"/
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2329
"/    tracing := true.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2330
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2331
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2332
doTraceStep
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2333
    "tracestep - not implemented yet"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2334
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2335
    canContinue ifTrue:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2336
	tracing := true.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2337
	self doStep
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2338
    ]
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2339
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2340
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2341
exit
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2342
    "exit from menu: immediate exit from smalltalk"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2343
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2344
    OperatingSystem exit
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2345
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2346
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2347
implementors
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2348
    "open a browser on the implementors"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2349
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2350
    selectedContext isNil ifTrue:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2351
	^ self showError:'** select a context first **'
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2352
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2353
    SystemBrowser browseImplementorsOf:selectedContext selector.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2354
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2355
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2356
inspectContext
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2357
    "launch an inspector on the currently selected context"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2358
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2359
    contextView selection notNil ifTrue:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2360
	(contextView selectionValue startsWith:'**') ifFalse:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2361
	    (contextArray at:(contextView selection)) inspect.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2362
	]
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2363
    ]
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2364
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2365
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2366
quickTerminate
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2367
    "quick terminate - the process will get no chance for cleanup actions"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2368
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2369
    inspecting ifTrue:[
477
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2370
        self processPerform:#terminateNoSignal.
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2371
        ^ self
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2372
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2373
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  2374
    steppedContext := wrapperContext := nil.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2375
    haveControl := false.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2376
    exitAction := #quickTerminate.
581
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2377
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2378
    "exit private event-loop"
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2379
    catchBlock notNil ifTrue:[catchBlock value].
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2380
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2381
    "/ not reached (normally)
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2382
    inspecting ifFalse:[
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
  2383
        'DebugView [warning]: terminate failed' errorPrintCR.
581
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2384
        self warn:'terminate failed'.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2385
    ].
581
d1a1ae9d49e4 removed old non-thread support
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
  2386
    terminateButton turnOff.
477
6351acd20dfb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 448
diff changeset
  2387
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
  2388
    "Modified: 10.1.1997 / 17:42:10 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2389
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2390
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2391
removeAllBreakpoints
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2392
    "remove all trace & breakpoints - if any"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2393
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2394
    MessageTracer unwrapAllMethods
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2395
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2396
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2397
removeBreakpoint
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2398
    "remove breakpoint on the selected contexts method - if any"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2399
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2400
    |implementorClass method|
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2401
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2402
    selectedContext isNil ifTrue:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2403
	^ self showError:'** select a context first **'
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2404
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2405
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2406
    implementorClass := selectedContext methodClass. 
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2407
    implementorClass notNil ifTrue:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2408
	method := implementorClass compiledMethodAt:selectedContext selector.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2409
	(method notNil and:[method isWrapped]) ifTrue:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2410
	    MessageTracer unwrapMethod:method
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2411
	]
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2412
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2413
    contextView middleButtonMenu disable:#removeBreakpoint.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2414
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2415
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2416
senders
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2417
    "open a browser on the senders"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2418
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2419
    selectedContext isNil ifTrue:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2420
	^ self showError:'** select a context first **'
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2421
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2422
    SystemBrowser browseAllCallsOn:selectedContext selector.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2423
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2424
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2425
showDenseBacktrace
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2426
    verboseBacktrace := false.
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2427
    contextView middleButtonMenu labelAt:#showDenseBacktrace put:(resources string:'show verbose backtrace').
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2428
    contextView middleButtonMenu selectorAt:#showDenseBacktrace put:#showVerboseBacktrace.
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2429
    self redisplayBacktrace.
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2430
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2431
    "Created: 10.1.1997 / 21:33:55 / cg"
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2432
    "Modified: 10.1.1997 / 21:37:21 / cg"
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2433
!
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2434
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2435
showMore
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2436
    "double number of contexts shown"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2437
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2438
    contextArray notNil ifTrue:[
563
93633e3ff304 selection: / setSelection:
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
  2439
        nChainShown := nChainShown * 2.
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2440
        self redisplayBacktrace.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2441
    ]
563
93633e3ff304 selection: / setSelection:
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
  2442
950
f1df338e6a78 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 949
diff changeset
  2443
    "Modified: 12.1.1997 / 01:24:26 / cg"
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2444
!
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2445
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2446
showVerboseBacktrace
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2447
    verboseBacktrace := true.
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2448
    contextView middleButtonMenu labelAt:#showVerboseBacktrace put:(resources string:'dense stack backtrace').
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2449
    contextView middleButtonMenu selectorAt:#showVerboseBacktrace put:#showDenseBacktrace.
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2450
    self redisplayBacktrace.
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2451
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2452
    "Modified: 10.1.1997 / 21:37:13 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2453
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2454
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2455
skip
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2456
    "skip for cursor line in selected method"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2457
1063
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  2458
    stepHow := #skip.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2459
    self doStep:codeView cursorLine.
790
6a166894d5e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
  2460
1063
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  2461
    "Modified: 3.3.1997 / 20:56:23 / cg"
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  2462
!
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  2463
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  2464
skipForReturn
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  2465
    "skip until context is left."
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  2466
1063
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  2467
    stepHow := #skipReturn.
754
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  2468
    self doStep:#return.
1848d4e89bc4 much better next & step (no longer single-steps through all sends)
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
  2469
1063
cc4f9a5d49ac added stepIn, stepOver and stepOut;
Claus Gittinger <cg@exept.de>
parents: 1049
diff changeset
  2470
    "Modified: 3.3.1997 / 20:56:32 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2471
! !
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2472
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2473
!DebugView methodsFor:'private'!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2474
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2475
busy
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2476
    ^ busy
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2477
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2478
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2479
cacheMyself
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2480
    "remember myself for next debug session"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2481
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2482
    "caching the last debugger will make the next debugger appear
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2483
     faster, since no resources have to be allocated in the display.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2484
     We have to be careful to release all refs to the debuggee, though.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2485
     Otherwise, the GC will not be able to release it"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2486
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2487
    windowGroup notNil ifTrue:[
781
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  2488
        windowGroup setProcess:nil.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2489
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2490
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2491
    busy := false.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2492
    codeView acceptAction:nil.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2493
    codeView doItAction:nil.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2494
    codeView contents:nil.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2495
    receiverInspector release.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2496
    contextInspector release.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2497
    inspectedProcess := nil.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2498
    exitAction := nil.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2499
    contextArray := nil.
940
b27a64095304 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
  2500
    selectedContext := actualContext := firstContext := nil.
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  2501
    steppedContext := wrapperContext := nil.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2502
    catchBlock := nil.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2503
    grabber := nil.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2504
    self autoUpdateOff.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2505
959
f1faf693f0d7 only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents: 952
diff changeset
  2506
    "/
f1faf693f0d7 only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents: 952
diff changeset
  2507
    "/ only cache if I am on the Display
f1faf693f0d7 only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents: 952
diff changeset
  2508
    "/
f1faf693f0d7 only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents: 952
diff changeset
  2509
    device == Display ifTrue:[
f1faf693f0d7 only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents: 952
diff changeset
  2510
        exclusive ifTrue:[
f1faf693f0d7 only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents: 952
diff changeset
  2511
            CachedExclusive := self
f1faf693f0d7 only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents: 952
diff changeset
  2512
        ] ifFalse:[
f1faf693f0d7 only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents: 952
diff changeset
  2513
            CachedDebugger := self
f1faf693f0d7 only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents: 952
diff changeset
  2514
        ].
f1faf693f0d7 only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents: 952
diff changeset
  2515
    ]
f1faf693f0d7 only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents: 952
diff changeset
  2516
f1faf693f0d7 only cache debugger on the Display
Claus Gittinger <cg@exept.de>
parents: 952
diff changeset
  2517
    "Modified: 15.2.1997 / 18:53:48 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2518
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2519
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2520
exclusive:aBoolean
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2521
    exclusive := aBoolean
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2522
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2523
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2524
inspectedProcess 
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2525
    ^ inspectedProcess 
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2526
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2527
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2528
interruptProcessWith:aBlock
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2529
    "let inspected process do something, then update the context list"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2530
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2531
    inspectedProcess isDead ifTrue:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2532
	self showTerminated.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2533
	^ self
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2534
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2535
    inspectedProcess interruptWith:aBlock.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2536
    "
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2537
     give the process a chance to run, then update
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2538
    "
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2539
    (Delay forSeconds:0.2) wait.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2540
    self setContext:(inspectedProcess suspendedContext).
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2541
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2542
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2543
processPerform:aMessage
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2544
    "do something, then update the context list"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2545
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2546
    inspectedProcess isDead ifTrue:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2547
	self showTerminated.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2548
	^ self
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2549
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2550
    inspectedProcess perform:aMessage.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2551
    "
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2552
     give the process a chance to run, then update
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2553
    "
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2554
    (Delay forSeconds:0.2) wait.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2555
    self setContext:(inspectedProcess suspendedContext).
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2556
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2557
939
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2558
redisplayBacktrace
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2559
    |oldSelection oldContext con idx|
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2560
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2561
    contextArray notNil ifTrue:[
950
f1df338e6a78 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 949
diff changeset
  2562
        self withWaitCursorDo:[
f1df338e6a78 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 949
diff changeset
  2563
            oldSelection := contextView selection.
f1df338e6a78 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 949
diff changeset
  2564
            oldSelection notNil ifTrue:[
f1df338e6a78 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 949
diff changeset
  2565
                oldContext := contextArray at:oldSelection ifAbsent:nil.
f1df338e6a78 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 949
diff changeset
  2566
            ].
f1df338e6a78 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 949
diff changeset
  2567
f1df338e6a78 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 949
diff changeset
  2568
            con := firstContext.
f1df338e6a78 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 949
diff changeset
  2569
"/            con := contextArray at:1.
f1df338e6a78 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 949
diff changeset
  2570
            contextArray at:1 put:nil.
f1df338e6a78 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 949
diff changeset
  2571
            self setContext:con.
f1df338e6a78 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 949
diff changeset
  2572
f1df338e6a78 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 949
diff changeset
  2573
            oldContext isNil ifTrue:[
f1df338e6a78 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 949
diff changeset
  2574
                idx := oldSelection
f1df338e6a78 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 949
diff changeset
  2575
            ] ifFalse:[
f1df338e6a78 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 949
diff changeset
  2576
                idx := contextArray identityIndexOf:oldContext ifAbsent:nil.
f1df338e6a78 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 949
diff changeset
  2577
            ].
f1df338e6a78 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 949
diff changeset
  2578
            contextView setSelection:idx.
f1df338e6a78 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 949
diff changeset
  2579
            idx notNil ifTrue:[
f1df338e6a78 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 949
diff changeset
  2580
                self showSelection:idx
f1df338e6a78 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 949
diff changeset
  2581
            ]
939
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2582
        ]
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2583
    ]
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2584
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2585
    "Created: 10.1.1997 / 21:36:46 / cg"
950
f1df338e6a78 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 949
diff changeset
  2586
    "Modified: 12.1.1997 / 01:24:17 / cg"
939
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2587
!
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2588
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2589
setContext:aContext
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2590
    "show calling chain from aContext in the walk-back listview"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2591
641
e02a521493ba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 628
diff changeset
  2592
    ^ self setContext:aContext releaseInspectors:true
300
027ffcadd12d keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents: 299
diff changeset
  2593
641
e02a521493ba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 628
diff changeset
  2594
    "Modified: 27.6.1996 / 17:21:59 / cg"
300
027ffcadd12d keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents: 299
diff changeset
  2595
!
027ffcadd12d keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents: 299
diff changeset
  2596
027ffcadd12d keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents: 299
diff changeset
  2597
setContext:aContext releaseInspectors:releaseInspectors
027ffcadd12d keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents: 299
diff changeset
  2598
    "show calling chain from aContext in the walk-back listview"
027ffcadd12d keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents: 299
diff changeset
  2599
949
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2600
    |con text method caller caller2 m count showIt c suspendContext nm|
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2601
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2602
    (contextArray notNil and:[aContext == (contextArray at:1)]) ifTrue:[
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2603
        "no change"
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2604
        ^ false
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2605
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2606
939
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2607
    firstContext := aContext.
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2608
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2609
    m := contextView middleButtonMenu.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2610
    m notNil ifTrue:[
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2611
        m disable:#showMore.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2612
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2613
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2614
    aContext isNil ifTrue:[
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2615
        text := Array with:'** no context **'.
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2616
        contextArray := nil.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2617
    ] ifFalse:[
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2618
        text := OrderedCollection new:nChainShown.
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2619
        contextArray := OrderedCollection new:nChainShown.
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2620
        con := aContext.
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2621
939
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2622
        verboseBacktrace ~~ true ifTrue:[
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2623
            "/ with dense backtrace, hide the ProcessorScheduler
944
680cc407240d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2624
            "/ contexts at the top; look for a Process>>suspend*
939
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2625
            "/ context within the first 10 contexts
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2626
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2627
            suspendContext := nil.
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2628
            c := con.
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2629
            1 to:10 do:[:i |
944
680cc407240d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2630
                |sel|
680cc407240d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2631
940
b27a64095304 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
  2632
                c notNil ifTrue:[
944
680cc407240d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2633
                    (sel := c selector) notNil ifTrue:[
680cc407240d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2634
                        ((sel startsWith:'suspend')
940
b27a64095304 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
  2635
                        and:[c receiver isMemberOf:Process]) ifTrue:[
b27a64095304 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
  2636
                            suspendContext := c
b27a64095304 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
  2637
                        ].
b27a64095304 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
  2638
                    ].
b27a64095304 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
  2639
                    c := c sender.
b27a64095304 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
  2640
                ]
939
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2641
            ].
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2642
            suspendContext notNil ifTrue:[
949
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2643
                con := suspendContext. suspendContext := nil
939
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2644
            ].
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2645
        ].
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2646
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2647
        "
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2648
         get them all
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2649
        "
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2650
        count := 0.
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2651
        [con notNil and:[count <= nChainShown]] whileTrue:[
949
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2652
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2653
            (self showingContext:con) ifTrue:[
1092
059c29fac604 made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
  2654
                contextArray add:con.
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2655
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2656
                (MoreDebuggingDetail == true) ifTrue:[
949
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2657
                    nm := (((ObjectMemory addressOf:con) printStringRadix:16) , ' ' , con printString).
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2658
                ] ifFalse:[
949
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2659
                    nm := con printString.
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2660
                ].
1092
059c29fac604 made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
  2661
                text add:nm.
059c29fac604 made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
  2662
                count := count + 1.
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2663
            ].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2664
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2665
            method := con method.
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2666
            (method notNil and:[method isWrapped]) ifTrue:[
949
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2667
                "/
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2668
                "/ kludge: if its a wrapped method, then hide the wrap-call
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2669
                "/
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2670
                caller := con sender.
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2671
                (caller notNil and:[caller receiver == method originalMethod]) ifTrue:[
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2672
                    caller2 := caller sender.
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2673
                    (caller2 notNil and:[caller2 method == method]) ifTrue:[
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2674
                        con := caller2
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2675
                    ]
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2676
                ].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2677
                caller := caller2 := nil
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2678
            ].
949
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2679
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2680
            "/ with dense backtrace, skip the doIt methods context
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2681
            "/ (its dummy anyway) and fake that contexts name
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2682
952
9f203aab32a4 skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2683
            verboseBacktrace ~~ true ifTrue:[
9f203aab32a4 skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2684
                (con isBlockContext
9f203aab32a4 skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2685
                 and:[con home == con sender
9f203aab32a4 skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2686
                 and:[((con home selector == #doIt)
9f203aab32a4 skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2687
                       or:[con home selector == #doIt:])
9f203aab32a4 skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2688
                 and:[con home method who isNil]]]) ifTrue:[
949
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2689
                    con := con sender.
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2690
                    text removeLast.
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2691
                    text add:(con methodHome printString)
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2692
                ]
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2693
            ].
952
9f203aab32a4 skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2694
1092
059c29fac604 made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
  2695
            "/ and also, all lazy loading intermediates
952
9f203aab32a4 skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2696
9f203aab32a4 skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2697
            verboseBacktrace ~~ true ifTrue:[
9f203aab32a4 skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2698
                (con selector == #noByteCode 
9f203aab32a4 skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2699
                and:[con receiver isMethod]) ifTrue:[
9f203aab32a4 skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2700
                    contextArray removeLast.    
9f203aab32a4 skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2701
                    text removeLast.
9f203aab32a4 skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2702
                    con := con sender.
1092
059c29fac604 made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
  2703
                    count := count - 1.
952
9f203aab32a4 skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2704
                ]
9f203aab32a4 skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2705
            ].
9f203aab32a4 skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2706
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2707
            con := con sender
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2708
        ].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2709
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2710
        "
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2711
         did we reach the end ?
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2712
        "
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2713
        (con isNil or:[con sender isNil]) ifTrue:[
949
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2714
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2715
            "/ the very last one is the startup context
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2716
            "/ (in main) - it has nil as receiver and nil as selector
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2717
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2718
            contextArray last selector isNil ifTrue:[
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2719
                contextArray removeLast.
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2720
                text removeLast
949
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2721
            ].
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2722
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2723
            verboseBacktrace ~~ true ifTrue:[
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2724
                "/ in dense mode, remove the process startup
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2725
                "/ contexts (if any)
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2726
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2727
                (con := contextArray last) methodClass == Process ifTrue:[
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2728
                    con selector == #start ifTrue:[
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2729
                        contextArray removeLast.
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2730
                        text removeLast.
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2731
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2732
                        [contextArray size > 0
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2733
                         and:[contextArray last methodHome == con]] whileTrue:[
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2734
                            contextArray removeLast.
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2735
                            text removeLast.
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2736
                        ]
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2737
                    ]
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  2738
                ]
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2739
            ]
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2740
        ] ifFalse:[
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2741
            m notNil ifTrue:[
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2742
                m enable:#showMore.
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2743
                text add:(resources string:'*** more walkback follows - click here to see them ***')
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2744
            ].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2745
        ].
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2746
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2747
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2748
    contextView setList:text.
944
680cc407240d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2749
300
027ffcadd12d keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents: 299
diff changeset
  2750
    releaseInspectors ifTrue:[
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2751
        receiverInspector release.
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2752
        contextInspector release.
300
027ffcadd12d keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents: 299
diff changeset
  2753
    ].
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2754
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2755
    m notNil ifTrue:[
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2756
        m disable:#removeBreakpoint.
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2757
        m disable:#implementors.
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2758
        m disable:#senders.
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2759
        m disable:#browseClass.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2760
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2761
    ^ true
300
027ffcadd12d keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents: 299
diff changeset
  2762
027ffcadd12d keep context in lower-right inspector when single stepping
Claus Gittinger <cg@exept.de>
parents: 299
diff changeset
  2763
    "Created: 14.12.1995 / 19:10:31 / cg"
1101
4db36b95dac4 dont mark contexts nonLifo
Claus Gittinger <cg@exept.de>
parents: 1092
diff changeset
  2764
    "Modified: 27.3.1997 / 18:25:17 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2765
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2766
779
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2767
setContextSkippingInterruptContexts:aContext
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2768
    "show calling chain from aContext in the walk-back listview.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2769
     Ignore any non-interresting interrupt-context."
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2770
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2771
    |con|
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2772
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2773
    con := aContext.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2774
    (con notNil and:[con selector == #threadSwitch:]) ifTrue:[
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2775
        con := con sender.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2776
        (con notNil and:[con selector == #timerInterrupt]) ifTrue:[
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2777
            con := con sender.
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2778
        ].
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2779
    ].
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2780
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2781
    ^ self setContext:con releaseInspectors:true
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2782
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2783
    "Modified: 27.6.1996 / 17:21:59 / cg"
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2784
    "Created: 20.10.1996 / 18:10:21 / cg"
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2785
!
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2786
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2787
showError:message
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2788
    codeView contents:(resources string:message).
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2789
    shown ifTrue:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2790
	exclusive ifTrue:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2791
	    "/ consider this a kludge:
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2792
	    "/ if exclusive, cannot use flash, since it suspends
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2793
	    "/ (but we cannot suspend here ...)
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2794
	    codeView redrawInverted. device flush.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2795
	    OperatingSystem millisecondDelay:200.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2796
	    codeView redraw
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2797
	] ifFalse:[
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2798
	    codeView flash
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2799
	]
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2800
    ]
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2801
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2802
    "Modified: 24.11.1995 / 22:07:30 / cg"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2803
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2804
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2805
showTerminated
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2806
    self showError:'** the process has terminated **'
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2807
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2808
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2809
showingContext:aContext
939
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2810
    "return false, if this context is to be skipped.
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2811
     Here, we hide some wellKnown methods, which are usually
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2812
     not too interresting; the set of methods which are suppressed
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2813
     is my (claus's) own choice."
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2814
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2815
    |sel rec mClass|
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2816
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2817
    verboseBacktrace ifTrue:[^ true].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2818
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2819
    rec := aContext receiver.
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2820
    sel := aContext selector.
939
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2821
    mClass := aContext methodClass.
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2822
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2823
    sel == #withCursor:do: ifTrue:[
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2824
        (mClass == WindowGroup) ifTrue:[^ false].
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2825
        (mClass == TopView) ifTrue:[^ false].
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2826
    ].
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2827
    (sel == #withExecuteCursorDo:
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2828
    or:[sel == #withWaitCursorDo:]) ifTrue:[
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2829
        (mClass == DisplaySurface) ifTrue:[^ false].
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2830
    ].
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2831
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2832
    (mClass == Object) ifTrue:[
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2833
        (sel startsWith:'perform:') ifTrue:[^ false]
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2834
    ].
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2835
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2836
    (mClass == Method) ifTrue:[
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2837
        (sel startsWith:'valueWithReceiver:') ifTrue:[^ false]
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2838
    ].
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2839
952
9f203aab32a4 skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2840
    (mClass == SmallInteger) ifTrue:[
9f203aab32a4 skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2841
        (sel == #to:do:) ifTrue:[^ false].
9f203aab32a4 skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2842
        (sel == #to:by:do:) ifTrue:[^ false].
9f203aab32a4 skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2843
    ].
9f203aab32a4 skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2844
939
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2845
    (mClass == Block) ifTrue:[
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2846
        sel == #valueNowOrOnUnwindDo: ifTrue:[^ false].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2847
        sel == #valueOnUnwindDo: ifTrue:[^ false].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2848
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2849
        sel == #value ifTrue:[^ false].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2850
        sel == #value: ifTrue:[^ false].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2851
        sel == #value:value: ifTrue:[^ false].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2852
        sel == #value:value:value: ifTrue:[^ false].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2853
        sel == #value:value:value:value: ifTrue:[^ false].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2854
        sel == #value:value:value:value:Value: ifTrue:[^ false].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2855
        sel == #value:value:value:value:value:value: ifTrue:[^ false].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2856
    ].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2857
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2858
"/    aContext isBlockContext ifTrue:[
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2859
"/        sel == #value ifTrue:[^ false].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2860
"/        sel == #value: ifTrue:[^ false].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2861
"/        sel == #value:value: ifTrue:[^ false].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2862
"/        sel == #value:value:value: ifTrue:[^ false].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2863
"/        sel == #value:value:value:value: ifTrue:[^ false].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2864
"/        sel == #value:value:value:value:Value: ifTrue:[^ false].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2865
"/        sel == #value:value:value:value:value:value: ifTrue:[^ false].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2866
"/    ].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2867
939
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2868
    ((mClass == Signal) 
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2869
    or:[(mClass == QuerySignal)
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2870
    or:[mClass == SignalSet]]
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2871
    ) ifTrue:[
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2872
        sel == #handle:do: ifTrue:[^ false].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2873
    ].
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2874
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2875
    ^ true.
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2876
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2877
    "Created: 10.1.1997 / 21:01:39 / cg"
952
9f203aab32a4 skip intermediate lazyMethod loading contexts
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2878
    "Modified: 14.1.1997 / 13:25:13 / cg"
936
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2879
!
34f8d67c4932 allow dense & verbose context-chain display.
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  2880
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2881
stepping 
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2882
    ^ stepping 
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2883
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2884
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2885
unstep 
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2886
    stepping := false.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2887
    bigStep := false.
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  2888
    steppedContext := wrapperContext := nil.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2889
    exitAction := nil
781
33e4d40fddbe better stepping (stepping in methods blockContext)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  2890
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  2891
    "Modified: 22.10.1996 / 11:59:57 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2892
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2893
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2894
updateContext
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2895
    |oldContext idx|
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2896
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2897
    inspectedProcess state == #dead ifTrue:[
642
77e7e39f503a update context uninterruptably
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
  2898
        self showTerminated.
77e7e39f503a update context uninterruptably
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
  2899
        ^ self
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2900
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2901
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2902
    oldContext := selectedContext.
642
77e7e39f503a update context uninterruptably
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
  2903
    [
779
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2904
        (self setContextSkippingInterruptContexts:inspectedProcess suspendedContext) ifTrue:[
642
77e7e39f503a update context uninterruptably
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
  2905
            oldContext notNil ifTrue:[
77e7e39f503a update context uninterruptably
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
  2906
                contextArray notNil ifTrue:[
77e7e39f503a update context uninterruptably
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
  2907
                    idx := contextArray identityIndexOf:oldContext.
77e7e39f503a update context uninterruptably
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
  2908
                    idx ~~ 0 ifTrue:[
77e7e39f503a update context uninterruptably
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
  2909
                        self showSelection:idx
77e7e39f503a update context uninterruptably
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
  2910
                    ] ifFalse:[
77e7e39f503a update context uninterruptably
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
  2911
                        codeView contents:('** context returned **')
77e7e39f503a update context uninterruptably
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
  2912
                    ]
77e7e39f503a update context uninterruptably
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
  2913
                ]
77e7e39f503a update context uninterruptably
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
  2914
            ]
77e7e39f503a update context uninterruptably
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
  2915
        ].
77e7e39f503a update context uninterruptably
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
  2916
    ] valueUninterruptably.
77e7e39f503a update context uninterruptably
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
  2917
779
0486301b79a1 use a single button for stop/continue;
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
  2918
    "Modified: 20.10.1996 / 18:11:24 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2919
! !
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2920
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2921
!DebugView methodsFor:'private control loop'!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2922
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2923
controlLoop
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2924
    "this is a kludge:
664
f5e2b3767ea8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 657
diff changeset
  2925
        start a dispatchloop which exits when
f5e2b3767ea8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 657
diff changeset
  2926
        either continue, return or step is pressed
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2927
    "
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2928
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2929
    haveControl := true.
664
f5e2b3767ea8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 657
diff changeset
  2930
    [
f5e2b3767ea8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 657
diff changeset
  2931
        [haveControl] whileTrue:[
f5e2b3767ea8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 657
diff changeset
  2932
            self controlLoopCatchingErrors
f5e2b3767ea8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 657
diff changeset
  2933
        ].
f5e2b3767ea8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 657
diff changeset
  2934
    ] valueNowOrOnUnwindDo:[
f5e2b3767ea8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 657
diff changeset
  2935
        catchBlock := nil.
f5e2b3767ea8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 657
diff changeset
  2936
        haveControl := false
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2937
    ].
664
f5e2b3767ea8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 657
diff changeset
  2938
f5e2b3767ea8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 657
diff changeset
  2939
    "Modified: 9.7.1996 / 18:29:09 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2940
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2941
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2942
controlLoopCatchingErrors
328
bdfe5bbd376d ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents: 317
diff changeset
  2943
    "this is the debuggers own private event handling loop;
bdfe5bbd376d ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents: 317
diff changeset
  2944
     errors are cought, to prevent recursive debugger-invocations."
bdfe5bbd376d ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents: 317
diff changeset
  2945
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2946
    "setup a self removing catch-block"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2947
    catchBlock := [catchBlock := nil. ^ nil].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2948
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2949
    (exclusive or:[windowGroup isNil]) ifTrue:[
448
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2950
        "if we do not have multiple processes or its a system process
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2951
         we start another dispatch loop, which exits when
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2952
         either continue, return or step is pressed
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2953
         or (via the catchBlock) if an error occurs.
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2954
         Since our display is an extra exclusive one, 
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2955
         all processing for normal views stops here ...
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2956
        "
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2957
448
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2958
        WindowGroup setActiveGroup:windowGroup.
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2959
        SignalSet anySignal handle:[:ex |
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2960
            |signal|
334
00d06ac75a99 handle notifications without err'ing
ah
parents: 333
diff changeset
  2961
448
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2962
            signal := ex signal.
1016
59ebb6068892 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2963
448
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2964
            self showError:'*** Error in modal debugger:
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2965
334
00d06ac75a99 handle notifications without err'ing
ah
parents: 333
diff changeset
  2966
>>>> Signal:  ' , signal printString , '
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2967
>>>> In:      ' , ex suspendedContext printString , '
1016
59ebb6068892 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2968
>>>> From:    ' , ex suspendedContext sender printString , '
59ebb6068892 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2969
>>>>     :    ' , ex suspendedContext sender sender printString , '
59ebb6068892 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2970
>>>>     :    ' , ex suspendedContext sender sender sender printString , '
59ebb6068892 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2971
>>>>     :    ' , ex suspendedContext sender sender sender sender printString , '
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2972
>>>> Message: ' , ex errorString , '
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2973
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2974
cought & ignored.'.
448
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2975
            ex return.
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2976
        ] do:[
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2977
            Object userNotificationSignal handle:[:ex |
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2978
                (ex signal == ActivityNotificationSignal) ifTrue:[
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2979
                    ex proceed
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2980
                ].
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2981
                self showError:ex errorString
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2982
            ] do:[
530
6170545e4518 show debug-state
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
  2983
                device dispatchModalWhile:[Processor activeProcess state:#debug.
6170545e4518 show debug-state
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
  2984
                                           haveControl].
448
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2985
            ]
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2986
        ].
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2987
        WindowGroup setActiveGroup:nil.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2988
    ] ifFalse:[
448
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2989
        "we do have multiple processes -
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2990
         simply enter the DebugViews-Windowgroup event loop.
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2991
         effectively suspending event processing for the currently 
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2992
         active group.
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2993
        "
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2994
        SignalSet anySignal handle:[:ex |
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2995
            |answer signal|
328
bdfe5bbd376d ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents: 317
diff changeset
  2996
448
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  2997
            signal := ex signal.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  2998
801
9aac5620fff5 allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
  2999
            DebuggingDebugger ~~ true ifTrue:[
9aac5620fff5 allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
  3000
                "/
9aac5620fff5 allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
  3001
                "/ ignore recursive breakpoints
9aac5620fff5 allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
  3002
                "/
9aac5620fff5 allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
  3003
                signal == MessageTracer breakpointSignal ifTrue:[
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
  3004
                    'DebugView [info]: breakpoint in debugger ignored' infoPrintCR.
801
9aac5620fff5 allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
  3005
                    ex proceed
448
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  3006
                ].
801
9aac5620fff5 allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
  3007
                (signal == ActivityNotificationSignal) ifTrue:[
9aac5620fff5 allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
  3008
                    ex proceed
9aac5620fff5 allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
  3009
                ].
9aac5620fff5 allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
  3010
                signal == Exception recursiveExceptionSignal ifTrue:[
9aac5620fff5 allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
  3011
                    ex parameter signal == MessageTracer breakpointSignal ifTrue:[
935
7c75379de9ec newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
  3012
                        'DebugView [info]: recursive breakpoint in debugger ignored' infoPrintCR.
801
9aac5620fff5 allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
  3013
                        ex proceed.
9aac5620fff5 allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
  3014
                    ].
9aac5620fff5 allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
  3015
9aac5620fff5 allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
  3016
                    self showError:'*** Recursive error in debugger:
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3017
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3018
>>>> Signal:  ' , ex signal printString , '
448
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  3019
>>>>          ' , ex parameter signal printString , '
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3020
>>>> In:      ' , ex suspendedContext printString , '
1016
59ebb6068892 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  3021
>>>> From:    ' , ex suspendedContext sender printString , '
59ebb6068892 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  3022
>>>>     :    ' , ex suspendedContext sender sender printString , '
59ebb6068892 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  3023
>>>>     :    ' , ex suspendedContext sender sender sender printString , '
59ebb6068892 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  3024
>>>>     :    ' , ex suspendedContext sender sender sender sender printString , '
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3025
>>>> Message: ' , ex errorString , '
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3026
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3027
cought & ignored.'.
801
9aac5620fff5 allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
  3028
                    ex return
9aac5620fff5 allow halt in debugger, if DebuggingDebugger is true.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
  3029
                ].
448
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  3030
            ].
328
bdfe5bbd376d ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents: 317
diff changeset
  3031
448
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  3032
            self topView raiseDeiconified.    
328
bdfe5bbd376d ignore recursive BreakPoint invocations
Claus Gittinger <cg@exept.de>
parents: 317
diff changeset
  3033
448
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  3034
            answer := Dialog 
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  3035
                        choose:('error in debugger: ' , ex errorString , '\\debug again ?') withCRs
949
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  3036
                        labels:#( 'proceed' 'cancel' 'debug' ) 
cf980155a791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 945
diff changeset
  3037
                        values:#( #proceed #cancel #debug ) 
448
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  3038
                        default:#cancel.
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  3039
            answer == #debug ifTrue:[
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  3040
                Debugger enterUnconditional:(ex suspendedContext) withMessage:'error in debugger: ' , ex errorString.
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  3041
                ex proceed.
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  3042
            ].
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  3043
            answer == #proceed ifTrue:[
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  3044
                ex proceed.
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  3045
            ].
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  3046
            ex return.
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  3047
        ] do:[
530
6170545e4518 show debug-state
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
  3048
            windowGroup eventLoopWhile:[Processor activeProcess state:#debug.
6170545e4518 show debug-state
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
  3049
                                        true] onLeave:[]
448
e50e23ae7dc3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
  3050
        ].
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3051
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3052
    catchBlock := nil.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3053
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3054
    "Created: 24.11.1995 / 20:33:45 / cg"
1016
59ebb6068892 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  3055
    "Modified: 29.1.1997 / 20:39:11 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3056
! !
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3057
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
  3058
!DebugView methodsFor:'user interaction'!
571fd5eee315 Initial revision
claus
parents:
diff changeset
  3059
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3060
codeAccept:someCode
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3061
    "user wants some code to be recompiled - must unwind stack since everything above
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3062
     and including selected method cannot be continued."
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3063
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3064
    "
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3065
     actually, this is not true, since the active methods will still be
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3066
     executed correctly - however, the code shown in the debugger is no
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3067
     longer in sync (showing the new code) with the executed code.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3068
     Therefore, we hide those contexts to avoid confusion ....
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3069
     If you dont like this behavior, remove the 'inspecting ifFalse:' check below"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3070
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3071
    "walk up context chain and find highest context which is either the selected context,
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3072
     or - if its a block-context - whose home is the selected context"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3073
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3074
    |con top sel implementorClass method newMethod|
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3075
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3076
    codeView cursor:Cursor execute.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3077
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3078
    "
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3079
     find the method-home context for this one
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3080
    "
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3081
    con := selectedContext.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3082
    top := con.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3083
    [con notNil] whileTrue:[
1019
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3084
        (con methodHome == selectedContext) ifTrue:[
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3085
            top := con
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3086
        ].
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3087
        con := con sender
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3088
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3089
    "
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3090
     use class&selector to find the method for the compilation
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3091
     and compile.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3092
    "
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3093
    sel := selectedContext selector.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3094
    implementorClass := selectedContext methodClass.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3095
    method := implementorClass compiledMethodAt:sel.
1019
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3096
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3097
    "/
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3098
    "/ provide the classes nameSpace on a query;
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3099
    "/ in case we accept while in another nameSpace context,
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3100
    "/ (but for a class which is somewhere else)
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3101
    "/
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3102
    Class nameSpaceQuerySignal
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3103
    answer:(implementorClass nameSpace)
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3104
    do:[
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3105
        newMethod := implementorClass compilerClass
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3106
                             compile:someCode
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3107
                             forClass:implementorClass
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3108
                             inCategory:(method category)
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3109
                             notifying:codeView.
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3110
    ].
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3111
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3112
    inspecting ifFalse:[
1019
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3113
        "
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3114
         if it worked, remove everything up to and including top
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3115
         from context chain
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3116
        "
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3117
        (newMethod notNil and:[newMethod ~~ #Error]) ifTrue:[
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3118
            self setContext:(top sender).
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3119
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3120
            "
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3121
             continue/step is no longer possible
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3122
            "
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3123
            canContinue := false.
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3124
            self showSelection:1.
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3125
            exitAction := #return
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3126
        ].
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3127
    ].
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3128
    codeView cursor:Cursor normal
1019
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3129
c997b2d576c5 when accepting, provide the classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  3130
    "Modified: 31.1.1997 / 15:02:33 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3131
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3132
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3133
destroy
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3134
    "closing the debugger implies an abort or continue"
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3135
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3136
    contextView middleButtonMenu hide.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3137
407
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  3138
    inspecting ifFalse:[
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  3139
        CachedExclusive == self ifTrue:[
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  3140
            CachedExclusive := nil.
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  3141
        ].
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  3142
        CachedDebugger == self ifTrue:[
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  3143
            CachedDebugger := nil
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  3144
        ].
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  3145
669
4ac860cdf673 care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
  3146
        "/
4ac860cdf673 care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
  3147
        "/ catch invalid return;
4ac860cdf673 care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
  3148
        "/ this happens, when my process has somehow died (quickterminate)
4ac860cdf673 care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
  3149
        "/ and I am a leftOver view, which gets terminated via the launchers
4ac860cdf673 care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
  3150
        "/ #destroy-window function.
4ac860cdf673 care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
  3151
        "/
4ac860cdf673 care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
  3152
        Context invalidReturnSignal handle:[:ex |
934
1931a6f4b1cf new infoMessage scheme
Claus Gittinger <cg@exept.de>
parents: 923
diff changeset
  3153
            'DebugView [info]: OOPS - non regular debugView closing' infoPrintCR.
669
4ac860cdf673 care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
  3154
            DebugView newDebugger.
4ac860cdf673 care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
  3155
            ex return.
4ac860cdf673 care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
  3156
        ] do:[
4ac860cdf673 care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
  3157
            inspecting ifFalse:[
4ac860cdf673 care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
  3158
                canAbort ifTrue:[
4ac860cdf673 care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
  3159
                    self doAbort.
4ac860cdf673 care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
  3160
                ] ifFalse:[
4ac860cdf673 care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
  3161
                    self doContinue
4ac860cdf673 care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
  3162
                ]
4ac860cdf673 care for quickterminated processes in destroy
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
  3163
            ].
407
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  3164
        ].
934
1931a6f4b1cf new infoMessage scheme
Claus Gittinger <cg@exept.de>
parents: 923
diff changeset
  3165
        'DebugView [info]: OOPS - non regular debugView closing' infoPrintCR.
430
45d1b89689a0 when destroyed (via Launchers menu) dont halt - output a debugMessage
Claus Gittinger <cg@exept.de>
parents: 425
diff changeset
  3166
        DebugView newDebugger.
407
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  3167
    ].
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  3168
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3169
    "
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3170
     we manually release all private data, since the Debugger
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3171
     is cached for reuse - thus the memory would not be collectable
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3172
     otherwise.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3173
    "
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3174
    codeView acceptAction:nil.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3175
    codeView doItAction:nil.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3176
    codeView contents:nil.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3177
    catchBlock := nil.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3178
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3179
    receiverInspector release.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3180
    contextInspector release.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3181
    inspectedProcess := nil.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3182
    exitAction := nil.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3183
    contextArray := nil.
940
b27a64095304 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
  3184
    selectedContext := actualContext := firstContext := nil.
788
26d452e40e52 care for wrappedMethods exit-blocks, when singleStepping
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
  3185
    steppedContext := wrapperContext := nil.
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3186
    grabber := nil.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3187
    self autoUpdateOff.
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3188
407
cf196c7cd2e6 oops - simply closing debugger lead to corrupted leftovers
Claus Gittinger <cg@exept.de>
parents: 384
diff changeset
  3189
    super destroy    "/ 1.12.94
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3190
940
b27a64095304 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
  3191
    "Modified: 11.1.1997 / 13:55:09 / cg"
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3192
!
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3193
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
  3194
showSelection:lineNr
301
cd15cb77e4b6 show wait cursor while accessing sources (may take long with CVS)
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
  3195
    "user clicked on a header line - show selected code in textView.
303
1d94813f1977 interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents: 301
diff changeset
  3196
     Also sent to autoselect an interesting context on entry."
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
  3197
56
d0cb937cbcaa *** empty log message ***
claus
parents: 55
diff changeset
  3198
    |con homeContext sel method code canAccept
105
claus
parents: 101
diff changeset
  3199
     implementorClass lineNrInMethod rec m line
193
8d0b4658249c added browse-menu function; disable inappropriate menu items; fixed walkback-copy
Claus Gittinger <cg@exept.de>
parents: 189
diff changeset
  3200
     sender selSender tryVars possibleBlocks errMsg 
945
bbda9364e4c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 944
diff changeset
  3201
     mthd cls codeSet|
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
  3202
1076
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3203
    MessageTracer breakpointSignal handle:[:ex |
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3204
        'DebugView [info]: breakpoint in debugger ignored' infoPrintCR.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3205
        ex proceed
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3206
    ] do:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3207
        contextArray notNil ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3208
            lineNr <= contextArray size ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3209
                con := contextArray at:lineNr.
939
0e700c9bd085 better dense backtrace
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  3210
            ].
563
93633e3ff304 selection: / setSelection:
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
  3211
            "
1076
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3212
             clicking on the '** ...'-line shows more ...
563
93633e3ff304 selection: / setSelection:
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
  3213
            "
1076
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3214
            con isNil ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3215
                line := contextView list at:lineNr.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3216
                (line startsWith:'**') ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3217
                    self showMore.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3218
                    contextView setSelection:lineNr.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3219
                    con := contextArray at:lineNr
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3220
                ].
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3221
                con isNil ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3222
                    codeView contents:nil.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3223
                    ^ self
646
04dafb2560bf added labels 'receiver' & 'context';
Claus Gittinger <cg@exept.de>
parents: 642
diff changeset
  3224
                ].
04dafb2560bf added labels 'receiver' & 'context';
Claus Gittinger <cg@exept.de>
parents: 642
diff changeset
  3225
            ].
04dafb2560bf added labels 'receiver' & 'context';
Claus Gittinger <cg@exept.de>
parents: 642
diff changeset
  3226
1076
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3227
            self withWaitCursorDo:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3228
                codeSet := false.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3229
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3230
                "
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3231
                 give it to the (lower right) inspector
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3232
                "
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3233
                contextInspector inspect:con.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3234
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3235
                con hasStackToShow ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3236
                    stackInspector isNil ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3237
                        receiverInspector origin:(0.0 @ 0.0) corner:0.3 @ 1.0.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3238
                        contextInspector origin:(0.3 @ 0.0) corner:(0.6 @ 1.0).
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3239
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3240
                        stackInspector := InspectorView
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3241
                                            origin:(0.6 @ 0.0) corner:(1.0 @ 1.0)
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3242
                                            in:contextInspector superView.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3243
                        stackInspector realize.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3244
                        stackInspector label:'stack'.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3245
                        stackInspector hideReceiver:true.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3246
                    ].
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3247
                    stackInspector inspect:(con stackFrame asArray).
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3248
                    stackInspector showLast.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3249
                ] ifFalse:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3250
                    stackInspector notNil ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3251
                        stackInspector destroy.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3252
                        stackInspector := nil.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3253
                        receiverInspector origin:(0.0 @ 0.0) corner:0.5 @ 1.0.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3254
                        contextInspector origin:(0.5 @ 0.0) corner:(1.0 @ 1.0).
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3255
                    ]
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3256
                ].
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3257
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3258
                "
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3259
                 get the home context
563
93633e3ff304 selection: / setSelection:
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
  3260
                "
1076
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3261
                con isBlockContext ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3262
                    homeContext := con methodHome
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3263
                ] ifFalse:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3264
                    homeContext := con
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3265
                ].
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3266
                con canReturn ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3267
                    returnButton enable. restartButton enable.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3268
                ] ifFalse:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3269
                    returnButton disable. restartButton disable.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3270
                ].
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3271
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3272
                lineNrInMethod := con lineNumber.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3273
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3274
                canAccept := false.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3275
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3276
                homeContext isNil ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3277
                    "
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3278
                     mhmh - an optimized block
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3279
                     should get the block here, and get the method from
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3280
                     that one ...
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3281
                     But in 2.10.x, there is no easy way to get to the block
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3282
                     since that one is not in the context.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3283
                     Starting with 2.11, the new block calling scheme will fix this.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3284
                    "
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3285
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3286
                    "temporary kludge - peek into the sender context.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3287
                     If its a do-like method and there is a single block variable 
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3288
                     in the args or temporaries, that must be the one.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3289
                     This helps in some cases.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3290
                    "
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3291
                    (sender := con sender) notNil ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3292
                        tryVars := false.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3293
                        (selSender := sender selector) notNil ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3294
                            (selSender endsWith:'do:') ifTrue:[
563
93633e3ff304 selection: / setSelection:
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
  3295
                                tryVars := true.
1076
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3296
                            ] ifFalse:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3297
                                (selSender endsWith:'Do:') ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3298
                                    tryVars := true.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3299
                                ]
563
93633e3ff304 selection: / setSelection:
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
  3300
                            ]
1076
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3301
                        ].
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3302
                        tryVars ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3303
                            possibleBlocks := sender argsAndVars select:[:v | v isBlock].
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3304
                            possibleBlocks := possibleBlocks select:[:b | b home isNil].
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3305
                            possibleBlocks size == 1 ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3306
                                method := possibleBlocks first method.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3307
                            ].
563
93633e3ff304 selection: / setSelection:
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
  3308
                        ]
93633e3ff304 selection: / setSelection:
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
  3309
                    ].
1076
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3310
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3311
                ] ifFalse:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3312
                    "fetch rec here - so we wont need context in doItAction"
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3313
                    rec := homeContext receiver.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3314
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3315
                    sel := homeContext selector.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3316
                    sel notNil ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3317
                        canAccept := true.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3318
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3319
                        implementorClass := homeContext methodClass.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3320
                        implementorClass isNil ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3321
                            "
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3322
                             special: look if this context was created by
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3323
                             valueWithReceiver kind of method invocation;
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3324
                             if so, grab the method from the sender and show it
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3325
                            "
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3326
                            ((sender := homeContext sender) notNil
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3327
                            and:[(sender selector startsWith:'valueWithReceiver:')
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3328
                            and:[sender receiver isMethod]]) ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3329
                                method := sender receiver.
655
c9a1de4e627a secret feature: if shift is pressed while selecting a context,
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
  3330
                                self sensor shiftDown ifTrue:[
c9a1de4e627a secret feature: if shift is pressed while selecting a context,
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
  3331
                                    code := method decompiledSource
c9a1de4e627a secret feature: if shift is pressed while selecting a context,
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
  3332
                                ] ifFalse:[
c9a1de4e627a secret feature: if shift is pressed while selecting a context,
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
  3333
                                    code := method source.
c9a1de4e627a secret feature: if shift is pressed while selecting a context,
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
  3334
                                ].
563
93633e3ff304 selection: / setSelection:
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
  3335
                                canAccept := false.
1076
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3336
                            ] ifFalse:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3337
                                (method := con method) notNil ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3338
                                    self sensor shiftDown ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3339
                                        code := method decompiledSource
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3340
                                    ] ifFalse:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3341
                                        code := method source.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3342
                                    ].
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3343
                                    canAccept := false.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3344
                                ]
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3345
                            ]
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3346
                        ] ifFalse:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3347
                            method := implementorClass compiledMethodAt:sel.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3348
                        ].
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3349
                    ]
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3350
                ].
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3351
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3352
                code isNil ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3353
                    errMsg := nil.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3354
                    method notNil ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3355
                        self sensor shiftDown ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3356
                            code := method decompiledSource
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3357
                        ] ifFalse:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3358
                            code := method source.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3359
                        ].
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3360
                        code isNil ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3361
                            method sourceFilename notNil ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3362
                                codeView contents:(resources 
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3363
                                                           string:'** no sourcefile: %1 **'
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3364
                                                           with:method sourceFilename).
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3365
                                codeView flash.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3366
                                codeSet := true.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3367
                            ] ifFalse:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3368
                                errMsg := '** no source **'
563
93633e3ff304 selection: / setSelection:
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
  3369
                            ]
93633e3ff304 selection: / setSelection:
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
  3370
                        ]
93633e3ff304 selection: / setSelection:
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
  3371
                    ] ifFalse:[
1076
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3372
                        homeContext isNil ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3373
                            errMsg := '** sorry; cannot show code of all optimized blocks (yet) **'.
563
93633e3ff304 selection: / setSelection:
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
  3374
                        ] ifFalse:[
1076
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3375
                            errMsg := '** no method - no source **'
563
93633e3ff304 selection: / setSelection:
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
  3376
                        ]
1076
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3377
                    ].
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3378
                    errMsg notNil ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3379
                       self showError:errMsg.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3380
                       codeSet := true.
563
93633e3ff304 selection: / setSelection:
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
  3381
                    ]
93633e3ff304 selection: / setSelection:
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
  3382
                ].
1076
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3383
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3384
                code isNil ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3385
                    canAccept := false.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3386
                    codeSet ifFalse:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3387
                        codeView contents:nil.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3388
                    ]
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3389
                ] ifFalse:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3390
                    codeView contents:code.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3391
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3392
                    (lineNrInMethod notNil and:[lineNrInMethod ~~ 0]) ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3393
    "/                    lineNrInMethod > codeView list size ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3394
    "/                        lineNrInMethod := codeView list size + 1
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3395
    "/                    ].
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3396
    "/                    codeView selectLine:lineNrInMethod.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3397
    "/                    codeView makeSelectionVisible
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3398
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3399
                        lineNrInMethod <= codeView list size ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3400
                            (lineNrInMethod == 255 
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3401
                            and:[method notNil
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3402
                            and:[method code isNil]]) ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3403
                                "/ means: do not really know in interpreted methods
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3404
                                codeView selectFromLine:255 col:1 toLine:codeView list size + 1 col:0.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3405
                            ] ifFalse:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3406
                                codeView selectLine:lineNrInMethod.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3407
                            ].
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3408
                            codeView makeSelectionVisible
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3409
                        ]
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3410
                    ].
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3411
                ].
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3412
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3413
                canAccept ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3414
                    codeView acceptEnabled:true.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3415
                    codeView acceptAction:[:code | self codeAccept:code asString]
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3416
                ] ifFalse:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3417
                    codeView acceptEnabled:false.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3418
                    codeView acceptAction:[:code | self device beep].
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3419
                ].
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3420
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3421
                receiverInspector inspect:rec.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3422
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3423
                "
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3424
                 the one below is wrong: currently, the
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3425
                 evaluator cannot handle passed contexts.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3426
                 Once it does, pass con as in:-arg
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3427
                "
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3428
                codeView doItAction:[:theCode |
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3429
                                 rec class evaluatorClass 
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3430
                                     evaluate:theCode 
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3431
                                     in:nil            "/ *** con
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3432
                                     receiver:rec 
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3433
                                     notifying:codeView 
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3434
                                     logged:true 
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3435
                                     ifFail:nil 
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3436
                ].
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3437
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3438
                selectedContext := homeContext.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3439
                actualContext := con
563
93633e3ff304 selection: / setSelection:
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
  3440
            ].
1076
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3441
        ] ifFalse:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3442
            codeView contents:nil.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3443
        ].
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3444
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3445
        con isContext ifFalse:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3446
            sendButton disable.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3447
        ] ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3448
            sendButton enable.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3449
        ].
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3450
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3451
        "clear out locals to prevent keeping around unneeded contexts 
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3452
         (due to the block held in codeView).
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3453
         (not really needed, since stuff gets collected away sooner or later ...
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3454
          ... but this makes it a bit sooner)
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3455
        "
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3456
        con := nil.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3457
        homeContext := nil.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3458
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3459
        "
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3460
         enable/disable some menu items
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3461
        "
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3462
        m := contextView middleButtonMenu.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3463
        (m notNil and:[selectedContext notNil]) ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3464
            m enableAll:#(implementors senders inspectContext skip skipForReturn).
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3465
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3466
            (method notNil and:[method isWrapped]) ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3467
                m enable:#removeBreakpoint.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3468
            ] ifFalse:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3469
                m disable:#removeBreakpoint.
563
93633e3ff304 selection: / setSelection:
Claus Gittinger <cg@exept.de>
parents: 554
diff changeset
  3470
            ].
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  3471
1076
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3472
            mthd := selectedContext method.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3473
            mthd notNil ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3474
                cls := mthd containingClass.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3475
            ].
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3476
            m enable:#browseClass.
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3477
            cls notNil ifTrue:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3478
                m enableAll:#(browse browseClass browseClassHierarchy browseFullClassProtocol).
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3479
            ] ifFalse:[
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3480
                m disableAll:#(browse browseClass browseClassHierarchy browseFullClassProtocol).
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3481
            ].
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3482
        ]
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
  3483
    ].
571fd5eee315 Initial revision
claus
parents:
diff changeset
  3484
1076
8c4e8ee0b863 ignore breakpoints while showing source
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
  3485
    "Modified: 17.3.1997 / 15:01:43 / cg"
73
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
  3486
! !
e332d9c71624 *** empty log message ***
claus
parents: 69
diff changeset
  3487
778
e0f6238c9dd5 better stepping of an interrupted context.
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
  3488
!DebugView class methodsFor:'documentation'!
78
037323660c45 *** empty log message ***
claus
parents: 75
diff changeset
  3489
266
8645fbd8fdb7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
  3490
version
1148
d53ae051fa82 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1136
diff changeset
  3491
    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.157 1997-04-18 13:22:53 cg Exp $'
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
  3492
! !
1092
059c29fac604 made the number of frames shown initially a
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
  3493
DebugView initialize!