(type_str)
A utility function to deduce the gdb.Type value from a string
        representing the type.

        Arguments:
            type_str: The type string from which the gdb.Type value should be
                      deduced.

        Returns:
            The deduced gdb.Type value if possible, None otherwise.
A utility function to deduce the gdb.Type value from a string
        representing the type.
A utility function to deduce the gdb . Type value from a string representing the type .
def get_type_from_str(type_str):
        """A utility function to deduce the gdb.Type value from a string
        representing the type.

        Arguments:
            type_str: The type string from which the gdb.Type value should be
                      deduced.

        Returns:
            The deduced gdb.Type value if possible, None otherwise.
        """
        try:
            # Assume the current language to be C/C++ and make a try.
            return gdb.parse_and_eval("(%s *)0" % type_str).type.target()
        except RuntimeError:
            # If assumption of current language to be C/C++ was wrong, then
            # lookup the type using the API.
            try:
                return gdb.lookup_type(type_str)
            except RuntimeError:
                return None
def get_type_from_str ( type_str ) : try : # Assume the current language to be C/C++ and make a try. return gdb . parse_and_eval ( "(%s *)0" % type_str ) . type . target ( ) except RuntimeError : # If assumption of current language to be C/C++ was wrong, then # lookup the type using the API. try : return gdb . lookup_type ( type_str ) except RuntimeError : return None