Pass the lwp id as the 4th arg to ptrace.diff -r1.3 -r1.4 src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c
(skrll)
--- src/external/gpl3/gdb/dist/gdb/Attic/armnbsd-nat.c 2011/10/10 23:13:25 1.3
+++ src/external/gpl3/gdb/dist/gdb/Attic/armnbsd-nat.c 2012/01/22 20:27:28 1.4
@@ -441,71 +441,71 @@ store_regs (const struct regcache *regca | @@ -441,71 +441,71 @@ store_regs (const struct regcache *regca | |||
441 | (PTRACE_TYPE_ARG3) &inferior_registers, TIDGET (inferior_ptid)); | 441 | (PTRACE_TYPE_ARG3) &inferior_registers, TIDGET (inferior_ptid)); | |
442 | 442 | |||
443 | if (ret < 0) | 443 | if (ret < 0) | |
444 | warning (_("unable to store general registers")); | 444 | warning (_("unable to store general registers")); | |
445 | } | 445 | } | |
446 | 446 | |||
447 | static void | 447 | static void | |
448 | store_fp_register (const struct regcache *regcache, int regno) | 448 | store_fp_register (const struct regcache *regcache, int regno) | |
449 | { | 449 | { | |
450 | struct fpreg inferior_fp_registers; | 450 | struct fpreg inferior_fp_registers; | |
451 | int ret; | 451 | int ret; | |
452 | 452 | |||
453 | ret = ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), | 453 | ret = ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), | |
454 | (PTRACE_TYPE_ARG3) &inferior_fp_registers, 0); | 454 | (PTRACE_TYPE_ARG3) &inferior_fp_registers, TIDGET (inferior_ptid)); | |
455 | 455 | |||
456 | if (ret < 0) | 456 | if (ret < 0) | |
457 | { | 457 | { | |
458 | warning (_("unable to fetch floating-point registers")); | 458 | warning (_("unable to fetch floating-point registers")); | |
459 | return; | 459 | return; | |
460 | } | 460 | } | |
461 | 461 | |||
462 | switch (regno) | 462 | switch (regno) | |
463 | { | 463 | { | |
464 | case ARM_FPS_REGNUM: | 464 | case ARM_FPS_REGNUM: | |
465 | regcache_raw_collect (regcache, ARM_FPS_REGNUM, | 465 | regcache_raw_collect (regcache, ARM_FPS_REGNUM, | |
466 | (char *) &inferior_fp_registers.fpr_fpsr); | 466 | (char *) &inferior_fp_registers.fpr_fpsr); | |
467 | break; | 467 | break; | |
468 | 468 | |||
469 | default: | 469 | default: | |
470 | regcache_raw_collect (regcache, regno, | 470 | regcache_raw_collect (regcache, regno, | |
471 | (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]); | 471 | (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]); | |
472 | break; | 472 | break; | |
473 | } | 473 | } | |
474 | 474 | |||
475 | ret = ptrace (PT_SETFPREGS, PIDGET (inferior_ptid), | 475 | ret = ptrace (PT_SETFPREGS, PIDGET (inferior_ptid), | |
476 | (PTRACE_TYPE_ARG3) &inferior_fp_registers, 0); | 476 | (PTRACE_TYPE_ARG3) &inferior_fp_registers, TIDGET (inferior_ptid)); | |
477 | 477 | |||
478 | if (ret < 0) | 478 | if (ret < 0) | |
479 | warning (_("unable to write register %d to inferior"), regno); | 479 | warning (_("unable to write register %d to inferior"), regno); | |
480 | } | 480 | } | |
481 | 481 | |||
482 | static void | 482 | static void | |
483 | store_fp_regs (const struct regcache *regcache) | 483 | store_fp_regs (const struct regcache *regcache) | |
484 | { | 484 | { | |
485 | struct fpreg inferior_fp_registers; | 485 | struct fpreg inferior_fp_registers; | |
486 | int ret; | 486 | int ret; | |
487 | int regno; | 487 | int regno; | |
488 | 488 | |||
489 | 489 | |||
490 | for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++) | 490 | for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++) | |
491 | regcache_raw_collect (regcache, regno, | 491 | regcache_raw_collect (regcache, regno, | |
492 | (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]); | 492 | (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]); | |
493 | 493 | |||
494 | regcache_raw_collect (regcache, ARM_FPS_REGNUM, | 494 | regcache_raw_collect (regcache, ARM_FPS_REGNUM, | |
495 | (char *) &inferior_fp_registers.fpr_fpsr); | 495 | (char *) &inferior_fp_registers.fpr_fpsr); | |
496 | 496 | |||
497 | ret = ptrace (PT_SETFPREGS, PIDGET (inferior_ptid), | 497 | ret = ptrace (PT_SETFPREGS, PIDGET (inferior_ptid), | |
498 | (PTRACE_TYPE_ARG3) &inferior_fp_registers, 0); | 498 | (PTRACE_TYPE_ARG3) &inferior_fp_registers, TIDGET (inferior_ptid)); | |
499 | 499 | |||
500 | if (ret < 0) | 500 | if (ret < 0) | |
501 | warning (_("unable to store floating-point registers")); | 501 | warning (_("unable to store floating-point registers")); | |
502 | } | 502 | } | |
503 | 503 | |||
504 | static void | 504 | static void | |
505 | armnbsd_store_registers (struct target_ops *ops, | 505 | armnbsd_store_registers (struct target_ops *ops, | |
506 | struct regcache *regcache, int regno) | 506 | struct regcache *regcache, int regno) | |
507 | { | 507 | { | |
508 | if (regno >= 0) | 508 | if (regno >= 0) | |
509 | { | 509 | { | |
510 | if (regno < ARM_F0_REGNUM || regno > ARM_FPS_REGNUM) | 510 | if (regno < ARM_F0_REGNUM || regno > ARM_FPS_REGNUM) | |
511 | store_register (regcache, regno); | 511 | store_register (regcache, regno); |
--- src/external/gpl3/gdb/dist/gdb/Attic/m68kbsd-nat.c 2011/10/11 23:04:21 1.3
+++ src/external/gpl3/gdb/dist/gdb/Attic/m68kbsd-nat.c 2012/01/22 20:27:28 1.4
@@ -109,78 +109,78 @@ m68kbsd_collect_fpregset (struct regcach | @@ -109,78 +109,78 @@ m68kbsd_collect_fpregset (struct regcach | |||
109 | 109 | |||
110 | /* Fetch register REGNUM from the inferior. If REGNUM is -1, do this | 110 | /* Fetch register REGNUM from the inferior. If REGNUM is -1, do this | |
111 | for all registers (including the floating-point registers). */ | 111 | for all registers (including the floating-point registers). */ | |
112 | 112 | |||
113 | static void | 113 | static void | |
114 | m68kbsd_fetch_inferior_registers (struct target_ops *ops, | 114 | m68kbsd_fetch_inferior_registers (struct target_ops *ops, | |
115 | struct regcache *regcache, int regnum) | 115 | struct regcache *regcache, int regnum) | |
116 | { | 116 | { | |
117 | if (regnum == -1 || m68kbsd_gregset_supplies_p (regnum)) | 117 | if (regnum == -1 || m68kbsd_gregset_supplies_p (regnum)) | |
118 | { | 118 | { | |
119 | struct reg regs; | 119 | struct reg regs; | |
120 | 120 | |||
121 | if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), | 121 | if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), | |
122 | (PTRACE_TYPE_ARG3) ®s, 0) == -1) | 122 | (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) | |
123 | perror_with_name (_("Couldn't get registers")); | 123 | perror_with_name (_("Couldn't get registers")); | |
124 | 124 | |||
125 | m68kbsd_supply_gregset (regcache, ®s); | 125 | m68kbsd_supply_gregset (regcache, ®s); | |
126 | } | 126 | } | |
127 | 127 | |||
128 | if (regnum == -1 || m68kbsd_fpregset_supplies_p (regnum)) | 128 | if (regnum == -1 || m68kbsd_fpregset_supplies_p (regnum)) | |
129 | { | 129 | { | |
130 | struct fpreg fpregs; | 130 | struct fpreg fpregs; | |
131 | 131 | |||
132 | if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), | 132 | if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), | |
133 | (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) | 133 | (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1) | |
134 | perror_with_name (_("Couldn't get floating point status")); | 134 | perror_with_name (_("Couldn't get floating point status")); | |
135 | 135 | |||
136 | m68kbsd_supply_fpregset (regcache, &fpregs); | 136 | m68kbsd_supply_fpregset (regcache, &fpregs); | |
137 | } | 137 | } | |
138 | } | 138 | } | |
139 | 139 | |||
140 | /* Store register REGNUM back into the inferior. If REGNUM is -1, do | 140 | /* Store register REGNUM back into the inferior. If REGNUM is -1, do | |
141 | this for all registers (including the floating-point registers). */ | 141 | this for all registers (including the floating-point registers). */ | |
142 | 142 | |||
143 | static void | 143 | static void | |
144 | m68kbsd_store_inferior_registers (struct target_ops *ops, | 144 | m68kbsd_store_inferior_registers (struct target_ops *ops, | |
145 | struct regcache *regcache, int regnum) | 145 | struct regcache *regcache, int regnum) | |
146 | { | 146 | { | |
147 | if (regnum == -1 || m68kbsd_gregset_supplies_p (regnum)) | 147 | if (regnum == -1 || m68kbsd_gregset_supplies_p (regnum)) | |
148 | { | 148 | { | |
149 | struct reg regs; | 149 | struct reg regs; | |
150 | 150 | |||
151 | if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), | 151 | if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), | |
152 | (PTRACE_TYPE_ARG3) ®s, 0) == -1) | 152 | (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) | |
153 | perror_with_name (_("Couldn't get registers")); | 153 | perror_with_name (_("Couldn't get registers")); | |
154 | 154 | |||
155 | m68kbsd_collect_gregset (regcache, ®s, regnum); | 155 | m68kbsd_collect_gregset (regcache, ®s, regnum); | |
156 | 156 | |||
157 | if (ptrace (PT_SETREGS, PIDGET (inferior_ptid), | 157 | if (ptrace (PT_SETREGS, PIDGET (inferior_ptid), | |
158 | (PTRACE_TYPE_ARG3) ®s, 0) == -1) | 158 | (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) | |
159 | perror_with_name (_("Couldn't write registers")); | 159 | perror_with_name (_("Couldn't write registers")); | |
160 | } | 160 | } | |
161 | 161 | |||
162 | if (regnum == -1 || m68kbsd_fpregset_supplies_p (regnum)) | 162 | if (regnum == -1 || m68kbsd_fpregset_supplies_p (regnum)) | |
163 | { | 163 | { | |
164 | struct fpreg fpregs; | 164 | struct fpreg fpregs; | |
165 | 165 | |||
166 | if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), | 166 | if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), | |
167 | (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) | 167 | (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1) | |
168 | perror_with_name (_("Couldn't get floating point status")); | 168 | perror_with_name (_("Couldn't get floating point status")); | |
169 | 169 | |||
170 | m68kbsd_collect_fpregset (regcache, &fpregs, regnum); | 170 | m68kbsd_collect_fpregset (regcache, &fpregs, regnum); | |
171 | 171 | |||
172 | if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid), | 172 | if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid), | |
173 | (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) | 173 | (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1) | |
174 | perror_with_name (_("Couldn't write floating point status")); | 174 | perror_with_name (_("Couldn't write floating point status")); | |
175 | } | 175 | } | |
176 | } | 176 | } | |
177 | 177 | |||
178 | 178 | |||
179 | /* Support for debugging kernel virtual memory images. */ | 179 | /* Support for debugging kernel virtual memory images. */ | |
180 | 180 | |||
181 | #include <sys/types.h> | 181 | #include <sys/types.h> | |
182 | #include <machine/pcb.h> | 182 | #include <machine/pcb.h> | |
183 | 183 | |||
184 | #include "bsd-kvm.h" | 184 | #include "bsd-kvm.h" | |
185 | 185 | |||
186 | /* OpenBSD doesn't have these. */ | 186 | /* OpenBSD doesn't have these. */ |
--- src/external/gpl3/gdb/dist/gdb/Attic/ppcnbsd-nat.c 2011/10/09 02:07:24 1.3
+++ src/external/gpl3/gdb/dist/gdb/Attic/ppcnbsd-nat.c 2012/01/22 20:27:28 1.4
@@ -80,81 +80,81 @@ getfpregs_supplies (struct gdbarch *gdba | @@ -80,81 +80,81 @@ getfpregs_supplies (struct gdbarch *gdba | |||
80 | } | 80 | } | |
81 | 81 | |||
82 | static void | 82 | static void | |
83 | ppcnbsd_fetch_inferior_registers (struct target_ops *ops, | 83 | ppcnbsd_fetch_inferior_registers (struct target_ops *ops, | |
84 | struct regcache *regcache, int regnum) | 84 | struct regcache *regcache, int regnum) | |
85 | { | 85 | { | |
86 | struct gdbarch *gdbarch = get_regcache_arch (regcache); | 86 | struct gdbarch *gdbarch = get_regcache_arch (regcache); | |
87 | 87 | |||
88 | if (regnum == -1 || getregs_supplies (gdbarch, regnum)) | 88 | if (regnum == -1 || getregs_supplies (gdbarch, regnum)) | |
89 | { | 89 | { | |
90 | struct reg regs; | 90 | struct reg regs; | |
91 | 91 | |||
92 | if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), | 92 | if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), | |
93 | (PTRACE_TYPE_ARG3) ®s, 0) == -1) | 93 | (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) | |
94 | perror_with_name (_("Couldn't get registers")); | 94 | perror_with_name (_("Couldn't get registers")); | |
95 | 95 | |||
96 | ppc_supply_gregset (&ppcnbsd_gregset, regcache, | 96 | ppc_supply_gregset (&ppcnbsd_gregset, regcache, | |
97 | regnum, ®s, sizeof regs); | 97 | regnum, ®s, sizeof regs); | |
98 | } | 98 | } | |
99 | 99 | |||
100 | if (regnum == -1 || getfpregs_supplies (gdbarch, regnum)) | 100 | if (regnum == -1 || getfpregs_supplies (gdbarch, regnum)) | |
101 | { | 101 | { | |
102 | struct fpreg fpregs; | 102 | struct fpreg fpregs; | |
103 | 103 | |||
104 | if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), | 104 | if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), | |
105 | (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) | 105 | (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1) | |
106 | perror_with_name (_("Couldn't get FP registers")); | 106 | perror_with_name (_("Couldn't get FP registers")); | |
107 | 107 | |||
108 | ppc_supply_fpregset (&ppcnbsd_fpregset, regcache, | 108 | ppc_supply_fpregset (&ppcnbsd_fpregset, regcache, | |
109 | regnum, &fpregs, sizeof fpregs); | 109 | regnum, &fpregs, sizeof fpregs); | |
110 | } | 110 | } | |
111 | } | 111 | } | |
112 | 112 | |||
113 | static void | 113 | static void | |
114 | ppcnbsd_store_inferior_registers (struct target_ops *ops, | 114 | ppcnbsd_store_inferior_registers (struct target_ops *ops, | |
115 | struct regcache *regcache, int regnum) | 115 | struct regcache *regcache, int regnum) | |
116 | { | 116 | { | |
117 | struct gdbarch *gdbarch = get_regcache_arch (regcache); | 117 | struct gdbarch *gdbarch = get_regcache_arch (regcache); | |
118 | 118 | |||
119 | if (regnum == -1 || getregs_supplies (gdbarch, regnum)) | 119 | if (regnum == -1 || getregs_supplies (gdbarch, regnum)) | |
120 | { | 120 | { | |
121 | struct reg regs; | 121 | struct reg regs; | |
122 | 122 | |||
123 | if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), | 123 | if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), | |
124 | (PTRACE_TYPE_ARG3) ®s, 0) == -1) | 124 | (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) | |
125 | perror_with_name (_("Couldn't get registers")); | 125 | perror_with_name (_("Couldn't get registers")); | |
126 | 126 | |||
127 | ppc_collect_gregset (&ppcnbsd_gregset, regcache, | 127 | ppc_collect_gregset (&ppcnbsd_gregset, regcache, | |
128 | regnum, ®s, sizeof regs); | 128 | regnum, ®s, sizeof regs); | |
129 | 129 | |||
130 | if (ptrace (PT_SETREGS, PIDGET (inferior_ptid), | 130 | if (ptrace (PT_SETREGS, PIDGET (inferior_ptid), | |
131 | (PTRACE_TYPE_ARG3) ®s, 0) == -1) | 131 | (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) | |
132 | perror_with_name (_("Couldn't write registers")); | 132 | perror_with_name (_("Couldn't write registers")); | |
133 | } | 133 | } | |
134 | 134 | |||
135 | if (regnum == -1 || getfpregs_supplies (gdbarch, regnum)) | 135 | if (regnum == -1 || getfpregs_supplies (gdbarch, regnum)) | |
136 | { | 136 | { | |
137 | struct fpreg fpregs; | 137 | struct fpreg fpregs; | |
138 | 138 | |||
139 | if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), | 139 | if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), | |
140 | (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) | 140 | (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1) | |
141 | perror_with_name (_("Couldn't get FP registers")); | 141 | perror_with_name (_("Couldn't get FP registers")); | |
142 | 142 | |||
143 | ppc_collect_fpregset (&ppcnbsd_fpregset, regcache, | 143 | ppc_collect_fpregset (&ppcnbsd_fpregset, regcache, | |
144 | regnum, &fpregs, sizeof fpregs); | 144 | regnum, &fpregs, sizeof fpregs); | |
145 | 145 | |||
146 | if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid), | 146 | if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid), | |
147 | (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) | 147 | (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1) | |
148 | perror_with_name (_("Couldn't set FP registers")); | 148 | perror_with_name (_("Couldn't set FP registers")); | |
149 | } | 149 | } | |
150 | } | 150 | } | |
151 | 151 | |||
152 | static int | 152 | static int | |
153 | ppcnbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb) | 153 | ppcnbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb) | |
154 | { | 154 | { | |
155 | struct switchframe sf; | 155 | struct switchframe sf; | |
156 | struct callframe cf; | 156 | struct callframe cf; | |
157 | struct gdbarch *gdbarch = get_regcache_arch (regcache); | 157 | struct gdbarch *gdbarch = get_regcache_arch (regcache); | |
158 | struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); | 158 | struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); | |
159 | int i; | 159 | int i; | |
160 | 160 |
--- src/external/gpl3/gdb/dist/gdb/Attic/hppanbsd-nat.c 2011/09/24 20:10:38 1.1.1.1
+++ src/external/gpl3/gdb/dist/gdb/Attic/hppanbsd-nat.c 2012/01/22 20:27:28 1.2
@@ -158,78 +158,78 @@ hppanbsd_collect_fpregset (struct regcac | @@ -158,78 +158,78 @@ hppanbsd_collect_fpregset (struct regcac | |||
158 | /* Fetch register REGNUM from the inferior. If REGNUM is -1, do this | 158 | /* Fetch register REGNUM from the inferior. If REGNUM is -1, do this | |
159 | for all registers (including the floating-point registers). */ | 159 | for all registers (including the floating-point registers). */ | |
160 | 160 | |||
161 | static void | 161 | static void | |
162 | hppanbsd_fetch_registers (struct target_ops *ops, | 162 | hppanbsd_fetch_registers (struct target_ops *ops, | |
163 | struct regcache *regcache, int regnum) | 163 | struct regcache *regcache, int regnum) | |
164 | 164 | |||
165 | { | 165 | { | |
166 | if (regnum == -1 || hppanbsd_gregset_supplies_p (regnum)) | 166 | if (regnum == -1 || hppanbsd_gregset_supplies_p (regnum)) | |
167 | { | 167 | { | |
168 | struct reg regs; | 168 | struct reg regs; | |
169 | 169 | |||
170 | if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), | 170 | if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), | |
171 | (PTRACE_TYPE_ARG3) ®s, 0) == -1) | 171 | (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) | |
172 | perror_with_name (_("Couldn't get registers")); | 172 | perror_with_name (_("Couldn't get registers")); | |
173 | 173 | |||
174 | hppanbsd_supply_gregset (regcache, ®s); | 174 | hppanbsd_supply_gregset (regcache, ®s); | |
175 | } | 175 | } | |
176 | 176 | |||
177 | if (regnum == -1 || hppanbsd_fpregset_supplies_p (regnum)) | 177 | if (regnum == -1 || hppanbsd_fpregset_supplies_p (regnum)) | |
178 | { | 178 | { | |
179 | struct fpreg fpregs; | 179 | struct fpreg fpregs; | |
180 | 180 | |||
181 | if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), | 181 | if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), | |
182 | (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) | 182 | (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1) | |
183 | perror_with_name (_("Couldn't get floating point status")); | 183 | perror_with_name (_("Couldn't get floating point status")); | |
184 | 184 | |||
185 | hppanbsd_supply_fpregset (regcache, &fpregs); | 185 | hppanbsd_supply_fpregset (regcache, &fpregs); | |
186 | } | 186 | } | |
187 | } | 187 | } | |
188 | 188 | |||
189 | /* Store register REGNUM back into the inferior. If REGNUM is -1, do | 189 | /* Store register REGNUM back into the inferior. If REGNUM is -1, do | |
190 | this for all registers (including the floating-point registers). */ | 190 | this for all registers (including the floating-point registers). */ | |
191 | 191 | |||
192 | static void | 192 | static void | |
193 | hppanbsd_store_registers (struct target_ops *ops, | 193 | hppanbsd_store_registers (struct target_ops *ops, | |
194 | struct regcache *regcache, int regnum) | 194 | struct regcache *regcache, int regnum) | |
195 | { | 195 | { | |
196 | if (regnum == -1 || hppanbsd_gregset_supplies_p (regnum)) | 196 | if (regnum == -1 || hppanbsd_gregset_supplies_p (regnum)) | |
197 | { | 197 | { | |
198 | struct reg regs; | 198 | struct reg regs; | |
199 | 199 | |||
200 | if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), | 200 | if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), | |
201 | (PTRACE_TYPE_ARG3) ®s, 0) == -1) | 201 | (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) | |
202 | perror_with_name (_("Couldn't get registers")); | 202 | perror_with_name (_("Couldn't get registers")); | |
203 | 203 | |||
204 | hppanbsd_collect_gregset (regcache, ®s, regnum); | 204 | hppanbsd_collect_gregset (regcache, ®s, regnum); | |
205 | 205 | |||
206 | if (ptrace (PT_SETREGS, PIDGET (inferior_ptid), | 206 | if (ptrace (PT_SETREGS, PIDGET (inferior_ptid), | |
207 | (PTRACE_TYPE_ARG3) ®s, 0) == -1) | 207 | (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) | |
208 | perror_with_name (_("Couldn't write registers")); | 208 | perror_with_name (_("Couldn't write registers")); | |
209 | } | 209 | } | |
210 | 210 | |||
211 | if (regnum == -1 || hppanbsd_fpregset_supplies_p (regnum)) | 211 | if (regnum == -1 || hppanbsd_fpregset_supplies_p (regnum)) | |
212 | { | 212 | { | |
213 | struct fpreg fpregs; | 213 | struct fpreg fpregs; | |
214 | 214 | |||
215 | if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), | 215 | if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), | |
216 | (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) | 216 | (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1) | |
217 | perror_with_name (_("Couldn't get floating point status")); | 217 | perror_with_name (_("Couldn't get floating point status")); | |
218 | 218 | |||
219 | hppanbsd_collect_fpregset (regcache, &fpregs, regnum); | 219 | hppanbsd_collect_fpregset (regcache, &fpregs, regnum); | |
220 | 220 | |||
221 | if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid), | 221 | if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid), | |
222 | (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) | 222 | (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1) | |
223 | perror_with_name (_("Couldn't write floating point status")); | 223 | perror_with_name (_("Couldn't write floating point status")); | |
224 | } | 224 | } | |
225 | } | 225 | } | |
226 | 226 | |||
227 | 227 | |||
228 | /* Provide a prototype to silence -Wmissing-prototypes. */ | 228 | /* Provide a prototype to silence -Wmissing-prototypes. */ | |
229 | void _initialize_hppanbsd_nat (void); | 229 | void _initialize_hppanbsd_nat (void); | |
230 | 230 | |||
231 | void | 231 | void | |
232 | _initialize_hppanbsd_nat (void) | 232 | _initialize_hppanbsd_nat (void) | |
233 | { | 233 | { | |
234 | struct target_ops *t; | 234 | struct target_ops *t; | |
235 | 235 |
--- src/external/gpl3/gdb/dist/gdb/Attic/mipsnbsd-nat.c 2011/09/24 20:11:33 1.1.1.1
+++ src/external/gpl3/gdb/dist/gdb/Attic/mipsnbsd-nat.c 2012/01/22 20:27:28 1.2
@@ -39,83 +39,83 @@ getregs_supplies (struct gdbarch *gdbarc | @@ -39,83 +39,83 @@ getregs_supplies (struct gdbarch *gdbarc | |||
39 | && (regno) <= gdbarch_pc_regnum (gdbarch)); | 39 | && (regno) <= gdbarch_pc_regnum (gdbarch)); | |
40 | } | 40 | } | |
41 | 41 | |||
42 | static void | 42 | static void | |
43 | mipsnbsd_fetch_inferior_registers (struct target_ops *ops, | 43 | mipsnbsd_fetch_inferior_registers (struct target_ops *ops, | |
44 | struct regcache *regcache, int regno) | 44 | struct regcache *regcache, int regno) | |
45 | { | 45 | { | |
46 | struct gdbarch *gdbarch = get_regcache_arch (regcache); | 46 | struct gdbarch *gdbarch = get_regcache_arch (regcache); | |
47 | if (regno == -1 || getregs_supplies (gdbarch, regno)) | 47 | if (regno == -1 || getregs_supplies (gdbarch, regno)) | |
48 | { | 48 | { | |
49 | struct reg regs; | 49 | struct reg regs; | |
50 | 50 | |||
51 | if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), | 51 | if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), | |
52 | (PTRACE_TYPE_ARG3) ®s, 0) == -1) | 52 | (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) | |
53 | perror_with_name (_("Couldn't get registers")); | 53 | perror_with_name (_("Couldn't get registers")); | |
54 | 54 | |||
55 | mipsnbsd_supply_reg (regcache, (char *) ®s, regno); | 55 | mipsnbsd_supply_reg (regcache, (char *) ®s, regno); | |
56 | if (regno != -1) | 56 | if (regno != -1) | |
57 | return; | 57 | return; | |
58 | } | 58 | } | |
59 | 59 | |||
60 | if (regno == -1 | 60 | if (regno == -1 | |
61 | || regno >= gdbarch_fp0_regnum (get_regcache_arch (regcache))) | 61 | || regno >= gdbarch_fp0_regnum (get_regcache_arch (regcache))) | |
62 | { | 62 | { | |
63 | struct fpreg fpregs; | 63 | struct fpreg fpregs; | |
64 | 64 | |||
65 | if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), | 65 | if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), | |
66 | (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) | 66 | (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1) | |
67 | perror_with_name (_("Couldn't get floating point status")); | 67 | perror_with_name (_("Couldn't get floating point status")); | |
68 | 68 | |||
69 | mipsnbsd_supply_fpreg (regcache, (char *) &fpregs, regno); | 69 | mipsnbsd_supply_fpreg (regcache, (char *) &fpregs, regno); | |
70 | } | 70 | } | |
71 | } | 71 | } | |
72 | 72 | |||
73 | static void | 73 | static void | |
74 | mipsnbsd_store_inferior_registers (struct target_ops *ops, | 74 | mipsnbsd_store_inferior_registers (struct target_ops *ops, | |
75 | struct regcache *regcache, int regno) | 75 | struct regcache *regcache, int regno) | |
76 | { | 76 | { | |
77 | struct gdbarch *gdbarch = get_regcache_arch (regcache); | 77 | struct gdbarch *gdbarch = get_regcache_arch (regcache); | |
78 | if (regno == -1 || getregs_supplies (gdbarch, regno)) | 78 | if (regno == -1 || getregs_supplies (gdbarch, regno)) | |
79 | { | 79 | { | |
80 | struct reg regs; | 80 | struct reg regs; | |
81 | 81 | |||
82 | if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), | 82 | if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), | |
83 | (PTRACE_TYPE_ARG3) ®s, 0) == -1) | 83 | (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) | |
84 | perror_with_name (_("Couldn't get registers")); | 84 | perror_with_name (_("Couldn't get registers")); | |
85 | 85 | |||
86 | mipsnbsd_fill_reg (regcache, (char *) ®s, regno); | 86 | mipsnbsd_fill_reg (regcache, (char *) ®s, regno); | |
87 | 87 | |||
88 | if (ptrace (PT_SETREGS, PIDGET (inferior_ptid), | 88 | if (ptrace (PT_SETREGS, PIDGET (inferior_ptid), | |
89 | (PTRACE_TYPE_ARG3) ®s, 0) == -1) | 89 | (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid).) == -1) | |
90 | perror_with_name (_("Couldn't write registers")); | 90 | perror_with_name (_("Couldn't write registers")); | |
91 | 91 | |||
92 | if (regno != -1) | 92 | if (regno != -1) | |
93 | return; | 93 | return; | |
94 | } | 94 | } | |
95 | 95 | |||
96 | if (regno == -1 | 96 | if (regno == -1 | |
97 | || regno >= gdbarch_fp0_regnum (get_regcache_arch (regcache))) | 97 | || regno >= gdbarch_fp0_regnum (get_regcache_arch (regcache))) | |
98 | { | 98 | { | |
99 | struct fpreg fpregs; | 99 | struct fpreg fpregs; | |
100 | 100 | |||
101 | if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), | 101 | if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), | |
102 | (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) | 102 | (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1) | |
103 | perror_with_name (_("Couldn't get floating point status")); | 103 | perror_with_name (_("Couldn't get floating point status")); | |
104 | 104 | |||
105 | mipsnbsd_fill_fpreg (regcache, (char *) &fpregs, regno); | 105 | mipsnbsd_fill_fpreg (regcache, (char *) &fpregs, regno); | |
106 | 106 | |||
107 | if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid), | 107 | if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid), | |
108 | (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) | 108 | (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1) | |
109 | perror_with_name (_("Couldn't write floating point status")); | 109 | perror_with_name (_("Couldn't write floating point status")); | |
110 | } | 110 | } | |
111 | } | 111 | } | |
112 | 112 | |||
113 | 113 | |||
114 | /* Provide a prototype to silence -Wmissing-prototypes. */ | 114 | /* Provide a prototype to silence -Wmissing-prototypes. */ | |
115 | void _initialize_mipsnbsd_nat (void); | 115 | void _initialize_mipsnbsd_nat (void); | |
116 | 116 | |||
117 | void | 117 | void | |
118 | _initialize_mipsnbsd_nat (void) | 118 | _initialize_mipsnbsd_nat (void) | |
119 | { | 119 | { | |
120 | struct target_ops *t; | 120 | struct target_ops *t; | |
121 | 121 |
--- src/external/gpl3/gdb/dist/gdb/sparc-nat.c 2011/09/24 20:12:31 1.1.1.1
+++ src/external/gpl3/gdb/dist/gdb/sparc-nat.c 2012/01/22 20:27:28 1.2
@@ -157,102 +157,102 @@ sparc_fetch_inferior_registers (struct t | @@ -157,102 +157,102 @@ sparc_fetch_inferior_registers (struct t | |||
157 | if (pid == 0) | 157 | if (pid == 0) | |
158 | pid = PIDGET (inferior_ptid); | 158 | pid = PIDGET (inferior_ptid); | |
159 | 159 | |||
160 | if (regnum == SPARC_G0_REGNUM) | 160 | if (regnum == SPARC_G0_REGNUM) | |
161 | { | 161 | { | |
162 | regcache_raw_supply (regcache, SPARC_G0_REGNUM, NULL); | 162 | regcache_raw_supply (regcache, SPARC_G0_REGNUM, NULL); | |
163 | return; | 163 | return; | |
164 | } | 164 | } | |
165 | 165 | |||
166 | if (regnum == -1 || sparc_gregset_supplies_p (gdbarch, regnum)) | 166 | if (regnum == -1 || sparc_gregset_supplies_p (gdbarch, regnum)) | |
167 | { | 167 | { | |
168 | gregset_t regs; | 168 | gregset_t regs; | |
169 | 169 | |||
170 | if (ptrace (PTRACE_GETREGS, pid, (PTRACE_TYPE_ARG3) ®s, 0) == -1) | 170 | if (ptrace (PTRACE_GETREGS, pid, (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) | |
171 | perror_with_name (_("Couldn't get registers")); | 171 | perror_with_name (_("Couldn't get registers")); | |
172 | 172 | |||
173 | sparc_supply_gregset (sparc_gregset, regcache, -1, ®s); | 173 | sparc_supply_gregset (sparc_gregset, regcache, -1, ®s); | |
174 | if (regnum != -1) | 174 | if (regnum != -1) | |
175 | return; | 175 | return; | |
176 | } | 176 | } | |
177 | 177 | |||
178 | if (regnum == -1 || sparc_fpregset_supplies_p (gdbarch, regnum)) | 178 | if (regnum == -1 || sparc_fpregset_supplies_p (gdbarch, regnum)) | |
179 | { | 179 | { | |
180 | fpregset_t fpregs; | 180 | fpregset_t fpregs; | |
181 | 181 | |||
182 | if (ptrace (PTRACE_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) | 182 | if (ptrace (PTRACE_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1) | |
183 | perror_with_name (_("Couldn't get floating point status")); | 183 | perror_with_name (_("Couldn't get floating point status")); | |
184 | 184 | |||
185 | sparc_supply_fpregset (regcache, -1, &fpregs); | 185 | sparc_supply_fpregset (regcache, -1, &fpregs); | |
186 | } | 186 | } | |
187 | } | 187 | } | |
188 | 188 | |||
189 | void | 189 | void | |
190 | sparc_store_inferior_registers (struct target_ops *ops, | 190 | sparc_store_inferior_registers (struct target_ops *ops, | |
191 | struct regcache *regcache, int regnum) | 191 | struct regcache *regcache, int regnum) | |
192 | { | 192 | { | |
193 | struct gdbarch *gdbarch = get_regcache_arch (regcache); | 193 | struct gdbarch *gdbarch = get_regcache_arch (regcache); | |
194 | int pid; | 194 | int pid; | |
195 | 195 | |||
196 | /* NOTE: cagney/2002-12-02: See comment in fetch_inferior_registers | 196 | /* NOTE: cagney/2002-12-02: See comment in fetch_inferior_registers | |
197 | about threaded assumptions. */ | 197 | about threaded assumptions. */ | |
198 | pid = TIDGET (inferior_ptid); | 198 | pid = TIDGET (inferior_ptid); | |
199 | if (pid == 0) | 199 | if (pid == 0) | |
200 | pid = PIDGET (inferior_ptid); | 200 | pid = PIDGET (inferior_ptid); | |
201 | 201 | |||
202 | if (regnum == -1 || sparc_gregset_supplies_p (gdbarch, regnum)) | 202 | if (regnum == -1 || sparc_gregset_supplies_p (gdbarch, regnum)) | |
203 | { | 203 | { | |
204 | gregset_t regs; | 204 | gregset_t regs; | |
205 | 205 | |||
206 | if (ptrace (PTRACE_GETREGS, pid, (PTRACE_TYPE_ARG3) ®s, 0) == -1) | 206 | if (ptrace (PTRACE_GETREGS, pid, (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) | |
207 | perror_with_name (_("Couldn't get registers")); | 207 | perror_with_name (_("Couldn't get registers")); | |
208 | 208 | |||
209 | sparc_collect_gregset (sparc_gregset, regcache, regnum, ®s); | 209 | sparc_collect_gregset (sparc_gregset, regcache, regnum, ®s); | |
210 | 210 | |||
211 | if (ptrace (PTRACE_SETREGS, pid, (PTRACE_TYPE_ARG3) ®s, 0) == -1) | 211 | if (ptrace (PTRACE_SETREGS, pid, (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) | |
212 | perror_with_name (_("Couldn't write registers")); | 212 | perror_with_name (_("Couldn't write registers")); | |
213 | 213 | |||
214 | /* Deal with the stack regs. */ | 214 | /* Deal with the stack regs. */ | |
215 | if (regnum == -1 || regnum == SPARC_SP_REGNUM | 215 | if (regnum == -1 || regnum == SPARC_SP_REGNUM | |
216 | || (regnum >= SPARC_L0_REGNUM && regnum <= SPARC_I7_REGNUM)) | 216 | || (regnum >= SPARC_L0_REGNUM && regnum <= SPARC_I7_REGNUM)) | |
217 | { | 217 | { | |
218 | ULONGEST sp; | 218 | ULONGEST sp; | |
219 | 219 | |||
220 | regcache_cooked_read_unsigned (regcache, SPARC_SP_REGNUM, &sp); | 220 | regcache_cooked_read_unsigned (regcache, SPARC_SP_REGNUM, &sp); | |
221 | sparc_collect_rwindow (regcache, sp, regnum); | 221 | sparc_collect_rwindow (regcache, sp, regnum); | |
222 | } | 222 | } | |
223 | 223 | |||
224 | if (regnum != -1) | 224 | if (regnum != -1) | |
225 | return; | 225 | return; | |
226 | } | 226 | } | |
227 | 227 | |||
228 | if (regnum == -1 || sparc_fpregset_supplies_p (gdbarch, regnum)) | 228 | if (regnum == -1 || sparc_fpregset_supplies_p (gdbarch, regnum)) | |
229 | { | 229 | { | |
230 | fpregset_t fpregs, saved_fpregs; | 230 | fpregset_t fpregs, saved_fpregs; | |
231 | 231 | |||
232 | if (ptrace (PTRACE_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) | 232 | if (ptrace (PTRACE_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1) | |
233 | perror_with_name (_("Couldn't get floating-point registers")); | 233 | perror_with_name (_("Couldn't get floating-point registers")); | |
234 | 234 | |||
235 | memcpy (&saved_fpregs, &fpregs, sizeof (fpregs)); | 235 | memcpy (&saved_fpregs, &fpregs, sizeof (fpregs)); | |
236 | sparc_collect_fpregset (regcache, regnum, &fpregs); | 236 | sparc_collect_fpregset (regcache, regnum, &fpregs); | |
237 | 237 | |||
238 | /* Writing the floating-point registers will fail on NetBSD with | 238 | /* Writing the floating-point registers will fail on NetBSD with | |
239 | EINVAL if the inferior process doesn't have an FPU state | 239 | EINVAL if the inferior process doesn't have an FPU state | |
240 | (i.e. if it didn't use the FPU yet). Therefore we don't try | 240 | (i.e. if it didn't use the FPU yet). Therefore we don't try | |
241 | to write the registers if nothing changed. */ | 241 | to write the registers if nothing changed. */ | |
242 | if (memcmp (&saved_fpregs, &fpregs, sizeof (fpregs)) != 0) | 242 | if (memcmp (&saved_fpregs, &fpregs, sizeof (fpregs)) != 0) | |
243 | { | 243 | { | |
244 | if (ptrace (PTRACE_SETFPREGS, pid, | 244 | if (ptrace (PTRACE_SETFPREGS, pid, | |
245 | (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) | 245 | (PTRACE_TYPE_ARG3) &fpregs, TIDGET (inferior_ptid)) == -1) | |
246 | perror_with_name (_("Couldn't write floating-point registers")); | 246 | perror_with_name (_("Couldn't write floating-point registers")); | |
247 | } | 247 | } | |
248 | 248 | |||
249 | if (regnum != -1) | 249 | if (regnum != -1) | |
250 | return; | 250 | return; | |
251 | } | 251 | } | |
252 | } | 252 | } | |
253 | 253 | |||
254 | 254 | |||
255 | /* Fetch StackGhost Per-Process XOR cookie. */ | 255 | /* Fetch StackGhost Per-Process XOR cookie. */ | |
256 | 256 | |||
257 | LONGEST | 257 | LONGEST | |
258 | sparc_xfer_wcookie (struct target_ops *ops, enum target_object object, | 258 | sparc_xfer_wcookie (struct target_ops *ops, enum target_object object, |
--- src/external/gpl3/gdb/dist/gdb/Attic/vaxbsd-nat.c 2011/09/25 16:30:25 1.2
+++ src/external/gpl3/gdb/dist/gdb/Attic/vaxbsd-nat.c 2012/01/22 20:27:28 1.3
@@ -61,49 +61,49 @@ vaxbsd_collect_gregset (const struct reg | @@ -61,49 +61,49 @@ vaxbsd_collect_gregset (const struct reg | |||
61 | } | 61 | } | |
62 | 62 | |||
63 | 63 | |||
64 | /* Fetch register REGNUM from the inferior. If REGNUM is -1, do this | 64 | /* Fetch register REGNUM from the inferior. If REGNUM is -1, do this | |
65 | for all registers. */ | 65 | for all registers. */ | |
66 | 66 | |||
67 | static void | 67 | static void | |
68 | vaxbsd_fetch_inferior_registers (struct target_ops *ops, | 68 | vaxbsd_fetch_inferior_registers (struct target_ops *ops, | |
69 | struct regcache *regcache, int regnum) | 69 | struct regcache *regcache, int regnum) | |
70 | { | 70 | { | |
71 | struct reg regs; | 71 | struct reg regs; | |
72 | 72 | |||
73 | if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), | 73 | if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), | |
74 | (PTRACE_TYPE_ARG3) ®s, 0) == -1) | 74 | (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) | |
75 | perror_with_name (_("Couldn't get registers")); | 75 | perror_with_name (_("Couldn't get registers")); | |
76 | 76 | |||
77 | vaxbsd_supply_gregset (regcache, ®s); | 77 | vaxbsd_supply_gregset (regcache, ®s); | |
78 | } | 78 | } | |
79 | 79 | |||
80 | /* Store register REGNUM back into the inferior. If REGNUM is -1, do | 80 | /* Store register REGNUM back into the inferior. If REGNUM is -1, do | |
81 | this for all registers. */ | 81 | this for all registers. */ | |
82 | 82 | |||
83 | static void | 83 | static void | |
84 | vaxbsd_store_inferior_registers (struct target_ops *ops, | 84 | vaxbsd_store_inferior_registers (struct target_ops *ops, | |
85 | struct regcache *regcache, int regnum) | 85 | struct regcache *regcache, int regnum) | |
86 | { | 86 | { | |
87 | struct reg regs; | 87 | struct reg regs; | |
88 | 88 | |||
89 | if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), | 89 | if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), | |
90 | (PTRACE_TYPE_ARG3) ®s, 0) == -1) | 90 | (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) | |
91 | perror_with_name (_("Couldn't get registers")); | 91 | perror_with_name (_("Couldn't get registers")); | |
92 | 92 | |||
93 | vaxbsd_collect_gregset (regcache, ®s, regnum); | 93 | vaxbsd_collect_gregset (regcache, ®s, regnum); | |
94 | 94 | |||
95 | if (ptrace (PT_SETREGS, PIDGET (inferior_ptid), | 95 | if (ptrace (PT_SETREGS, PIDGET (inferior_ptid), | |
96 | (PTRACE_TYPE_ARG3) ®s, 0) == -1) | 96 | (PTRACE_TYPE_ARG3) ®s, TIDGET (inferior_ptid)) == -1) | |
97 | perror_with_name (_("Couldn't write registers")); | 97 | perror_with_name (_("Couldn't write registers")); | |
98 | } | 98 | } | |
99 | 99 | |||
100 | 100 | |||
101 | /* Support for debugging kernel virtual memory images. */ | 101 | /* Support for debugging kernel virtual memory images. */ | |
102 | 102 | |||
103 | #include <sys/types.h> | 103 | #include <sys/types.h> | |
104 | #include <machine/pcb.h> | 104 | #include <machine/pcb.h> | |
105 | 105 | |||
106 | #include "bsd-kvm.h" | 106 | #include "bsd-kvm.h" | |
107 | 107 | |||
108 | static int | 108 | static int | |
109 | vaxbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb) | 109 | vaxbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb) |