GDBVariable.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 13 Feb 2018 22:35:15 +0000
changeset 109 f57ce907abf4
parent 108 f34505ec6a7f
child 127 1254cc005f57
permissions -rw-r--r--
Variable objects: added `GDBVariableObject >> #duplicate` that creates a copy of that object.
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
"
55
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
"{ Package: 'jv:libgdbs' }"
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
"{ NameSpace: Smalltalk }"
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    22
106
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
    23
GDBDebuggerObject subclass:#GDBVariable
74
d53d325c2930 Initial work on varobjs. Tests locks up an image, should be polished and folded.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 56
diff changeset
    24
	instanceVariableNames:'frame name value varobj'
55
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
	classVariableNames:''
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
	poolDictionaries:''
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
	category:'GDB-Core'
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
!
437ee6413c74 Initial support for variables
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
!GDBVariable 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
! !
76
29efc28d989a Fixed `GDBVariable>>varobj` to actually keep the varobj
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 74
diff changeset
    52
55
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    53
!GDBVariable class methodsFor:'accessing - GDB value descriptors'!
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    54
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    55
description
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    56
    ^ (super description)
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    57
        define:#name as:String;
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    58
        yourself
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    59
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    60
    "Created: / 16-09-2014 / 23:59:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    61
    "Modified: / 27-02-2015 / 15:00:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    62
! !
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    63
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    64
!GDBVariable methodsFor:'accessing'!
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    65
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    66
name
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    67
    ^ name
56
20989de12cfb More work on variables + tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
    68
!
20989de12cfb More work on variables + tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
    69
20989de12cfb More work on variables + tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
    70
value
74
d53d325c2930 Initial work on varobjs. Tests locks up an image, should be polished and folded.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 56
diff changeset
    71
    ^ self varobj value
56
20989de12cfb More work on variables + tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
    72
20989de12cfb More work on variables + tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
    73
    "Created: / 27-02-2015 / 23:37:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
74
d53d325c2930 Initial work on varobjs. Tests locks up an image, should be polished and folded.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 56
diff changeset
    74
    "Modified: / 18-03-2015 / 16:47:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
d53d325c2930 Initial work on varobjs. Tests locks up an image, should be polished and folded.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 56
diff changeset
    75
! !
d53d325c2930 Initial work on varobjs. Tests locks up an image, should be polished and folded.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 56
diff changeset
    76
d53d325c2930 Initial work on varobjs. Tests locks up an image, should be polished and folded.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 56
diff changeset
    77
!GDBVariable methodsFor:'accessing-private'!
d53d325c2930 Initial work on varobjs. Tests locks up an image, should be polished and folded.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 56
diff changeset
    78
d53d325c2930 Initial work on varobjs. Tests locks up an image, should be polished and folded.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 56
diff changeset
    79
varobj
d53d325c2930 Initial work on varobjs. Tests locks up an image, should be polished and folded.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 56
diff changeset
    80
    varobj isNil ifTrue:[ 
109
f57ce907abf4 Variable objects: added `GDBVariableObject >> #duplicate`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 108
diff changeset
    81
        varobj := debugger evaluate: name in: frame.
74
d53d325c2930 Initial work on varobjs. Tests locks up an image, should be polished and folded.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 56
diff changeset
    82
    ].
83
b2fb8968f1f4 Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
    83
    ^ varobj
74
d53d325c2930 Initial work on varobjs. Tests locks up an image, should be polished and folded.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 56
diff changeset
    84
d53d325c2930 Initial work on varobjs. Tests locks up an image, should be polished and folded.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 56
diff changeset
    85
    "Created: / 27-02-2015 / 17:18:20 / 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
    86
    "Modified: / 15-01-2018 / 23:10:31 / jv"
109
f57ce907abf4 Variable objects: added `GDBVariableObject >> #duplicate`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 108
diff changeset
    87
    "Modified: / 13-02-2018 / 22:23:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
56
20989de12cfb More work on variables + tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
    88
! !
20989de12cfb More work on variables + tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
    89
20989de12cfb More work on variables + tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
    90
!GDBVariable methodsFor:'initialization'!
20989de12cfb More work on variables + tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
    91
20989de12cfb More work on variables + tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
    92
setFrame: aGDBFrame
20989de12cfb More work on variables + tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
    93
    self assert: frame isNil.
20989de12cfb More work on variables + tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
    94
    self assert: (debugger isNil or:[ debugger == aGDBFrame debugger ]).
20989de12cfb More work on variables + tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
    95
    frame := aGDBFrame.
106
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
    96
    self setDebugger: frame debugger.
56
20989de12cfb More work on variables + tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
    97
20989de12cfb More work on variables + tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 55
diff changeset
    98
    "Created: / 27-02-2015 / 17:08:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
106
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
    99
    "Modified: / 04-02-2018 / 21:41:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
104
4add55336dfe Variable objects: automagically update values whenever changed.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   100
!
4add55336dfe Variable objects: automagically update values whenever changed.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   101
4add55336dfe Variable objects: automagically update values whenever changed.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   102
setValue: aString
4add55336dfe Variable objects: automagically update values whenever changed.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   103
    value := aString
4add55336dfe Variable objects: automagically update values whenever changed.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   104
4add55336dfe Variable objects: automagically update values whenever changed.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   105
    "Created: / 01-02-2018 / 21:34:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
55
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   106
! !
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   107
83
b2fb8968f1f4 Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   108
!GDBVariable methodsFor:'inspecting'!
b2fb8968f1f4 Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   109
b2fb8968f1f4 Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   110
inspectorExtraAttributes
b2fb8968f1f4 Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   111
    ^ super inspectorExtraAttributes
b2fb8968f1f4 Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   112
        add:('-varobj' -> [ self varobj ]);
b2fb8968f1f4 Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   113
        yourself
b2fb8968f1f4 Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   114
b2fb8968f1f4 Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   115
    "Created: / 13-06-2017 / 14:51:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
b2fb8968f1f4 Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   116
! !
b2fb8968f1f4 Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   117
55
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   118
!GDBVariable methodsFor:'printing & storing'!
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   119
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   120
printOn:aStream
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   121
    "append a printed representation if the receiver to the argument, aStream"
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   122
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   123
    super printOn:aStream.
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   124
    aStream nextPutAll:'('.
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   125
    name printOn: aStream.
83
b2fb8968f1f4 Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   126
    aStream nextPutAll:': '.
b2fb8968f1f4 Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   127
    aStream nextPutAll: self valueString.
55
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   128
    aStream nextPutAll:')'.
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   129
83
b2fb8968f1f4 Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   130
    "Modified: / 13-06-2017 / 17:01:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
82
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 76
diff changeset
   131
!
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 76
diff changeset
   132
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 76
diff changeset
   133
valueString
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 76
diff changeset
   134
    "Return value as string to be presented to user. The difference
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 76
diff changeset
   135
     to sending `value displayString` is that #valueString returns a
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 76
diff changeset
   136
     pretty-printed value (if pretty printing was enabled for GDB)
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 76
diff changeset
   137
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 76
diff changeset
   138
     @see GDBMI_enable_pretty_printing
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 76
diff changeset
   139
     @see GDBDebugger >> enablePrettyPrinting
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 76
diff changeset
   140
    "
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 76
diff changeset
   141
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 76
diff changeset
   142
    ^ value notNil ifTrue:[ value ] ifFalse:[ self value displayString ]
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 76
diff changeset
   143
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 76
diff changeset
   144
    "Created: / 11-06-2017 / 23:24:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 76
diff changeset
   145
    "Modified (comment): / 12-06-2017 / 09:26:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
55
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   146
! !
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   147
106
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
   148
!GDBVariable methodsFor:'testing'!
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
   149
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
   150
isValid
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
   151
    ^ frame isValid
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
   152
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
   153
    "Created: / 04-02-2018 / 21:32:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
   154
! !
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
   155
76
29efc28d989a Fixed `GDBVariable>>varobj` to actually keep the varobj
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 74
diff changeset
   156
!GDBVariable class methodsFor:'documentation'!
29efc28d989a Fixed `GDBVariable>>varobj` to actually keep the varobj
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 74
diff changeset
   157
29efc28d989a Fixed `GDBVariable>>varobj` to actually keep the varobj
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 74
diff changeset
   158
version_HG
29efc28d989a Fixed `GDBVariable>>varobj` to actually keep the varobj
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 74
diff changeset
   159
29efc28d989a Fixed `GDBVariable>>varobj` to actually keep the varobj
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 74
diff changeset
   160
    ^ '$Changeset: <not expanded> $'
29efc28d989a Fixed `GDBVariable>>varobj` to actually keep the varobj
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 74
diff changeset
   161
! !
29efc28d989a Fixed `GDBVariable>>varobj` to actually keep the varobj
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 74
diff changeset
   162