author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Thu, 24 Jan 2019 21:59:23 +0000 | |
changeset 172 | 836209352efb |
parent 112 | a8138ced2f5e |
child 259 | 651864c2aa29 |
permissions | -rw-r--r-- |
112
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
1 |
"{ Encoding: utf8 }" |
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
2 |
|
91
472a4841a8b6
License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
3 |
" |
472a4841a8b6
License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
4 |
jv:libgdbs - GNU Debugger Interface Library |
472a4841a8b6
License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
5 |
Copyright (C) 2015-now Jan Vrany |
472a4841a8b6
License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
6 |
|
472a4841a8b6
License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
7 |
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:
78
diff
changeset
|
8 |
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:
78
diff
changeset
|
9 |
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:
78
diff
changeset
|
10 |
version 2.1 of the License. |
472a4841a8b6
License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
11 |
|
472a4841a8b6
License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
12 |
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:
78
diff
changeset
|
13 |
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:
78
diff
changeset
|
14 |
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:
78
diff
changeset
|
15 |
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:
78
diff
changeset
|
16 |
|
472a4841a8b6
License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
17 |
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:
78
diff
changeset
|
18 |
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:
78
diff
changeset
|
19 |
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:
78
diff
changeset
|
20 |
" |
12
568a2971c977
Generated classes for MI commands.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
21 |
"{ Package: 'jv:libgdbs' }" |
568a2971c977
Generated classes for MI commands.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
22 |
|
78 | 23 |
"{ NameSpace: Smalltalk }" |
24 |
||
12
568a2971c977
Generated classes for MI commands.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
25 |
GDBMICommand subclass:#GDBMI_var_set_visualizer |
568a2971c977
Generated classes for MI commands.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
26 |
instanceVariableNames:'' |
568a2971c977
Generated classes for MI commands.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
27 |
classVariableNames:'' |
568a2971c977
Generated classes for MI commands.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
28 |
poolDictionaries:'' |
568a2971c977
Generated classes for MI commands.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
29 |
category:'GDB-Core-Commands-MI' |
568a2971c977
Generated classes for MI commands.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
30 |
! |
568a2971c977
Generated classes for MI commands.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
31 |
|
91
472a4841a8b6
License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
32 |
!GDBMI_var_set_visualizer class methodsFor:'documentation'! |
472a4841a8b6
License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
33 |
|
472a4841a8b6
License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
34 |
copyright |
472a4841a8b6
License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
35 |
" |
472a4841a8b6
License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
36 |
jv:libgdbs - GNU Debugger Interface Library |
472a4841a8b6
License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
37 |
Copyright (C) 2015-now Jan Vrany |
472a4841a8b6
License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
38 |
|
472a4841a8b6
License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
39 |
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:
78
diff
changeset
|
40 |
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:
78
diff
changeset
|
41 |
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:
78
diff
changeset
|
42 |
version 2.1 of the License. |
472a4841a8b6
License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
43 |
|
472a4841a8b6
License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
44 |
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:
78
diff
changeset
|
45 |
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:
78
diff
changeset
|
46 |
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:
78
diff
changeset
|
47 |
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:
78
diff
changeset
|
48 |
|
472a4841a8b6
License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
49 |
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:
78
diff
changeset
|
50 |
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:
78
diff
changeset
|
51 |
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:
78
diff
changeset
|
52 |
" |
112
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
53 |
! |
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
54 |
|
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
55 |
documentation |
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
56 |
" |
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
57 |
Synopsis |
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
58 |
|
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
59 |
-var-set-visualizer name visualizer |
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
60 |
|
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
61 |
Set a visualizer for the variable object name. |
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
62 |
|
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
63 |
visualizer is the visualizer to use. The special value ‘None’ means to disable any visualizer in use. |
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
64 |
|
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
65 |
If not ‘None’, visualizer must be a Python expression. This expression must evaluate to a callable object which accepts a single argument. GDB will call this object with the value of the varobj name as an argument (this is done so that the same Python pretty-printing code can be used for both the CLI and MI). When called, this object must return an object which conforms to the pretty-printing interface (see Pretty Printing API). |
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
66 |
|
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
67 |
The pre-defined function gdb.default_visualizer may be used to select a visualizer by following the built-in process (see Selecting Pretty-Printers). This is done automatically when a varobj is created, and so ordinarily is not needed. |
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
68 |
|
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
69 |
This feature is only available if Python support is enabled. The MI command -list-features (see GDB/MI Support Commands) can be used to check this. |
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
70 |
Example |
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
71 |
|
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
72 |
Resetting the visualizer: |
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
73 |
|
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
74 |
(gdb) |
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
75 |
-var-set-visualizer V None |
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
76 |
^done |
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
77 |
|
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
78 |
Reselecting the default (type-based) visualizer: |
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
79 |
|
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
80 |
(gdb) |
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
81 |
-var-set-visualizer V gdb.default_visualizer |
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
82 |
^done |
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
83 |
|
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
84 |
Suppose SomeClass is a visualizer class. A lambda expression can be used to instantiate this class for a varobj: |
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
85 |
|
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
86 |
(gdb) |
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
87 |
-var-set-visualizer V 'lambda val: SomeClass()' |
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
88 |
^done |
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
89 |
|
a8138ced2f5e
Fixed `GDBVariableObject >> valueFormatted:` to work even if python pretty printing is enable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
90 |
" |
91
472a4841a8b6
License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
91 |
! ! |
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:
12
diff
changeset
|
92 |
|
12
568a2971c977
Generated classes for MI commands.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
93 |
!GDBMI_var_set_visualizer methodsFor:'accessing'! |
568a2971c977
Generated classes for MI commands.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
94 |
|
568a2971c977
Generated classes for MI commands.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
95 |
operation |
568a2971c977
Generated classes for MI commands.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
96 |
^ 'var-set-visualizer' |
568a2971c977
Generated classes for MI commands.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
97 |
! ! |
568a2971c977
Generated classes for MI commands.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
98 |
|
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:
12
diff
changeset
|
99 |
!GDBMI_var_set_visualizer class methodsFor:'documentation'! |
fb48207b6104
Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12
diff
changeset
|
100 |
|
fb48207b6104
Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12
diff
changeset
|
101 |
version_HG |
fb48207b6104
Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12
diff
changeset
|
102 |
|
fb48207b6104
Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12
diff
changeset
|
103 |
^ '$Changeset: <not expanded> $' |
fb48207b6104
Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12
diff
changeset
|
104 |
! ! |
fb48207b6104
Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12
diff
changeset
|
105 |