def invoke(self, obj: gdb.Value, type: gdb.Value) -> gdb.Value:
        try:
            type_string = type.string()
        except gdb.error:
            raise gdb.error('the second argument must be literal string')

        try:
            dispatch = self._dispatch[parse_type(obj)]
        except KeyError:
            raise gdb.error(
                'the first argument must be of supported types: interface, literal address, void*'
            )

        return dispatch(obj, type_string)
示例#2
0
 def string_value(self, value: gdb.Value) -> str:
     return value.string()