GDBThreadInfo.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 25 Feb 2019 17:55:20 +0000
changeset 177 e7bd05df3d6b
parent 104 4add55336dfe
child 214 0c56387e5d12
permissions -rw-r--r--
Introduce new internal API `GDBDebuggerObject >> updateFrom:` to update one ("old") object with another one ("new"). This is used in cases when we want to preserve an identity of API objects.
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: 89
diff changeset
     1
"
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 89
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: 89
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: 89
diff changeset
     4
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 89
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: 89
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: 89
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: 89
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: 89
diff changeset
     9
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 89
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: 89
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: 89
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: 89
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: 89
diff changeset
    14
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 89
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: 89
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: 89
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: 89
diff changeset
    18
"
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
"{ Package: 'jv:libgdbs' }"
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
"{ NameSpace: Smalltalk }"
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    22
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
GDBObject subclass:#GDBThreadInfo
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
	instanceVariableNames:'id target_id frame state'
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
	classVariableNames:''
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
	poolDictionaries:''
104
4add55336dfe Variable objects: automagically update values whenever changed.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 100
diff changeset
    27
	category:'GDB-Private'
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
!
c4ac76afe03d Keep thread information in transient thread-info object.
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: 89
diff changeset
    30
!GDBThreadInfo class methodsFor:'documentation'!
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 89
diff changeset
    31
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 89
diff changeset
    32
copyright
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 89
diff changeset
    33
"
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 89
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: 89
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: 89
diff changeset
    36
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 89
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: 89
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: 89
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: 89
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: 89
diff changeset
    41
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 89
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: 89
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: 89
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: 89
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: 89
diff changeset
    46
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 89
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: 89
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: 89
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: 89
diff changeset
    50
"
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 89
diff changeset
    51
! !
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 89
diff changeset
    52
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    53
!GDBThreadInfo class methodsFor:'accessing - GDB value descriptors'!
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    54
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    55
description
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    56
    ^ (super description)
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    57
        define:#'id' as:Integer;
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    58
        define:#'target-id' as:String;
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    59
        "/ define:#'frame' as: GDBFrame
89
ba62d486014f Initial support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
    60
        define:#'state' as: String;
67
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    61
        yourself
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    62
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    63
    "Created: / 06-09-2014 / 02:21:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
89
ba62d486014f Initial support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
    64
    "Modified: / 12-11-2017 / 17:20: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:
diff changeset
    65
! !
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    66
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    67
!GDBThreadInfo methodsFor:'accessing'!
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    68
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    69
id
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    70
    ^ id
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    71
!
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    72
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    73
state
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    74
    ^ state
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    75
!
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    76
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    77
targetId
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    78
    ^ target_id
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    79
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    80
    "Created: / 08-03-2015 / 08:39:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    81
! !
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    82
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    83
!GDBThreadInfo methodsFor:'accessing-private'!
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    84
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    85
_state: aString
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    86
    state := GDBThreadState fromString: aString
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    87
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    88
    "Created: / 08-03-2015 / 08:35:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    89
! !
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    90
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    91
!GDBThreadInfo methodsFor:'initialization'!
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    92
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    93
setId: idArg state: stateArg
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    94
    id := idArg.
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    95
    state := stateArg
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    96
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    97
    "Created: / 08-03-2015 / 10:27:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    98
! !
c4ac76afe03d Keep thread information in transient thread-info object.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    99
100
aab8dd376f29 Fixed SubscriptionCollection >> value:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   100
!GDBThreadInfo class methodsFor:'documentation'!
aab8dd376f29 Fixed SubscriptionCollection >> value:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   101
aab8dd376f29 Fixed SubscriptionCollection >> value:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   102
version_HG
aab8dd376f29 Fixed SubscriptionCollection >> value:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   103
aab8dd376f29 Fixed SubscriptionCollection >> value:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   104
    ^ '$Changeset: <not expanded> $'
aab8dd376f29 Fixed SubscriptionCollection >> value:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   105
! !
aab8dd376f29 Fixed SubscriptionCollection >> value:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   106