1*deef35fdSEric Schrock /* 2*deef35fdSEric Schrock * CDDL HEADER START 3*deef35fdSEric Schrock * 4*deef35fdSEric Schrock * The contents of this file are subject to the terms of the 5*deef35fdSEric Schrock * Common Development and Distribution License (the "License"). 6*deef35fdSEric Schrock * You may not use this file except in compliance with the License. 7*deef35fdSEric Schrock * 8*deef35fdSEric Schrock * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*deef35fdSEric Schrock * or http://www.opensolaris.org/os/licensing. 10*deef35fdSEric Schrock * See the License for the specific language governing permissions 11*deef35fdSEric Schrock * and limitations under the License. 12*deef35fdSEric Schrock * 13*deef35fdSEric Schrock * When distributing Covered Code, include this CDDL HEADER in each 14*deef35fdSEric Schrock * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*deef35fdSEric Schrock * If applicable, add the following below this CDDL HEADER, with the 16*deef35fdSEric Schrock * fields enclosed by brackets "[]" replaced with your own identifying 17*deef35fdSEric Schrock * information: Portions Copyright [yyyy] [name of copyright owner] 18*deef35fdSEric Schrock * 19*deef35fdSEric Schrock * CDDL HEADER END 20*deef35fdSEric Schrock */ 21*deef35fdSEric Schrock 22*deef35fdSEric Schrock /* 23*deef35fdSEric Schrock * Copyright (c) 2011 by Delphix. All rights reserved. 24*deef35fdSEric Schrock */ 25*deef35fdSEric Schrock 26*deef35fdSEric Schrock #pragma D option quiet 27*deef35fdSEric Schrock 28*deef35fdSEric Schrock typedef struct bar { 29*deef35fdSEric Schrock int alpha; 30*deef35fdSEric Schrock } bar_t; 31*deef35fdSEric Schrock 32*deef35fdSEric Schrock typedef struct foo { 33*deef35fdSEric Schrock int a[3]; 34*deef35fdSEric Schrock char b[30]; 35*deef35fdSEric Schrock bar_t c[2]; 36*deef35fdSEric Schrock char d[3]; 37*deef35fdSEric Schrock } foo_t; 38*deef35fdSEric Schrock 39*deef35fdSEric Schrock BEGIN 40*deef35fdSEric Schrock { 41*deef35fdSEric Schrock this->f = (foo_t *)alloca(sizeof (foo_t)); 42*deef35fdSEric Schrock 43*deef35fdSEric Schrock this->f->a[0] = 1; 44*deef35fdSEric Schrock this->f->a[1] = 2; 45*deef35fdSEric Schrock this->f->a[2] = 3; 46*deef35fdSEric Schrock this->f->b[0] = 'a'; 47*deef35fdSEric Schrock this->f->b[1] = 'b'; 48*deef35fdSEric Schrock this->f->b[2] = 0; 49*deef35fdSEric Schrock this->f->c[0].alpha = 5; 50*deef35fdSEric Schrock this->f->c[1].alpha = 6; 51*deef35fdSEric Schrock this->f->c[2].alpha = 7; 52*deef35fdSEric Schrock this->f->d[0] = 4; 53*deef35fdSEric Schrock this->f->d[1] = 0; 54*deef35fdSEric Schrock this->f->d[2] = 0; 55*deef35fdSEric Schrock 56*deef35fdSEric Schrock print(this->f->a); 57*deef35fdSEric Schrock print(this->f->b); 58*deef35fdSEric Schrock print(this->f->c); 59*deef35fdSEric Schrock print(*this->f); 60*deef35fdSEric Schrock 61*deef35fdSEric Schrock exit(0); 62*deef35fdSEric Schrock } 63