File: python36.natvis

package info (click to toggle)
renderdoc 1.27%2Bdfsg-1
  • links: PTS, VCS
  • area: non-free
  • in suites: sid
  • size: 107,796 kB
  • sloc: cpp: 763,519; ansic: 326,847; python: 26,946; xml: 23,189; java: 11,382; cs: 7,181; makefile: 6,707; yacc: 5,682; ruby: 4,648; perl: 3,461; sh: 2,381; php: 2,119; lisp: 1,835; javascript: 1,525; tcl: 1,068; ml: 747
file content (322 lines) | stat: -rw-r--r-- 16,370 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
<?xml version="1.0" encoding="utf-8"?> 
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">

  <Type Name="PyDictKeyEntry">
    <DisplayString>{*me_key} = {*me_value}</DisplayString>

    <Expand>
      <ExpandedItem>me_value</ExpandedItem>
    </Expand>
  </Type>
  
  <Type Name="_object">
    <!-- TODO: Set, Slice, DateTime (and sub types), Complex, Range, OrderedDict,
         Exception, Traceback, Frame, Generator, Iterator, Method, InstanceMethod -->
  
    <!-- None -->
    <DisplayString Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!_PyNone_Type">
      None
    </DisplayString>

    <!-- Bools -->
    <DisplayString Condition="(python36.dll!_longobject *)this == &amp;python36.dll!_Py_TrueStruct">True</DisplayString>
    <DisplayString Condition="(python36.dll!_longobject *)this == &amp;python36.dll!_Py_FalseStruct">False</DisplayString>

    <!-- Modules -->
    <DisplayString Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyModule_Type">
      Python module {*((python36.dll!PyModuleObject *)this)->md_name}
    </DisplayString>

    <!-- Functions -->
    <DisplayString Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyFunction_Type">
      Python function {*((python36.dll!PyFunctionObject *)this)->func_name}
    </DisplayString>

    <!-- C Function -->
    <DisplayString Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyCFunction_Type">
      C Function {((python36.dll!PyCFunctionObject *)this)->m_ml->ml_name,s}
    </DisplayString>

    <!-- Bytes -->
    <DisplayString Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyBytes_Type">
      Python bytes object {((python36.dll!PyBytesObject *)this)->ob_base.ob_size} bytes
    </DisplayString>

    <!-- Dictionaries -->
    <DisplayString Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyDict_Type">
      Python dict, {((python36.dll!PyDictObject *)this)->ma_used} items
    </DisplayString>

    <!-- Lists -->
    <DisplayString Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyList_Type">
      Python list, {((python36.dll!PyListObject *)this)->ob_base.ob_size} items
    </DisplayString>

    <!-- Tuples -->
    <DisplayString Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyTuple_Type">
      Python tuple, {((python36.dll!PyTupleObject *)this)->ob_base.ob_size} items
    </DisplayString>

    <!-- Floats -->
    <DisplayString Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyFloat_Type">
      {((python36.dll!PyFloatObject *)this)->ob_fval}
    </DisplayString>

    <!-- Longs -->

    <!-- 30 bit digits -->
    
    <!-- up to 30 bits -->
    <DisplayString Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyLong_Type &amp;&amp;
                              sizeof(((python36.dll!PyLongObject *)this)->ob_digit) == 4 &amp;&amp;
                              ((python36.dll!PyLongObject *)this)->ob_base.ob_size == 1">
      {((python36.dll!PyLongObject *)this)->ob_digit[0]}
    </DisplayString>
    <!-- up to 60 bits -->
    <DisplayString Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyLong_Type &amp;&amp;
                              sizeof(((python36.dll!PyLongObject *)this)->ob_digit[0]) == 4 &amp;&amp;
                              ((python36.dll!PyLongObject *)this)->ob_base.ob_size == 2">
      {
      (uint64_t(((python36.dll!PyLongObject *)this)->ob_digit[0])) +
      (uint64_t(((python36.dll!PyLongObject *)this)->ob_digit[1])&lt;&lt;30)
      }
    </DisplayString>
    <!-- up to 64 bits (check for overflow) -->
    <DisplayString Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyLong_Type &amp;&amp;
                              sizeof(((python36.dll!PyLongObject *)this)->ob_digit[0]) == 4 &amp;&amp;
                              ((python36.dll!PyLongObject *)this)->ob_base.ob_size == 3 &amp;&amp;
                              ((python36.dll!PyLongObject *)this)->ob_digit[2] &lt;= 0xf">
      {
      (uint64_t(((python36.dll!PyLongObject *)this)->ob_digit[0])) +
      (uint64_t(((python36.dll!PyLongObject *)this)->ob_digit[1])&lt;&lt;30) +
      (uint64_t(((python36.dll!PyLongObject *)this)->ob_digit[2])&lt;&lt;60)
      }
    </DisplayString>

    <!-- 15 bit digits -->

    <!-- up to 15 bits -->
    <DisplayString Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyLong_Type &amp;&amp;
                              sizeof(((python36.dll!PyLongObject *)this)->ob_digit) == 2 &amp;&amp;
                              ((python36.dll!PyLongObject *)this)->ob_base.ob_size == 1">
      {((python36.dll!PyLongObject *)this)->ob_digit[0]}
    </DisplayString>
    <!-- up to 30 bits -->
    <DisplayString Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyLong_Type &amp;&amp;
                              sizeof(((python36.dll!PyLongObject *)this)->ob_digit[0]) == 2 &amp;&amp;
                              ((python36.dll!PyLongObject *)this)->ob_base.ob_size == 2">
      {
      (uint64_t(((python36.dll!PyLongObject *)this)->ob_digit[0])) +
      (uint64_t(((python36.dll!PyLongObject *)this)->ob_digit[1])&lt;&lt;15)
      }
    </DisplayString>
    <!-- up to 45 bits -->
    <DisplayString Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyLong_Type &amp;&amp;
                              sizeof(((python36.dll!PyLongObject *)this)->ob_digit[0]) == 2 &amp;&amp;
                              ((python36.dll!PyLongObject *)this)->ob_base.ob_size == 3">
      {
      (uint64_t(((python36.dll!PyLongObject *)this)->ob_digit[0])) +
      (uint64_t(((python36.dll!PyLongObject *)this)->ob_digit[1])&lt;&lt;15) +
      (uint64_t(((python36.dll!PyLongObject *)this)->ob_digit[2])&lt;&lt;30)
      }
    </DisplayString>
    <!-- up to 60 bits -->
    <DisplayString Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyLong_Type &amp;&amp;
                              sizeof(((python36.dll!PyLongObject *)this)->ob_digit[0]) == 2 &amp;&amp;
                              ((python36.dll!PyLongObject *)this)->ob_base.ob_size == 4">
      {
      (uint64_t(((python36.dll!PyLongObject *)this)->ob_digit[0])) +
      (uint64_t(((python36.dll!PyLongObject *)this)->ob_digit[1])&lt;&lt;15) +
      (uint64_t(((python36.dll!PyLongObject *)this)->ob_digit[2])&lt;&lt;30) +
      (uint64_t(((python36.dll!PyLongObject *)this)->ob_digit[3])&lt;&lt;45)
      }
    </DisplayString>
    <!-- up to 64 bits (check for overflow) -->
    <DisplayString Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyLong_Type &amp;&amp;
                              sizeof(((python36.dll!PyLongObject *)this)->ob_digit[0]) == 4 &amp;&amp;
                              ((python36.dll!PyLongObject *)this)->ob_base.ob_size == 5 &amp;&amp;
                              ((python36.dll!PyLongObject *)this)->ob_digit[4] &lt;= 0xf">
      {
      (uint64_t(((python36.dll!PyLongObject *)this)->ob_digit[0])) +
      (uint64_t(((python36.dll!PyLongObject *)this)->ob_digit[1])&lt;&lt;15) +
      (uint64_t(((python36.dll!PyLongObject *)this)->ob_digit[2])&lt;&lt;30) +
      (uint64_t(((python36.dll!PyLongObject *)this)->ob_digit[3])&lt;&lt;45) +
      (uint64_t(((python36.dll!PyLongObject *)this)->ob_digit[4])&lt;&lt;60)
      }
    </DisplayString>
    
    <!-- overflow -->
    <DisplayString Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyLong_Type">
      Python Big Integer
    </DisplayString>

    <!-- End Longs -->

    <!-- Strings -->
    <DisplayString Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyUnicode_Type &amp;&amp;
                              ((python36.dll!PyASCIIObject *)this)->state.ascii &amp;&amp;
                              ((python36.dll!PyASCIIObject *)this)->state.compact">
      <!-- Compact ASCII -->
      {(char *)(((python36.dll!PyASCIIObject *)this) + 1),s}
    </DisplayString>
    <DisplayString Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyUnicode_Type">
      Non compact ASCII string
    </DisplayString>

    <!-- End Strings -->

    <!-- Type Objects -->
    <DisplayString Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyType_Type">
      Type Object
    </DisplayString>

    <!-- Unknown Type -->
    <DisplayString>
      Unknown {ob_type->tp_name,s} object
    </DisplayString>

    <!-- Strings -->
    <StringView Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyUnicode_Type &amp;&amp;
                           ((python36.dll!PyASCIIObject *)this)->state.ascii &amp;&amp;
                           ((python36.dll!PyASCIIObject *)this)->state.compact">
      <!-- Compact ASCII -->
      (char *)(((python36.dll!PyASCIIObject *)this) + 1),s
    </StringView>

    <!-- End Strings -->

    <Expand>
      <!-- Common properties -->
      <Item Name="Reference Count">ob_refcnt</Item>
      <Item Name="Type">ob_type</Item>

      <!-- Modules -->
      <Item Name="Module Name" Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyModule_Type">
        ((python36.dll!PyModuleObject *)this)->md_name
      </Item>
      <Item Name="Module Dictionary" Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyModule_Type">
        ((python36.dll!PyModuleObject *)this)->md_dict
      </Item>
      <Item Name="Module Properties" Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyModule_Type">
        (python36.dll!PyModuleObject *)this
      </Item>

      <!-- Functions -->
      <Item Name="Function Name" Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyFunction_Type">
        ((python36.dll!PyFunctionObject *)this)->func_name
      </Item>
      <Item Name="Function Properties" Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyFunction_Type">
        (python36.dll!PyFunctionObject *)this
      </Item>

      <!-- C Function -->
      <Item Name="Function Properties" Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyCFunction_Type">
        (python36.dll!PyCFunctionObject *)this
      </Item>

      <!-- Dictionaries -->
      <Item Name="Dict Properties" Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyDict_Type">
        (python36.dll!PyDictObject *)this
      </Item>
      <Item Name="[Length]" Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyDict_Type">
        ((python36.dll!PyDictObject *)this)->ma_used
      </Item>
      <ArrayItems Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyDict_Type">
        <!-- combined table-->
        <Size>((python36.dll!PyDictObject *)this)->ma_used</Size>
        <ValuePointer Condition="((python36.dll!PyDictObject *)this)->ma_keys->dk_size &lt;= 0xff">
          (python36.dll!PyDictKeyEntry *)(((python36.dll!PyDictObject *)this)->ma_keys->dk_indices.as_1 + (((python36.dll!PyDictObject *)this)->ma_keys->dk_size * 1))
        </ValuePointer>
        <ValuePointer Condition="((python36.dll!PyDictObject *)this)->ma_keys->dk_size &lt;= 0xffff">
          (python36.dll!PyDictKeyEntry *)(((python36.dll!PyDictObject *)this)->ma_keys->dk_indices.as_1 + (((python36.dll!PyDictObject *)this)->ma_keys->dk_size * 2))
        </ValuePointer>
        <ValuePointer Condition="((python36.dll!PyDictObject *)this)->ma_keys->dk_size &lt;= 0xffffffff">
          (python36.dll!PyDictKeyEntry *)(((python36.dll!PyDictObject *)this)->ma_keys->dk_indices.as_1 + (((python36.dll!PyDictObject *)this)->ma_keys->dk_size * 4))
        </ValuePointer>
        <ValuePointer Condition="((python36.dll!PyDictObject *)this)->ma_keys->dk_size &gt; 0xffffffff">
          (python36.dll!PyDictKeyEntry *)(((python36.dll!PyDictObject *)this)->ma_keys->dk_indices.as_1 + (((python36.dll!PyDictObject *)this)->ma_keys->dk_size * 8))
        </ValuePointer>
      </ArrayItems>
      <ArrayItems Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyDict_Type &amp;&amp;
                             ((python36.dll!PyDictObject *)this)->ma_values">
        <!-- separate value -->
        <Size>((python36.dll!PyDictObject *)this)->ma_used</Size>
        <ValuePointer>((python36.dll!PyDictObject *)this)->ma_values</ValuePointer>
      </ArrayItems>

      <!-- End Dictionaries -->

      <!-- Lists -->
      <Item Name="[Length]" Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyList_Type">
        ((python36.dll!PyListObject *)this)->ob_base.ob_size
      </Item>
      <ArrayItems Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyList_Type">
        <Size>((python36.dll!PyListObject *)this)->ob_base.ob_size</Size>
        <ValuePointer>
          ((python36.dll!PyListObject *)this)->ob_item
        </ValuePointer>
      </ArrayItems>

      <!-- Tuple -->
      <Item Name="[Length]" Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyTuple_Type">
        ((python36.dll!PyTupleObject *)this)->ob_base.ob_size
      </Item>
      <ArrayItems Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyTuple_Type">
        <Size>((python36.dll!PyTupleObject *)this)->ob_base.ob_size</Size>
        <ValuePointer>
          ((python36.dll!PyTupleObject *)this)->ob_item
        </ValuePointer>
      </ArrayItems>

      <!-- Longs -->
      <Item Name="Number of Digit Sections" Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyLong_Type">
        ((python36.dll!PyLongObject *)this)->ob_base.ob_size
      </Item>
      <ArrayItems Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyLong_Type">
        <Size>((python36.dll!PyLongObject *)this)->ob_base.ob_size</Size>
        <ValuePointer>
          ((python36.dll!PyLongObject *)this)->ob_digit
        </ValuePointer>
      </ArrayItems>

      <!-- Bytes -->
      <Item Name="Bytes Data" Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyBytes_Type">
        (char *)((python36.dll!PyBytesObject *)this)->ob_sval
      </Item>

      <!-- Strings -->
      <!-- General state (shared among all string representations) -->
      <Item Name="String State" Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyUnicode_Type">
        ((python36.dll!PyASCIIObject *)this)->state
      </Item>
      
      <!-- Compact ASCII strings -->
      <Item Name="ASCII String Object" Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyUnicode_Type &amp;&amp;
                                                  ((python36.dll!PyASCIIObject *)this)->state.ascii &amp;&amp;
                                                  ((python36.dll!PyASCIIObject *)this)->state.compact">
        (python36.dll!PyASCIIObject *)this
      </Item>
      <Item Name="ASCII Data" Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyUnicode_Type &amp;&amp;
                                         ((python36.dll!PyASCIIObject *)this)->state.ascii &amp;&amp;
                                         ((python36.dll!PyASCIIObject *)this)->state.compact">
        (char *)(((python36.dll!PyASCIIObject *)this) + 1)
      </Item>

      <!-- Compact Unicode strings -->
      <Item Name="Compact Unicode String Object" Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyUnicode_Type &amp;&amp;
                                                            ((python36.dll!PyASCIIObject *)this)->state.ascii == 0 &amp;&amp;
                                                            ((python36.dll!PyASCIIObject *)this)->state.compact">
        (python36.dll!PyCompactUnicodeObject *)this
      </Item>

      <!-- Non-compact Unicode strings -->
      <Item Name="Unicode String Object" Condition="(python36.dll!_typeobject *)ob_type == &amp;python36.dll!PyUnicode_Type &amp;&amp;
                                                    ((python36.dll!PyASCIIObject *)this)->state.ascii == 0 &amp;&amp;
                                                    ((python36.dll!PyASCIIObject *)this)->state.compact == 0">
        (python36.dll!PyUnicodeObject *)this
      </Item>

      <!-- End Strings -->
    </Expand>
  </Type>
</AutoVisualizer>