9512fe850e98fdd448c638ca63fdd92a8a510255ahl/*
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * CDDL HEADER START
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * The contents of this file are subject to the terms of the
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Common Development and Distribution License (the "License").
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * You may not use this file except in compliance with the License.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * or http://www.opensolaris.org/os/licensing.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * See the License for the specific language governing permissions
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * and limitations under the License.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * When distributing Covered Code, include this CDDL HEADER in each
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * If applicable, add the following below this CDDL HEADER, with the
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * fields enclosed by brackets "[]" replaced with your own identifying
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * information: Portions Copyright [yyyy] [name of copyright owner]
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * CDDL HEADER END
9512fe850e98fdd448c638ca63fdd92a8a510255ahl */
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl/*
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Use is subject to license terms.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl */
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#pragma ident "%Z%%M% %I% %E% SMI"
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl/*
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * ASSERTION:
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Positive test to make sure that we can invoke x86
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * ureg[] aliases.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * SECTION: User Process Tracing/uregs Array
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * NOTES: This test does no verification - the value of the output
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * is not deterministic.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl */
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#pragma D option quiet
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahlBEGIN
9512fe850e98fdd448c638ca63fdd92a8a510255ahl{
9512fe850e98fdd448c638ca63fdd92a8a510255ahl printf("R_GS = 0x%x\n", uregs[R_GS]);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl printf("R_ES = 0x%x\n", uregs[R_ES]);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl printf("R_DS = 0x%x\n", uregs[R_DS]);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl printf("R_EDI = 0x%x\n", uregs[R_EDI]);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl printf("R_ESI = 0x%x\n", uregs[R_ESI]);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl printf("R_EBP = 0x%x\n", uregs[R_EBP]);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl printf("R_EBX = 0x%x\n", uregs[R_EBX]);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl printf("R_EDX = 0x%x\n", uregs[R_EDX]);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl printf("R_ECX = 0x%x\n", uregs[R_ECX]);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl printf("R_EAX = 0x%x\n", uregs[R_EAX]);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl printf("R_TRAPNO = 0x%x\n", uregs[R_TRAPNO]);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl printf("R_ERR = 0x%x\n", uregs[R_ERR]);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl printf("R_EIP = 0x%x\n", uregs[R_EIP]);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl printf("R_CS = 0x%x\n", uregs[R_CS]);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl printf("R_EFL = 0x%x\n", uregs[R_EFL]);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl printf("R_UESP = 0x%x\n", uregs[R_UESP]);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl printf("R_SS = 0x%x\n", uregs[R_SS]);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl exit(0);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl}