third_party/blink/tools/gdb/blink.py
def lookup_function(val):
        """Function used to load pretty printers; will be passed to GDB."""
        type = val.type
        if type.code == gdb.TYPE_CODE_REF:
            type = type.target()
        type = type.unqualified().strip_typedefs()
        tag = type.tag
        if tag:
            for function, pretty_printer in pretty_printers:
                if function.search(tag):
                    return pretty_printer(val)

        if type.code == gdb.TYPE_CODE_PTR:
            name = str(type.target().unqualified())
            if name == 'UChar':
                return UCharStringPrinter(val)
            if name == 'LChar':
                return LCharStringPrinter(val)
        return None
Function used to load pretty printers; will be passed to GDB.
Function used to load pretty printers; will be passed to GDB.
Function used to load pretty printers ; will be passed to GDB .
def lookup_function(val):
        type = val.type
        if type.code == gdb.TYPE_CODE_REF:
            type = type.target()
        type = type.unqualified().strip_typedefs()
        tag = type.tag
        if tag:
            for function, pretty_printer in pretty_printers:
                if function.search(tag):
                    return pretty_printer(val)
        if type.code == gdb.TYPE_CODE_PTR:
            name = str(type.target().unqualified())
            if name == 'UChar':
                return UCharStringPrinter(val)
            if name == 'LChar':
                return LCharStringPrinter(val)
        return None
def lookup_function ( val ) : type = val . type if type . code == gdb . TYPE_CODE_REF : type = type . target ( ) type = type . unqualified ( ) . strip_typedefs ( ) tag = type . tag if tag : for function , pretty_printer in pretty_printers : if function . search ( tag ) : return pretty_printer ( val ) if type . code == gdb . TYPE_CODE_PTR : name = str ( type . target ( ) . unqualified ( ) ) if name == 'UChar' : return UCharStringPrinter ( val ) if name == 'LChar' : return LCharStringPrinter ( val ) return None
Function used to load pretty printers; will be passed to GDB.
Function used to load pretty printers ; will be passed to GDB .
"""Function used to load pretty printers; will be passed to GDB."""
val