ATLAS Offline Software
Loading...
Searching...
No Matches
python.pointerprint Namespace Reference

Classes

class  VPointerPrinter

Functions

 lookup_vpointer_function (val)

Function Documentation

◆ lookup_vpointer_function()

python.pointerprint.lookup_vpointer_function ( val)

Definition at line 62 of file pointerprint.py.

62def lookup_vpointer_function (val):
63 "Look-up and return a pretty-printer that can print val."
64
65 # Get the type.
66 type = val.type
67
68 # If it points to a reference, get the reference.
69 if type.code == gdb.TYPE_CODE_REF:
70 type = type.target ()
71
72 # Get the unqualified type, stripped of typedefs.
73 type = type.unqualified ().strip_typedefs ()
74
75 if type.code != gdb.TYPE_CODE_PTR:
76 return
77
78 #if str(type.target()).startswith ('class '):
79 if type.target().code == gdb.TYPE_CODE_STRUCT:
80 return VPointerPrinter(val)
81
82 # Cannot find a pretty printer. Return None.
83 return None
84
85