GDBThread.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Thu, 11 Jan 2018 23:53:06 +0000
changeset 95 f417138e9c48
parent 91 472a4841a8b6
child 103 56bf65352505
permissions -rw-r--r--
Win32: initial support for Windows This commit brings an initial support for Windows: * Introduces a Windows-specific`GDBWindowsProcess` since there's no TTY/PTY support on Windows. It uses pipes to communicate with MI interface. To separate MI data from inferior output, it uses `set new-console on` - something that works only on Windows. It seems that this is the only way to get GDB/MI working on Windows. * Fixed `GDBMIParser` to support CR, LF or CRLF line ends * Fixed tests to work under Windows, skipping those that cannot. * Fixed thread creation/termination handling at various places
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;
95
f417138e9c48 Win32: initial support for Windows
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
    60
        setStatus: GDBThreadStateRunning theOneAndOnlyInstance;
36
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    61
        yourself.
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    62
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    63
    "Created: / 07-09-2014 / 21:33:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
95
f417138e9c48 Win32: initial support for Windows
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
    64
    "Modified: / 14-01-2018 / 22:33:26 / jv"
36
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    65
! !
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    66
35
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    67
!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
    68
45
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 43
diff changeset
    69
description
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 43
diff changeset
    70
    ^ (super description)
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 43
diff changeset
    71
        define:#id as:Integer;
35
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    72
        yourself
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
    "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
    75
! !
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    76
36
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    77
!GDBThread methodsFor:'accessing'!
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    78
43
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
    79
group
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
    80
    ^ group
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
    81
!
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
    82
36
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    83
id
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    84
    ^ id
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    85
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    86
    "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
    87
!
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
    88
70
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
    89
name
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
    90
    ^ self targetId
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
    "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
    93
!
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
    94
39
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
    95
stack
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
    96
    self ensureIsStopped.
40
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 39
diff changeset
    97
    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
    98
        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
    99
            | 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
   100
            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
   101
            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
   102
            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
   103
            frames := result propertyAt: #stack.
55
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 53
diff changeset
   104
            frames do:[:each | 
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 53
diff changeset
   105
                each debugger: debugger.
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 53
diff changeset
   106
                each propertyAt: #thread put: self 
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 53
diff changeset
   107
            ].
43
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   108
            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
   109
        ].
39
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   110
    ].
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
   111
    ^ stack value
39
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   112
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   113
    "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
   114
    "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
   115
!
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   116
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   117
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
   118
    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
   119
        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
   120
    ].
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   121
    ^ status
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   122
86
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   123
    "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
   124
!
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   125
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   126
targetId
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   127
    ^ self info targetId
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   128
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   129
    "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
   130
! !
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
!GDBThread methodsFor:'accessing-private'!
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   133
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   134
info
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   135
    info isNil ifTrue:[
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   136
        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
   137
            | result infos |
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   138
90
6046abc9ddf4 Replaced Squek computed arrays by more verbose `Array with:...`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 86
diff changeset
   139
            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
   140
            infos := result propertyAt: #threads.
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   141
            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
   142
            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
   143
                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
   144
                ifFalse:[ infos first ]
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   145
        ].
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
    ^ info value
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   148
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   149
    "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
   150
    "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
   151
! !
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   152
70
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   153
!GDBThread methodsFor:'displaying'!
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   154
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   155
displayString
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   156
    ^ '%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
   157
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   158
    "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
   159
! !
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   160
86
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   161
!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
   162
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   163
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
   164
    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
   165
    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
   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
    "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
   168
!
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   169
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   170
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
   171
    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
   172
    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
   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
    "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
   175
! !
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   176
36
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   177
!GDBThread methodsFor:'initialization'!
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   178
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   179
setGroup: aGDBThreadGroup
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   180
    self assert: group isNil.
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   181
    group := aGDBThreadGroup.
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
    "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
   184
!
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   185
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   186
setId: tid
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   187
    self assert: id isNil.
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   188
    id := tid.
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   189
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   190
    "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
   191
    "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
   192
!
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   193
86
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   194
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
   195
    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
   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
    "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
   198
!
7f53d51a0a65 Cache thread status and update it on `=stopped` and `=running` events
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   199
36
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   200
setTerminated
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   201
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   202
    "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
   203
    "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
   204
! !
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
   205
43
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   206
!GDBThread methodsFor:'printing & storing'!
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   207
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   208
printOn:aStream
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   209
    "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
   210
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   211
    aStream nextPutAll:'thread  '.
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   212
    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:'in group '.
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   214
"/    group id printOn:aStream.
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   215
    aStream nextPutAll:' ['.
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   216
    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
   217
    aStream nextPutAll:']'.
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   218
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   219
    "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
   220
! !
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   221
39
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   222
!GDBThread methodsFor:'private'!
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   223
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   224
ensureIsStopped
40
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 39
diff changeset
   225
    self isStopped ifFalse:[
39
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   226
        (GDBInvalidObject newException)
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   227
            parameter:self;
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   228
            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
   229
            raise.
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   230
    ].
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   231
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   232
    "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
   233
    "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
   234
! !
2b9d2f75906f Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
   235
37
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
   236
!GDBThread methodsFor:'testing'!
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
   237
43
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   238
isDead
95
f417138e9c48 Win32: initial support for Windows
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   239
    ^ self isTerminated
43
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   240
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   241
    "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
   242
    "Modified: / 08-03-2015 / 12:35:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
95
f417138e9c48 Win32: initial support for Windows
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   243
    "Modified: / 14-01-2018 / 22:34:04 / jv"
43
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   244
!
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   245
37
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
   246
isRunning
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   247
    ^ self status isRunning
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
    "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
   250
    "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
   251
!
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
isStopped
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   254
    ^ self status isStopped
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
    "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
   257
    "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
   258
!
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
isTerminated
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
   261
    ^ self status isTerminated
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
    "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
   264
    "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
   265
! !
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
   266
70
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   267
!GDBThread class methodsFor:'documentation'!
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   268
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   269
version_HG
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   270
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   271
    ^ '$Changeset: <not expanded> $'
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   272
! !
6d7285bb1703 GDBThread: use native name in thread's displayString
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 67
diff changeset
   273