/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 2012, Joyent, Inc. All rights reserved.
*/
/*
* Libkvm Kernel Target Intel component
*
* This file provides the Intel-dependent portion of the libkvm kernel target.
* For more details on the implementation refer to mdb_kvm.c.
*/
#include <mdb/mdb_target_impl.h>
#include <mdb/mdb_kreg_impl.h>
#include <mdb/mdb_errno.h>
#include <mdb/kvm_isadep.h>
#include <sys/privmregs.h>
int
{
return (set_errno(EMDB_NOREGS));
*rp &= 0xffffffffULL;
*rp &= 0xffffULL;
*rp &= 0xffULL;
return (0);
}
}
return (set_errno(EMDB_BADREG));
}
int
{
return (set_errno(EMDB_NOREGS));
r &= 0xffffffffULL;
r &= 0xffffULL;
r = (r & 0xffULL) << 8;
r &= 0xffULL;
return (0);
}
}
return (set_errno(EMDB_BADREG));
}
int
{
int ret;
return (ret);
return (0);
}
static int
{
return (-1);
}
int
{
int i;
if (flags & DCMD_ADDRSPEC) {
(void) set_errno(EMDB_NOMAP);
return (DCMD_ERR);
}
flags &= ~DCMD_ADDRSPEC;
}
NULL);
argc -= i;
argv += i;
return (DCMD_ERR);
}
/*
* Tell the stack walker that we have regs.
*/
flags |= DCMD_ADDRSPEC;
if (verbose)
else
}
/*ARGSUSED*/
int
{
int i;
if (flags & DCMD_ADDRSPEC) {
if (argc != 0)
return (DCMD_USAGE);
(void) set_errno(EMDB_NOMAP);
return (DCMD_ERR);
}
}
NULL);
argc -= i;
argv += i;
if (argc != 0)
return (DCMD_USAGE);
return (DCMD_ERR);
}
}