proc_service.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /* Copyright (C) 1999 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3. The GNU C Library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Lesser General Public
  5. License as published by the Free Software Foundation; either
  6. version 2.1 of the License, or (at your option) any later version.
  7. The GNU C Library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public
  12. License along with the GNU C Library; if not, write to the Free
  13. Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  14. 02111-1307 USA. */
  15. /* The definitions in this file must correspond to those in the debugger. */
  16. #include <sys/procfs.h>
  17. typedef enum
  18. {
  19. PS_OK, /* generic "call succeeded" */
  20. PS_ERR, /* generic. */
  21. PS_BADPID, /* bad process handle */
  22. PS_BADLID, /* bad lwp identifier */
  23. PS_BADADDR, /* bad address */
  24. PS_NOSYM, /* p_lookup() could not find given symbol */
  25. PS_NOFREGS
  26. /*
  27. * FPU register set not available for given
  28. * lwp
  29. */
  30. } ps_err_e;
  31. struct ps_prochandle; /* user defined. */
  32. extern ps_err_e ps_pdread(struct ps_prochandle *,
  33. psaddr_t, void *, size_t);
  34. extern ps_err_e ps_pdwrite(struct ps_prochandle *,
  35. psaddr_t, const void *, size_t);
  36. extern ps_err_e ps_ptread(struct ps_prochandle *,
  37. psaddr_t, void *, size_t);
  38. extern ps_err_e ps_ptwrite(struct ps_prochandle *,
  39. psaddr_t, const void *, size_t);
  40. extern ps_err_e ps_pglobal_lookup(struct ps_prochandle *,
  41. const char *object_name, const char *sym_name, psaddr_t *sym_addr);
  42. extern ps_err_e ps_lgetregs(struct ps_prochandle *,
  43. lwpid_t, prgregset_t);
  44. extern ps_err_e ps_lsetregs(struct ps_prochandle *,
  45. lwpid_t, const prgregset_t);
  46. extern ps_err_e ps_lgetfpregs(struct ps_prochandle *,
  47. lwpid_t, prfpregset_t *);
  48. extern ps_err_e ps_lsetfpregs(struct ps_prochandle *,
  49. lwpid_t, const prfpregset_t *);
  50. extern pid_t ps_getpid (struct ps_prochandle *);
  51. extern ps_err_e ps_pstop (const struct ps_prochandle *);
  52. extern ps_err_e ps_pcontinue (const struct ps_prochandle *);
  53. extern ps_err_e ps_lstop (const struct ps_prochandle *, lwpid_t);
  54. extern ps_err_e ps_lcontinue (const struct ps_prochandle *, lwpid_t);