adapt for vax.diff -r1.8 -r1.9 src/external/gpl3/gdb/dist/gdb/vaxbsd-nat.c
(christos)
--- src/external/gpl3/gdb/dist/gdb/Attic/vaxbsd-nat.c 2015/08/16 09:58:29 1.8
+++ src/external/gpl3/gdb/dist/gdb/Attic/vaxbsd-nat.c 2016/03/24 00:38:40 1.9
@@ -7,26 +7,27 @@ | @@ -7,26 +7,27 @@ | |||
7 | This program is free software; you can redistribute it and/or modify | 7 | This program is free software; you can redistribute it and/or modify | |
8 | it under the terms of the GNU General Public License as published by | 8 | it under the terms of the GNU General Public License as published by | |
9 | the Free Software Foundation; either version 3 of the License, or | 9 | the Free Software Foundation; either version 3 of the License, or | |
10 | (at your option) any later version. | 10 | (at your option) any later version. | |
11 | 11 | |||
12 | This program is distributed in the hope that it will be useful, | 12 | This program is distributed in the hope that it will be useful, | |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. | |
16 | 16 | |||
17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License | |
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
19 | 19 | |||
20 | #define _KERNTYPES | |||
20 | #include "defs.h" | 21 | #include "defs.h" | |
21 | #include "inferior.h" | 22 | #include "inferior.h" | |
22 | #include "regcache.h" | 23 | #include "regcache.h" | |
23 | #include "target.h" | 24 | #include "target.h" | |
24 | 25 | |||
25 | #include <sys/types.h> | 26 | #include <sys/types.h> | |
26 | #include <sys/ptrace.h> | 27 | #include <sys/ptrace.h> | |
27 | #include <machine/reg.h> | 28 | #include <machine/reg.h> | |
28 | 29 | |||
29 | #include "nbsd-nat.h" | 30 | #include "nbsd-nat.h" | |
30 | #include "vax-tdep.h" | 31 | #include "vax-tdep.h" | |
31 | #include "inf-ptrace.h" | 32 | #include "inf-ptrace.h" | |
32 | 33 | |||
@@ -53,35 +54,35 @@ static void | @@ -53,35 +54,35 @@ static void | |||
53 | vaxbsd_collect_gregset (const struct regcache *regcache, | 54 | vaxbsd_collect_gregset (const struct regcache *regcache, | |
54 | void *gregs, int regnum) | 55 | void *gregs, int regnum) | |
55 | { | 56 | { | |
56 | gdb_byte *regs = gregs; | 57 | gdb_byte *regs = gregs; | |
57 | int i; | 58 | int i; | |
58 | 59 | |||
59 | for (i = 0; i <= VAX_NUM_REGS; i++) | 60 | for (i = 0; i <= VAX_NUM_REGS; i++) | |
60 | { | 61 | { | |
61 | if (regnum == -1 || regnum == i) | 62 | if (regnum == -1 || regnum == i) | |
62 | regcache_raw_collect (regcache, i, regs + i * 4); | 63 | regcache_raw_collect (regcache, i, regs + i * 4); | |
63 | } | 64 | } | |
64 | } | 65 | } | |
65 | 66 | |||
66 | void | 67 | static void | |
67 | supply_gregset (struct regcache *regcache, const gregset_t *gregs) | 68 | supply_gregset (struct regcache *regcache, const gregset_t *gregs) | |
68 | { | 69 | { | |
69 | if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid), | 70 | if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid), | |
70 | (PTRACE_TYPE_ARG3) gregs, ptid_get_lwp (inferior_ptid)) == -1) | 71 | (PTRACE_TYPE_ARG3) gregs, ptid_get_lwp (inferior_ptid)) == -1) | |
71 | perror_with_name (_("Couldn't write registers")); | 72 | perror_with_name (_("Couldn't write registers")); | |
72 | } | 73 | } | |
73 | 74 | |||
74 | void | 75 | static void | |
75 | fill_gregset (const struct regcache *regcache, gregset_t *gregs, int regnum) | 76 | fill_gregset (const struct regcache *regcache, gregset_t *gregs, int regnum) | |
76 | { | 77 | { | |
77 | if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid), | 78 | if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid), | |
78 | (PTRACE_TYPE_ARG3) gregs, ptid_get_lwp (inferior_ptid)) == -1) | 79 | (PTRACE_TYPE_ARG3) gregs, ptid_get_lwp (inferior_ptid)) == -1) | |
79 | perror_with_name (_("Couldn't get registers")); | 80 | perror_with_name (_("Couldn't get registers")); | |
80 | } | 81 | } | |
81 | 82 | |||
82 | 83 | |||
83 | /* Support for debugging kernel virtual memory images. */ | 84 | /* Support for debugging kernel virtual memory images. */ | |
84 | 85 | |||
85 | /* Fetch register REGNUM from the inferior. If REGNUM is -1, do this | 86 | /* Fetch register REGNUM from the inferior. If REGNUM is -1, do this | |
86 | for all registers. */ | 87 | for all registers. */ | |
87 | 88 |
--- src/external/gpl3/gdb/lib/libbfd/arch/vax/bfd_stdint.h 2015/08/17 10:17:25 1.3
+++ src/external/gpl3/gdb/lib/libbfd/arch/vax/bfd_stdint.h 2016/03/24 00:38:40 1.4
@@ -1,18 +1,18 @@ | @@ -1,18 +1,18 @@ | |||
1 | /* This file is automatically generated. DO NOT EDIT! */ | 1 | /* This file is automatically generated. DO NOT EDIT! */ | |
2 | /* Generated from: NetBSD: mknative-gdb,v 1.6 2013/10/03 18:58:37 christos Exp */ | 2 | /* Generated from: NetBSD: mknative-gdb,v 1.6 2013/10/03 18:58:37 christos Exp */ | |
3 | /* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ | 3 | /* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ | |
4 | 4 | |||
5 | /* generated for vax--netbsdelf-gcc (NetBSD nb1 20141012) 4.8.4 20141009 (prerelease) */ | 5 | /* generated for vax--netbsdelf-gcc (NetBSD nb1 20160317) 5.3.0 */ | |
6 | 6 | |||
7 | #ifndef GCC_GENERATED_STDINT_H | 7 | #ifndef GCC_GENERATED_STDINT_H | |
8 | #define GCC_GENERATED_STDINT_H 1 | 8 | #define GCC_GENERATED_STDINT_H 1 | |
9 | 9 | |||
10 | #include <sys/types.h> | 10 | #include <sys/types.h> | |
11 | #include <stdint.h> | 11 | #include <stdint.h> | |
12 | /* glibc uses these symbols as guards to prevent redefinitions. */ | 12 | /* glibc uses these symbols as guards to prevent redefinitions. */ | |
13 | #ifdef __int8_t_defined | 13 | #ifdef __int8_t_defined | |
14 | #define _INT8_T | 14 | #define _INT8_T | |
15 | #define _INT16_T | 15 | #define _INT16_T | |
16 | #define _INT32_T | 16 | #define _INT32_T | |
17 | #endif | 17 | #endif | |
18 | #ifdef __uint32_t_defined | 18 | #ifdef __uint32_t_defined |
--- src/external/gpl3/gdb/lib/libdecnumber/arch/vax/gstdint.h 2015/08/17 10:17:25 1.3
+++ src/external/gpl3/gdb/lib/libdecnumber/arch/vax/gstdint.h 2016/03/24 00:38:40 1.4
@@ -1,18 +1,18 @@ | @@ -1,18 +1,18 @@ | |||
1 | /* This file is automatically generated. DO NOT EDIT! */ | 1 | /* This file is automatically generated. DO NOT EDIT! */ | |
2 | /* Generated from: NetBSD: mknative-gdb,v 1.6 2013/10/03 18:58:37 christos Exp */ | 2 | /* Generated from: NetBSD: mknative-gdb,v 1.6 2013/10/03 18:58:37 christos Exp */ | |
3 | /* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ | 3 | /* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ | |
4 | 4 | |||
5 | /* generated for vax--netbsdelf-gcc (NetBSD nb1 20141012) 4.8.4 20141009 (prerelease) */ | 5 | /* generated for vax--netbsdelf-gcc (NetBSD nb1 20160317) 5.3.0 */ | |
6 | 6 | |||
7 | #ifndef GCC_GENERATED_STDINT_H | 7 | #ifndef GCC_GENERATED_STDINT_H | |
8 | #define GCC_GENERATED_STDINT_H 1 | 8 | #define GCC_GENERATED_STDINT_H 1 | |
9 | 9 | |||
10 | #include <sys/types.h> | 10 | #include <sys/types.h> | |
11 | #include <stdint.h> | 11 | #include <stdint.h> | |
12 | /* glibc uses these symbols as guards to prevent redefinitions. */ | 12 | /* glibc uses these symbols as guards to prevent redefinitions. */ | |
13 | #ifdef __int8_t_defined | 13 | #ifdef __int8_t_defined | |
14 | #define _INT8_T | 14 | #define _INT8_T | |
15 | #define _INT16_T | 15 | #define _INT16_T | |
16 | #define _INT32_T | 16 | #define _INT32_T | |
17 | #endif | 17 | #endif | |
18 | #ifdef __uint32_t_defined | 18 | #ifdef __uint32_t_defined |
--- src/external/gpl3/gdb/lib/libgdb/arch/vax/config.h 2016/02/03 22:13:42 1.5
+++ src/external/gpl3/gdb/lib/libgdb/arch/vax/config.h 2016/03/24 00:38:40 1.6
@@ -209,27 +209,27 @@ | @@ -209,27 +209,27 @@ | |||
209 | /* Define if Guile supports manual finalization. */ | 209 | /* Define if Guile supports manual finalization. */ | |
210 | /* #undef HAVE_GUILE_MANUAL_FINALIZATION */ | 210 | /* #undef HAVE_GUILE_MANUAL_FINALIZATION */ | |
211 | 211 | |||
212 | /* Define if you have the iconv() function. */ | 212 | /* Define if you have the iconv() function. */ | |
213 | #define HAVE_ICONV 1 | 213 | #define HAVE_ICONV 1 | |
214 | 214 | |||
215 | /* Define to 1 if you have the `iconvlist' function. */ | 215 | /* Define to 1 if you have the `iconvlist' function. */ | |
216 | /* #undef HAVE_ICONVLIST */ | 216 | /* #undef HAVE_ICONVLIST */ | |
217 | 217 | |||
218 | /* Define to 1 if you have the <inttypes.h> header file. */ | 218 | /* Define to 1 if you have the <inttypes.h> header file. */ | |
219 | #define HAVE_INTTYPES_H 1 | 219 | #define HAVE_INTTYPES_H 1 | |
220 | 220 | |||
221 | /* Define to 1 if your system has the kinfo_getvmmap function. */ | 221 | /* Define to 1 if your system has the kinfo_getvmmap function. */ | |
222 | /* #undef HAVE_KINFO_GETVMMAP */ | 222 | #define HAVE_KINFO_GETVMMAP 1 | |
223 | 223 | |||
224 | /* Define if you have <langinfo.h> and nl_langinfo(CODESET). */ | 224 | /* Define if you have <langinfo.h> and nl_langinfo(CODESET). */ | |
225 | #define HAVE_LANGINFO_CODESET 1 | 225 | #define HAVE_LANGINFO_CODESET 1 | |
226 | 226 | |||
227 | /* Define if your <locale.h> file defines LC_MESSAGES. */ | 227 | /* Define if your <locale.h> file defines LC_MESSAGES. */ | |
228 | #define HAVE_LC_MESSAGES 1 | 228 | #define HAVE_LC_MESSAGES 1 | |
229 | 229 | |||
230 | /* Define if you have the babeltrace library. */ | 230 | /* Define if you have the babeltrace library. */ | |
231 | /* #undef HAVE_LIBBABELTRACE */ | 231 | /* #undef HAVE_LIBBABELTRACE */ | |
232 | 232 | |||
233 | /* Define to 1 if you have the `dl' library (-ldl). */ | 233 | /* Define to 1 if you have the `dl' library (-ldl). */ | |
234 | /* #undef HAVE_LIBDL */ | 234 | /* #undef HAVE_LIBDL */ | |
235 | 235 |