Back to index

glibc  2.9
proc_service.h
Go to the documentation of this file.
00001 /* Copyright (C) 1999 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 /* The definitions in this file must correspond to those in the debugger.  */
00020 #include <sys/procfs.h>
00021 
00022 typedef enum
00023 {
00024   PS_OK,          /* generic "call succeeded" */
00025   PS_ERR,         /* generic. */
00026   PS_BADPID,      /* bad process handle */
00027   PS_BADLID,      /* bad lwp identifier */
00028   PS_BADADDR,     /* bad address */
00029   PS_NOSYM,       /* p_lookup() could not find given symbol */
00030         PS_NOFREGS
00031   /*
00032    * FPU register set not available for given
00033    * lwp
00034    */
00035 }       ps_err_e;
00036 
00037 
00038 struct ps_prochandle;              /* user defined. */
00039 
00040 
00041 extern ps_err_e ps_pdread(struct ps_prochandle *,
00042                         psaddr_t, void *, size_t);
00043 extern ps_err_e ps_pdwrite(struct ps_prochandle *,
00044                         psaddr_t, const void *, size_t);
00045 extern ps_err_e ps_ptread(struct ps_prochandle *,
00046                         psaddr_t, void *, size_t);
00047 extern ps_err_e ps_ptwrite(struct ps_prochandle *,
00048                         psaddr_t, const void *, size_t);
00049 
00050 extern ps_err_e ps_pglobal_lookup(struct ps_prochandle *,
00051         const char *object_name, const char *sym_name, psaddr_t *sym_addr);
00052 
00053 
00054 extern ps_err_e ps_lgetregs(struct ps_prochandle *,
00055                         lwpid_t, prgregset_t);
00056 extern ps_err_e ps_lsetregs(struct ps_prochandle *,
00057                         lwpid_t, const prgregset_t);
00058 extern ps_err_e ps_lgetfpregs(struct ps_prochandle *,
00059                         lwpid_t, prfpregset_t *);
00060 extern ps_err_e ps_lsetfpregs(struct ps_prochandle *,
00061                         lwpid_t, const prfpregset_t *);
00062 
00063 extern pid_t ps_getpid (struct ps_prochandle *);
00064 
00065 
00066 extern ps_err_e ps_pstop (const struct ps_prochandle *);
00067 extern ps_err_e ps_pcontinue (const struct ps_prochandle *);
00068 
00069 extern ps_err_e ps_lstop (const struct ps_prochandle *, lwpid_t);
00070 extern ps_err_e ps_lcontinue (const struct ps_prochandle *, lwpid_t);