Punch lint in the face
[hiphop-php.git] / hphp / tools / gdb / deref.py
blob24100b705d6462a2d7eae43be794116d0151130b
1 """
2 GDB convenience function for dereferencing arbitrary pointery types.
3 """
4 # @lint-avoid-python-3-compatibility-imports
5 # @lint-avoid-pyflakes3
6 # @lint-avoid-pyflakes2
8 import gdb
9 from gdbutils import *
12 #------------------------------------------------------------------------------
13 # `deref' function.
15 class DerefFunction(gdb.Function):
16 def __init__(self):
17 super(DerefFunction, self).__init__('deref')
19 def invoke(self, val):
20 return deref(val)
22 DerefFunction._DerefFunction__doc__ = deref.__doc__
24 DerefFunction()