1c9bd843ebc00801cc418156a3893362a1dc872edinak * CDDL HEADER START
1c9bd843ebc00801cc418156a3893362a1dc872edinak * The contents of this file are subject to the terms of the
1c9bd843ebc00801cc418156a3893362a1dc872edinak * Common Development and Distribution License, Version 1.0 only
1c9bd843ebc00801cc418156a3893362a1dc872edinak * (the "License"). You may not use this file except in compliance
1c9bd843ebc00801cc418156a3893362a1dc872edinak * with the License.
1c9bd843ebc00801cc418156a3893362a1dc872edinak * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1c9bd843ebc00801cc418156a3893362a1dc872edinak * See the License for the specific language governing permissions
1c9bd843ebc00801cc418156a3893362a1dc872edinak * and limitations under the License.
1c9bd843ebc00801cc418156a3893362a1dc872edinak * When distributing Covered Code, include this CDDL HEADER in each
1c9bd843ebc00801cc418156a3893362a1dc872edinak * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1c9bd843ebc00801cc418156a3893362a1dc872edinak * If applicable, add the following below this CDDL HEADER, with the
1c9bd843ebc00801cc418156a3893362a1dc872edinak * fields enclosed by brackets "[]" replaced with your own identifying
1c9bd843ebc00801cc418156a3893362a1dc872edinak * information: Portions Copyright [yyyy] [name of copyright owner]
1c9bd843ebc00801cc418156a3893362a1dc872edinak * CDDL HEADER END
1c9bd843ebc00801cc418156a3893362a1dc872edinak * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
1c9bd843ebc00801cc418156a3893362a1dc872edinak * Use is subject to license terms.
1c9bd843ebc00801cc418156a3893362a1dc872edinak#pragma ident "%Z%%M% %I% %E% SMI"
1c9bd843ebc00801cc418156a3893362a1dc872edinakextern void oprgetstatus(kthread_t *, prstatus_t *, zone_t *);
1c9bd843ebc00801cc418156a3893362a1dc872edinakextern void oprgetpsinfo(proc_t *, prpsinfo_t *, kthread_t *);
1c9bd843ebc00801cc418156a3893362a1dc872edinak#if defined(__sparc)
1c9bd843ebc00801cc418156a3893362a1dc872edinak * Figure out the number and sizes of register windows.
1c9bd843ebc00801cc418156a3893362a1dc872edinak sizeof (struct rwindow);
1c9bd843ebc00801cc418156a3893362a1dc872edinak#endif /* __sparc */
1c9bd843ebc00801cc418156a3893362a1dc872edinakwrite_old_elfnotes(proc_t *p, int sig, vnode_t *vp, offset_t offset,
1c9bd843ebc00801cc418156a3893362a1dc872edinak#if defined(__sparc)
1c9bd843ebc00801cc418156a3893362a1dc872edinak#endif /* __sparc */
1c9bd843ebc00801cc418156a3893362a1dc872edinak size_t bigsize = MAX(sizeof (*bigwad), (size_t)xregsize);
1c9bd843ebc00801cc418156a3893362a1dc872edinak * The order of the elfnote entries should be same here and in
1c9bd843ebc00801cc418156a3893362a1dc872edinak * the gcore(1) command. Synchronization is needed between the
1c9bd843ebc00801cc418156a3893362a1dc872edinak * kernel and libproc's Pfgcore() function where the meat of
if (error)
goto done;
if (error)
goto done;
for (i = 0; i < __KERN_NAUXV_IMPL; i++) {
if (error)
goto done;
t = curthread;
nlwp--;
if (t == curthread) {
t->t_whystop = 0;
if (error)
goto done;
if (prhasfp()) {
if (error)
goto done;
#if defined(__sparc)
if (size != 0) {
sizeof (struct rwindow);
if (error)
goto done;
if (xregsize) {
if (error)
goto done;
done:
return (error);