GDBTransientObject.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 01 Oct 2014 02:04:11 +0100
changeset 51 2fa20404923c
parent 37 a85f0c91f164
child 55 437ee6413c74
permissions -rw-r--r--
Introduced GDBThreadGroupType. Currently, there's only type 'process' as it is the only type supported by GDB.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
"{ Package: 'jv:libgdbs' }"
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
GDBDebuggerObject subclass:#GDBTransientObject
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
	instanceVariableNames:'stateSequenceNumber'
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
	classVariableNames:''
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
	poolDictionaries:''
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
	category:'GDB-Core'
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
!
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
51
2fa20404923c Introduced GDBThreadGroupType.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
    10
!GDBTransientObject class methodsFor:'testing'!
2fa20404923c Introduced GDBThreadGroupType.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
    11
2fa20404923c Introduced GDBThreadGroupType.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
    12
isAbstract
2fa20404923c Introduced GDBThreadGroupType.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
    13
    ^ self == GDBTransientObject
2fa20404923c Introduced GDBThreadGroupType.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
    14
! !
2fa20404923c Introduced GDBThreadGroupType.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 37
diff changeset
    15
37
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
!GDBTransientObject methodsFor:'private'!
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    17
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
ensureIsValid
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
    self isValid ifTrue:[
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
        (GDBInvalidObject newException)
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
            parameter:self;
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    22
            messageText:'Invalid object (thread resumed)';
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
            raise.
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
    ].
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
    "Created: / 07-09-2014 / 23:08:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
! !
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
!GDBTransientObject methodsFor:'testing'!
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    30
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    31
isValid
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    32
    ^ debugger currentInferiorStateSequnceNumber ~~ stateSequenceNumber
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    33
! !
a85f0c91f164 Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    34