proc_service.h revision 146818
133965Sjdp/* 278828Sobrien * Copyright (c) 2004 David Xu <davidxu@freebsd.org> 3218822Sdim * Copyright (c) 2004 Marcel Moolenaar 433965Sjdp * All rights reserved. 533965Sjdp * 633965Sjdp * Redistribution and use in source and binary forms, with or without 7130561Sobrien * modification, are permitted provided that the following conditions 833965Sjdp * are met: 9130561Sobrien * 1. Redistributions of source code must retain the above copyright 10130561Sobrien * notice, this list of conditions and the following disclaimer. 11130561Sobrien * 2. Redistributions in binary form must reproduce the above copyright 12130561Sobrien * notice, this list of conditions and the following disclaimer in the 1333965Sjdp * documentation and/or other materials provided with the distribution. 14130561Sobrien * 15130561Sobrien * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 16130561Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17130561Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1833965Sjdp * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 19130561Sobrien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20130561Sobrien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21218822Sdim * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2233965Sjdp * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2333965Sjdp * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2433965Sjdp * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2533965Sjdp * SUCH DAMAGE. 2633965Sjdp * 2733965Sjdp * $FreeBSD: head/include/proc_service.h 146818 2005-05-31 09:43:04Z dfr $ 2833965Sjdp */ 2960484Sobrien 3033965Sjdp#ifndef _PROC_SERVICE_H_ 3133965Sjdp#define _PROC_SERVICE_H_ 3233965Sjdp 3333965Sjdp#include <sys/types.h> 3433965Sjdp#include <sys/procfs.h> 3533965Sjdp 3633965Sjdptypedef enum { 3733965Sjdp PS_OK = 0, /* No errors. */ 3833965Sjdp PS_ERR, /* Generic error. */ 3933965Sjdp PS_BADADDR, /* Bad address. */ 4033965Sjdp PS_BADLID, /* Bad LWP Id. */ 4133965Sjdp PS_BADPID, /* Bad process Id. */ 4233965Sjdp PS_NOFREGS, /* FPU register set not available. */ 4333965Sjdp PS_NOSYM /* Symbol not found. */ 4433965Sjdp} ps_err_e; 4533965Sjdp 4633965Sjdpstruct ps_prochandle; /* Opaque type. Defined by the implementor. */ 4733965Sjdp 4833965Sjdp__BEGIN_DECLS 4933965Sjdpps_err_e ps_lcontinue(struct ps_prochandle *, lwpid_t); 50218822Sdimps_err_e ps_lgetfpregs(struct ps_prochandle *, lwpid_t, prfpregset_t *); 5133965Sjdpps_err_e ps_lgetregs(struct ps_prochandle *, lwpid_t, prgregset_t); 5233965Sjdpps_err_e ps_lsetfpregs(struct ps_prochandle *, lwpid_t, const prfpregset_t *); 5333965Sjdpps_err_e ps_lsetregs(struct ps_prochandle *, lwpid_t, const prgregset_t); 5433965Sjdp#ifdef __i386__ 5533965Sjdpps_err_e ps_lgetxmmregs (struct ps_prochandle *, lwpid_t, char *); 5633965Sjdpps_err_e ps_lsetxmmregs (struct ps_prochandle *, lwpid_t, const char *); 5733965Sjdp#endif 5833965Sjdpps_err_e ps_lstop(struct ps_prochandle *, lwpid_t); 5933965Sjdpps_err_e ps_pcontinue(struct ps_prochandle *); 6033965Sjdpps_err_e ps_pdmodel(struct ps_prochandle *, int *); 6133965Sjdpps_err_e ps_pglobal_lookup(struct ps_prochandle *, const char *, const char *, 6233965Sjdp psaddr_t *); 6333965Sjdpvoid ps_plog(const char *, ...); 6433965Sjdpps_err_e ps_pread(struct ps_prochandle *, psaddr_t, void *, size_t); 6533965Sjdpps_err_e ps_pstop(struct ps_prochandle *); 6633965Sjdpps_err_e ps_pwrite(struct ps_prochandle *, psaddr_t, const void *, size_t); 6733965Sjdp__END_DECLS 6891041Sobrien 6933965Sjdp#endif /* _PROC_SERVICE_H_ */ 7033965Sjdp