xref: /csrg-svn/lib/libc/sparc/sys/ptrace.s (revision 61176)
154406Storek/*
2*61176Sbostic * Copyright (c) 1992, 1993
3*61176Sbostic *	The Regents of the University of California.  All rights reserved.
454406Storek *
554406Storek * This software was developed by the Computer Systems Engineering group
654406Storek * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
754406Storek * contributed to Berkeley.
854406Storek *
954406Storek * %sccs.include.redist.c%
1054406Storek *
1154406Storek * from: $Header: ptrace.s,v 1.2 91/12/20 01:59:00 leres Exp $
1254406Storek */
1354406Storek
1454406Storek#if defined(LIBC_SCCS) && !defined(lint)
15*61176Sbostic	.asciz "@(#)ptrace.s	8.1 (Berkeley) 06/04/93"
1654406Storek#endif /* LIBC_SCCS and not lint */
1754406Storek
1854406Storek#include "SYS.h"
1954406Storek
2054406StorekENTRY(ptrace)
2154406Storek	sethi	%hi(_errno), %g1
2254406Storek	st	%g0, [%g1 + %lo(_errno)]
2354406Storek	mov	SYS_ptrace, %g1
2454406Storek	t	ST_SYSCALL
2554406Storek	bcc	1f
2654406Storek	nop
2754406Storek	ERROR()
2854406Storek1:
2954406Storek	retl
3054406Storek	nop
31