]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/gdbserver/gdb_proc_service.h
Update year range in copyright notice of all files owned by the GDB project.
[thirdparty/binutils-gdb.git] / gdb / gdbserver / gdb_proc_service.h
1 /* <proc_service.h> replacement for systems that don't have it.
2 Copyright (C) 2000-2015 Free Software Foundation, Inc.
3
4 This file is part of GDB.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18
19 #ifndef GDB_PROC_SERVICE_H
20 #define GDB_PROC_SERVICE_H
21
22 #include <sys/types.h>
23
24 #ifdef HAVE_PROC_SERVICE_H
25 #include <proc_service.h>
26 #else
27
28 #ifdef HAVE_SYS_PROCFS_H
29 #include <sys/procfs.h>
30 #endif
31
32 /* Not all platforms bring in <linux/elf.h> via <sys/procfs.h>. If
33 <sys/procfs.h> wasn't enough to find elf_fpregset_t, try the kernel
34 headers also (but don't if we don't need to). */
35 #ifndef HAVE_ELF_FPREGSET_T
36 # ifdef HAVE_LINUX_ELF_H
37 # include <linux/elf.h>
38 # endif
39 #endif
40
41 typedef enum
42 {
43 PS_OK, /* Success. */
44 PS_ERR, /* Generic error. */
45 PS_BADPID, /* Bad process handle. */
46 PS_BADLID, /* Bad LWP id. */
47 PS_BADADDR, /* Bad address. */
48 PS_NOSYM, /* Symbol not found. */
49 PS_NOFREGS /* FPU register set not available. */
50 } ps_err_e;
51
52 #ifndef HAVE_LWPID_T
53 typedef unsigned int lwpid_t;
54 #endif
55
56 #ifndef HAVE_PSADDR_T
57 typedef void *psaddr_t;
58 #endif
59
60 #ifndef HAVE_PRGREGSET_T
61 typedef elf_gregset_t prgregset_t;
62 #endif
63
64 #endif /* HAVE_PROC_SERVICE_H */
65
66 /* Structure that identifies the target process. */
67 struct ps_prochandle
68 {
69 /* We don't need to track anything. All context is served from the
70 current inferior. */
71 };
72
73 #endif /* gdb_proc_service.h */