Definition at line 12 of file pointerprint.py.
◆ __init__()
| python.pointerprint.VPointerPrinter.__init__ |
( |
| self, |
|
|
| val ) |
Definition at line 13 of file pointerprint.py.
13 def __init__ (self, val):
14 self.val = val
15
16
◆ to_string()
| python.pointerprint.VPointerPrinter.to_string |
( |
| self | ) |
|
Definition at line 55 of file pointerprint.py.
56 return "(%s) 0x%x%s" % (self.val.type, int(self.val), self.vtstring())
57
58
59
60
61
◆ vtstring()
| python.pointerprint.VPointerPrinter.vtstring |
( |
| self | ) |
|
Definition at line 43 of file pointerprint.py.
43 def vtstring (self):
44 if self.val == 0: return ''
45 vpptype = gdb.lookup_type('void').pointer().pointer()
46 vt = self.val.cast(vpptype).dereference()
47 out = self.vtstring1 (vt)
48 if not out:
49
50 findlib (int(vt), True)
51 out = self.vtstring1 (vt)
52 return out
53
54
◆ vtstring1()
| python.pointerprint.VPointerPrinter.vtstring1 |
( |
| self, |
|
|
| vt ) |
Definition at line 17 of file pointerprint.py.
17 def vtstring1 (self, vt):
18 olddem = gdb.parameter('print asm-demangle')
19 out = ''
20 try:
21 try:
22 gdb.execute ('set print asm-demangle on')
23 out = gdb.execute ('x/x 0x%x' % int(vt), to_string = True)
24 except:
25
26 pass
27 finally:
28 if not olddem:
29 gdb.execute ('set print asm-demangle off')
30 i = out.find ('<vtable for ')
31 if i >= 0:
32 i += 12
33 j = out.rfind ('>')
34 if j >= 0:
35 jj = out.rfind ('+', i, j)
36 if jj >= 0:
37 j = jj
38 return '<' + out[i:j] + '>'
39
40 return ''
41
42
◆ val
| python.pointerprint.VPointerPrinter.val = val |
The documentation for this class was generated from the following file: