author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Sun, 28 Jan 2018 22:19:27 +0000 | |
changeset 101 | d8fee2af20b2 |
parent 95 | f417138e9c48 |
child 102 | d573a3b2abe2 |
permissions | -rw-r--r-- |
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 |
|
437ee6413c74
Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
23 |
GDBTransientObject 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:[ |
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
|
81 |
| result currentThreadId currentFrameId | |
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 |
|
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
|
83 |
result := debugger send: (GDBMI_thread_list_ids new). |
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 |
currentThreadId := result propertyAt: 'current-thread-id'. |
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 |
result := debugger send: (GDBMI_stack_info_frame new). |
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
|
86 |
currentFrameId := (result propertyAt: 'frame') level. |
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
|
87 |
|
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
|
88 |
frame thread id ~= currentThreadId ifTrue:[ |
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
|
89 |
debugger send: (GDBMI_thread_select new arguments:(Array with:frame thread id)). |
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
|
90 |
debugger send: (GDBMI_stack_select_frame new arguments:(Array with:frame level)). |
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
|
91 |
] ifFalse:[ |
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
|
92 |
frame level ~= currentFrameId ifTrue:[ |
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
|
93 |
debugger send: (GDBMI_stack_select_frame new arguments:(Array with:frame level)). |
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
|
94 |
]. |
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
|
95 |
]. |
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
|
96 |
|
90
6046abc9ddf4
Replaced Squek computed arrays by more verbose `Array with:...`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
83
diff
changeset
|
97 |
result := debugger send: (GDBMI_var_create new arguments: (Array with: '-' with: '*' with: name)). |
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
|
98 |
|
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
|
99 |
frame thread id ~= currentThreadId ifTrue:[ |
95
f417138e9c48
Win32: initial support for Windows
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
100 |
debugger send: (GDBMI_thread_select new arguments: (Array with: currentThreadId)). |
f417138e9c48
Win32: initial support for Windows
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
101 |
debugger send: (GDBMI_stack_select_frame new arguments:(Array with: currentFrameId)). |
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
|
102 |
] ifFalse:[ |
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
|
103 |
frame level ~= currentFrameId ifTrue:[ |
95
f417138e9c48
Win32: initial support for Windows
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
104 |
debugger send: (GDBMI_stack_select_frame new arguments:(Array with: currentFrameId)). |
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
|
105 |
]. |
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
|
106 |
]. |
76
29efc28d989a
Fixed `GDBVariable>>varobj` to actually keep the varobj
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
74
diff
changeset
|
107 |
|
29efc28d989a
Fixed `GDBVariable>>varobj` to actually keep the varobj
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
74
diff
changeset
|
108 |
varobj := result value. |
101
d8fee2af20b2
Variable objects: added support for composite types
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
109 |
varobj setDebugger: debugger; setExpression: name. |
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
|
110 |
]. |
83
b2fb8968f1f4
Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
82
diff
changeset
|
111 |
^ 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
|
112 |
|
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
|
113 |
"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
|
114 |
"Modified: / 15-01-2018 / 23:10:31 / jv" |
101
d8fee2af20b2
Variable objects: added support for composite types
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
115 |
"Modified: / 28-01-2018 / 21:52:42 / 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
|
116 |
! ! |
20989de12cfb
More work on variables + tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
55
diff
changeset
|
117 |
|
20989de12cfb
More work on variables + tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
55
diff
changeset
|
118 |
!GDBVariable methodsFor:'initialization'! |
20989de12cfb
More work on variables + tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
55
diff
changeset
|
119 |
|
20989de12cfb
More work on variables + tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
55
diff
changeset
|
120 |
setFrame: aGDBFrame |
20989de12cfb
More work on variables + tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
55
diff
changeset
|
121 |
self assert: frame isNil. |
20989de12cfb
More work on variables + tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
55
diff
changeset
|
122 |
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
|
123 |
frame := aGDBFrame. |
20989de12cfb
More work on variables + tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
55
diff
changeset
|
124 |
self debugger: frame debugger. |
20989de12cfb
More work on variables + tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
55
diff
changeset
|
125 |
|
20989de12cfb
More work on variables + tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
55
diff
changeset
|
126 |
"Created: / 27-02-2015 / 17:08:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
55
437ee6413c74
Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
127 |
! ! |
437ee6413c74
Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
128 |
|
83
b2fb8968f1f4
Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
82
diff
changeset
|
129 |
!GDBVariable methodsFor:'inspecting'! |
b2fb8968f1f4
Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
82
diff
changeset
|
130 |
|
b2fb8968f1f4
Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
82
diff
changeset
|
131 |
inspectorExtraAttributes |
b2fb8968f1f4
Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
82
diff
changeset
|
132 |
^ super inspectorExtraAttributes |
b2fb8968f1f4
Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
82
diff
changeset
|
133 |
add:('-varobj' -> [ self varobj ]); |
b2fb8968f1f4
Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
82
diff
changeset
|
134 |
yourself |
b2fb8968f1f4
Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
82
diff
changeset
|
135 |
|
b2fb8968f1f4
Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
82
diff
changeset
|
136 |
"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
|
137 |
! ! |
b2fb8968f1f4
Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
82
diff
changeset
|
138 |
|
55
437ee6413c74
Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
139 |
!GDBVariable methodsFor:'printing & storing'! |
437ee6413c74
Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
140 |
|
437ee6413c74
Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
141 |
printOn:aStream |
437ee6413c74
Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
142 |
"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
|
143 |
|
437ee6413c74
Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
144 |
super printOn:aStream. |
437ee6413c74
Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
145 |
aStream nextPutAll:'('. |
437ee6413c74
Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
146 |
name printOn: aStream. |
83
b2fb8968f1f4
Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
82
diff
changeset
|
147 |
aStream nextPutAll:': '. |
b2fb8968f1f4
Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
82
diff
changeset
|
148 |
aStream nextPutAll: self valueString. |
55
437ee6413c74
Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
149 |
aStream nextPutAll:')'. |
437ee6413c74
Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
150 |
|
83
b2fb8968f1f4
Improved some #printOn: and #inspectorExtraAttributes to ease debugging
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
82
diff
changeset
|
151 |
"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
|
152 |
! |
7ee72b7a498f
Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
153 |
|
7ee72b7a498f
Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
154 |
valueString |
7ee72b7a498f
Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
155 |
"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
|
156 |
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
|
157 |
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
|
158 |
|
7ee72b7a498f
Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
159 |
@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
|
160 |
@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
|
161 |
" |
7ee72b7a498f
Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
162 |
|
7ee72b7a498f
Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
163 |
^ 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
|
164 |
|
7ee72b7a498f
Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
165 |
"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
|
166 |
"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
|
167 |
! ! |
437ee6413c74
Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
168 |
|
76
29efc28d989a
Fixed `GDBVariable>>varobj` to actually keep the varobj
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
74
diff
changeset
|
169 |
!GDBVariable class methodsFor:'documentation'! |
29efc28d989a
Fixed `GDBVariable>>varobj` to actually keep the varobj
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
74
diff
changeset
|
170 |
|
29efc28d989a
Fixed `GDBVariable>>varobj` to actually keep the varobj
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
74
diff
changeset
|
171 |
version_HG |
29efc28d989a
Fixed `GDBVariable>>varobj` to actually keep the varobj
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
74
diff
changeset
|
172 |
|
29efc28d989a
Fixed `GDBVariable>>varobj` to actually keep the varobj
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
74
diff
changeset
|
173 |
^ '$Changeset: <not expanded> $' |
29efc28d989a
Fixed `GDBVariable>>varobj` to actually keep the varobj
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
74
diff
changeset
|
174 |
! ! |
29efc28d989a
Fixed `GDBVariable>>varobj` to actually keep the varobj
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
74
diff
changeset
|
175 |