GDBserver
/home/stan/gdb/src/gdb/gdbserver/gdb_proc_service.h
Go to the documentation of this file.
00001 /* <proc_service.h> replacement for systems that don't have it.
00002    Copyright (C) 2000-2013 Free Software Foundation, Inc.
00003 
00004    This file is part of GDB.
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 3 of the License, or
00009    (at your option) any later version.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
00018 
00019 #ifndef GDB_PROC_SERVICE_H
00020 #define GDB_PROC_SERVICE_H
00021 
00022 #include <sys/types.h>
00023 
00024 #ifdef HAVE_PROC_SERVICE_H
00025 #include <proc_service.h>
00026 #else
00027 
00028 #ifdef HAVE_SYS_PROCFS_H
00029 #include <sys/procfs.h>
00030 #endif
00031 
00032 /* Not all platforms bring in <linux/elf.h> via <sys/procfs.h>.  If
00033    <sys/procfs.h> wasn't enough to find elf_fpregset_t, try the kernel
00034    headers also (but don't if we don't need to).  */
00035 #ifndef HAVE_ELF_FPREGSET_T
00036 # ifdef HAVE_LINUX_ELF_H
00037 #  include <linux/elf.h>
00038 # endif
00039 #endif
00040 
00041 typedef enum
00042 {
00043   PS_OK,                        /* Success.  */
00044   PS_ERR,                       /* Generic error.  */
00045   PS_BADPID,                    /* Bad process handle.  */
00046   PS_BADLID,                    /* Bad LWP id.  */
00047   PS_BADADDR,                   /* Bad address.  */
00048   PS_NOSYM,                     /* Symbol not found.  */
00049   PS_NOFREGS                    /* FPU register set not available.  */
00050 } ps_err_e;
00051 
00052 #ifndef HAVE_LWPID_T
00053 typedef unsigned int lwpid_t;
00054 #endif
00055 
00056 #ifndef HAVE_PSADDR_T
00057 typedef void *psaddr_t;
00058 #endif
00059 
00060 #ifndef HAVE_PRGREGSET_T
00061 typedef elf_gregset_t prgregset_t;
00062 #endif
00063 
00064 #endif /* HAVE_PROC_SERVICE_H */
00065 
00066 /* Structure that identifies the target process.  */
00067 struct ps_prochandle
00068 {
00069   /* We don't need to track anything.  All context is served from the
00070      current inferior.  */
00071 };
00072 
00073 #endif /* gdb_proc_service.h */
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines