GDBThread.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Thu, 23 Nov 2017 22:51:20 +0000
changeset 91 472a4841a8b6
parent 90 6046abc9ddf4
child 95 f417138e9c48
permissions -rw-r--r--
License this package under 'GNU Lesser General Public License'
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
91
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
     1
"
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
     2
jv:libgdbs - GNU Debugger Interface Library
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
     3
Copyright (C) 2015-now Jan Vrany
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
     4
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
     5
This library is free software; you can redistribute it and/or
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
     6
modify it under the terms of the GNU Lesser General Public
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
     7
License as published by the Free Software Foundation; either
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
     8
version 2.1 of the License. 
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
     9
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    10
This library is distributed in the hope that it will be useful,
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    11
but WITHOUT ANY WARRANTY; without even the implied warranty of
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    13
Lesser General Public License for more details.
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    14
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    15
You should have received a copy of the GNU Lesser General Public
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    16
License along with this library; if not, write to the Free Software
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    18
"
35
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
"{ Package: 'jv:libgdbs' }"
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
53
63669c2c0f9e Test fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
    21
"{ NameSpace: Smalltalk }"
63669c2c0f9e Test fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
    22
36
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    23
GDBDebuggerObject subclass:#GDBThread
86
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
    24
	instanceVariableNames:'id group status info stack'
35
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
	classVariableNames:''
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
	poolDictionaries:''
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
	category:'GDB-Core'
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
!
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
91
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    30
!GDBThread class methodsFor:'documentation'!
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    31
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    32
copyright
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    33
"
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    34
jv:libgdbs - GNU Debugger Interface Library
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    35
Copyright (C) 2015-now Jan Vrany
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    36
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    37
This library is free software; you can redistribute it and/or
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    38
modify it under the terms of the GNU Lesser General Public
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    39
License as published by the Free Software Foundation; either
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    40
version 2.1 of the License. 
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    41
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    42
This library is distributed in the hope that it will be useful,
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    43
but WITHOUT ANY WARRANTY; without even the implied warranty of
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    44
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    45
Lesser General Public License for more details.
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    46
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    47
You should have received a copy of the GNU Lesser General Public
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    48
License along with this library; if not, write to the Free Software
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    49
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    50
"
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    51
! !
70
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
    52
36
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    53
!GDBThread class methodsFor:'instance creation'!
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    54
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    55
newWithDebugger: debugger id: id group: group
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    56
    ^ self new
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    57
        setDebugger: debugger;
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    58
        setId: id;
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    59
        setGroup: group;
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    60
        yourself.
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    61
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    62
    "Created: / 07-09-2014 / 21:33:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    63
! !
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    64
35
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    65
!GDBThread class methodsFor:'accessing - GDB value descriptors'!
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    66
45
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 43
diff changeset
    67
description
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 43
diff changeset
    68
    ^ (super description)
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 43
diff changeset
    69
        define:#id as:Integer;
35
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    70
        yourself
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    71
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    72
    "Created: / 06-09-2014 / 02:21:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    73
! !
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    74
36
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    75
!GDBThread methodsFor:'accessing'!
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    76
43
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
    77
group
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
    78
    ^ group
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
    79
!
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
    80
36
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    81
id
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    82
    ^ id
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    83
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    84
    "Created: / 07-09-2014 / 22:41:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
39
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
    85
!
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
    86
70
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
    87
name
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
    88
    ^ self targetId
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
    89
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
    90
    "Created: / 10-03-2015 / 00:32:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
    91
!
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
    92
39
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
    93
stack
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
    94
    self ensureIsStopped.
40
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 39
diff changeset
    95
    stack isNil ifTrue:[
41
fb48207b6104 Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
    96
        stack := GDBTransientDataHolder debugger: debugger factory:[ 
43
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
    97
            | result depth frames |
90
6046abc9ddf4 Replaced Squek computed arrays by more verbose `Array with:...`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 86
diff changeset
    98
            result := debugger send: (GDBMI_stack_info_depth new arguments: (Array with: '--thread' with: id with: 100)).
41
fb48207b6104 Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
    99
            depth := result propertyAt: #depth.
90
6046abc9ddf4 Replaced Squek computed arrays by more verbose `Array with:...`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 86
diff changeset
   100
            result := debugger send: (GDBMI_stack_list_frames new arguments: (Array with:  '--thread' with: id with: 0 with: depth - 1 )).
43
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   101
            frames := result propertyAt: #stack.
55
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 53
diff changeset
   102
            frames do:[:each | 
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 53
diff changeset
   103
                each debugger: debugger.
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 53
diff changeset
   104
                each propertyAt: #thread put: self 
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 53
diff changeset
   105
            ].
43
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   106
            frames
41
fb48207b6104 Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
   107
        ].
39
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   108
    ].
41
fb48207b6104 Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
   109
    ^ stack value
39
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   110
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   111
    "Created: / 09-09-2014 / 00:02:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
90
6046abc9ddf4 Replaced Squek computed arrays by more verbose `Array with:...`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 86
diff changeset
   112
    "Modified: / 17-11-2017 / 20:21:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
39
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   113
!
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   114
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   115
status
86
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   116
    status isUnknown ifTrue:[ 
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   117
        status := self info state
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   118
    ].
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   119
    ^ status
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   120
86
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   121
    "Modified: / 12-07-2017 / 13:36:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
70
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   122
!
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   123
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   124
targetId
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   125
    ^ self info targetId
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   126
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   127
    "Created: / 10-03-2015 / 00:32:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   128
! !
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   129
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   130
!GDBThread methodsFor:'accessing-private'!
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   131
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   132
info
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   133
    info isNil ifTrue:[
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   134
        info := GDBTransientDataHolder debugger: debugger factory:[ 
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   135
            | result infos |
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   136
90
6046abc9ddf4 Replaced Squek computed arrays by more verbose `Array with:...`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 86
diff changeset
   137
            result := debugger send: (GDBMI_thread_info new arguments: (Array with: id)).
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   138
            infos := result propertyAt: #threads.
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   139
            self assert: (infos isEmptyOrNil or:[ infos size == 1 and:[ infos first id = id ] ]).
72
eb4eea3ebf4c Increate sequence number also when thread or thread group is stopped
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 70
diff changeset
   140
            infos isEmptyOrNil 
eb4eea3ebf4c Increate sequence number also when thread or thread group is stopped
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 70
diff changeset
   141
                ifTrue:[ GDBThreadInfo new setId: id state: GDBThreadStateTerminated theOneAndOnlyInstance ] 
eb4eea3ebf4c Increate sequence number also when thread or thread group is stopped
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 70
diff changeset
   142
                ifFalse:[ infos first ]
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   143
        ].
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   144
    ].
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   145
    ^ info value
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   146
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   147
    "Created: / 08-03-2015 / 09:07:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
90
6046abc9ddf4 Replaced Squek computed arrays by more verbose `Array with:...`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 86
diff changeset
   148
    "Modified: / 17-11-2017 / 20:21:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
36
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   149
! !
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   150
70
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   151
!GDBThread methodsFor:'displaying'!
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   152
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   153
displayString
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   154
    ^ '%1 [%2]' bindWith: self name with: self status
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   155
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   156
    "Created: / 10-03-2015 / 00:32:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   157
! !
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   158
86
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   159
!GDBThread methodsFor:'event handling'!
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   160
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   161
onRunningEvent: aGDBRunningEvent
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   162
    self assert: (aGDBRunningEvent threads includesIdentical: self).
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   163
    status := GDBThreadStateRunning theOneAndOnlyInstance.
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   164
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   165
    "Created: / 12-07-2017 / 13:50:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   166
!
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   167
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   168
onStoppedEvent: aGDBStoppedEvent
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   169
    self assert: (aGDBStoppedEvent threads includesIdentical: self).
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   170
    status := GDBThreadStateStopped theOneAndOnlyInstance.
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   171
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   172
    "Created: / 12-07-2017 / 13:50:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   173
! !
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   174
36
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   175
!GDBThread methodsFor:'initialization'!
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   176
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   177
setGroup: aGDBThreadGroup
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   178
    self assert: group isNil.
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   179
    group := aGDBThreadGroup.
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   180
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   181
    "Created: / 07-09-2014 / 21:32:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   182
!
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   183
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   184
setId: tid
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   185
    self assert: id isNil.
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   186
    id := tid.
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   187
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   188
    "Created: / 07-09-2014 / 21:31:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   189
    "Modified: / 08-03-2015 / 09:08:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
36
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   190
!
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   191
86
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   192
setStatus: aGDBThreadState
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   193
    status := aGDBThreadState
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   194
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   195
    "Created: / 12-07-2017 / 13:43:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   196
!
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   197
36
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   198
setTerminated
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   199
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   200
    "Created: / 07-09-2014 / 21:37:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   201
    "Modified: / 08-03-2015 / 09:08:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
36
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   202
! !
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   203
43
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   204
!GDBThread methodsFor:'printing & storing'!
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   205
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   206
printOn:aStream
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   207
    "append a printed representation if the receiver to the argument, aStream"
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   208
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   209
    aStream nextPutAll:'thread  '.
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   210
    id printOn:aStream.
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   211
"/    aStream nextPutAll:'in group '.
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   212
"/    group id printOn:aStream.
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   213
    aStream nextPutAll:' ['.
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   214
    self status printOn:aStream.
43
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   215
    aStream nextPutAll:']'.
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   216
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   217
    "Modified: / 08-03-2015 / 09:07:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
43
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   218
! !
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   219
39
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   220
!GDBThread methodsFor:'private'!
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   221
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   222
ensureIsStopped
40
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 39
diff changeset
   223
    self isStopped ifFalse:[
39
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   224
        (GDBInvalidObject newException)
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   225
            parameter:self;
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   226
            messageText:'Invalid state (thread is running or already dead)';
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   227
            raise.
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   228
    ].
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   229
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   230
    "Created: / 09-09-2014 / 00:04:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
40
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 39
diff changeset
   231
    "Modified: / 16-09-2014 / 23:51:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
39
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   232
! !
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   233
37
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
   234
!GDBThread methodsFor:'testing'!
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
   235
43
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   236
isDead
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   237
    ^ self status isTerminated
43
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   238
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   239
    "Created: / 22-09-2014 / 00:54:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   240
    "Modified: / 08-03-2015 / 12:35:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
43
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   241
!
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   242
37
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
   243
isRunning
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   244
    ^ self status isRunning
37
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
   245
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
   246
    "Created: / 07-09-2014 / 23:23:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   247
    "Modified: / 08-03-2015 / 09:08:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
37
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
   248
!
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
   249
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
   250
isStopped
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   251
    ^ self status isStopped
37
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
   252
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
   253
    "Created: / 07-09-2014 / 23:23:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   254
    "Modified: / 08-03-2015 / 09:08:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
37
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
   255
!
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
   256
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
   257
isTerminated
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   258
    ^ self status isTerminated
37
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
   259
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
   260
    "Created: / 07-09-2014 / 23:23:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   261
    "Modified: / 08-03-2015 / 09:08:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
37
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
   262
! !
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
   263
70
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   264
!GDBThread class methodsFor:'documentation'!
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   265
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   266
version_HG
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   267
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   268
    ^ '$Changeset: <not expanded> $'
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   269
! !
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   270