VDBStackApplication.st
author Jan Vrany <jan.vrany@labware.com>
Tue, 26 Jul 2022 15:01:33 +0100
changeset 265 f2470f0dd9cd
parent 264 23960fcb9dac
permissions -rw-r--r--
Do not show address for (pseudo) instructions with no code While such instructions do not appear in GDB-produced disassembly, they may appear in some manually-generated instruction lists. One example of such (pseudo) instruction is label.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
49
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
     1
"
264
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
     2
jv:libgdbs - GNU Debugger Interface Library
49
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
     3
Copyright (C) 2015-now Jan Vrany
264
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
     4
Copyright (C) 2021-2022 LabWare
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
     5
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
     6
Permission is hereby granted, free of charge, to any person obtaining a copy
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
     7
of this software and associated documentation files (the 'Software'), to deal
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
     8
in the Software without restriction, including without limitation the rights
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
     9
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    10
copies of the Software, and to permit persons to whom the Software is
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    11
furnished to do so, subject to the following conditions:
49
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
    12
264
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    13
The above copyright notice and this permission notice shall be included in all
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    14
copies or substantial portions of the Software.
49
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
    15
264
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    16
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    17
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    18
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    19
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    20
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    21
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    22
SOFTWARE.
49
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
    23
"
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
"{ Package: 'jv:vdb' }"
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
    26
"{ NameSpace: Smalltalk }"
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
    27
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
    28
VDBAbstractTreeApplication subclass:#VDBStackApplication
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    29
	instanceVariableNames:'selectedThreadGroupHolder selectedThreadHolder
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
    30
		selectedFrameHolder'
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    31
	classVariableNames:''
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    32
	poolDictionaries:''
16
fc1898815ab6 Temporary commit: some more work on displaying source code.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 15
diff changeset
    33
	category:'VDB-UI-Others'
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    34
!
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    35
49
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
    36
!VDBStackApplication class methodsFor:'documentation'!
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
    37
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
    38
copyright
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
    39
"
264
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    40
jv:libgdbs - GNU Debugger Interface Library
49
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
    41
Copyright (C) 2015-now Jan Vrany
264
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    42
Copyright (C) 2021-2022 LabWare
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    43
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    44
Permission is hereby granted, free of charge, to any person obtaining a copy
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    45
of this software and associated documentation files (the 'Software'), to deal
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    46
in the Software without restriction, including without limitation the rights
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    47
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    48
copies of the Software, and to permit persons to whom the Software is
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    49
furnished to do so, subject to the following conditions:
49
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
    50
264
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    51
The above copyright notice and this permission notice shall be included in all
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    52
copies or substantial portions of the Software.
49
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
    53
264
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    54
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    55
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    56
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    57
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    58
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    59
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23960fcb9dac Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents: 241
diff changeset
    60
SOFTWARE.
49
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
    61
"
2ec7f7ed9242 License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 46
diff changeset
    62
! !
15
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    63
46
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
    64
!VDBStackApplication class methodsFor:'accessing'!
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
    65
115
0dd989ce3ae7 Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 113
diff changeset
    66
defaultWindowTitle
0dd989ce3ae7 Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 113
diff changeset
    67
    ^ self resources string: 'Callstack'
46
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
    68
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
    69
    "Created: / 11-07-2017 / 16:37:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
115
0dd989ce3ae7 Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 113
diff changeset
    70
    "Modified: / 03-10-2018 / 15:39:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
46
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
    71
! !
6b857f3cec8c Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 42
diff changeset
    72
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    73
!VDBStackApplication class methodsFor:'plugIn spec'!
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    74
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    75
aspectSelectors
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    76
    "This resource specification was automatically generated
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    77
     by the UIPainter of ST/X."
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    78
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    79
    "Do not manually edit this. If it is corrupted,
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    80
     the UIPainter may not be able to read the specification."
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    81
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    82
    "Return a description of exported aspects;
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    83
     these can be connected to aspects of an embedding application
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    84
     (if this app is embedded in a subCanvas)."
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    85
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    86
    ^ #(
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    87
        #debuggerHolder
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    88
        #selectedFrameHolder
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    89
        #selectedThreadGroupHolder
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
    90
        #selectedThreadHolder
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    91
      ).
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    92
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    93
! !
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    94
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    95
!VDBStackApplication methodsFor:'aspects'!
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    96
78
5b61031de9a7 API: generalize support for application-defined background and foreground colors for presenters
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 72
diff changeset
    97
foregroundColorFor: aVDBAbstractPresenter
80
7a9cf1d6be50 UX: improvements in disasembly view (`VDBInstructionListApplication`)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
    98
    ^ (aVDBAbstractPresenter isFramePresenter and:[ aVDBAbstractPresenter frame thread isStopped not])
78
5b61031de9a7 API: generalize support for application-defined background and foreground colors for presenters
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 72
diff changeset
    99
        ifTrue:[  Color gray ]
5b61031de9a7 API: generalize support for application-defined background and foreground colors for presenters
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 72
diff changeset
   100
        ifFalse:[ nil ]
5b61031de9a7 API: generalize support for application-defined background and foreground colors for presenters
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 72
diff changeset
   101
5b61031de9a7 API: generalize support for application-defined background and foreground colors for presenters
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 72
diff changeset
   102
    "Created: / 26-06-2018 / 13:06:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
80
7a9cf1d6be50 UX: improvements in disasembly view (`VDBInstructionListApplication`)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   103
    "Modified: / 04-07-2018 / 13:13:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
78
5b61031de9a7 API: generalize support for application-defined background and foreground colors for presenters
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 72
diff changeset
   104
!
5b61031de9a7 API: generalize support for application-defined background and foreground colors for presenters
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 72
diff changeset
   105
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   106
selectedFrameHolder
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   107
    "return/create the 'selectionHolder' value holder (automatically generated)"
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   108
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   109
    selectedFrameHolder isNil ifTrue:[
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   110
        selectedFrameHolder := ValueHolder new.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   111
        selectedFrameHolder addDependent:self.
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   112
    ].
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   113
    ^ selectedFrameHolder
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   114
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   115
    "Created: / 21-09-2014 / 23:51:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   116
!
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   117
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   118
selectedFrameHolder:aValueModel
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   119
    "set the 'selectionHolder' value holder (automatically generated)"
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   120
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   121
    |oldValue newValue|
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   122
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   123
    selectedFrameHolder notNil ifTrue:[
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   124
        oldValue := selectedFrameHolder value.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   125
        selectedFrameHolder removeDependent:self.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   126
    ].
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   127
    selectedFrameHolder := aValueModel.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   128
    selectedFrameHolder notNil ifTrue:[
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   129
        selectedFrameHolder addDependent:self.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   130
    ].
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   131
    newValue := selectedFrameHolder value.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   132
    oldValue ~~ newValue ifTrue:[
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   133
        self update:#value with:newValue from:selectedFrameHolder.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   134
    ].
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   135
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   136
    "Created: / 21-09-2014 / 23:50:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   137
!
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   138
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   139
selectedThreadGroupHolder
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   140
    "return/create the 'selectedThreadGroupHolder' value holder (automatically generated)"
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   141
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   142
    selectedThreadGroupHolder isNil ifTrue:[
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   143
        selectedThreadGroupHolder := ValueHolder new.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   144
        selectedThreadGroupHolder addDependent:self.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   145
    ].
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   146
    ^ selectedThreadGroupHolder
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   147
!
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   148
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   149
selectedThreadGroupHolder:something
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   150
    "set the 'selectedThreadGroupHolder' value holder (automatically generated)"
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   151
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   152
    |oldValue newValue|
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   153
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   154
    selectedThreadGroupHolder notNil ifTrue:[
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   155
        oldValue := selectedThreadGroupHolder value.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   156
        selectedThreadGroupHolder removeDependent:self.
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   157
    ].
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   158
    selectedThreadGroupHolder := something.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   159
    selectedThreadGroupHolder notNil ifTrue:[
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   160
        selectedThreadGroupHolder addDependent:self.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   161
    ].
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   162
    newValue := selectedThreadGroupHolder value.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   163
    oldValue ~~ newValue ifTrue:[
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   164
        self update:#value with:newValue from:selectedThreadGroupHolder.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   165
    ].
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   166
!
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   167
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   168
selectedThreadHolder
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   169
    "return/create the 'selectedThreadHolder' value holder (automatically generated)"
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   170
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   171
    selectedThreadHolder isNil ifTrue:[
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   172
        selectedThreadHolder := ValueHolder new.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   173
        selectedThreadHolder addDependent:self.
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   174
    ].
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   175
    ^ selectedThreadHolder
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   176
!
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   177
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   178
selectedThreadHolder:something
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   179
    "set the 'selectedThreadHolder' value holder (automatically generated)"
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   180
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   181
    |oldValue newValue|
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   182
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   183
    selectedThreadHolder notNil ifTrue:[
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   184
        oldValue := selectedThreadHolder value.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   185
        selectedThreadHolder removeDependent:self.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   186
    ].
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   187
    selectedThreadHolder := something.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   188
    selectedThreadHolder notNil ifTrue:[
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   189
        selectedThreadHolder addDependent:self.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   190
    ].
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   191
    newValue := selectedThreadHolder value.
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   192
    oldValue ~~ newValue ifTrue:[
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   193
        self update:#value with:newValue from:selectedThreadHolder.
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   194
    ].
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   195
! !
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   196
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   197
!VDBStackApplication methodsFor:'change & update'!
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   198
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   199
update:aspect with:param from:sender
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   200
    "Invoked when an object that I depend upon sends a change notification."
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   201
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   202
    "stub code automatically generated - please change as required"
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   203
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   204
    sender == selectedFrameHolder ifTrue:[
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   205
         self updateInternalSelection.
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   206
         ^ self.
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   207
    ].
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   208
    super update:aspect with:param from:sender
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   209
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   210
    "Modified: / 27-02-2015 / 15:44:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   211
!
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   212
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   213
updateInternalSelection
226
810378570b9e UX: oops, do not use recursiveDetect: on thread / stack tree
Jan Vrany <jan.vrany@labware.com>
parents: 219
diff changeset
   214
    | frame frameP |
87
a7db77284c7f UX: always show selected (contextual) frame in stack view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 80
diff changeset
   215
a7db77284c7f UX: always show selected (contextual) frame in stack view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 80
diff changeset
   216
    frame := self selectedFrameHolder value.
219
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   217
218
0d21b4d593a6 Link debugger application's selected frame/thread/inferior holder to debugger's user context
Jan Vrany <jan.vrany@labware.com>
parents: 189
diff changeset
   218
    frame notNil ifTrue:[
219
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   219
"/        presenter := self internalSelectionHolder value.
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   220
"/        "/ Short-circuit if already selected.
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   221
"/        (presenter notNil and: [ presenter isFramePresenter and:[presenter frame = frame ] ]) ifTrue:[ 
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   222
"/            (self internalListHolder value root recursiveDetect: [ :e | presenter == e ]) notNil ifTrue: [ 
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   223
"/                ^ self 
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   224
"/            ].
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   225
"/        ].
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   226
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   227
        "/ Find presenter for given frame. Here we do it in two
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   228
        "/ steps:
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   229
        "/   1. find presenter for frame's thread and then
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   230
        "/   2. find presenter for frame starting in thread presenter.
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   231
        "/ 
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   232
        "/ In multi-threaded programs this helps to avoid fetching frames
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   233
        "/ for other threads and thus save some time
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   234
226
810378570b9e UX: oops, do not use recursiveDetect: on thread / stack tree
Jan Vrany <jan.vrany@labware.com>
parents: 219
diff changeset
   235
        | rootP threadGroupP threadP |
810378570b9e UX: oops, do not use recursiveDetect: on thread / stack tree
Jan Vrany <jan.vrany@labware.com>
parents: 219
diff changeset
   236
219
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   237
        "/ 1.
226
810378570b9e UX: oops, do not use recursiveDetect: on thread / stack tree
Jan Vrany <jan.vrany@labware.com>
parents: 219
diff changeset
   238
        rootP := self internalListHolder value root.
810378570b9e UX: oops, do not use recursiveDetect: on thread / stack tree
Jan Vrany <jan.vrany@labware.com>
parents: 219
diff changeset
   239
        threadGroupP := rootP children detect: [:each | each threadGroup = frame thread group ] ifNone: [ ^ self ].
810378570b9e UX: oops, do not use recursiveDetect: on thread / stack tree
Jan Vrany <jan.vrany@labware.com>
parents: 219
diff changeset
   240
        threadP := threadGroupP children detect: [:each | each thread = frame thread ] ifNone: [ ^ self ].
219
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   241
        "/ 2.
226
810378570b9e UX: oops, do not use recursiveDetect: on thread / stack tree
Jan Vrany <jan.vrany@labware.com>
parents: 219
diff changeset
   242
        frameP := threadP children detect: [:each | each frame level = frame level ].
219
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   243
    ].
226
810378570b9e UX: oops, do not use recursiveDetect: on thread / stack tree
Jan Vrany <jan.vrany@labware.com>
parents: 219
diff changeset
   244
    frameP notNil ifTrue: [ 
810378570b9e UX: oops, do not use recursiveDetect: on thread / stack tree
Jan Vrany <jan.vrany@labware.com>
parents: 219
diff changeset
   245
        frameP parent expand. "/ expand thread item
810378570b9e UX: oops, do not use recursiveDetect: on thread / stack tree
Jan Vrany <jan.vrany@labware.com>
parents: 219
diff changeset
   246
        frameP parent parent expand. "/ expand thread group item
810378570b9e UX: oops, do not use recursiveDetect: on thread / stack tree
Jan Vrany <jan.vrany@labware.com>
parents: 219
diff changeset
   247
        frameP parent parent parent expand "/ expand (hidden) root item
218
0d21b4d593a6 Link debugger application's selected frame/thread/inferior holder to debugger's user context
Jan Vrany <jan.vrany@labware.com>
parents: 189
diff changeset
   248
    ].
87
a7db77284c7f UX: always show selected (contextual) frame in stack view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 80
diff changeset
   249
    self internalSelectionHolder
226
810378570b9e UX: oops, do not use recursiveDetect: on thread / stack tree
Jan Vrany <jan.vrany@labware.com>
parents: 219
diff changeset
   250
        value: frameP
87
a7db77284c7f UX: always show selected (contextual) frame in stack view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 80
diff changeset
   251
        withoutNotifying: self.
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   252
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   253
    "Created: / 20-09-2014 / 23:05:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
87
a7db77284c7f UX: always show selected (contextual) frame in stack view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 80
diff changeset
   254
    "Modified (format): / 30-07-2018 / 07:40:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
219
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   255
    "Modified: / 17-05-2021 / 19:48:36 / Jan Vrany <jan.vrany@labware.com>"
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   256
!
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   257
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   258
updateSelection
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   259
    | internalSelection frame thread group |
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   260
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   261
    internalSelection := self internalSelectionHolder value.
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   262
    internalSelection notNil ifTrue:[ 
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   263
        internalSelection isFramePresenter ifTrue:[
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   264
            frame := internalSelection frame.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   265
            thread := frame thread.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   266
            group := thread group.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   267
        ] ifFalse:[ 
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   268
            internalSelection isThreadPresenter ifTrue:[ 
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   269
                thread := internalSelection thread.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   270
                group := thread group.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   271
            ] ifFalse:[  
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   272
                group := internalSelection threadGroup.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   273
            ]
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   274
        ].
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   275
    ].
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   276
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   277
    self selectedThreadGroupHolder value: group withoutNotifying: self.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   278
    self selectedThreadHolder value: thread withoutNotifying: self.
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   279
    self selectedFrameHolder value: frame withoutNotifying: self.
17
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   280
c5ee4ea44165 Some more work on source displaying
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   281
    "Created: / 20-09-2014 / 23:10:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
23
ed5f4b55cee5 Added toolbar and icons. Show all thread groups and threads in stack view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17
diff changeset
   282
    "Modified: / 22-09-2014 / 00:17:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   283
! !
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   284
25
e0f3744cd77d When execution is stopped. pre-select frame of stopped thread.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
   285
!VDBStackApplication methodsFor:'change & update-delayed'!
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   286
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   287
delayedUpdateInternalList
219
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   288
    | root inferiorPs inferiorPsToRemove inferiorPsToAdd |
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   289
219
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   290
    root := self internalListHolder value root.
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   291
    debugger isNil ifTrue: [ 
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   292
        root removeAll. 
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   293
        ^ self.
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   294
    ].
219
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   295
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   296
    inferiorPs := root getChildren ? #().
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   297
    inferiorPsToRemove := inferiorPs copy.
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   298
    inferiorPsToAdd := #().
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   299
    debugger inferiors do: [:inferior |  
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   300
        | inferiorP |
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   301
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   302
        inferiorP := inferiorPs detect: [:each | each threadGroup == inferior ] ifNone: nil.
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   303
        inferiorP notNil ifTrue: [ 
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   304
            inferiorPsToRemove remove: inferiorP.
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   305
            inferiorP updateChildren.
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   306
        ] ifFalse: [ 
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   307
            inferiorP := VDBThreadGroupPresenter new
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   308
                        setThreadGroup: inferior;
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   309
                        parent: self;
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   310
                        yourself.
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   311
            inferiorPsToAdd := inferiorPsToAdd copyWith: inferiorP.
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   312
        ].
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   313
    ].
219
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   314
    inferiorPsToRemove notEmpty ifTrue: [ 
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   315
        root removeAll: inferiorPsToRemove.
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   316
    ].
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   317
    inferiorPsToAdd notEmpty ifTrue: [ 
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   318
        root addAll: inferiorPsToAdd.
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   319
        root expand.
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   320
    ].
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   321
218
0d21b4d593a6 Link debugger application's selected frame/thread/inferior holder to debugger's user context
Jan Vrany <jan.vrany@labware.com>
parents: 189
diff changeset
   322
    self updateInternalSelection.
72
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   323
    self delayedInvalidateInternalList
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   324
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   325
    "Created: / 20-09-2014 / 23:05:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
72
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   326
    "Modified: / 09-04-2018 / 19:52:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
183
91a467093d63 Fix `VDBStackApplication >> delayedUpdateAfterThreadStopped:`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 164
diff changeset
   327
    "Modified (format): / 06-09-2019 / 01:51:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
219
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   328
    "Modified: / 18-05-2021 / 11:20:43 / Jan Vrany <jan.vrany@labware.com>"
25
e0f3744cd77d When execution is stopped. pre-select frame of stopped thread.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
   329
!
e0f3744cd77d When execution is stopped. pre-select frame of stopped thread.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
   330
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   331
delayedUpdateSelection
218
0d21b4d593a6 Link debugger application's selected frame/thread/inferior holder to debugger's user context
Jan Vrany <jan.vrany@labware.com>
parents: 189
diff changeset
   332
    | internalSelection frame thread |
25
e0f3744cd77d When execution is stopped. pre-select frame of stopped thread.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
   333
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   334
    internalSelection := self internalSelectionHolder value.
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   335
    internalSelection notNil ifTrue:[ 
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   336
        internalSelection isFramePresenter ifTrue:[
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   337
            frame := internalSelection frame.
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   338
            thread := frame thread.
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   339
        ] ifFalse:[ 
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   340
            internalSelection isThreadPresenter ifTrue:[ 
218
0d21b4d593a6 Link debugger application's selected frame/thread/inferior holder to debugger's user context
Jan Vrany <jan.vrany@labware.com>
parents: 189
diff changeset
   341
                frame := internalSelection children first frame.
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   342
                thread := internalSelection thread.
218
0d21b4d593a6 Link debugger application's selected frame/thread/inferior holder to debugger's user context
Jan Vrany <jan.vrany@labware.com>
parents: 189
diff changeset
   343
            ].
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   344
        ].
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   345
    ].
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   346
218
0d21b4d593a6 Link debugger application's selected frame/thread/inferior holder to debugger's user context
Jan Vrany <jan.vrany@labware.com>
parents: 189
diff changeset
   347
    thread notNil ifTrue: [
0d21b4d593a6 Link debugger application's selected frame/thread/inferior holder to debugger's user context
Jan Vrany <jan.vrany@labware.com>
parents: 189
diff changeset
   348
        self selectedThreadHolder value: thread withoutNotifying: self.
0d21b4d593a6 Link debugger application's selected frame/thread/inferior holder to debugger's user context
Jan Vrany <jan.vrany@labware.com>
parents: 189
diff changeset
   349
        self selectedFrameHolder value: frame withoutNotifying: self.
0d21b4d593a6 Link debugger application's selected frame/thread/inferior holder to debugger's user context
Jan Vrany <jan.vrany@labware.com>
parents: 189
diff changeset
   350
    ].
37
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   351
f417fe8685c5 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 34
diff changeset
   352
    "Created: / 27-02-2015 / 15:33:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
218
0d21b4d593a6 Link debugger application's selected frame/thread/inferior holder to debugger's user context
Jan Vrany <jan.vrany@labware.com>
parents: 189
diff changeset
   353
    "Modified: / 12-03-2021 / 15:03:18 / Jan Vrany <jan.vrany@labware.com>"
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   354
! !
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   355
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   356
!VDBStackApplication methodsFor:'event handling'!
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   357
31
00f6de198c7f Minor fixes in the UI - redraw stack list when execution state changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 25
diff changeset
   358
onRunningEvent: event
113
1a40f33af921 UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 110
diff changeset
   359
    self enqueueDelayedInvalidateInternalList
31
00f6de198c7f Minor fixes in the UI - redraw stack list when execution state changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 25
diff changeset
   360
00f6de198c7f Minor fixes in the UI - redraw stack list when execution state changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 25
diff changeset
   361
    "Created: / 30-09-2014 / 00:02:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
55
fd2637e6d153 UI: refactored updates in thread / stack view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 53
diff changeset
   362
    "Modified: / 17-01-2018 / 06:59:11 / jv"
113
1a40f33af921 UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 110
diff changeset
   363
    "Modified: / 01-10-2018 / 12:59:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
219
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   364
    "Modified: / 17-05-2021 / 19:59:21 / Jan Vrany <jan.vrany@labware.com>"
6ab12a17ca3b UX: selectively update stack tree to minimize changes
Jan Vrany <jan.vrany@labware.com>
parents: 218
diff changeset
   365
    "Modified (comment): / 18-05-2021 / 11:19:59 / Jan Vrany <jan.vrany@labware.com>"
31
00f6de198c7f Minor fixes in the UI - redraw stack list when execution state changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 25
diff changeset
   366
!
00f6de198c7f Minor fixes in the UI - redraw stack list when execution state changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 25
diff changeset
   367
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   368
onStoppedEvent: event
151
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   369
    self enqueueDelayedUpdateContents.
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   370
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   371
    "Created: / 17-09-2014 / 23:04:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
53
738e2f6626bf Win32: initial support for Windows.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 49
diff changeset
   372
    "Modified: / 15-01-2018 / 11:51:51 / jv"
151
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   373
    "Modified: / 14-02-2019 / 16:31:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
218
0d21b4d593a6 Link debugger application's selected frame/thread/inferior holder to debugger's user context
Jan Vrany <jan.vrany@labware.com>
parents: 189
diff changeset
   374
    "Modified: / 12-03-2021 / 15:04:38 / Jan Vrany <jan.vrany@labware.com>"
15
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   375
!
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   376
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   377
onThreadGroupExitedEvent: event
151
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   378
    self enqueueDelayedUpdateContents.
15
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   379
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   380
    "Created: / 18-09-2014 / 23:30:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
151
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   381
    "Modified: / 14-02-2019 / 16:31:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
38
9b861cb882c8 Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   382
!
9b861cb882c8 Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   383
9b861cb882c8 Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   384
onThreadGroupStartedEvent: event
151
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   385
    self enqueueDelayedUpdateContents.
38
9b861cb882c8 Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   386
9b861cb882c8 Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   387
    "Created: / 02-03-2015 / 06:42:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
151
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   388
    "Modified: / 14-02-2019 / 16:31:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   389
! !
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   390
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   391
!VDBStackApplication methodsFor:'initialization & release'!
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   392
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   393
subscribe   
241
9996050286c5 Always call `super subscribe` when overriding
Jan Vrany <jan.vrany@labware.com>
parents: 226
diff changeset
   394
    super subscribe.
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   395
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   396
    debugger announcer
38
9b861cb882c8 Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   397
        when: GDBRunningEvent               send: #onRunningEvent: to: self;
9b861cb882c8 Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   398
        when: GDBStoppedEvent               send: #onStoppedEvent: to: self;
9b861cb882c8 Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   399
        when: GDBThreadGroupStartedEvent    send: #onThreadGroupStartedEvent: to: self;
9b861cb882c8 Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   400
        when: GDBThreadGroupExitedEvent     send: #onThreadGroupExitedEvent: to: self
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   401
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   402
    "Created: / 07-06-2014 / 14:33:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
38
9b861cb882c8 Show al thread groupd, even terminated ones
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   403
    "Modified: / 02-03-2015 / 06:42:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
55
fd2637e6d153 UI: refactored updates in thread / stack view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 53
diff changeset
   404
    "Modified: / 17-01-2018 / 06:56:46 / jv"
241
9996050286c5 Always call `super subscribe` when overriding
Jan Vrany <jan.vrany@labware.com>
parents: 226
diff changeset
   405
    "Modified: / 17-11-2021 / 16:37:55 / Jan Vrany <jan.vrany@labware.com>"
9996050286c5 Always call `super subscribe` when overriding
Jan Vrany <jan.vrany@labware.com>
parents: 226
diff changeset
   406
    "Modified (comment): / 18-11-2021 / 16:24:54 / Jan Vrany <jan.vrany@labware.com>"
13
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   407
! !
d06924d8ca0a Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   408
72
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   409
!VDBStackApplication methodsFor:'queries'!
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   410
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   411
canSelect: anItem
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   412
    ^ anItem isFramePresenter not or:[ anItem frame thread isStopped ]
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   413
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   414
    "Created: / 09-04-2018 / 20:52:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   415
! !
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   416
15
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   417
!VDBStackApplication class methodsFor:'documentation'!
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   418
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   419
version_HG
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   420
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   421
    ^ '$Changeset: <not expanded> $'
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   422
! !
7cddd476fb00 Fix in stack application: react on thread / inferior termination.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   423