FreeBSD/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
/*
 * Resolve a tdesc down to a node which should have a size.  Returns the size,
 * zero if the size hasn't yet been determined.
 */
Resolve a tdesc down to a node which should have a size.  Returns the size,
zero if the size hasn't yet been determined.
Resolve a tdesc down to a node which should have a size . Returns the size zero if the size hasn ' t yet been determined .
static size_t
tdesc_size(tdesc_t *tdp)
{
	for (;;) {
		switch (tdp->t_type) {
		case INTRINSIC:
		case POINTER:
		case ARRAY:
		case FUNCTION:
		case STRUCT:
		case UNION:
		case ENUM:
			return (tdp->t_size);
		case FORWARD:
			return (0);
		case TYPEDEF:
		case VOLATILE:
		case CONST:
		case RESTRICT:
			tdp = tdp->t_tdesc;
			continue;
		case 0: 
			return (0);
		default:
			terminate("tdp %u: tdesc_size on unknown type %d\n",
			    tdp->t_id, tdp->t_type);
		}
	}
}
static size_t tdesc_size ( tdesc_t * tdp ) { for ( ; ; ) { switch ( tdp -> t_type ) { case INTRINSIC : case POINTER : case ARRAY : case FUNCTION : case STRUCT : case UNION : case ENUM : return ( tdp -> t_size ) ; case FORWARD : return ( 0 ) ; case TYPEDEF : case VOLATILE : case CONST : case RESTRICT : tdp = tdp -> t_tdesc ; continue ; case 0 : return ( 0 ) ; default : terminate ( " \n " , tdp -> t_id , tdp -> t_type ) ; } } }
Resolve a tdesc down to a node which should have a size.
Resolve a tdesc down to a node which should have a size .
/* not yet defined */