1 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3 * linux-low.h (struct linux_target_ops): Remove.
4 (the_low_target): Remove.
5 * linux-x86-low.cc (the_low_target): Remove.
6 * linux-aarch64-low.cc (the_low_target): Ditto.
7 * linux-arm-low.cc (the_low_target): Ditto.
8 * linux-bfin-low.cc (the_low_target): Ditto.
9 * linux-cris-low.cc (the_low_target): Ditto.
10 * linux-crisv32-low.cc (the_low_target): Ditto.
11 * linux-ia64-low.cc (the_low_target): Ditto.
12 * linux-m32r-low.cc (the_low_target): Ditto.
13 * linux-m68k-low.cc (the_low_target): Ditto.
14 * linux-mips-low.cc (the_low_target): Ditto.
15 * linux-nios2-low.cc (the_low_target): Ditto.
16 * linux-ppc-low.cc (the_low_target): Ditto.
17 * linux-riscv-low.cc (the_low_target): Ditto.
18 * linux-s390-low.cc (the_low_target): Ditto.
19 * linux-sh-low.cc (the_low_target): Ditto.
20 * linux-sparc-low.cc (the_low_target): Ditto.
21 * linux-tic6x-low.cc (the_low_target): Ditto.
22 * linux-tile-low.cc (the_low_target): Ditto.
23 * linux-xtensa-low.cc (the_low_target): Ditto.
25 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
27 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
28 linux target define the op by overriding the declaration in
29 process_stratum_target.
31 * linux-low.h (struct linux_target_ops): Remove the op.
32 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
33 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
34 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
35 (x86_get_ipa_tdesc_idx): Turn into...
36 (x86_target::get_ipa_tdesc_idx): ...this.
37 (the_low_target): Remove the op field.
38 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
39 (ppc_get_ipa_tdesc_idx): Turn into...
40 (ppc_target::get_ipa_tdesc_idx): ...this.
41 (the_low_target): Remove the op field.
42 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
43 (s390_get_ipa_tdesc_idx): Turn into...
44 (s390_target::get_ipa_tdesc_idx): ...this.
45 (the_low_target): Remove the op field.
47 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
49 Turn the 'get_syscall_trapinfo' linux target op into a method
50 of process_stratum_target.
52 * linux-low.h (struct linux_target_ops): Remove the op.
53 (class linux_process_target) <get_syscall_trapinfo>
54 <gdb_catch_this_syscall>
55 <low_supports_catch_syscall>
56 <low_get_syscall_trapinfo>: Declare.
57 * linux-low.cc (get_syscall_trapinfo): Turn into...
58 (linux_process_target::get_syscall_trapinfo): ...this.
59 (linux_process_target::low_get_syscall_trapinfo): Define.
60 (gdb_catch_this_syscall_p): Turn into...
61 (linux_process_target::gdb_catch_this_syscall): ...this.
62 (linux_process_target::low_supports_catch_syscall): Define.
64 Update the callers below.
66 (linux_process_target::wait_1)
67 (linux_process_target::supports_catch_syscall)
69 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
70 <low_get_syscall_trapinfo>: Declare.
71 (x86_target::low_supports_catch_syscall): Define.
72 (x86_get_syscall_trapinfo): Turn into...
73 (x86_target::low_get_syscall_trapinfo): ...this.
74 (the_low_target): Remove the op field.
75 * linux-aarch64-low.cc (class aarch64_target)
76 <low_supports_catch_syscall>
77 <low_get_syscall_trapinfo>: Declare.
78 (aarch64_target::low_supports_catch_syscall): Define.
79 (aarch64_get_syscall_trapinfo): Turn into...
80 (aarch64_target::low_get_syscall_trapinfo): ...this.
81 (the_low_target): Remove the op field.
82 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
83 <low_get_syscall_trapinfo>: Declare.
84 (arm_target::low_supports_catch_syscall): Define.
85 (arm_get_syscall_trapinfo): Turn into...
86 (arm_target::low_get_syscall_trapinfo): ...this.
87 (the_low_target): Remove the op field.
88 * linux-ppc-low.cc (the_low_target): Remove the op field.
89 * linux-s390-low.cc (the_low_target): Remove the op field.
91 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
93 Remove the 'supports_hardware_single_step' linux target op and
94 override the process_stratum_target's op definition in
95 linux_process_target to return true.
97 * linux-low.h (struct linux_target_ops): Remove the op.
98 (class linux_process_target) <finish_step_over>
99 <maybe_hw_step>: Declare.
100 * linux-low.cc (can_hardware_single_step): Remove.
101 (maybe_hw_step): Turn into...
102 (linux_process_target::maybe_hw_step): ...this.
103 (finish_step_over): Turn into...
104 (linux_process_target::finish_step_over): ...this.
105 (linux_process_target::supports_hardware_single_step): Update
108 Update the callers below.
110 (linux_process_target::single_step)
111 (linux_process_target::resume_one_lwp_throw)
113 * linux-arm-low.cc (class arm_target)
114 <supports_hardware_single_step>: Declare.
115 (arm_supports_hardware_single_step): Turn into...
116 (arm_target::supports_hardware_single_step): ...this.
117 (the_low_target): Remove the op field.
118 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
119 (the_low_target): Remove the op field.
120 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
122 (the_low_target): Remove the op field.
123 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
124 (the_low_target): Remove the op field.
125 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
126 (the_low_target): Remove the op field.
127 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
128 (the_low_target): Remove the op field.
129 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
130 (the_low_target): Remove the op field.
131 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
132 (the_low_target): Remove the op field.
133 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
134 (the_low_target): Remove the op field.
135 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
136 (the_low_target): Remove the op field.
137 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
138 (the_low_target): Remove the op field.
139 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
140 (the_low_target): Remove the op field.
141 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
143 (the_low_target): Remove the op field.
145 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
147 Turn the 'supports_range_stepping' linux target op into a method
148 of linux_process_target.
150 * linux-low.h (struct linux_target_ops): Remove the op.
151 (class linux_process_target) <low_supports_range_stepping>: Declare.
152 * linux-low.cc (linux_process_target::low_supports_range_stepping):
154 (linux_process_target::supports_range_stepping): Update the call
156 * linux-x86-low.cc (class x86_target)
157 <low_supports_range_stepping>: Declare.
158 (x86_supports_range_stepping): Turn into...
159 (x86_target::low_supports_range_stepping): ...this.
160 (the_low_target): Remove the op field.
161 * linux-aarch64-low.cc (class aarch64_target)
162 <low_supports_range_stepping>: Declare.
163 (aarch64_supports_range_stepping): Turn into...
164 (aarch64_target::low_supports_range_stepping): ...this.
165 (the_low_target): Remove the op field.
166 * linux-arm-low.cc (the_low_target): Remove the op field.
167 * linux-bfin-low.cc (the_low_target): Ditto.
168 * linux-crisv32-low.cc (the_low_target): Ditto.
169 * linux-m32r-low.cc (the_low_target): Ditto.
170 * linux-m68k-low.cc (the_low_target): Ditto.
171 * linux-ppc-low.cc (the_low_target): Ditto.
172 * linux-s390-low.cc (the_low_target): Ditto.
173 * linux-sh-low.cc (the_low_target): Ditto.
174 * linux-tic6x-low.cc (the_low_target): Ditto.
175 * linux-tile-low.cc (the_low_target): Ditto.
176 * linux-xtensa-low.cc (the_low_target): Ditto.
178 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
180 Remove the 'emit_ops' linux target ops and let the concrete
181 linux target define the op by overriding the declaration of
182 process_stratum_target.
184 * linux-low.h (struct linux_target_ops): Remove the op.
185 (class linux_process_target) <emit_ops>: Remove.
186 * linux-low.cc (linux_process_target::emit_ops): Remove.
187 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
188 (x86_emit_ops): Turn into...
189 (x86_target::emit_ops): ...this.
190 (the_low_target): Remove the op field.
191 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
192 (aarch64_emit_ops): Turn into...
193 (aarch64_target::emit_ops): ...this.
194 (the_low_target): Remove the op field.
195 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
196 (ppc_emit_ops): Turn into...
197 (ppc_target::emit_ops): ...this.
198 (the_low_target): Remove the op field.
199 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
200 (s390_emit_ops): Turn into...
201 (s390_target::emit_ops): ...this.
202 (the_low_target): Remove the op field.
203 * linux-arm-low.cc (the_low_target): Remove the op field.
204 * linux-bfin-low.cc (the_low_target): Ditto.
205 * linux-crisv32-low.cc (the_low_target): Ditto.
206 * linux-m32r-low.cc (the_low_target): Ditto.
207 * linux-m68k-low.cc (the_low_target): Ditto.
208 * linux-sh-low.cc (the_low_target): Ditto.
209 * linux-tic6x-low.cc (the_low_target): Ditto.
210 * linux-tile-low.cc (the_low_target): Ditto.
211 * linux-xtensa-low.cc (the_low_target): Ditto.
213 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
215 Remove the 'install_fast_tracepoint_jump_pad' and
216 'get_min_fast_tracepoint_insn_len' linux target ops to let the
217 concrete linux target define the ops by overriding the declarations
218 of process_stratum_target.
220 * linux-low.h (struct linux_target_ops): Remove the ops.
221 (class linux_process_target) <supports_fast_tracepoints>
222 <install_fast_tracepoint_jump_pad>
223 <get_min_fast_tracepoint_insn_len>: Remove.
224 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
225 (linux_process_target::install_fast_tracepoint_jump_pad)
226 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
227 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
228 <install_fast_tracepoint_jump_pad>
229 <get_min_fast_tracepoint_insn_len>: Declare.
230 (x86_target::supports_fast_tracepoints): Define.
231 (x86_install_fast_tracepoint_jump_pad): Turn into...
232 (x86_target::install_fast_tracepoint_jump_pad): ...this.
233 (x86_get_min_fast_tracepoint_insn_len): Turn into...
234 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
235 (the_low_target): Remove the op fields.
236 * linux-aarch64-low.cc (class aarch64_target)
237 <supports_fast_tracepoints>
238 <install_fast_tracepoint_jump_pad>
239 <get_min_fast_tracepoint_insn_len>: Declare.
240 (aarch64_target::supports_fast_tracepoints): Define.
241 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
242 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
243 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
244 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
245 (the_low_target): Remove the op fields.
246 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
247 <install_fast_tracepoint_jump_pad>
248 <get_min_fast_tracepoint_insn_len>: Declare.
249 (ppc_target::supports_fast_tracepoints): Define.
250 (ppc_install_fast_tracepoint_jump_pad): Turn into...
251 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
252 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
253 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
254 (the_low_target): Remove the op fields.
255 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
256 <install_fast_tracepoint_jump_pad>
257 <get_min_fast_tracepoint_insn_len>: Declare.
258 (s390_target::supports_fast_tracepoints): Define.
259 (s390_install_fast_tracepoint_jump_pad): Turn into...
260 (s390_target::install_fast_tracepoint_jump_pad): ...this.
261 (s390_get_min_fast_tracepoint_insn_len): Turn into...
262 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
263 (the_low_target): Remove the op fields.
264 * linux-arm-low.cc (the_low_target): Remove the op fields.
265 * linux-bfin-low.cc (the_low_target): Ditto.
266 * linux-crisv32-low.cc (the_low_target): Ditto.
267 * linux-m32r-low.cc (the_low_target): Ditto.
268 * linux-m68k-low.cc (the_low_target): Ditto.
269 * linux-sh-low.cc (the_low_target): Ditto.
270 * linux-tic6x-low.cc (the_low_target): Ditto.
271 * linux-tile-low.cc (the_low_target): Ditto.
272 * linux-xtensa-low.cc (the_low_target): Ditto.
274 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
276 Turn the 'get_thread_area' linux target op into a method of
277 process_stratum_target.
279 * linux-low.h (struct linux_target_ops): Remove the op.
280 (class linux_process_target) <stuck_in_jump_pad>
281 <linux_fast_tracepoint_collecting>
282 <low_get_thread_area>: Declare.
283 * linux-low.cc (supports_fast_tracepoints): Remove.
284 (linux_fast_tracepoint_collecting): Turn into...
285 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
286 (linux_process_target::low_get_thread_area): Define.
287 (stuck_in_jump_pad_callback): Turn into...
288 (linux_process_target::stuck_in_jump_pad): ...this.
290 Update the caller below.
292 (linux_process_target::stabilize_threads)
294 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
296 (x86_get_thread_area): Turn into...
297 (x86_target::low_get_thread_area): ...this.
298 (the_low_target): Remove the op field.
299 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
301 (aarch64_get_thread_area): Turn into...
302 (aarch64_target::low_get_thread_area): ...this.
303 (the_low_target): Remove the op field.
304 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
306 (ppc_get_thread_area): Turn into...
307 (ppc_target::low_get_thread_area): ...this.
308 (the_low_target): Remove the op field.
309 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
311 (s390_get_thread_area): Turn into...
312 (s390_target::low_get_thread_area): ...this.
313 (the_low_target): Remove the op field.
314 * linux-arm-low.cc (the_low_target): Remove the op field.
315 * linux-bfin-low.cc (the_low_target): Ditto.
316 * linux-crisv32-low.cc (the_low_target): Ditto.
317 * linux-m32r-low.cc (the_low_target): Ditto.
318 * linux-m68k-low.cc (the_low_target): Ditto.
319 * linux-sh-low.cc (the_low_target): Ditto.
320 * linux-tic6x-low.cc (the_low_target): Ditto.
321 * linux-tile-low.cc (the_low_target): Ditto.
322 * linux-xtensa-low.cc (the_low_target): Ditto.
324 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
326 Remote the 'supports_tracepoints' linux target op and let the
327 concrete linux target define it by overriding the op declared in
328 process_stratum_target.
330 * linux-low.h (struct linux_target_ops): Remove the op.
331 (class linux_process_target) <supports_tracepoints>: Remove.
332 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
333 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
335 (x86_supports_tracepoints): Turn into...
336 (x86_target::supports_tracepoints): ...this.
337 (the_low_target): Remove the op field.
338 * linux-aarch64-low.cc (class aarch64_target)
339 <supports_tracepoints>: Declare.
340 (aarch64_supports_tracepoints): Turn into...
341 (aarch64_target::supports_tracepoints): ...this.
342 (the_low_target): Remove the op field.
343 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
345 (ppc_supports_tracepoints): Turn into...
346 (ppc_target::supports_tracepoints): ...this.
347 (the_low_target): Remove the op field.
348 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
350 (s390_supports_tracepoints): Turn into...
351 (s390_target::supports_tracepoints): ...this.
352 (the_low_target): Remove the op field.
353 * linux-arm-low.cc (the_low_target): Remove the op field.
354 * linux-bfin-low.cc (the_low_target): Ditto.
355 * linux-crisv32-low.cc (the_low_target): Ditto.
356 * linux-m32r-low.cc (the_low_target): Ditto.
357 * linux-m68k-low.cc (the_low_target): Ditto.
358 * linux-sh-low.cc (the_low_target): Ditto.
359 * linux-tic6x-low.cc (the_low_target): Ditto.
360 * linux-tile-low.cc (the_low_target): Ditto.
361 * linux-xtensa-low.cc (the_low_target): Ditto.
363 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
365 Remove the 'process_qsupported' linux target op and let a concrete
366 linux target define the op by overriding the op declaration in
367 process_stratum_target.
369 * linux-low.h (struct linux_target_ops): Remove the op.
370 (class linux_process_target) <process_qsupported>: Remove.
371 * linux-low.cc (linux_process_target::process_qsupported): Remove.
372 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
373 (x86_linux_process_qsupported): Turn into...
374 (x86_target::process_qsupported): ...this.
375 (the_low_target): Remove the op field.
376 * linux-aarch64-low.cc (the_low_target): Remove the op
378 * linux-arm-low.cc (the_low_target): Ditto.
379 * linux-bfin-low.cc (the_low_target): Ditto.
380 * linux-crisv32-low.cc (the_low_target): Ditto.
381 * linux-m32r-low.cc (the_low_target): Ditto.
382 * linux-m68k-low.cc (the_low_target): Ditto.
383 * linux-ppc-low.cc (the_low_target): Ditto.
384 * linux-s390-low.cc (the_low_target): Ditto.
385 * linux-sh-low.cc (the_low_target): Ditto.
386 * linux-tic6x-low.cc (the_low_target): Ditto.
387 * linux-tile-low.cc (the_low_target): Ditto.
388 * linux-xtensa-low.cc (the_low_target): Ditto.
390 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
392 Turn the 'prepare_to_resume' linux target op into a method of
393 linux_process_target.
395 * linux-low.h (struct linux_target_ops): Remove the op.
396 (class linux_process_target) <low_prepare_to_resume>: Declare.
397 * linux-low.cc (linux_process_target::low_prepare_to_resume):
400 Update the callers below:
402 (linux_process_target::resume_one_lwp_throw)
403 (linux_process_target::low_prepare_to_resume)
405 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
407 (x86_target::low_prepare_to_resume): Define.
408 (the_low_target): Remove the op field.
409 * linux-aarch64-low.cc (class aarch64_target)
410 <low_prepare_to_resume>: Declare.
411 (aarch64_target::low_prepare_to_resume): Define.
412 (the_low_target): Remove the op field.
413 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
415 (arm_prepare_to_resume): Turn into...
416 (arm_target::low_prepare_to_resume): ...this.
417 (the_low_target): Remove the op field.
418 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
420 (mips_linux_prepare_to_resume): Turn into...
421 (mips_target::low_prepare_to_resume): ...this.
422 (the_low_target): Remove the op field.
423 * linux-bfin-low.cc (the_low_target): Remove the op field.
424 * linux-crisv32-low.cc (the_low_target): Ditto.
425 * linux-m32r-low.cc (the_low_target): Ditto.
426 * linux-m68k-low.cc (the_low_target): Ditto.
427 * linux-ppc-low.cc (the_low_target): Ditto.
428 * linux-s390-low.cc (the_low_target): Ditto.
429 * linux-sh-low.cc (the_low_target): Ditto.
430 * linux-tic6x-low.cc (the_low_target): Ditto.
431 * linux-tile-low.cc (the_low_target): Ditto.
432 * linux-xtensa-low.cc (the_low_target): Ditto.
434 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
436 Turn the 'new_process', 'delete_process', 'new_thread',
437 'delete_thread', and 'new_fork' linux target ops into methods
438 of linux_process_target.
440 * linux-low.h (struct linux_target_ops): Remove the ops.
441 (class linux_process_target) <add_linux_process>
446 <check_zombie_leaders>
452 <low_new_fork>: Declare.
453 * linux-low.cc (delete_lwp): Turn into...
454 (linux_process_target::delete_lwp): ...this.
455 (linux_process_target::low_delete_thread): Define.
456 (linux_add_process): Turn into...
457 (linux_process_target::add_linux_process): ...this.
458 (linux_process_target::low_new_process): Define.
459 (linux_process_target::low_delete_process): Define.
460 (linux_process_target::low_new_fork): Define.
461 (add_lwp): Turn into...
462 (linux_process_target::add_lwp): ...this.
463 (linux_process_target::low_new_thread): Define.
464 (linux_attach_lwp): Turn into...
465 (linux_process_target::attach_lwp): ...this.
466 (linux_detach_one_lwp): Turn into...
467 (linux_process_target::detach_one_lwp): ...this.
468 (linux_detach_lwp_callback): Remove and inline...
469 (linux_process_target::detach): ...here.
470 (check_zombie_leaders): Turn into...
471 (linux_process_target::check_zombie_leaders): ...this.
472 (filter_exit_event): Turn into...
473 (linux_process_target::filter_exit_event): ...this.
475 Update the callers below.
477 (linux_process_target::handle_extended_wait)
478 (linux_process_target::create_inferior)
479 (attach_proc_task_lwp_callback)
480 (linux_process_target::attach)
481 (linux_process_target::detach)
482 (linux_process_target::mourn)
483 * thread-db.cc (attach_thread)
485 * linux-x86-low.cc (class x86_target) <low_new_process>
489 <low_new_fork>: Declare.
490 (x86_linux_new_process): Turn into...
491 (x86_target::low_new_process): ...this.
492 (x86_linux_delete_process): Turn into...
493 (x86_target::low_delete_process): ...this.
494 (x86_target::low_new_thread): Define.
495 (x86_target::low_delete_thread): Define.
496 (x86_linux_new_fork): Turn into...
497 (x86_target::low_new_fork): ...this.
498 (the_low_target): Remove the op fields.
499 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
503 <low_new_fork>: Declare.
504 (aarch64_linux_new_process): Turn into...
505 (aarch64_target::low_new_process): ...this.
506 (aarch64_linux_delete_process): Turn into...
507 (aarch64_target::low_delete_process): ...this.
508 (aarch64_target::low_new_thread): Define.
509 (aarch64_target::low_delete_thread): Define.
510 (aarch64_linux_new_fork): Turn into...
511 (aarch64_target::low_new_fork): ...this.
512 (the_low_target): Remove the op fields.
513 * linux-arm-low.cc (class arm_target) <low_new_process>
517 <low_new_fork>: Declare.
518 (arm_new_process): Turn into...
519 (arm_target::low_new_process): ...this.
520 (arm_delete_process): Turn into...
521 (arm_target::low_delete_process): ...this.
522 (arm_new_thread): Turn into...
523 (arm_target::low_new_thread): ...this.
524 (arm_delete_thread): Turn into...
525 (arm_target::low_delete_thread): ...this.
526 (arm_new_fork): Turn into...
527 (arm_target::low_new_fork): ...this.
528 (the_low_target): Remove the op fields.
529 * linux-mips-low.cc (class mips_target) <low_new_process>
533 <low_new_fork>: Declare.
534 (mips_linux_new_process): Turn into...
535 (mips_target::low_new_process): ...this.
536 (mips_linux_delete_process): Turn into...
537 (mips_target::low_delete_process): ...this.
538 (mips_linux_new_thread): Turn into...
539 (mips_target::low_new_thread): ...this.
540 (mips_linux_delete_thread): Turn into...
541 (mips_target::low_delete_thread): ...this.
542 (mips_linux_new_fork): Turn into...
543 (mips_target::low_new_fork): ...this.
544 (the_low_target): Remove the op fields.
545 * linux-bfin-low.cc (the_low_target): Remove the op fields.
546 * linux-crisv32-low.cc (the_low_target): Ditto.
547 * linux-m32r-low.cc (the_low_target): Ditto.
548 * linux-m68k-low.cc (the_low_target): Ditto.
549 * linux-ppc-low.cc (the_low_target): Ditto.
550 * linux-s390-low.cc (the_low_target): Ditto.
551 * linux-sh-low.cc (the_low_target): Ditto.
552 * linux-tic6x-low.cc (the_low_target): Ditto.
553 * linux-tile-low.cc (the_low_target): Ditto.
554 * linux-xtensa-low.cc (the_low_target): Ditto.
556 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
558 Turn the 'siginfo_fixup' linux target op into a method of
559 linux_process_target.
561 * linux-low.h (struct linux_target_ops): Remove the op.
562 (class linux_process_target) <siginfo_fixup>
563 <low_siginfo_fixup>: Declare.
564 * linux-low.cc (siginfo_fixup): Turn into...
565 (linux_process_target::siginfo_fixup): ...this.
566 (linux_process_target::low_siginfo_fixup): Define.
567 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
568 (x86_siginfo_fixup): Turn into...
569 (x86_target::low_siginfo_fixup): ...this.
570 (the_low_target): Remove the op field.
571 * linux-aarch64-low.cc (class aarch64_target):
572 <low_siginfo_fixup>: Declare.
573 (aarch64_linux_siginfo_fixup): Turn into...
574 (aarch64_target::low_siginfo_fixup): ...this.
575 (the_low_target): Remove the op field.
576 * linux-arm-low.cc (the_low_target): Remove the op field.
577 * linux-bfin-low.cc (the_low_target): Ditto.
578 * linux-crisv32-low.cc (the_low_target): Ditto.
579 * linux-m32r-low.cc (the_low_target): Ditto.
580 * linux-m68k-low.cc (the_low_target): Ditto.
581 * linux-mips-low.cc (the_low_target): Ditto.
582 * linux-ppc-low.cc (the_low_target): Ditto.
583 * linux-s390-low.cc (the_low_target): Ditto.
584 * linux-sh-low.cc (the_low_target): Ditto.
585 * linux-tic6x-low.cc (the_low_target): Ditto.
586 * linux-tile-low.cc (the_low_target): Ditto.
587 * linux-xtensa-low.cc (the_low_target): Ditto.
589 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
591 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
592 linux target ops into methods of linux_process_target.
594 * linux-low.h (struct linux_target_ops): Remove the ops.
595 (class linux_process_target) <low_collect_ptrace_register>
596 <low_store_ptrace_register>: Declare.
597 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
598 (linux_process_target::low_supply_ptrace_register): Define.
600 Update the callers below.
602 (linux_process_target::fetch_register)
603 (linux_process_target::store_register)
605 * linux-x86-low.cc (the_low_target): Remove the op fields.
606 * linux-aarch64-low.cc (the_low_target): Ditto.
607 * linux-arm-low.cc (the_low_target): Ditto.
608 * linux-bfin-low.cc (the_low_target): Ditto.
609 * linux-crisv32-low.cc (the_low_target): Ditto.
610 * linux-m32r-low.cc (the_low_target): Ditto.
611 * linux-m68k-low.cc (the_low_target): Ditto.
612 * linux-sh-low.cc (the_low_target): Ditto.
613 * linux-sparc-low.cc (the_low_target): Ditto.
614 * linux-tic6x-low.cc (the_low_target): Ditto.
615 * linux-tile-low.cc (the_low_target): Ditto.
616 * linux-xtensa-low.cc (the_low_target): Ditto.
617 * linux-mips-low.cc (class mips_target)
618 <low_collect_ptrace_register>
619 <low_supply_ptrace_register>: Declare.
620 (mips_collect_ptrace_register): Turn into ...
621 (mips_target::low_collect_ptrace_register): ...this.
622 (mips_supply_ptrace_register): Turn into...
623 (mips_target::low_supply_ptrace_register): ...this.
624 (the_low_target): Remove the op fields.
625 * linux-ppc-low.cc (class ppc_target)
626 <low_collect_ptrace_register>
627 <low_supply_ptrace_register>: Declare.
628 (ppc_collect_ptrace_register): Turn into ...
629 (ppc_target::low_collect_ptrace_register): ...this.
630 (ppc_supply_ptrace_register): Turn into ...
631 (ppc_target::low_supply_ptrace_register): ...this.
632 (ppc_fill_gregset): Update for the calls to
633 low_collect_ptrace_register.
634 (the_low_target): Remove the op fields.
635 * linux-s390-low.cc (class s390_target)
636 <low_collect_ptrace_register>
637 <low_supply_ptrace_register>: Declare.
638 (s390_collect_ptrace_register): Turn into ...
639 (s390_target::low_collect_ptrace_register): ...this.
640 (s390_supply_ptrace_register): Turn into ...
641 (s390_target::low_supply_ptrace_register): ...this.
642 (s390_fill_gregset): Update for the calls to
643 low_collect_ptrace_register.
644 (the_low_target): Remove the op fields.
646 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
648 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
649 target ops into methods of linux_process_target.
651 * linux-low.h (struct linux_target_ops): Remove the ops.
652 (class linux_process_target) <check_stopped_by_watchpoint>
653 <low_stopped_by_watchpoint>
654 <low_stopped_data_address>: Declare.
655 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
656 (linux_process_target::check_stopped_by_watchpoint): ...this.
657 (linux_process_target::low_stopped_by_watchpoint): Define.
658 (linux_process_target::low_stopped_data_address): Define.
659 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
660 <low_stopped_data_address>: Declare.
661 (x86_stopped_by_watchpoint): Turn into...
662 (x86_target::low_stopped_by_watchpoint): ...this.
663 (x86_stopped_data_address): Turn into...
664 (x86_target::low_stopped_data_address): ...this.
665 (the_low_target): Remove the op fields.
666 * linux-aarch64-low.cc (class aarch64_target)
667 <low_stopped_by_watchpoint>
668 <low_stopped_data_address>: Declare.
669 (aarch64_stopped_by_watchpoint): Turn into...
670 (aarch64_target::low_stopped_by_watchpoint): ...this.
671 (aarch64_stopped_data_address): Turn into...
672 (aarch64_target::low_stopped_data_address): ...this.
673 (the_low_target): Remove the op fields.
674 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
675 <low_stopped_data_address>: Declare.
676 (arm_stopped_by_watchpoint): Turn into...
677 (arm_target::low_stopped_by_watchpoint): ...this.
678 (arm_stopped_data_address): Turn into...
679 (arm_target::low_stopped_data_address): ...this.
680 (the_low_target): Remove the op fields.
681 * linux-crisv32-low.cc (class crisv32_target)
682 <low_stopped_by_watchpoint>
683 <low_stopped_data_address>: Declare.
684 (cris_stopped_by_watchpoint): Turn into...
685 (crisv32_target::low_stopped_by_watchpoint): ...this.
686 (cris_stopped_data_address): Turn into...
687 (crisv32_target::low_stopped_data_address): ...this.
688 (the_low_target): Remove the op fields.
689 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
690 <low_stopped_data_address>: Declare.
691 (mips_stopped_by_watchpoint): Turn into...
692 (mips_target::low_stopped_by_watchpoint): ...this.
693 (mips_stopped_data_address): Turn into...
694 (mips_target::low_stopped_data_address): ...this.
695 (the_low_target): Remove the op fields.
696 * linux-bfin-low.cc (the_low_target): Remove the op fields.
697 * linux-m32r-low.cc (the_low_target): Ditto.
698 * linux-m68k-low.cc (the_low_target): Ditto.
699 * linux-ppc-low.cc (the_low_target): Ditto.
700 * linux-s390-low.cc (the_low_target): Ditto.
701 * linux-sh-low.cc (the_low_target): Ditto.
702 * linux-sparc-low.cc (the_low_target): Ditto.
703 * linux-tic6x-low.cc (the_low_target): Ditto.
704 * linux-tile-low.cc (the_low_target): Ditto.
705 * linux-xtensa-low.cc (the_low_target): Ditto.
707 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
709 Turn the 'insert_point' and 'remove_point' linux target ops into
710 methods of linux_process_target.
712 * linux-low.h (struct linux_target_ops): Remove the ops.
713 (class linux_process_target) <low_insert_point>
714 <low_remove_point>: Declare.
715 * linux-low.cc (linux_process_target::low_insert_point)
716 (linux_process_target::low_remove_point): Define.
717 (linux_process_target::insert_point)
718 (linux_process_target::remove_point): Update for calls to
719 low_insert_point and low_remove_point.
720 * linux-x86-low.cc (class x86_target) <low_insert_point>
721 <low_remove_point>: Declare.
722 (x86_insert_point): Turn into...
723 (x86_target::low_insert_point): ...this.
724 (x86_remove_point): Turn into...
725 (x86_target::low_remove_point): ...this.
726 (the_low_target): Remove the op fields.
727 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
728 <low_remove_point>: Declare.
729 (aarch64_insert_point): Turn into...
730 (aarch64_target::low_insert_point): ...this.
731 (aarch64_remove_point): Turn into...
732 (aarch64_target::low_remove_point): ...this.
733 (the_low_target): Remove the op fields.
734 * linux-arm-low.cc (class arm_target) <low_insert_point>
735 <low_remove_point>: Declare.
736 (arm_insert_point): Turn into...
737 (arm_target::low_insert_point): ...this.
738 (arm_remove_point): Turn into...
739 (arm_target::low_remove_point): ...this.
740 (the_low_target): Remove the op fields.
741 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
742 <low_remove_point>: Declare.
743 (crisv32_insert_point): Turn into...
744 (crisv32_target::low_insert_point): ...this.
745 (crisv32_remove_point): Turn into...
746 (crisv32_target::low_remove_point): ...this.
747 (the_low_target): Remove the op fields.
748 * linux-mips-low.cc (class mips_target) <low_insert_point>
749 <low_remove_point>: Declare.
750 (mips_insert_point): Turn into...
751 (mips_target::low_insert_point): ...this.
752 (mips_remove_point): Turn into...
753 (mips_target::low_remove_point): ...this.
754 (the_low_target): Remove the op fields.
755 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
756 <low_remove_point>: Declare.
757 (ppc_insert_point): Turn into...
758 (ppc_target::low_insert_point): ...this.
759 (ppc_remove_point): Turn into...
760 (ppc_target::low_remove_point): ...this.
761 (the_low_target): Remove the op fields.
762 * linux-bfin-low.cc (the_low_target): Remove the op fields.
763 * linux-m32r-low.cc (the_low_target): Ditto.
764 * linux-m68k-low.cc (the_low_target): Ditto.
765 * linux-s390-low.cc (the_low_target): Ditto.
766 * linux-sh-low.cc (the_low_target): Ditto.
767 * linux-sparc-low.cc (the_low_target): Ditto.
768 * linux-tic6x-low.cc (the_low_target): Ditto.
769 * linux-tile-low.cc (the_low_target): Ditto.
770 * linux-xtensa-low.cc (the_low_target): Ditto.
772 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
774 Remove the 'supports_z_point_type' linux target op and let the
775 concrete linux target define it by overriding the op declared in
776 process_stratum_target.
778 * linux-low.cc (linux_process_target::supports_z_point_type):
780 * linux-low.h (struct linux_target_ops): Remove the op.
781 (class linux_process_target) <supports_z_point_type>: Remove.
782 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
784 (x86_supports_z_point_type): Turn into...
785 (x86_target::supports_z_point_type): ...this.
786 (the_low_target): Remove the op field.
787 * linux-aarch64-low.cc (class aarch64_target)
788 <supports_z_point_type>: Declare.
789 (aarch64_supports_z_point_type): Turn into...
790 (aarch64_target::supports_z_point_type): ...this.
791 (the_low_target): Remove the op field.
792 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
794 (arm_supports_z_point_type): Turn into...
795 (arm_target::supports_z_point_type): ...this.
796 (the_low_target): Remove the op field.
797 * linux-crisv32-low.cc (class crisv32_target)
798 <supports_z_point_type>: Declare.
799 (cris_supports_z_point_type): Turn into...
800 (crisv32_target::supports_z_point_type): ...this.
801 (the_low_target): Remove the op field.
802 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
804 (mips_supports_z_point_type): Turn into...
805 (mips_target::supports_z_point_type): ...this.
806 (the_low_target): Remove the op field.
807 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
809 (ppc_supports_z_point_type): Turn into...
810 (ppc_target::supports_z_point_type): ...this.
811 (the_low_target): Remove the op field.
812 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
814 (s390_supports_z_point_type): Turn into...
815 (s390_target::supports_z_point_type): ...this.
816 (the_low_target): Remove the op field.
817 * linux-bfin-low.cc (the_low_target): Remove the op field.
818 * linux-m32r-low.cc (the_low_target): Ditto.
819 * linux-m68k-low.cc (the_low_target): Ditto.
820 * linux-sh-low.cc (the_low_target): Ditto.
821 * linux-sparc-low.cc (the_low_target): Ditto.
822 * linux-tic6x-low.cc (the_low_target): Ditto.
823 * linux-tile-low.cc (the_low_target): Ditto.
824 * linux-xtensa-low.cc (the_low_target): Ditto.
826 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
828 Turn the 'breakpoint_at' linux target op into a method of
829 linux_process_target.
831 * linux-low.h (struct linux_target_ops): Remove the op.
832 (class linux_process_target) <low_breakpoint_at>: Declare.
834 Update the callers below:
836 * linux-low.cc (linux_process_target::save_stop_reason)
837 (linux_process_target::thread_still_has_status_pending)
838 (linux_process_target::wait_1)
840 * linux-x86-low.cc (class x86_target)
841 <low_breakpoint_at>: Declare.
842 (x86_breakpoint_at): Turn into...
843 (x86_target::low_breakpoint_at): ...this.
844 (the_low_target): Remove the op field.
845 * linux-aarch64-low.cc (class aarch64_target)
846 <low_breakpoint_at>: Declare.
847 (aarch64_breakpoint_at): Turn into...
848 (aarch64_target::low_breakpoint_at): ...this.
849 (the_low_target): Remove the op field.
850 * linux-arm-low.cc (class arm_target)
851 <low_breakpoint_at>: Declare.
852 (arm_target::low_breakpoint_at): Define.
853 (the_low_target): Remove the op field.
854 * linux-bfin-low.cc (class bfin_target)
855 <low_breakpoint_at>: Declare.
856 (bfin_breakpoint_at): Turn into...
857 (bfin_target::low_breakpoint_at): ...this.
858 (the_low_target): Remove the op field.
859 * linux-cris-low.cc (class cris_target)
860 <low_breakpoint_at>: Declare.
861 (cris_breakpoint_at): Turn into...
862 (cris_target::low_breakpoint_at): ...this.
863 (the_low_target): Remove the op field.
864 * linux-crisv32-low.cc (class crisv32_target)
865 <low_breakpoint_at>: Declare.
866 (crisv32_breakpoint_at): Turn into...
867 (crisv32_target::low_breakpoint_at): ...this.
868 (the_low_target): Remove the op field.
869 * linux-ia64-low.cc (class ia64_target)
870 <low_breakpoint_at>: Declare.
871 (ia64_target::low_breakpoint_at): Define.
872 * linux-m32r-low.cc (class m32r_target)
873 <low_breakpoint_at>: Declare.
874 (m32r_breakpoint_at): Turn into...
875 (m32r_target::low_breakpoint_at): ...this.
876 (the_low_target): Remove the op field.
877 * linux-m68k-low.cc (class m68k_target)
878 <low_breakpoint_at>: Declare.
879 (m68k_breakpoint_at): Turn into...
880 (m68k_target::low_breakpoint_at): ...this.
881 (the_low_target): Remove the op field.
882 * linux-mips-low.cc (class mips_target)
883 <low_breakpoint_at>: Declare.
884 (mips_breakpoint_at): Turn into...
885 (mips_target::low_breakpoint_at): ...this.
886 (the_low_target): Remove the op field.
887 * linux-nios2-low.cc (class nios2_target)
888 <low_breakpoint_at>: Declare.
889 (nios2_breakpoint_at): Turn into...
890 (nios2_target::low_breakpoint_at): ...this.
891 (the_low_target): Remove the op field.
892 * linux-ppc-low.cc (class ppc_target)
893 <low_breakpoint_at>: Declare.
894 (ppc_breakpoint_at): Turn into...
895 (ppc_target::low_breakpoint_at): ...this.
896 (the_low_target): Remove the op field.
897 * linux-riscv-low.cc (class riscv_target)
898 <low_breakpoint_at>: Declare.
899 (riscv_breakpoint_at): Turn into...
900 (riscv_target::low_breakpoint_at): ...this.
901 (the_low_target): Remove the op field.
902 * linux-s390-low.cc (class s390_target)
903 <low_breakpoint_at>: Declare.
904 (s390_breakpoint_at): Turn into...
905 (s390_target::low_breakpoint_at): ...this.
906 (the_low_target): Remove the op field.
907 * linux-sh-low.cc (class sh_target)
908 <low_breakpoint_at>: Declare.
909 (sh_breakpoint_at): Turn into...
910 (sh_target::low_breakpoint_at): ...this.
911 (the_low_target): Remove the op field.
912 * linux-sparc-low.cc (class sparc_target)
913 <low_breakpoint_at>: Declare.
914 (sparc_breakpoint_at): Turn into...
915 (sparc_target::low_breakpoint_at): ...this.
916 (the_low_target): Remove the op field.
917 * linux-tic6x-low.cc (class tic6x_target)
918 <low_breakpoint_at>: Declare.
919 (tic6x_breakpoint_at): Turn into...
920 (tic6x_target::low_breakpoint_at): ...this.
921 (the_low_target): Remove the op field.
922 * linux-tile-low.cc (class tile_target)
923 <low_breakpoint_at>: Declare.
924 (tile_breakpoint_at): Turn into...
925 (tile_target::low_breakpoint_at): ...this.
926 (the_low_target): Remove the op field.
927 * linux-xtensa-low.cc (class xtensa_target)
928 <low_breakpoint_at>: Declare.
929 (xtensa_breakpoint_at): Turn into...
930 (xtensa_target::low_breakpoint_at): ...this.
931 (the_low_target): Remove the op field.
933 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
935 Turn the 'decr_pc_after_break' linux_target_ops field into
936 a method of linux_process_target.
938 * linux-low.h (struct linux_target_ops)
939 <decr_pc_after_break>: Remove.
940 (class linux_process_target) <low_decr_pc_after_break>: New method
942 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
943 New method implementation.
945 Update the users below.
947 (linux_process_target::save_stop_reason)
948 (linux_process_target::wait_1)
949 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
951 (x86_target::low_decr_pc_after_break): New method implementation.
952 (the_low_target): Remove the field.
953 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
955 (bfin_target::low_decr_pc_after_break): New method implementation.
956 (the_low_target): Remove the field.
957 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
959 (m68k_target::low_decr_pc_after_break): New method implementation.
960 (the_low_target): Remove the field.
961 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
963 (s390_target::low_decr_pc_after_break): New method implementation.
964 (the_low_target): Remove the field.
965 * linux-aarch64-low.cc (the_low_target): Remove the field.
966 * linux-arm-low.cc (the_low_target): Remove the field.
967 * linux-cris-low.cc (the_low_target): Remove the field.
968 * linux-crisv32-low.cc (the_low_target): Remove the field.
969 * linux-m32r-low.cc (the_low_target): Remove the field.
970 * linux-mips-low.cc (the_low_target): Remove the field.
971 * linux-nios2-low.cc (the_low_target): Remove the field.
972 * linux-ppc-low.cc (the_low_target): Remove the field.
973 * linux-riscv-low.cc (the_low_target): Remove the field.
974 * linux-sh-low.cc (the_low_target): Remove the field.
975 * linux-sparc-low.cc (the_low_target): Remove the field.
976 * linux-tic6x-low.cc (the_low_target): Remove the field.
977 * linux-tile-low.cc (the_low_target): Remove the field.
978 * linux-xtensa-low.cc (the_low_target): Remove the field.
980 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
982 Remove the 'supports_software_single_step' linux target op and let
983 the concrete linux target define it by overriding the op in
984 process_stratum_target.
985 Turn the 'get_next_pcs' linux target op into a method of
986 linux_process_target.
988 * linux-low.h (struct linux_target_ops): Remove the ops.
989 (class linux_process_target) <supports_software_single_step>:
991 <low_get_next_pcs>: Declare.
992 * linux-low.cc (can_software_single_step): Remove.
993 (linux_process_target::low_get_next_pcs): Define.
994 (linux_process_target::supports_software_single_step): Remove.
996 Update the callers below.
998 (linux_process_target::handle_extended_wait)
999 (linux_process_target::wait_1)
1000 (linux_process_target::install_software_single_step_breakpoints)
1001 (linux_process_target::single_step)
1002 (linux_process_target::thread_needs_step_over)
1003 (linux_process_target::proceed_one_lwp)
1004 (linux_process_target::supports_range_stepping)
1006 * linux-x86-low.cc (the_low_target): Remove the op field.
1007 * linux-aarch64-low.cc (the_low_target): Ditto.
1008 * linux-bfin-low.cc (the_low_target): Ditto.
1009 * linux-cris-low.cc (the_low_target): Ditto.
1010 * linux-crisv32-low.cc (the_low_target): Ditto.
1011 * linux-m32r-low.cc (the_low_target): Ditto.
1012 * linux-m68k-low.cc (the_low_target): Ditto.
1013 * linux-mips-low.cc (the_low_target): Ditto.
1014 * linux-nios2-low.cc (the_low_target): Ditto.
1015 * linux-ppc-low.cc (the_low_target): Ditto.
1016 * linux-riscv-low.cc (the_low_target): Ditto.
1017 * linux-s390-low.cc (the_low_target): Ditto.
1018 * linux-sh-low.cc (the_low_target): Ditto.
1019 * linux-sparc-low.cc (the_low_target): Ditto.
1020 * linux-tic6x-low.cc (the_low_target): Ditto.
1021 * linux-tile-low.cc (the_low_target): Ditto.
1022 * linux-xtensa-low.cc (the_low_target): Ditto.
1023 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1024 <supports_software_single_step>: Declare.
1025 (arm_target::supports_software_single_step): Define.
1026 (arm_gdbserver_get_next_pcs): Turn into...
1027 (arm_target::low_get_next_pcs): ...this.
1028 (the_low_target): Remove the op field.
1030 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1032 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1033 the concrete linux target define it by overriding the op
1034 in process_stratum_target.
1036 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1038 * linux-low.h (struct linux_target_ops): Remove the op.
1039 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1040 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1042 (x86_sw_breakpoint_from_kind): Turn into...
1043 (x86_target::sw_breakpoint_from_kind): ...this.
1044 (the_low_target): Remove the op field.
1045 * linux-aarch64-low.cc (class aarch64_target)
1046 <sw_breakpoint_from_kind>: Declare.
1047 (aarch64_sw_breakpoint_from_kind): Turn into...
1048 (aarch64_target::sw_breakpoint_from_kind): ...this.
1049 (the_low_target): Remove the op field.
1050 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1052 (arm_target::sw_breakpoint_from_kind): Define.
1053 (the_low_target): Remove the op field.
1054 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
1056 (bfin_sw_breakpoint_from_kind): Turn into...
1057 (bfin_target::sw_breakpoint_from_kind): ...this.
1058 (the_low_target): Remove the op field.
1059 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
1061 (cris_sw_breakpoint_from_kind): Turn into...
1062 (cris_target::sw_breakpoint_from_kind): ...this.
1063 (the_low_target): Remove the op field.
1064 * linux-crisv32-low.cc (class crisv32_target)
1065 <sw_breakpoint_from_kind>: Declare.
1066 (cris_sw_breakpoint_from_kind): Turn into...
1067 (crisv32_target::sw_breakpoint_from_kind): ...this.
1068 (the_low_target): Remove the op field.
1069 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
1071 (ia64_target::sw_breakpoint_from_kind): Define.
1072 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
1074 (m32r_sw_breakpoint_from_kind): Turn into...
1075 (m32r_target::sw_breakpoint_from_kind): ...this.
1076 (the_low_target): Remove the op field.
1077 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
1079 (m68k_sw_breakpoint_from_kind): Turn into...
1080 (m68k_target::sw_breakpoint_from_kind): ...this.
1081 (the_low_target): Remove the op field.
1082 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
1084 (mips_sw_breakpoint_from_kind): Turn into...
1085 (mips_target::sw_breakpoint_from_kind): ...this.
1086 (the_low_target): Remove the op field.
1087 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
1089 (nios2_sw_breakpoint_from_kind): Turn into...
1090 (nios2_target::sw_breakpoint_from_kind): ...this.
1091 (the_low_target): Remove the op field.
1092 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1094 (ppc_sw_breakpoint_from_kind): Turn into...
1095 (ppc_target::sw_breakpoint_from_kind): ...this.
1096 (the_low_target): Remove the op field.
1097 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1099 (riscv_sw_breakpoint_from_kind): Turn into...
1100 (riscv_target::sw_breakpoint_from_kind): ...this.
1101 (the_low_target): Remove the op field.
1102 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1104 (s390_sw_breakpoint_from_kind): Turn into...
1105 (s390_target::sw_breakpoint_from_kind): ...this.
1106 (the_low_target): Remove the op field.
1107 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1109 (sh_sw_breakpoint_from_kind): Turn into...
1110 (sh_target::sw_breakpoint_from_kind): ...this.
1111 (the_low_target): Remove the op field.
1112 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1114 (sparc_sw_breakpoint_from_kind): Turn into...
1115 (sparc_target::sw_breakpoint_from_kind): ...this.
1116 (the_low_target): Remove the op field.
1117 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1119 (tic6x_sw_breakpoint_from_kind): Turn into...
1120 (tic6x_target::sw_breakpoint_from_kind): ...this.
1121 (the_low_target): Remove the op field.
1122 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1124 (tile_sw_breakpoint_from_kind): Turn into...
1125 (tile_target::sw_breakpoint_from_kind): ...this.
1126 (the_low_target): Remove the op field.
1127 * linux-xtensa-low.cc (class xtensa_target)
1128 <sw_breakpoint_from_kind>: Declare.
1129 (xtensa_sw_breakpoint_from_kind): Turn into...
1130 (xtensa_target::sw_breakpoint_from_kind): ...this.
1131 (the_low_target): Remove the op field.
1133 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1135 Remove the 'breakpoint_kind_from_pc' and
1136 'breakpoint_kind_from_current_state' linux target ops, and let the
1137 concrete linux target define them by overriding the ops of
1138 process_stratum_target.
1140 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1142 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1143 * linux-low.h (struct linux_target_ops): Remove ops.
1144 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1145 <breakpoint_kind_from_current_state>: Remove.
1146 * linux-x86-low.cc (the_low_target): Remove the op fields.
1147 * linux-bfin-low.cc (the_low_target): Ditto.
1148 * linux-cris-low.cc (the_low_target): Ditto.
1149 * linux-crisv32-low.cc (the_low_target): Ditto.
1150 * linux-m32r-low.cc (the_low_target): Ditto.
1151 * linux-m68k-low.cc (the_low_target): Ditto.
1152 * linux-mips-low.cc (the_low_target): Ditto.
1153 * linux-nios2-low.cc (the_low_target): Ditto.
1154 * linux-ppc-low.cc (the_low_target): Ditto.
1155 * linux-s390-low.cc (the_low_target): Ditto.
1156 * linux-sh-low.cc (the_low_target): Ditto.
1157 * linux-sparc-low.cc (the_low_target): Ditto.
1158 * linux-tic6x-low.cc (the_low_target): Ditto.
1159 * linux-tile-low.cc (the_low_target): Ditto.
1160 * linux-xtensa-low.cc (the_low_target): Ditto.
1161 * linux-aarch64-low.cc (class aarch64_target)
1162 <breakpoint_kind_from_pc>
1163 <breakpoint_kind_from_current_state>: Declare.
1164 (aarch64_breakpoint_kind_from_pc): Turn into...
1165 (aarch64_target::breakpoint_kind_from_pc): ...this.
1166 (aarch64_breakpoint_kind_from_current_state): Turn into...
1167 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1168 (the_low_target): Remove the op fields.
1169 * linux-arm-low.cc (class arm_target):
1170 <breakpoint_kind_from_pc>
1171 <breakpoint_kind_from_current_state>: Declare.
1172 (arm_target::breakpoint_kind_from_pc): Define.
1173 (arm_target::breakpoint_kind_from_current_state): Define.
1174 (the_low_target): Remove the op fields.
1175 * linux-riscv-low.cc (class riscv_target):
1176 <breakpoint_kind_from_pc>: Declare.
1177 (riscv_breakpoint_kind_from_pc): Turn into...
1178 (riscv_target::breakpoint_kind_from_pc): ...this.
1179 (the_low_target): Remove the op fields.
1181 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1183 Turn the 'get_pc' and 'set_pc' linux target ops into methods
1184 of linux_process_target.
1186 * linux-low.h (struct linux_target_ops): Remove the ops.
1187 (class linux_process_target) <low_supports_breakpoints>
1189 <low_set_pc>: Declare.
1190 * linux-low.cc (supports_breakpoints): Turn into...
1191 (linux_process_target::low_supports_breakpoints): ...this.
1192 (linux_process_target::low_get_pc): Define.
1193 (linux_process_target::low_set_pc): Define.
1195 Update the callers below.
1197 (linux_process_target::get_pc)
1198 (linux_process_target::save_stop_reason)
1199 (linux_process_target::maybe_move_out_of_jump_pad)
1200 (linux_process_target::wait_1)
1201 (linux_process_target::resume_one_lwp_throw)
1202 (linux_process_target::resume)
1203 (linux_process_target::proceed_all_lwps)
1204 (linux_process_target::read_pc)
1205 (linux_process_target::write_pc)
1207 * linux-x86-low.cc (class linux_process_target)
1208 <low_supports_breakpoints>
1210 <low_set_pc>: Declare.
1211 (x86_target::low_supports_breakpoints): Define.
1212 (x86_get_pc): Turn into...
1213 (x86_target::low_get_pc): ...this.
1214 (x86_set_pc): Turn into...
1215 (x86_target::low_set_pc): ...this.
1216 (the_low_target): Remove the op fields.
1217 * linux-arm-low.cc (class arm_target)
1218 <low_supports_breakpoints>
1220 <low_set_pc>: Declare.
1221 (arm_target::low_supports_breakpoints)
1222 (arm_target::low_get_pc)
1223 (arm_target::low_set_pc): Define.
1224 (the_low_target): Remove the op fields.
1225 * linux-bfin-low.cc (class bfin_target)
1226 <low_supports_breakpoints>
1228 <low_set_pc>: Declare.
1229 (bfin_target::low_supports_breakpoints)
1230 (bfin_target::low_get_pc)
1231 (bfin_target::low_set_pc): Define.
1232 (the_low_target): Remove the op fields.
1233 * linux-cris-low.cc (class cris_target)
1234 <low_supports_breakpoints>
1236 <low_set_pc>: Declare.
1237 (cris_target::low_supports_breakpoints)
1238 (cris_target::low_get_pc)
1239 (cris_target::low_set_pc): Define.
1240 (the_low_target): Remove the op fields.
1241 * linux-crisv32-low.cc (class crisv32_target)
1242 <low_supports_breakpoints>
1244 <low_set_pc>: Declare.
1245 (crisv32_target::low_supports_breakpoints)
1246 (crisv32_target::low_get_pc)
1247 (crisv32_target::low_set_pc): Define.
1248 (the_low_target): Remove the op fields.
1249 * linux-m32r-low.cc (class m32r_target)
1250 <low_supports_breakpoints>
1252 <low_set_pc>: Declare.
1253 (m32r_target::low_supports_breakpoints)
1254 (m32r_target::low_get_pc)
1255 (m32r_target::low_set_pc): Define.
1256 (the_low_target): Remove the op fields.
1257 * linux-m68k-low.cc (class m68k_target)
1258 <low_supports_breakpoints>
1260 <low_set_pc>: Declare.
1261 (m68k_target::low_supports_breakpoints)
1262 (m68k_target::low_get_pc)
1263 (m68k_target::low_set_pc): Define.
1264 (the_low_target): Remove the op fields.
1265 * linux-nios2-low.cc (class nios2_target)
1266 <low_supports_breakpoints>
1268 <low_set_pc>: Declare.
1269 (nios2_target::low_supports_breakpoints)
1270 (nios2_target::low_get_pc)
1271 (nios2_target::low_set_pc): Define.
1272 (the_low_target): Remove the op fields.
1273 * linux-sh-low.cc (class sh_target)
1274 <low_supports_breakpoints>
1276 <low_set_pc>: Declare.
1277 (sh_target::low_supports_breakpoints)
1278 (sh_target::low_get_pc)
1279 (sh_target::low_set_pc): Define.
1280 (the_low_target): Remove the op fields.
1281 * linux-xtensa-low.cc (class xtensa_target)
1282 <low_supports_breakpoints>
1284 <low_set_pc>: Declare.
1285 (xtensa_target::low_supports_breakpoints)
1286 (xtensa_target::low_get_pc)
1287 (xtensa_target::low_set_pc): Define.
1288 (the_low_target): Remove the op fields.
1289 * linux-sparc-low.cc (class sparc_target)
1290 <low_supports_breakpoints>
1291 <low_get_pc>: Declare.
1292 (sparc_target::low_supports_breakpoints)
1293 (sparc_target::low_get_pc): Define.
1294 (the_low_target): Remove the op fields.
1295 * linux-tile-low.cc (class tile_target)
1296 <low_supports_breakpoints>
1298 <low_set_pc>: Declare.
1299 (tile_target::low_supports_breakpoints)
1300 (tile_target::low_get_pc)
1301 (tile_target::low_set_pc): Define.
1302 (the_low_target): Remove the op fields.
1303 * linux-aarch64-low.cc (class aarch64_target)
1304 <low_supports_breakpoints>
1306 <low_set_pc>: Declare.
1307 (aarch64_target::low_supports_breakpoints): Define.
1308 (aarch64_get_pc): Turn into...
1309 (aarch64_target::low_get_pc): ...this.
1310 (aarch64_set_pc): Turn into...
1311 (aarch64_target::low_set_pc): ...this.
1312 (the_low_target): Remove the op fields.
1313 * linux-mips-low.cc (class mips_target)
1314 <low_supports_breakpoints>
1316 <low_set_pc>: Declare.
1317 (mips_target::low_supports_breakpoints): Define.
1318 (mips_get_pc): Turn into...
1319 (mips_target::low_get_pc): ...this.
1320 (mips_set_pc): Turn into...
1321 (mips_target::low_set_pc): ...this.
1322 (the_low_target): Remove the op fields.
1323 * linux-ppc-low.cc (class ppc_target)
1324 <low_supports_breakpoints>
1326 <low_set_pc>: Declare.
1327 (ppc_target::low_supports_breakpoints): Define.
1328 (ppc_get_pc): Turn into...
1329 (ppc_target::low_get_pc): ...this.
1330 (ppc_set_pc): Turn into...
1331 (ppc_target::low_set_pc): ...this.
1332 (the_low_target): Remove the op fields.
1333 * linux-riscv-low.cc (class riscv_target)
1334 <low_supports_breakpoints>
1336 <low_set_pc>: Declare.
1337 (riscv_target::low_supports_breakpoints): Define.
1338 (riscv_get_pc): Turn into...
1339 (riscv_target::low_get_pc): ...this.
1340 (riscv_set_pc): Turn into...
1341 (riscv_target::low_set_pc): ...this.
1342 (the_low_target): Remove the op fields.
1343 * linux-s390-low.cc (class s390_target)
1344 <low_supports_breakpoints>
1346 <low_set_pc>: Declare.
1347 (s390_target::low_supports_breakpoints): Define.
1348 (s390_get_pc): Turn into...
1349 (s390_target::low_get_pc): ...this.
1350 (s390_set_pc): Turn into...
1351 (s390_target::low_set_pc): ...this.
1352 (the_low_target): Remove the op fields.
1353 * linux-tic6x-low.cc (class tic6x_target)
1354 <low_supports_breakpoints>
1356 <low_set_pc>: Declare.
1357 (tic6x_target::low_supports_breakpoints): Define.
1358 (tic6x_get_pc): Turn into...
1359 (tic6x_target::low_get_pc): ...this.
1360 (tic6x_set_pc): Turn into...
1361 (tic6x_target::low_set_pc): ...this.
1362 (the_low_target): Remove the op fields.
1364 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1366 Turn some more static methods in linux-low into private methods
1367 of linux_process_target.
1369 * linux-low.cc (get_pc): Turn into...
1370 (linux_process_target::get_pc): ...this.
1371 (save_stop_reason): Turn into...
1372 (linux_process_target::save_stop_reason): ...this.
1373 (thread_still_has_status_pending_p): Turn into...
1374 (linux_process_target::thread_still_has_status_pending): ...this.
1375 (status_pending_p_callback): Turn into...
1376 (linux_process_target::status_pending_p_callback): ...this.
1377 (resume_stopped_resumed_lwps): Turn into...
1378 (linux_process_target::resume_stopped_resumed_lwps): ...this.
1379 (install_software_single_step_breakpoints): Turn into...
1380 (linux_process_target::install_software_single_step_breakpoints):
1382 (single_step): Turn into...
1383 (linux_process_target::single_step): ...this.
1384 (linux_resume_one_lwp_throw): Turn into...
1385 (linux_process_target::resume_one_lwp_throw): ...this.
1386 (linux_resume_one_lwp): Turn into...
1387 (linux_process_target::resume_one_lwp): ...this.
1388 (resume_status_pending_p): Turn into...
1389 (linux_process_target::resume_status_pending): ...this.
1390 (need_step_over_p): Turn into...
1391 (linux_process_target::thread_needs_step_over): ...this.
1392 (linux_resume_one_thread): Turn into...
1393 (linux_process_target::resume_one_thread): ...this.
1394 (proceed_one_lwp): Turn into...
1395 (linux_process_target::proceed_one_lwp): ...this.
1396 (unsuspend_and_proceed_one_lwp): Turn into...
1397 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
1399 Update the calls/references to the above functions below.
1401 (linux_process_target::handle_extended_wait)
1402 (linux_process_target::filter_event)
1403 (linux_process_target::wait_for_event_filtered)
1404 (linux_process_target::wait_1)
1405 (linux_process_target::move_out_of_jump_pad)
1406 (linux_process_target::start_step_over)
1407 (linux_process_target::resume)
1408 (linux_process_target::proceed_all_lwps)
1409 (regsets_store_inferior_registers)
1410 (linux_process_target::store_register)
1412 * linux-low.h (class linux_process_target)
1415 <thread_still_has_status_pending>
1416 <status_pending_p_callback>
1417 <resume_stopped_resumed_lwps>
1418 <install_software_single_step_breakpoints>
1420 <resume_one_lwp_throw>
1422 <resume_status_pending>
1423 <thread_needs_step_over>
1426 <unsuspend_and_proceed_one_lwp>: Declare.
1428 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1430 Turn the 'fetch_register' linux target op into a method of
1431 linux_process_target.
1433 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
1434 (class linux_process_target) <low_fetch_register>: Declare.
1435 * linux-x86-low.cc (the_low_target)
1436 * linux-aarch64-low.cc (the_low_target)
1437 * linux-arm-low.cc (the_low_target)
1438 * linux-bfin-low.cc (the_low_target)
1439 * linux-cris-low.cc (the_low_target)
1440 * linux-crisv32-low.cc (the_low_target)
1441 * linux-m32r-low.cc (the_low_target)
1442 * linux-m68k-low.cc (the_low_target)
1443 * linux-nios2-low.cc (the_low_target)
1444 * linux-ppc-low.cc (the_low_target)
1445 * linux-s390-low.cc (the_low_target)
1446 * linux-sh-low.cc (the_low_target)
1447 * linux-sparc-low.cc (the_low_target)
1448 * linux-tic6x-low.cc (the_low_target)
1449 * linux-tile-low.cc (the_low_target)
1450 * linux-xtensa-low.cc (the_low_target): Remove the op field.
1451 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
1453 (ia64_fetch_register): Turn into...
1454 (ia64_target::low_fetch_register): ...this.
1455 (the_low_target): Remove the op field.
1456 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
1458 (mips_fetch_register): Turn into...
1459 (mips_target::low_fetch_register): ...this.
1460 (the_low_target): Remove the op field.
1461 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
1463 (riscv_fetch_register): Turn into...
1464 (riscv_target::low_fetch_register): ...this.
1465 (the_low_target): Remove the op field.
1467 Update the callers below.
1469 * linux-low.cc (linux_process_target::fetch_registers)
1470 (linux_process_target::low_fetch_register)
1472 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1474 Turn the 'cannot_fetch_register' and 'cannot_store_register'
1475 linux target ops into methods of linux_process_target.
1477 * linux-low.h (struct linux_target_ops): Remove the low target ops.
1478 (class linux_process_target) <fetch_register>
1480 <usr_fetch_inferior_registers>
1481 <usr_store_inferior_registers>
1482 <low_cannot_fetch_register>
1483 <low_cannot_fetch_register> Declare.
1484 * linux-low.cc (fetch_register): Turn into...
1485 (linux_process_target::fetch_register): ...this.
1486 (store_register): Turn into ...
1487 (linux_process_target::store_register): ...this.
1488 (usr_fetch_inferior_registers): Turn into...
1489 (linux_process_target::usr_fetch_inferior_registers): ...this.
1490 (usr_store_inferior_registers): Turn into...
1491 (linux_process_target::usr_store_inferior_registers): ...this.
1492 * linux-x86-low.cc (class x86_target)
1493 <low_cannot_fetch_register>
1494 <low_cannot_store_register>: Declare.
1495 (x86_cannot_store_register): Turn into...
1496 (x86_target::low_cannot_store_register): ...this.
1497 (x86_cannot_fetch_register): Turn into...
1498 (x86_target::low_cannot_fetch_register): ...this.
1499 (the_low_target): Remove the target op fields.
1500 * linux-aarch64-low.cc (class aarch64_target)
1501 <low_cannot_fetch_register>
1502 <low_cannot_store_register>: Declare.
1503 (aarch64_target::low_cannot_fetch_register)
1504 (aarch64_target::low_cannot_store_register): Define.
1505 (the_low_target): Remove the op fields.
1506 * linux-arm-low.cc (class arm_target)
1507 <low_cannot_fetch_register>
1508 <low_cannot_store_register>: Declare.
1509 (arm_cannot_fetch_register): Turn into...
1510 (arm_target::low_cannot_fetch_register): ...this.
1511 (arm_cannot_store_register): Turn into...
1512 (arm_target::low_cannot_store_register): ...this.
1513 (the_low_target): Remove the op fields.
1514 * linux-bfin-low.cc (class bfin_target)
1515 <low_cannot_fetch_register>
1516 <low_cannot_store_register>: Declare.
1517 (bfin_cannot_fetch_register): Turn into...
1518 (bfin_target::low_cannot_fetch_register): ...this.
1519 (bfin_cannot_store_register): Turn into...
1520 (bfin_target::low_cannot_store_register): ...this.
1521 (the_low_target): Remove the op fields.
1522 * linux-cris-low.cc (class cris_target)
1523 <low_cannot_fetch_register>
1524 <low_cannot_store_register>: Declare.
1525 (cris_cannot_fetch_register): Turn into...
1526 (cris_target::low_cannot_fetch_register): ...this.
1527 (cris_cannot_store_register): Turn into...
1528 (cris_target::low_cannot_store_register): ...this.
1529 (the_low_target): Remove the op fields.
1530 * linux-crisv32-low.cc (class crisv32_target)
1531 <low_cannot_fetch_register>
1532 <low_cannot_store_register>: Declare.
1533 (crisv32_target::low_cannot_fetch_register)
1534 (crisv32_target::low_cannot_store_register): Define.
1535 (the_low_target): Remove the op fields.
1536 * linux-ia64-low.cc (class ia64_target)
1537 <low_cannot_fetch_register>
1538 <low_cannot_store_register>: Declare.
1539 (ia64_cannot_fetch_register): Turn into...
1540 (ia64_target::low_cannot_fetch_register): ...this.
1541 (ia64_cannot_store_register): Turn into...
1542 (ia64_target::low_cannot_store_register): ...this.
1543 (the_low_target): Remove the op fields.
1544 * linux-m32r-low.cc (class m32r_target)
1545 <low_cannot_fetch_register>
1546 <low_cannot_store_register>: Declare.
1547 (m32r_cannot_fetch_register): Turn into...
1548 (m32r_target::low_cannot_fetch_register): ...this.
1549 (m32r_cannot_store_register): Turn into...
1550 (m32r_target::low_cannot_store_register): ...this.
1551 (the_low_target): Remove the op fields.
1552 * linux-m68k-low.cc (class m68k_target)
1553 <low_cannot_fetch_register>
1554 <low_cannot_store_register>: Declare.
1555 (m68k_cannot_fetch_register): Turn into...
1556 (m68k_target::low_cannot_fetch_register): ...this.
1557 (m68k_cannot_store_register): Turn into...
1558 (m68k_target::low_cannot_store_register): ...this.
1559 (the_low_target): Remove the op fields.
1560 * linux-mips-low.cc (class mips_target)
1561 <low_cannot_fetch_register>
1562 <low_cannot_store_register>: Declare.
1563 (mips_cannot_fetch_register): Turn into...
1564 (mips_target::low_cannot_fetch_register): ...this.
1565 (mips_cannot_store_register): Turn into...
1566 (mips_target::low_cannot_store_register): ...this.
1567 (get_usrregs_info): Inline at the call sites in
1568 low_cannot_fetch_register and low_cannot_store_register,
1570 (the_low_target): Remove the op fields.
1571 * linux-nios2-low.cc (class nios2_target)
1572 <low_cannot_fetch_register>
1573 <low_cannot_store_register>: Declare.
1574 (nios2_cannot_fetch_register): Turn into...
1575 (nios2_target::low_cannot_fetch_register): ...this.
1576 (nios2_cannot_store_register): Turn into...
1577 (nios2_target::low_cannot_store_register): ...this.
1578 (the_low_target): Remove the op fields.
1579 * linux-ppc-low.cc (class ppc_target)
1580 <low_cannot_fetch_register>
1581 <low_cannot_store_register>: Declare.
1582 (ppc_cannot_fetch_register): Turn into...
1583 (ppc_target::low_cannot_fetch_register): ...this.
1584 (ppc_cannot_store_register): Turn into...
1585 (ppc_target::low_cannot_store_register): ...this.
1586 (the_low_target): Remove the op fields.
1587 * linux-riscv-low.cc (class riscv_target)
1588 <low_cannot_fetch_register>
1589 <low_cannot_store_register>: Declare.
1590 (riscv_target::low_cannot_fetch_register)
1591 (riscv_target::low_cannot_store_register): Define.
1592 (the_low_target): Remove the op fields.
1593 * linux-s390-low.cc (class s390_target)
1594 <low_cannot_fetch_register>
1595 <low_cannot_store_register>: Declare.
1596 (s390_cannot_fetch_register): Turn into...
1597 (s390_target::low_cannot_fetch_register): ...this.
1598 (s390_cannot_store_register): Turn into...
1599 (s390_target::low_cannot_store_register): ...this.
1600 (the_low_target): Remove the op fields.
1601 * linux-sh-low.cc (class sh_target)
1602 <low_cannot_fetch_register>
1603 <low_cannot_store_register>: Declare.
1604 (sh_cannot_fetch_register): Turn into...
1605 (sh_target::low_cannot_fetch_register): ...this.
1606 (sh_cannot_store_register): Turn into...
1607 (sh_target::low_cannot_store_register): ...this.
1608 (the_low_target): Remove the op fields.
1609 * linux-sparc-low.cc (class sparc_target)
1610 <low_cannot_fetch_register>
1611 <low_cannot_store_register>: Declare.
1612 (sparc_cannot_fetch_register): Turn into...
1613 (sparc_target::low_cannot_fetch_register): ...this.
1614 (sparc_cannot_store_register): Turn into...
1615 (sparc_target::low_cannot_store_register): ...this.
1616 (the_low_target): Remove the op fields.
1617 * linux-tic6x-low.cc (class tic6x_target)
1618 <low_cannot_fetch_register>
1619 <low_cannot_store_register>: Declare.
1620 (tic6x_cannot_fetch_register): Turn into...
1621 (tic6x_target::low_cannot_fetch_register): ...this.
1622 (tic6x_cannot_store_register): Turn into...
1623 (tic6x_target::low_cannot_store_register): ...this.
1624 (the_low_target): Remove the op fields.
1625 * linux-tile-low.cc (class tile_target)
1626 <low_cannot_fetch_register>
1627 <low_cannot_store_register>: Declare.
1628 (tile_cannot_fetch_register): Turn into...
1629 (tile_target::low_cannot_fetch_register): ...this.
1630 (tile_cannot_store_register): Turn into...
1631 (tile_target::low_cannot_store_register): ...this.
1632 (the_low_target): Remove the op fields.
1633 * linux-xtensa-low.cc (class xtensa_target)
1634 <low_cannot_fetch_register>
1635 <low_cannot_store_register>: Declare.
1636 (xtensa_target::low_cannot_fetch_register)
1637 (xtensa_target::low_cannot_store_register): Define.
1638 (the_low_target): Remove the op fields.
1640 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1642 Turn the 'regs_info' linux target op into a method of
1643 linux_process_target.
1645 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
1646 (class linux_process_target) <get_regs_info>: Define.
1648 Update the callers below.
1650 * linux-low.cc (linux_process_target::fetch_registers)
1651 (linux_process_target::store_registers)
1652 * proc-service.cc (gregset_info)
1654 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
1655 (x86_linux_regs_info): Turn into ...
1656 (x86_target::get_regs_info): ...this.
1657 (the_low_target): Remove the op field.
1658 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
1660 (aarch64_regs_info): Turn into ...
1661 (aarch64_target::get_regs_info): ...this.
1662 (the_low_target): Remove the op field.
1663 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
1664 (arm_regs_info): Turn into ...
1665 (arm_target::get_regs_info): ...this.
1666 (the_low_target): Remove the op field.
1667 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
1668 (bfin_regs_info): Turn into ...
1669 (bfin_target::get_regs_info): ...this.
1670 (the_low_target): Remove the op field.
1671 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
1672 (cris_regs_info): Turn into ...
1673 (cris_target::get_regs_info): ...this.
1674 (the_low_target): Remove the op field.
1675 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
1677 (crisv32_regs_info): Turn into ...
1678 (crisv32_target::get_regs_info): ...this.
1679 (the_low_target): Remove the op field.
1680 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
1681 (ia64_regs_info): Turn into ...
1682 (ia64_target::get_regs_info): ...this.
1683 (the_low_target): Remove the op field.
1684 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
1685 (m32r_regs_info): Turn into ...
1686 (m32r_target::get_regs_info): ...this.
1687 (the_low_target): Remove the op field.
1688 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
1689 (m68k_regs_info): Turn into ...
1690 (m68k_target::get_regs_info): ...this.
1691 (the_low_target): Remove the op field.
1692 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
1693 (mips_regs_info): Turn into ...
1694 (mips_target::get_regs_info): ...this.
1695 (the_low_target): Remove the op field.
1696 (get_usrregs_info): Update the call to the op.
1697 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
1698 (nios2_regs_info): Turn into ...
1699 (nios2_target::get_regs_info): ...this.
1700 (the_low_target): Remove the op field.
1701 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
1702 (ppc_regs_info): Turn into ...
1703 (ppc_target::get_regs_info): ...this.
1704 (the_low_target): Remove the op field.
1705 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
1706 (riscv_regs_info): Turn into ...
1707 (riscv_target::get_regs_info): ...this.
1708 (the_low_target): Remove the op field.
1709 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
1710 (s390_regs_info): Turn into ...
1711 (s390_target::get_regs_info): ...this.
1712 (the_low_target): Remove the op field.
1713 (s390_collect_ptrace_register)
1714 (s390_supply_ptrace_register)
1715 (s390_fill_gregset): Update the call to the op.
1716 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
1717 (sh_regs_info): Turn into ...
1718 (sh_target::get_regs_info): ...this.
1719 (the_low_target): Remove the op field.
1720 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
1721 (sparc_regs_info): Turn into ...
1722 (sparc_target::get_regs_info): ...this.
1723 (the_low_target): Remove the op field.
1724 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
1725 (tic6x_regs_info): Turn into ...
1726 (tic6x_target::get_regs_info): ...this.
1727 (the_low_target): Remove the op field.
1728 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
1729 (tile_regs_info): Turn into ...
1730 (tile_target::get_regs_info): ...this.
1731 (the_low_target): Remove the op field.
1732 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
1734 (xtensa_regs_info): Turn into ...
1735 (xtensa_target::get_regs_info): ...this.
1736 (the_low_target): Remove the op field.
1738 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1740 Turn the 'arch_setup' linux target op into a method of
1741 linux_process_target.
1743 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
1744 (class linux_process_target) <arch_setup_thread>
1745 <low_arch_setup>: New declarations.
1746 * linux-low.cc (linux_arch_setup): Delete.
1747 (linux_arch_setup_thread): Turn into...
1748 (linux_process_target::arch_setup_thread): ... this.
1750 Update the callers below.
1752 (linux_process_target::handle_extended_wait)
1753 (linux_process_target::post_create_inferior)
1754 (linux_process_target::filter_event)
1756 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
1758 (x86_linux_update_xmltarget): Turn into...
1759 (x86_target::update_xmltarget): ...this.
1760 (x86_linux_process_qsupported): Update the call to
1761 x86_linux_update_xmltarget.
1762 (x86_arch_setup): Turn into ...
1763 (x86_target::low_arch_setup): ...this.
1764 (the_low_target): Remove the op field.
1765 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
1767 (aarch64_arch_setup): Turn into ...
1768 (aarch64_target::low_arch_setup): ...this.
1769 (the_low_target): Remove the op field.
1770 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
1772 (arm_arch_setup): Turn into ...
1773 (arm_target::low_arch_setup): ...this.
1774 (the_low_target): Remove the op field.
1775 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
1777 (bfin_arch_setup): Turn into ...
1778 (bfin_target::low_arch_setup): ...this.
1779 (the_low_target): Remove the op field.
1780 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
1782 (cris_arch_setup): Turn into ...
1783 (cris_target::low_arch_setup): ...this.
1784 (the_low_target): Remove the op field.
1785 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
1787 (crisv32_arch_setup): Turn into ...
1788 (crisv32_target::low_arch_setup): ...this.
1789 (the_low_target): Remove the op field.
1790 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
1792 (ia64_arch_setup): Turn into ...
1793 (ia64_target::low_arch_setup): ...this.
1794 (the_low_target): Remove the op field.
1795 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
1797 (m32r_arch_setup): Turn into ...
1798 (m32r_target::low_arch_setup): ...this.
1799 (the_low_target): Remove the op field.
1800 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
1802 (m68k_arch_setup): Turn into ...
1803 (m68k_target::low_arch_setup): ...this.
1804 (the_low_target): Remove the op field.
1805 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
1807 (mips_arch_setup): Turn into ...
1808 (mips_target::low_arch_setup): ...this.
1809 (the_low_target): Remove the op field.
1810 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
1812 (nios2_arch_setup): Turn into ...
1813 (nios2_target::low_arch_setup): ...this.
1814 (the_low_target): Remove the op field.
1815 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
1817 (ppc_arch_setup): Turn into ...
1818 (ppc_target::low_arch_setup): ...this.
1819 (the_low_target): Remove the op field.
1820 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
1822 (riscv_arch_setup): Turn into ...
1823 (riscv_target::low_arch_setup): ...this.
1824 (the_low_target): Remove the op field.
1825 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
1827 (s390_arch_setup): Turn into ...
1828 (s390_target::low_arch_setup): ...this.
1829 (the_low_target): Remove the op field.
1830 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
1832 (sh_arch_setup): Turn into ...
1833 (sh_target::low_arch_setup): ...this.
1834 (the_low_target): Remove the op field.
1835 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
1837 (sparc_arch_setup): Turn into ...
1838 (sparc_target::low_arch_setup): ...this.
1839 (the_low_target): Remove the op field.
1840 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
1842 (tic6x_arch_setup): Turn into ...
1843 (tic6x_target::low_arch_setup): ...this.
1844 (the_low_target): Remove the op field.
1845 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
1847 (tile_arch_setup): Turn into ...
1848 (tile_target::low_arch_setup): ...this.
1849 (the_low_target): Remove the op field.
1850 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
1852 (xtensa_arch_setup): Turn into ...
1853 (xtensa_target::low_arch_setup): ...this.
1854 (the_low_target): Remove the op field.
1856 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1858 * linux-low.h (the_linux_target): New extern declaration.
1859 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
1861 (the_linux_target): Remove.
1862 * linux-x86-low.cc (class x86_target): New class.
1863 (the_x86_target): New static object.
1864 (the_linux_target): Define as pointer to the_x86_target.
1865 * linux-aarch64-low.cc (class aarch64_target): New class.
1866 (the_aarch64_target): New static object.
1867 (the_linux_target): Define as pointer to the_aarch64_target.
1868 * linux-arm-low.cc (class arm_target): New class.
1869 (the_arm_target): New static object.
1870 (the_linux_target): Define as pointer to the_arm_target.
1871 * linux-bfin-low.cc (class bfin_target): New class.
1872 (the_bfin_target): New static object.
1873 (the_linux_target): Define as pointer to the_bfin_target.
1874 * linux-cris-low.cc (class cris_target): New class.
1875 (the_cris_target): New static object.
1876 (the_linux_target): Define as pointer to the_cris_target.
1877 * linux-crisv32-low.cc (class crisv32_target): New class.
1878 (the_crisv32_target): New static object.
1879 (the_linux_target): Define as pointer to the_crisv32_target.
1880 * linux-ia64-low.cc (class ia64_target): New class.
1881 (the_ia64_target): New static object.
1882 (the_linux_target): Define as pointer to the_ia64_target.
1883 * linux-m32r-low.cc (class m32r_target): New class.
1884 (the_m32r_target): New static object.
1885 (the_linux_target): Define as pointer to the_m32r_target.
1886 * linux-m68k-low.cc (class m68k_target): New class.
1887 (the_m68k_target): New static object.
1888 (the_linux_target): Define as pointer to the_m68k_target.
1889 * linux-mips-low.cc (class mips_target): New class.
1890 (the_mips_target): New static object.
1891 (the_linux_target): Define as pointer to the_mips_target.
1892 * linux-nios2-low.cc (class nios2_target): New class.
1893 (the_nios2_target): New static object.
1894 (the_linux_target): Define as pointer to the_nios2_target.
1895 * linux-ppc-low.cc (class ppc_target): New class.
1896 (the_ppc_target): New static object.
1897 (the_linux_target): Define as pointer to the_ppc_target.
1898 * linux-riscv-low.cc (class riscv_target): New class.
1899 (the_riscv_target): New static object.
1900 (the_linux_target): Define as pointer to the_riscv_target.
1901 * linux-s390-low.cc (class s390_target): New class.
1902 (the_s390_target): New static object.
1903 (the_linux_target): Define as pointer to the_s390_target.
1904 * linux-sh-low.cc (class sh_target): New class.
1905 (the_sh_target): New static object.
1906 (the_linux_target): Define as pointer to the_sh_target.
1907 * linux-sparc-low.cc (class sparc_target): New class.
1908 (the_sparc_target): New static object.
1909 (the_linux_target): Define as pointer to the_sparc_target.
1910 * linux-tic6x-low.cc (class tic6x_target): New class.
1911 (the_tic6x_target): New static object.
1912 (the_linux_target): Define as pointer to the_tic6x_target.
1913 * linux-tile-low.cc (class tile_target): New class.
1914 (the_tile_target): New static object.
1915 (the_linux_target): Define as pointer to the_tile_target.
1916 * linux-xtensa-low.cc (class xtensa_target): New class.
1917 (the_xtensa_target): New static object.
1918 (the_linux_target): Define as pointer to the_xtensa_target.
1920 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1922 Turn some static functions in linux-low.cc into private methods of
1923 linux_process_target.
1925 * linux-low.cc (handle_extended_wait): Turn into ...
1926 (linux_process_target::handle_extended_wait): ...this. Call
1927 'mourn' on 'this' object instead of 'the_target'.
1928 (maybe_move_out_of_jump_pad): Turn into...
1929 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
1930 (linux_low_filter_event): Turn into...
1931 (linux_process_target::filter_event): ...this.
1932 (linux_wait_for_event_filtered): Turn into...
1933 (linux_process_target::wait_for_event_filtered): ...this.
1934 (linux_wait_for_event): Turn into...
1935 (linux_process_target::wait_for_event): ...this.
1936 (linux_wait_1): Turn into...
1937 (linux_process_target::wait_1): ...this.
1938 (wait_for_sigstop): Turn into...
1939 (linux_process_target::wait_for_sigstop): ...this.
1940 (move_out_of_jump_pad_callback): Turn into...
1941 (linux_process_target::move_out_of_jump_pad): ...this.
1942 (stop_all_lwps): Turn into...
1943 (linux_process_target::stop_all_lwps): ...this.
1944 (start_step_over): Turn into...
1945 (linux_process_target::start_step_over): ...this.
1946 (complete_ongoing_step_over): Turn into...
1947 (linux_process_target::complete_ongoing_step_over): ...this.
1948 (proceed_all_lwps): Turn into...
1949 (linux_process_target::proceed_all_lwps): ...this.
1950 (unstop_all_lwps): Turn into...
1951 (linux_process_target::unstop_all_lwps): ...this.
1953 * linux-low.h (class linux_process_target)
1954 <handle_extended_wait>
1955 <maybe_move_out_of_jump_pad>
1957 <wait_for_event_filtered>
1961 <move_out_of_jump_pad>
1964 <complete_ongoing_step_over>
1966 <unstop_all_lwps>: Declare.
1968 Update the callers below.
1970 * linux-low.cc (linux_process_target::attach): Update.
1971 (linux_process_target::stabilize_threads): Ditto.
1972 (linux_process_target::wait): Ditto.
1974 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1976 * linux-low.h (struct linux_target_ops): Update the comment for
1977 'cannot_store_register' to return 0 or 1.
1978 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
1981 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
1983 * config.in: Re-generate.
1984 * configure: Re-generate.
1986 2020-03-17 Kamil Rytarowski <n54@gmx.com>
1988 * regcache.cc (find_register_by_number): Update.
1989 * tdesc.cc (init_target_desc): Likewise.
1990 * tdesc.h (target_desc::reg_defs): Likewise.
1992 2020-03-12 Tom Tromey <tom@tromey.com>
1994 * configure: Rebuild.
1995 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
1996 (WIN32APILIBS): New subst.
1997 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
1999 (gdbsupport/%.o): Remove target.
2000 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2001 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2002 (WIN32APILIBS): New variable.
2003 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2004 (gdbreplay$(EXEEXT)): Likewise.
2006 2020-03-12 Tom Tromey <tom@tromey.com>
2008 * config.in, configure: Rebuild.
2009 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2010 * acinclude.m4: Include gettext-sister.m4.
2011 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2013 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2014 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2016 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2018 * acinclude.m4: Update path to selftest.m4.
2020 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2022 * configure.ac: Don't source bfd/development.sh, move
2023 GDB_AC_COMMON higher.
2024 * configure: Re-generate.
2026 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2028 * configure: Re-generate.
2030 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
2032 * configure: Re-generate.
2034 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2036 * .dir-locals.el: New file.
2038 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2040 * .gitattributes: New file.
2042 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2044 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2045 reply into an S reply.
2046 * server.cc (disable_packet_T): New global.
2047 (captured_main): Set new global when appropriate.
2048 * server.h (disable_packet_T): Declare.
2050 2020-02-21 Tom Tromey <tom@tromey.com>
2052 * Makefile.in (mostlyclean): New target.
2054 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2056 * target.h (struct process_stratum_target): Remove.
2057 (class process_target): Rename to ...
2058 (class process_stratum_target): ... this.
2059 * linux-low.h (class linux_process_target): Derive from
2060 'process_stratum_target'.
2061 * linux-low.cc (linux_target_ops): Remove.
2062 (initialize_low): Set the_target to the singleton instance of
2063 linux_process_target.
2064 * lynx-low.h (class lynx_process_target): Derive from
2065 'process_stratum_target'.
2066 * lynx-low.cc (lynx_target_ops): Remove.
2067 (initialize_low): Set the_target to the singleton instance of
2068 lynx_process_target.
2069 * nto-low.h (class nto_process_target): Derive from
2070 'process_stratum_target'.
2071 * nto-low.cc (nto_target_ops): Remove.
2072 (initialize_low): Set the_target to the singleton instance of
2074 * win32-low.h (class win32_process_target): Derive from
2075 'process_stratum_target'.
2076 * win32-low.cc (win32_target_ops): Remove.
2077 (initialize_low): Set the_target to the singleton instance of
2078 win32_process_target.
2080 Replace 'the_target->pt' with 'the_target' in the uses below.
2082 * hostio.cc (hostio_error)
2087 * linux-aarch32-low.cc (arm_breakpoint_at)
2088 * linux-aarch64-low.cc (aarch64_breakpoint_at)
2089 * linux-arm-low.cc (arm_sigreturn_next_pc)
2091 (arm_get_syscall_trapinfo)
2092 * linux-cris-low.cc (cris_breakpoint_at)
2093 * linux-crisv32-low.cc (cris_breakpoint_at)
2094 * linux-low.cc (handle_extended_wait)
2097 (linux_process_target::breakpoint_kind_from_pc)
2099 * linux-m32r-low.cc (m32r_breakpoint_at)
2100 * linux-mips-low.cc (mips_breakpoint_at)
2101 * linux-nios2-low.cc (nios2_breakpoint_at)
2102 * linux-ppc-low.cc (ppc_breakpoint_at)
2103 * linux-s390-low.cc (s390_get_hwcap)
2104 * linux-sh-low.cc (sh_breakpoint_at)
2105 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2106 (sparc_store_gregset_from_stack)
2107 (sparc_breakpoint_at)
2108 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2109 * linux-tile-low.cc (tile_breakpoint_at)
2110 * linux-x86-low.cc (x86_breakpoint_at)
2111 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2112 * mem-break.cc (bp_size)
2114 (insert_memory_breakpoint)
2115 (set_raw_breakpoint_at)
2116 (delete_raw_breakpoint)
2118 (uninsert_raw_breakpoint)
2119 (reinsert_raw_breakpoint)
2120 (validate_inserted_breakpoint)
2121 * regcache.cc (regcache_read_pc)
2123 * remote-utils.cc (putpkt_binary_1)
2126 (prepare_resume_reply)
2127 * server.cc (handle_general_set)
2130 (handle_qxfer_exec_file)
2131 (handle_qxfer_libraries_svr4)
2132 (handle_qxfer_osdata)
2133 (handle_qxfer_siginfo)
2134 (handle_qxfer_fdpic)
2138 (queue_stop_reply_callback)
2140 * target.cc (prepare_to_access_memory)
2141 (done_accessing_memory)
2142 (read_inferior_memory)
2143 (target_write_memory)
2144 (target_stop_and_wait)
2146 (target_mourn_inferior)
2147 (target_continue_no_signal)
2149 (target_supports_multi_process)
2152 (target_create_inferior)
2153 (target_post_create_inferior)
2155 (target_supports_fork_events)
2156 (target_supports_vfork_events)
2157 (target_supports_exec_events)
2158 (target_handle_new_gdb_connection)
2161 (fetch_inferior_registers)
2162 (store_inferior_registers)
2164 (target_supports_non_stop)
2166 (target_process_qsupported)
2167 (target_supports_catch_syscall)
2168 (target_get_ipa_tdesc_idx)
2169 (target_supports_tracepoints)
2170 (target_supports_fast_tracepoints)
2171 (target_get_min_fast_tracepoint_insn_len)
2172 (target_thread_stopped)
2174 (target_unpause_all)
2175 (target_stabilize_threads)
2176 (target_install_fast_tracepoint_jump_pad)
2178 (target_supports_disable_randomization)
2179 (target_supports_agent)
2180 (target_enable_btrace)
2181 (target_disable_btrace)
2182 (target_read_btrace)
2183 (target_read_btrace_conf)
2184 (target_supports_range_stepping)
2185 (target_supports_stopped_by_sw_breakpoint)
2186 (target_stopped_by_sw_breakpoint)
2187 (target_supports_stopped_by_hw_breakpoint)
2188 (target_supports_hardware_single_step)
2189 (target_stopped_by_hw_breakpoint)
2190 (target_breakpoint_kind_from_pc)
2191 (target_breakpoint_kind_from_current_state)
2192 (target_supports_software_single_step)
2193 (target_core_of_thread)
2194 (target_thread_name)
2195 (target_thread_handle)
2196 * win32-low.cc (do_initial_child_stuff)
2198 Rename target op default definitions listed below.
2200 * target.cc (process_target::post_create_inferior): Rename as ...
2201 (process_stratum_target::post_create_inferior): ... this.
2202 (process_target::prepare_to_access_memory): Rename as ...
2203 (process_stratum_target::prepare_to_access_memory): ... this.
2204 (process_target::done_accessing_memory): Rename as ...
2205 (process_stratum_target::done_accessing_memory): ... this.
2206 (process_target::look_up_symbols): Rename as ...
2207 (process_stratum_target::look_up_symbols): ... this.
2208 (process_target::supports_read_auxv): Rename as ...
2209 (process_stratum_target::supports_read_auxv): ... this.
2210 (process_target::read_auxv): Rename as ...
2211 (process_stratum_target::read_auxv): ... this.
2212 (process_target::supports_z_point_type): Rename as ...
2213 (process_stratum_target::supports_z_point_type): ... this.
2214 (process_target::insert_point): Rename as ...
2215 (process_stratum_target::insert_point): ... this.
2216 (process_target::remove_point): Rename as ...
2217 (process_stratum_target::remove_point): ... this.
2218 (process_target::stopped_by_sw_breakpoint): Rename as ...
2219 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
2220 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
2221 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
2222 (process_target::stopped_by_hw_breakpoint): Rename as ...
2223 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
2224 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
2225 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
2226 (process_target::supports_hardware_single_step): Rename as ...
2227 (process_stratum_target::supports_hardware_single_step): ... this.
2228 (process_target::stopped_by_watchpoint): Rename as ...
2229 (process_stratum_target::stopped_by_watchpoint): ... this.
2230 (process_target::stopped_data_address): Rename as ...
2231 (process_stratum_target::stopped_data_address): ... this.
2232 (process_target::supports_read_offsets): Rename as ...
2233 (process_stratum_target::supports_read_offsets): ... this.
2234 (process_target::read_offsets): Rename as ...
2235 (process_stratum_target::read_offsets): ... this.
2236 (process_target::supports_get_tls_address): Rename as ...
2237 (process_stratum_target::supports_get_tls_address): ... this.
2238 (process_target::get_tls_address): Rename as ...
2239 (process_stratum_target::get_tls_address): ... this.
2240 (process_target::hostio_last_error): Rename as ...
2241 (process_stratum_target::hostio_last_error): ... this.
2242 (process_target::supports_qxfer_osdata): Rename as ...
2243 (process_stratum_target::supports_qxfer_osdata): ... this.
2244 (process_target::qxfer_osdata): Rename as ...
2245 (process_stratum_target::qxfer_osdata): ... this.
2246 (process_target::supports_qxfer_siginfo): Rename as ...
2247 (process_stratum_target::supports_qxfer_siginfo): ... this.
2248 (process_target::qxfer_siginfo): Rename as ...
2249 (process_stratum_target::qxfer_siginfo): ... this.
2250 (process_target::supports_non_stop): Rename as ...
2251 (process_stratum_target::supports_non_stop): ... this.
2252 (process_target::async): Rename as ...
2253 (process_stratum_target::async): ... this.
2254 (process_target::start_non_stop): Rename as ...
2255 (process_stratum_target::start_non_stop): ... this.
2256 (process_target::supports_multi_process): Rename as ...
2257 (process_stratum_target::supports_multi_process): ... this.
2258 (process_target::supports_fork_events): Rename as ...
2259 (process_stratum_target::supports_fork_events): ... this.
2260 (process_target::supports_vfork_events): Rename as ...
2261 (process_stratum_target::supports_vfork_events): ... this.
2262 (process_target::supports_exec_events): Rename as ...
2263 (process_stratum_target::supports_exec_events): ... this.
2264 (process_target::handle_new_gdb_connection): Rename as ...
2265 (process_stratum_target::handle_new_gdb_connection): ... this.
2266 (process_target::handle_monitor_command): Rename as ...
2267 (process_stratum_target::handle_monitor_command): ... this.
2268 (process_target::core_of_thread): Rename as ...
2269 (process_stratum_target::core_of_thread): ... this.
2270 (process_target::supports_read_loadmap): Rename as ...
2271 (process_stratum_target::supports_read_loadmap): ... this.
2272 (process_target::read_loadmap): Rename as ...
2273 (process_stratum_target::read_loadmap): ... this.
2274 (process_target::process_qsupported): Rename as ...
2275 (process_stratum_target::process_qsupported): ... this.
2276 (process_target::supports_tracepoints): Rename as ...
2277 (process_stratum_target::supports_tracepoints): ... this.
2278 (process_target::read_pc): Rename as ...
2279 (process_stratum_target::read_pc): ... this.
2280 (process_target::write_pc): Rename as ...
2281 (process_stratum_target::write_pc): ... this.
2282 (process_target::supports_thread_stopped): Rename as ...
2283 (process_stratum_target::supports_thread_stopped): ... this.
2284 (process_target::thread_stopped): Rename as ...
2285 (process_stratum_target::thread_stopped): ... this.
2286 (process_target::supports_get_tib_address): Rename as ...
2287 (process_stratum_target::supports_get_tib_address): ... this.
2288 (process_target::get_tib_address): Rename as ...
2289 (process_stratum_target::get_tib_address): ... this.
2290 (process_target::pause_all): Rename as ...
2291 (process_stratum_target::pause_all): ... this.
2292 (process_target::unpause_all): Rename as ...
2293 (process_stratum_target::unpause_all): ... this.
2294 (process_target::stabilize_threads): Rename as ...
2295 (process_stratum_target::stabilize_threads): ... this.
2296 (process_target::supports_fast_tracepoints): Rename as ...
2297 (process_stratum_target::supports_fast_tracepoints): ... this.
2298 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
2299 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
2300 (process_target::emit_ops): Rename as ...
2301 (process_stratum_target::emit_ops): ... this.
2302 (process_target::supports_disable_randomization): Rename as ...
2303 (process_stratum_target::supports_disable_randomization): ... this.
2304 (process_target::supports_qxfer_libraries_svr4): Rename as ...
2305 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
2306 (process_target::qxfer_libraries_svr4): Rename as ...
2307 (process_stratum_target::qxfer_libraries_svr4): ... this.
2308 (process_target::supports_agent): Rename as ...
2309 (process_stratum_target::supports_agent): ... this.
2310 (process_target::enable_btrace): Rename as ...
2311 (process_stratum_target::enable_btrace): ... this.
2312 (process_target::disable_btrace): Rename as ...
2313 (process_stratum_target::disable_btrace): ... this.
2314 (process_target::read_btrace): Rename as ...
2315 (process_stratum_target::read_btrace): ... this.
2316 (process_target::read_btrace_conf): Rename as ...
2317 (process_stratum_target::read_btrace_conf): ... this.
2318 (process_target::supports_range_stepping): Rename as ...
2319 (process_stratum_target::supports_range_stepping): ... this.
2320 (process_target::supports_pid_to_exec_file): Rename as ...
2321 (process_stratum_target::supports_pid_to_exec_file): ... this.
2322 (process_target::pid_to_exec_file): Rename as ...
2323 (process_stratum_target::pid_to_exec_file): ... this.
2324 (process_target::supports_multifs): Rename as ...
2325 (process_stratum_target::supports_multifs): ... this.
2326 (process_target::multifs_open): Rename as ...
2327 (process_stratum_target::multifs_open): ... this.
2328 (process_target::multifs_unlink): Rename as ...
2329 (process_stratum_target::multifs_unlink): ... this.
2330 (process_target::multifs_readlink): Rename as ...
2331 (process_stratum_target::multifs_readlink): ... this.
2332 (process_target::breakpoint_kind_from_pc): Rename as ...
2333 (process_stratum_target::breakpoint_kind_from_pc): ... this.
2334 (process_target::breakpoint_kind_from_current_state): Rename as ...
2335 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
2336 (process_target::thread_name): Rename as ...
2337 (process_stratum_target::thread_name): ... this.
2338 (process_target::thread_handle): Rename as ...
2339 (process_stratum_target::thread_handle): ... this.
2340 (process_target::supports_software_single_step): Rename as ...
2341 (process_stratum_target::supports_software_single_step): ... this.
2342 (process_target::supports_catch_syscall): Rename as ...
2343 (process_stratum_target::supports_catch_syscall): ... this.
2344 (process_target::get_ipa_tdesc_idx): Rename as ...
2345 (process_stratum_target::get_ipa_tdesc_idx): ... this.
2347 2020-02-20 Pedro Alves <palves@redhat.com>
2349 * target.cc (set_target_ops): Simply copy the given target pointer
2350 instead of creating a copy of the pointed object.
2352 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2354 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
2357 * target.h (struct process_stratum_target): Remove the target op.
2358 (class process_target): Add the target op.
2359 (target_get_ipa_tdesc_idx): Update the macro.
2360 * target.cc (process_target::get_ipa_tdesc_idx): Define.
2362 Update the derived classes and callers below.
2364 * linux-low.cc (linux_target_ops): Update.
2365 (linux_get_ipa_tdesc_idx): Turn into ...
2366 (linux_process_target::get_ipa_tdesc_idx): ... this.
2367 * linux-low.h (class linux_process_target): Update.
2368 * lynx-low.cc (lynx_target_ops): Update.
2369 * nto-low.cc (nto_target_ops): Update.
2370 * win32-low.cc (win32_target_ops): Update.
2372 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2374 Turn process_stratum_target's supports_catch_syscall op into a
2375 method of process_target.
2377 * target.h (struct process_stratum_target): Remove the target op.
2378 (class process_target): Add the target op.
2379 (target_supports_catch_syscall): Update the macro.
2380 * target.cc (process_target::supports_catch_syscall): Define.
2382 Update the derived classes and callers below.
2384 * linux-low.cc (linux_target_ops): Update.
2385 (linux_supports_catch_syscall): Turn into ...
2386 (linux_process_target::supports_catch_syscall): ... this.
2387 * linux-low.h (class linux_process_target): Update.
2388 * lynx-low.cc (lynx_target_ops): Update.
2389 * nto-low.cc (nto_target_ops): Update.
2390 * win32-low.cc (win32_target_ops): Update.
2392 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2394 Turn process_stratum_target's supports_software_single_step op
2395 into a method of process_target.
2397 * target.h (struct process_stratum_target): Remove the target op.
2398 (class process_target): Add the target op.
2399 (target_supports_software_single_step): Update the macro.
2400 * target.cc (process_target::supports_software_single_step): Define.
2402 Update the derived classes and callers below.
2404 * linux-low.cc (linux_target_ops): Update.
2405 (linux_supports_software_single_step): Turn into ...
2406 (linux_process_target::supports_software_single_step): ... this.
2407 * linux-low.h (class linux_process_target): Update.
2408 * lynx-low.cc (lynx_target_ops): Update.
2409 * nto-low.cc (nto_target_ops): Update.
2410 * win32-low.cc (win32_target_ops): Update.
2412 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2414 Turn process_stratum_target's thread_name and thread_handle ops
2415 into methods of process_target.
2417 * target.h (struct process_stratum_target): Remove the target ops.
2418 (class process_target): Add the target ops.
2419 (target_thread_name): Update the macro.
2420 (target_thread_handle): Update the macro.
2421 * target.cc (process_target::thread_name): Define.
2422 (process_target::thread_handle): Define.
2424 Update the derived classes and callers below.
2426 * linux-low.cc (linux_target_ops): Update.
2427 (linux_process_target::thread_name): Define.
2428 (linux_process_target::thread_handle): Define.
2429 * linux-low.h (class linux_process_target): Update.
2430 * lynx-low.cc (lynx_target_ops): Update.
2431 * nto-low.cc (nto_target_ops): Update.
2432 * win32-low.cc (win32_target_ops): Update.
2434 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2436 Turn process_stratum_target's breakpoint_kind_from_pc,
2437 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
2438 ops into methods of process_target.
2440 * target.h (struct process_stratum_target): Remove the target op.
2441 (class process_target): Add the target op.
2442 (target_breakpoint_kind_from_pc): Update the macro.
2443 (target_breakpoint_kind_from_current_state): Update the macro.
2444 (default_breakpoint_kind_from_pc): Remove declaration.
2445 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
2446 (process_target::breakpoint_kind_from_pc): ... this.
2447 (process_target::breakpoint_kind_from_current_state): Define.
2449 Update the derived classes and callers below.
2451 * mem-break.cc (bp_size): Update.
2452 (bp_opcode): Update.
2453 * linux-low.cc (linux_target_ops): Update.
2454 (linux_wait_1): Update.
2455 (linux_breakpoint_kind_from_pc): Turn into ...
2456 (linux_process_target::breakpoint_kind_from_pc): ... this.
2457 (linux_sw_breakpoint_from_kind): Turn into ...
2458 (linux_process_target::sw_breakpoint_from_kind): ... this.
2459 (linux_breakpoint_kind_from_current_state): Turn into ...
2460 (linux_process_target::breakpoint_kind_from_current_state): ... this.
2461 * linux-low.h (class linux_process_target): Update.
2462 * lynx-low.cc (lynx_target_ops): Update.
2463 (lynx_process_target::sw_breakpoint_from_kind): Define.
2464 * lynx-low.h (class lynx_process_target): Update.
2465 * nto-low.cc (nto_target_ops): Update.
2466 (nto_sw_breakpoint_from_kind): Turn into ...
2467 (nto_process_target::sw_breakpoint_from_kind): ... this.
2468 * nto-low.h (class nto_process_target): Update.
2469 * win32-low.cc (win32_target_ops): Update.
2470 (win32_sw_breakpoint_from_kind): Turn into ...
2471 (win32_process_target::sw_breakpoint_from_kind): ... this.
2472 * win32-low.h (class win32_process_target): Update.
2474 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2476 Turn process_stratum_target's multifs_open, multifs_readlink,
2477 multifs_unlink ops into methods of process_target.
2479 * target.h (struct process_stratum_target): Remove the target ops.
2480 (class process_target): Add the target ops. Also add
2482 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
2484 (process_target::supports_multifs): Define.
2485 (process_target::multifs_open): Define.
2486 (process_target::multifs_readlink): Define.
2487 (process_target::multifs_unlink): Define.
2489 Update the derived classes and callers below.
2491 * hostio.cc (handle_setfs): Update.
2492 (handle_open): Update.
2493 (handle_unlink): Update.
2494 (handle_readlink): Update.
2495 * linux-low.cc (linux_target_ops): Update.
2496 (linux_process_target::supports_multifs): Define.
2497 (linux_process_target::multifs_open): Define.
2498 (linux_process_target::multifs_readlink): Define.
2499 (linux_process_target::multifs_unlink): Define.
2500 * linux-low.h (class linux_process_target): Update.
2501 * lynx-low.cc (lynx_target_ops): Update.
2502 * nto-low.cc (nto_target_ops): Update.
2503 * win32-low.cc (win32_target_ops): Update.
2505 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2507 Turn process_stratum_target's pid_to_exec_file op into a method
2510 * target.h (struct process_stratum_target): Remove the target op.
2511 (class process_target): Add the target op. Also add
2512 'supports_pid_to_exec_file'.
2513 * target.cc (process_target::pid_to_exec_file): Define.
2514 (process_target::supports_pid_to_exec_file): Define.
2516 Update the derived classes and callers below.
2518 * server.cc (handle_qxfer_exec_file): Update.
2519 (handle_query): Update.
2520 * linux-low.cc (linux_target_ops): Update.
2521 (linux_process_target::supports_pid_to_exec_file): Define.
2522 (linux_process_target::pid_to_exec_file): Define.
2523 * linux-low.h (class linux_process_target): Update.
2524 * lynx-low.cc (lynx_target_ops): Update.
2525 * nto-low.cc (nto_target_ops): Update.
2526 * win32-low.cc (win32_target_ops): Update.
2528 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2530 Turn process_stratum_target's supports_range_stepping op into a
2531 method of process_target.
2533 * target.h (struct process_stratum_target): Remove the target op.
2534 (class process_target): Add the target op.
2535 (target_supports_range_stepping): Update the macro.
2536 * target.cc (process_target::supports_range_stepping): Define.
2538 Update the derived classes and callers below.
2540 * linux-low.cc (linux_target_ops): Update.
2541 (linux_supports_range_stepping): Turn into ...
2542 (linux_process_target::supports_range_stepping): ... this.
2543 * linux-low.h (class linux_process_target): Update.
2544 * lynx-low.cc (lynx_target_ops): Update.
2545 * nto-low.cc (nto_target_ops): Update.
2546 * win32-low.cc (win32_target_ops): Update.
2548 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2550 Turn process_stratum_target's btrace-related ops (enable_btrace,
2551 disable_btrace, read_btrace, read_btrace_conf) into methods of
2554 * target.h (struct process_stratum_target): Remove the target ops.
2555 (class process_target): Add the target ops.
2556 (target_enable_btrace): Update.
2557 (target_disable_btrace): Update.
2558 (target_read_btrace): Update.
2559 (target_read_btrace_conf): Update.
2560 * target.cc (process_target::enable_btrace): Define.
2561 (process_target::disable_btrace): Define.
2562 (process_target::read_btrace): Define.
2563 (process_target::read_btrace_conf): Define.
2565 Update the derived classes and callers below.
2567 * linux-low.cc (linux_target_ops): Update.
2568 (linux_process_target:enable_btrace): Define as a wrapper around
2569 linux_enable_btrace.
2570 (linux_low_disable_btrace): Turn into ...
2571 (linux_process_target::disable_btrace): ... this.
2572 (linux_low_read_btrace): Turn into ...
2573 (linux_process_target::read_btrace): ... this.
2574 (linux_low_btrace_conf): Turn into ...
2575 (linux_process_target::read_btrace_conf): ... this.
2576 * linux-low.h (class linux_process_target): Update.
2577 * lynx-low.cc (lynx_target_ops): Update.
2578 * nto-low.cc (nto_target_ops): Update.
2579 * win32-low.cc (win32_target_ops): Update.
2581 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2583 Turn process_stratum_target's supports_agent op into a method of
2586 * target.h (struct process_stratum_target): Remove the target op.
2587 (class process_target): Add the target op.
2588 (target_supports_agent): Update the macro.
2589 * target.cc (process_target::supports_agent): Define.
2591 Update the derived classes and callers below.
2593 * linux-low.cc (linux_target_ops): Update.
2594 (linux_supports_agent): Turn into ...
2595 (linux_process_target::supports_agent): ... this.
2596 * linux-low.h (class linux_process_target): Update.
2597 * lynx-low.cc (lynx_target_ops): Update.
2598 * nto-low.cc (nto_target_ops): Update.
2599 * win32-low.cc (win32_target_ops): Update.
2601 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2603 Turn process_stratum_target's qxfer_libraries_svr4 op into a
2604 method of process_target.
2606 * target.h (struct process_stratum_target): Remove the target op.
2607 (class process_target): Add the target op. Also add
2608 'supports_qxfer_libraries_svr4'.
2609 * target.cc (process_target::qxfer_libraries_svr4): Define.
2610 (process_target::supports_qxfer_libraries_svr4): Define.
2612 Update the derived classes and callers below.
2614 * server.cc (handle_qxfer_libraries_svr4): Update.
2615 (handle_query): Update.
2616 * linux-low.cc (linux_target_ops): Update.
2617 (linux_process_target::supports_qxfer_libraries_svr4): Define.
2618 (linux_qxfer_libraries_svr4): Turn into ...
2619 (linux_process_target::qxfer_libraries_svr4): ... this.
2620 * linux-low.h (class linux_process_target): Update.
2621 * lynx-low.cc (lynx_target_ops): Update.
2622 * nto-low.cc (nto_target_ops): Update.
2623 * win32-low.cc (win32_target_ops): Update.
2625 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2627 Turn process_stratum_target's supports_disable_randomization op
2628 into a method of process_target.
2630 * target.h (struct process_stratum_target): Remove the target op.
2631 (class process_target): Add the target op.
2632 (target_supports_disable_randomization): Update the macro.
2633 * target.cc (process_target::supports_disable_randomization): Define.
2635 Update the derived classes and callers below.
2637 * linux-low.cc (linux_target_ops): Update.
2638 (linux_supports_disable_randomization): Turn into ...
2639 (linux_process_target::supports_disable_randomization): ... this.
2640 * linux-low.h (class linux_process_target): Update.
2641 * lynx-low.cc (lynx_target_ops): Update.
2642 * nto-low.cc (nto_target_ops): Update.
2643 * win32-low.cc (win32_target_ops): Update.
2645 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2647 Turn process_stratum_target's emit_ops op into a method of
2650 * target.h (struct process_stratum_target): Remove the target op.
2651 (class process_target): Add the target op.
2652 (target_emit_ops): Update the macro.
2653 * target.cc (process_target::emit_ops): Define.
2655 Update the derived classes and callers below.
2657 * linux-low.cc (linux_target_ops): Update.
2658 (linux_emit_ops): Turn into ...
2659 (linux_process_target::emit_ops): ... this.
2660 * linux-low.h (class linux_process_target): Update.
2661 * lynx-low.cc (lynx_target_ops): Update.
2662 * nto-low.cc (nto_target_ops): Update.
2663 * win32-low.cc (win32_target_ops): Update.
2665 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2667 Turn process_stratum_target's install_fast_tracepoint_jump_pad
2668 and get_min_fast_tracepoint_insn_len ops into methods of
2671 * target.h (struct process_stratum_target): Remove the target ops.
2672 (class process_target): Add the target ops. Also add
2673 'supports_fast_tracepoints'.
2674 (target_supports_fast_tracepoints): Update the macro.
2675 (target_get_min_fast_tracepoint_insn_len): Update the macro.
2676 (install_fast_tracepoint_jump_pad): Update and rename the macro
2678 (target_install_fast_tracepoint_jump_pad): ... this.
2679 * target.cc (process_target::supports_fast_tracepoints): Define.
2680 (process_target::install_fast_tracepoint_jump_pad): Define.
2681 (process_target::get_min_fast_tracepoint_insn_len): Define.
2683 Update the derived classes and callers below.
2685 * tracepoint.cc (install_fast_tracepoint): Update.
2686 * linux-low.cc (linux_target_ops): Update.
2687 (linux_process_target::supports_fast_tracepoints): Define.
2688 (linux_install_fast_tracepoint_jump_pad): Turn into ...
2689 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
2690 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
2691 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
2692 * linux-low.h (class linux_process_target): Update.
2693 * lynx-low.cc (lynx_target_ops): Update.
2694 * nto-low.cc (nto_target_ops): Update.
2695 * win32-low.cc (win32_target_ops): Update.
2697 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2699 Turn process_stratum_target's stabilize_threads op into a
2700 method of process_target.
2702 * target.h (struct process_stratum_target): Remove the target op.
2703 (class process_target): Add the target op.
2704 (target_stabilize_threads): Update the macro.
2705 * target.cc (process_target::stabilize_threads): Define.
2707 Update the derived classes and callers below.
2709 * server.cc (handle_status): Update.
2710 * tracepoint.cc (cmd_qtdp): Update.
2711 (cmd_qtstart): Update.
2712 * linux-low.cc (linux_target_ops): Update.
2713 (linux_stabilize_threads): Turn into ...
2714 (linux_process_target::stabilize_threads): ... this.
2715 (linux_wait_1): Update.
2716 * linux-low.h (class linux_process_target): Update.
2717 * lynx-low.cc (lynx_target_ops): Update.
2718 * nto-low.cc (nto_target_ops): Update.
2719 * win32-low.cc (win32_target_ops): Update.
2721 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2723 Turn process_stratum_target's pause_all and unpause_all ops
2724 into methods of process_target.
2726 * target.h (struct process_stratum_target): Remove the target ops.
2727 (class process_target): Add the target ops.
2728 (pause_all): Update the macro and rename to...
2729 (target_pause_all): ... this.
2730 (unpause_all): Update the macro and rename to...
2731 (target_unpause_all): ... this.
2732 * target.cc (process_target::pause_all): Define.
2733 (process_target::unpause_all): Define.
2735 Update the derived classes and callers below.
2737 * server.cc (handle_status): Update.
2738 * tracepoint.cc (clear_installed_tracepoints): Update.
2740 (cmd_qtstart): Update.
2741 (stop_tracing): Update.
2742 (cmd_qtstatus): Update.
2743 (upload_fast_traceframes): Update.
2744 (run_inferior_command): Update.
2745 * linux-low.cc (linux_target_ops): Update.
2746 (linux_pause_all): Turn into ...
2747 (linux_process_target::pause_all): ... this.
2748 (linux_unpause_all): Turn into ...
2749 (linux_process_target::unpause_all): ... this.
2750 (linux_process_target::prepare_to_access_memory): Update.
2751 (linux_process_target::done_accessing_memory): Update.
2752 * linux-low.h (class linux_process_target): Update.
2753 * lynx-low.cc (lynx_target_ops): Update.
2754 * nto-low.cc (nto_target_ops): Update.
2755 * win32-low.cc (win32_target_ops): Update.
2757 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2759 Turn process_stratum_target's get_tib_address op into a method of
2762 * target.h (struct process_stratum_target): Remove the target op.
2763 (class process_target): Add the target op. Also add
2764 'supports_get_tib_address'.
2765 * target.cc (process_target::get_tib_address): Define.
2766 (process_target::supports_get_tib_address): Define.
2768 Update the derived classes and callers below.
2770 * server.cc (handle_query): Update.
2771 * linux-low.cc (win32_target_ops): Update.
2772 * lynx-low.cc (lynx_target_ops): Update.
2773 * nto-low.cc (nto_target_ops): Update.
2774 * win32-low.cc (win32_target_ops): Update.
2775 (win32_process_target::supports_get_tib_address): Define.
2776 (win32_get_tib_address): Turn into ...
2777 (win32_process_target::get_tib_address): ... this.
2778 * win32-low.h (class win32_process_target): Update.
2780 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2782 Turn process_stratum_target's thread_stopped op into a method of
2785 * target.h (struct process_stratum_target): Remove the target op.
2786 (class process_target): Add the target op. Also add
2787 'supports_thread_stopped'.
2788 (target_thread_stopped): Update the macro.
2789 * target.cc (process_target::thread_stopped): Define.
2790 (process_target::supports_thread_stopped): Define.
2791 (prepare_to_access_memory): Update.
2793 Update the derived classes and callers below.
2795 * server.cc (queue_stop_reply_callback): Update.
2796 * linux-low.cc (linux_target_ops): Update.
2797 (linux_process_target::supports_thread_stopped): Define.
2798 (linux_thread_stopped): Turn into ...
2799 (linux_process_target::thread_stopped): ... this.
2800 * linux-low.h (class linux_process_target): Update.
2801 * lynx-low.cc (lynx_target_ops): Update.
2802 * nto-low.cc (nto_target_ops): Update.
2803 * win32-low.cc (win32_target_ops): Update.
2805 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2807 Turn process_stratum_target's read_pc and write_pc ops into
2808 methods of process_target.
2810 * target.h (struct process_stratum_target): Remove the target ops.
2811 (class process_target): Add the target ops.
2812 * target.cc (process_target::read_pc): Define.
2813 (process_target::write_pc): Define.
2815 Update the derived classes and callers below.
2817 * regcache.cc (regcache_read_pc): Update.
2818 (regcache_write_pc): Update.
2819 * linux-low.cc (linux_target_ops): Update.
2820 (linux_read_pc): Turn into ...
2821 (linux_process_target::read_pc): ... this.
2822 (linux_write_pc): Turn into ...
2823 (linux_process_target::write_pc): ... this.
2824 * linux-low.h (class linux_process_target): Update.
2825 * lynx-low.cc (lynx_target_ops): Update.
2826 * nto-low.cc (nto_target_ops): Update.
2827 * win32-low.cc (win32_target_ops): Update.
2829 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2831 Turn process_stratum_target's supports_tracepoints op into a
2832 method of process_target.
2834 * target.h (struct process_stratum_target): Remove the target op.
2835 (class process_target): Add the target op.
2836 (target_supports_tracepoints): Update the macro.
2837 * target.cc (process_target::supports_tracepoints): Define.
2839 Update the derived classes and callers below.
2841 * linux-low.cc (linux_target_ops): Update.
2842 (linux_supports_tracepoints): Turn into ...
2843 (linux_process_target::supports_tracepoints): ... this.
2844 * linux-low.h (class linux_process_target): Update.
2845 * lynx-low.cc (lynx_target_ops): Update.
2846 * nto-low.cc (nto_target_ops): Update.
2847 * win32-low.cc (win32_target_ops): Update.
2849 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2851 Turn process_stratum_target's process_qsupported op into a method
2854 * target.h (struct process_stratum_target): Remove the target op.
2855 (class process_target): Add the target op.
2856 (target_process_qsupported): Update the macro.
2857 * target.cc (process_target::process_qsupported): Define.
2859 Update the derived classes and callers below.
2861 * linux-low.cc (linux_target_ops): Update.
2862 (linux_process_qsupported): Turn into ...
2863 (linux_process_target::process_qsupported): ... this.
2864 * linux-low.h (class linux_process_target): Update.
2865 * lynx-low.cc (lynx_target_ops): Update.
2866 * nto-low.cc (nto_target_ops): Update.
2867 * win32-low.cc (win32_target_ops): Update.
2869 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2871 Turn process_stratum_target's read_loadmap op into a method of
2874 * target.h (struct process_stratum_target): Remove the target op.
2875 (class process_target): Add the target op. Also add
2876 'supports_read_loadmap'.
2877 * target.cc (process_target::read_loadmap): Define.
2878 (process_target::supports_read_loadmap): Define.
2880 Update the derived classes and callers below.
2882 * server.cc (handle_qxfer_fdpic): Update.
2883 (handle_query): Update.
2884 * linux-low.cc (linux_target_ops): Update.
2885 (linux_process_target::supports_read_loadmap): Define.
2886 (linux_read_loadmap): Turn into ...
2887 (linux_process_target::read_loadmap): ... this.
2888 * linux-low.h (class linux_process_target): Update.
2889 * lynx-low.cc (lynx_target_ops): Update.
2890 * nto-low.cc (nto_target_ops): Update.
2891 * win32-low.cc (win32_target_ops): Update.
2893 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2895 Turn process_stratum_target's core_of_thread op into a method of
2898 * target.h (struct process_stratum_target): Remove the target op.
2899 (class process_target): Add the target op.
2900 (target_core_of_thread): Update the macro.
2901 * target.cc (process_target::core_of_thread): Define.
2903 Update the derived classes and callers below.
2905 * linux-low.cc (linux_target_ops): Update.
2906 (linux_process_target::core_of_thread): Define.
2907 * linux-low.h (class linux_process_target): Update.
2908 * lynx-low.cc (lynx_target_ops): Update.
2909 * nto-low.cc (nto_target_ops): Update.
2910 * win32-low.cc (win32_target_ops): Update.
2912 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2914 Turn process_stratum_target's handle_monitor_command op into a
2915 method of process_target.
2917 * target.h (struct process_stratum_target): Remove the target op.
2918 (class process_target): Add the target op.
2919 (target_handle_monitor_command): Update the macro.
2920 * target.cc (process_target::handle_monitor_command): Define.
2922 Update the derived classes and callers below.
2924 * server.cc (handle_query): Update.
2925 * linux-low.cc (linux_target_ops): Update.
2926 (linux_process_target::handle_monitor_command): Define.
2927 * linux-low.h (class linux_process_target): Update.
2928 * lynx-low.cc (lynx_target_ops): Update.
2929 * nto-low.cc (nto_target_ops): Update.
2930 * win32-low.cc (win32_target_ops): Update.
2932 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2934 Turn process_stratum_target's handle_new_gdb_connection op into a
2935 method of process_target.
2937 * target.h (struct process_stratum_target): Remove the target op.
2938 (class process_target): Add the target op.
2939 (target_handle_new_gdb_connection): Update the macro.
2940 * target.cc (process_target::handle_new_gdb_connection): Define.
2942 Update the derived classes and callers below.
2944 * linux-low.cc (linux_target_ops): Update.
2945 (linux_handle_new_gdb_connection): Turn into ...
2946 (linux_process_target::handle_new_gdb_connection): ... this.
2947 * linux-low.h (class linux_process_target): Update.
2948 * lynx-low.cc (lynx_target_ops): Update.
2949 * nto-low.cc (nto_target_ops): Update.
2950 * win32-low.cc (win32_target_ops): Update.
2952 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2954 Turn process_stratum_target's supports_fork_events,
2955 supports_vfork_events, and supports_exec_events ops into methods
2958 * target.h (struct process_stratum_target): Remove the target ops.
2959 (class process_target): Add the target ops.
2960 (target_supports_fork_events): Update the macro.
2961 (target_supports_vfork_events): Update the macro.
2962 (target_supports_exec_events): Update the macro.
2963 * target.cc (process_target::supports_fork_events): Define.
2964 (process_target::supports_vfork_events): Define.
2965 (process_target::supports_exec_events): Define.
2967 Update the derived classes and callers below.
2969 * linux-low.cc (linux_target_ops): Update.
2970 (linux_supports_fork_events): Turn into ...
2971 (linux_process_target::supports_fork_events): ... this.
2972 (linux_supports_vfork_events): Turn into ...
2973 (linux_process_target::supports_vfork_events): ... this.
2974 (linux_supports_exec_events): Turn into ...
2975 (linux_process_target::supports_exec_events): ... this.
2976 * linux-low.h (class linux_process_target): Update.
2977 * lynx-low.cc (lynx_target_ops): Update.
2978 * nto-low.cc (nto_target_ops): Update.
2979 * win32-low.cc (win32_target_ops): Update.
2981 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2983 Turn process_stratum_target's supports_multi_process op into a
2984 method of process_target.
2986 * target.h (struct process_stratum_target): Remove the target op.
2987 (class process_target): Add the target op.
2988 * target.cc (process_target::supports_multi_process): Define.
2989 (target_supports_multi_process): Update.
2991 Update the derived classes and callers below.
2993 * linux-low.cc (linux_target_ops): Update.
2994 (linux_supports_multi_process): Turn into ...
2995 (linux_process_target::supports_multi_process): ... this.
2996 * linux-low.h (class linux_process_target): Update.
2997 * lynx-low.cc (lynx_target_ops): Update.
2998 * nto-low.cc (nto_target_ops): Update.
2999 * win32-low.cc (win32_target_ops): Update.
3001 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3003 Turn process_stratum_target's supports_non_stop, async, and
3004 start_non_stop ops into methods of process_target.
3006 * target.h (struct process_stratum_target): Remove the target ops.
3007 (class process_target): Add the target ops.
3008 (target_supports_non_stop): Update the macro.
3009 (target_async): Update the macro.
3010 (start_non_stop): Remove declaration.
3011 * target.cc (process_target::supports_non_stop): Define.
3012 (process_target::async): Define.
3013 (process_target::start_non_stop): Define.
3014 (start_non_stop): Remove.
3016 Update the derived classes and callers below.
3018 * server.cc (handle_qxfer_siginfo): Update.
3019 (handle_query): Update.
3020 * linux-low.cc (linux_target_ops): Update.
3021 (linux_supports_non_stop): Turn into ...
3022 (linux_process_target::supports_non_stop): ... this.
3023 (linux_async): Turn into ...
3024 (linux_process_target::async): ... this.
3025 (linux_start_non_stop): Turn into ...
3026 (linux_process_target::start_non_stop): ... this.
3027 * linux-low.h (class linux_process_target): Update.
3028 * lynx-low.cc (lynx_target_ops): Update.
3029 * nto-low.cc (nto_target_ops): Update.
3030 (nto_supports_non_stop): Remove; rely on the default behavior
3032 * win32-low.cc (win32_target_ops): Update.
3034 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3036 Turn process_stratum_target's qxfer_siginfo op into a method of
3039 * target.h (struct process_stratum_target): Remove the target op.
3040 (class process_target): Add the target op. Also add
3041 'supports_qxfer_siginfo'.
3042 * target.cc (process_target::qxfer_siginfo): Define.
3043 (process_target::supports_qxfer_siginfo): Define.
3045 Update the derived classes and callers below.
3047 * server.cc (handle_qxfer_siginfo): Update.
3048 (handle_query): Update.
3049 * linux-low.cc (linux_target_ops): Update.
3050 (linux_process_target::supports_qxfer_siginfo): Define.
3051 (linux_xfer_siginfo): Turn into ...
3052 (linux_process_target::qxfer_siginfo): ... this.
3053 * linux-low.h (class linux_process_target): Update.
3054 * lynx-low.cc (lynx_target_ops): Update.
3055 * nto-low.cc (nto_target_ops): Update.
3056 * win32-low.cc (win32_target_ops): Update.
3058 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3060 Turn process_stratum_target's qxfer_osdata op into a method of
3063 * target.h (struct process_stratum_target): Remove the target op.
3064 (class process_target): Add the target op. Also add
3065 'supports_qxfer_osdata'.
3066 * target.cc (process_target::qxfer_osdata): Define.
3067 (process_target::supports_qxfer_osdata): Define.
3069 Update the derived classes and callers below.
3071 * server.cc (handle_qxfer_osdata): Update.
3072 (handle_query): Update.
3073 * linux-low.cc (linux_target_ops): Update.
3074 (linux_process_target::supports_qxfer_osdata): Define.
3075 (linux_qxfer_osdata): Turn into ...
3076 (linux_process_target::qxfer_osdata): ... this.
3077 * linux-low.h (class linux_process_target): Update.
3078 * lynx-low.cc (lynx_target_ops): Update.
3079 * nto-low.cc (nto_target_ops): Update.
3080 * win32-low.cc (win32_target_ops): Update.
3082 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3084 Turn process_stratum_target's hostio_last_error op into a
3085 method of process_target.
3087 * target.h (struct process_stratum_target): Remove the target op.
3088 (class process_target): Add the target op.
3089 * target.cc: Add "hostio.h" to includes.
3090 (process_target::hostio_last_error): Define.
3092 Update the derived classes and callers below.
3094 * hostio.cc (hostio_error): Update.
3095 * linux-low.cc: Remove "hostio.h" from includes.
3096 (linux_target_ops): Update.
3097 * lynx-low.cc (lynx_target_ops): Update.
3098 * nto-low.cc (nto_target_ops): Update.
3099 * win32-low.h (class win32_process_target): Update.
3100 * win32-low.cc (win32_target_ops): Update.
3101 (wince_hostio_last_error): Turn into ...
3102 (win32_process_target::hostio_last_error): ... this.
3104 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3106 Turn process_stratum_target's get_tls_address op into a method of
3109 * target.h (struct process_stratum_target): Remove the target op.
3110 (class process_target): Add the target op. Also add
3111 'supports_get_tls_address'.
3112 * target.cc (process_target::get_tls_address): Define.
3113 (process_target::supports_get_tls_address): Define.
3115 Update the derived classes and callers below.
3117 * server.cc (handle_query): Update.
3118 * linux-low.cc (linux_target_ops): Update.
3119 (linux_process_target::supports_get_tls_address): Define.
3120 (linux_process_target::get_tls_address): Define.
3121 * linux-low.h (class linux_process_target): Update.
3122 * lynx-low.cc (lynx_target_ops): Update.
3123 * nto-low.cc (nto_target_ops): Update.
3124 * win32-low.cc (win32_target_ops): Update.
3126 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3128 Turn process_stratum_target's read_offsets op into a method of
3131 * target.h (struct process_stratum_target): Remove the target op.
3132 (class process_target): Add the target op. Also add
3133 'supports_read_offsets'.
3134 * target.cc (process_target::read_offsets): Define.
3135 (process_target::supports_read_offsets): Define.
3137 Update the derived classes and callers below.
3139 * server.cc (handle_query): Update.
3140 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3141 (linux_target_ops): Update.
3142 (linux_process_target::supports_read_offsets): Define.
3143 (linux_read_offsets): Turn into ...
3144 (linux_process_target::read_offsets): ... this.
3145 * linux-low.h (class linux_process_target): Update.
3146 * lynx-low.cc (lynx_target_ops): Update.
3147 * nto-low.cc (nto_target_ops): Update.
3148 * win32-low.cc (win32_target_ops): Update.
3150 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3152 Turn process_stratum_target's stopped_by_watchpoint and
3153 stopped_data_address ops into methods of process_target.
3155 * target.h (struct process_stratum_target): Remove the target ops.
3156 (class process_target): Add the target ops.
3157 * target.cc (process_target::stopped_by_watchpoint): Define.
3158 (process_target::stopped_data_address): Define.
3160 Update the derived classes and callers below.
3162 * remote-utils.cc (prepare_resume_reply): Update.
3163 * linux-low.cc (linux_target_ops): Update.
3164 (linux_stopped_by_watchpoint): Turn into ...
3165 (linux_process_target::stopped_by_watchpoint): ... this.
3166 (linux_stopped_data_address): Turn into ...
3167 (linux_process_target::stopped_data_address): ... this.
3168 * linux-low.h (class linux_process_target): Update.
3169 * lynx-low.cc (lynx_target_ops): Update.
3170 * nto-low.cc (nto_target_ops): Update.
3171 (nto_stopped_by_watchpoint): Turn into ...
3172 (nto_process_target::stopped_by_watchpoint): ... this.
3173 (nto_stopped_data_address): Turn into ...
3174 (nto_process_target::stopped_data_address): ... this.
3175 * nto-low.h (class nto_process_target): Update.
3176 * win32-low.cc (win32_target_ops): Update.
3177 (win32_stopped_by_watchpoint): Turn into ...
3178 (win32_process_target::stopped_by_watchpoint): ... this.
3179 (win32_stopped_data_address): Turn into ...
3180 (win32_process_target::stopped_data_address): ... this.
3181 * win32-low.h (class win32_process_target): Update.
3183 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3185 Turn process_stratum_target's supports_hardware_single_step op into
3186 a method of process_target.
3188 * target.h (struct process_stratum_target): Remove the target op.
3189 (class process_target): Add the target op.
3190 (target_supports_hardware_single_step): Update the macro.
3191 (target_can_do_hardware_single_step): Remove declaration.
3192 * target.cc (process_target::supports_hardware_single_step): Define.
3193 (target_can_do_hardware_single_step): Remove.
3195 Update the derived classes and callers below.
3197 * linux-low.h (class linux_process_target): Update.
3198 * linux-low.cc (linux_target_ops): Update.
3199 (linux_supports_hardware_single_step): Turn into ...
3200 (linux_process_target::supports_hardware_single_step): ... this.
3201 * lynx-low.h (class lynx_process_target): Update.
3202 * lynx-low.cc (lynx_target_ops): Update.
3203 (lynx_process_target::supports_hardware_single_step): Define.
3204 * nto-low.h (class nto_process_target): Update.
3205 * nto-low.cc (nto_target_ops): Update.
3206 (nto_process_target::supports_hardware_single_step): Define.
3207 * win32-low.h (class win32_process_target): Update.
3208 * win32-low.cc (win32_target_ops): Update.
3209 (win32_process_target::supports_hardware_single_step): Define.
3211 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3213 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
3214 ops into methods of process_target.
3216 * target.h (struct process_stratum_target): Remove the target ops.
3217 (class process_target): Add the target ops.
3218 (target_stopped_by_hw_breakpoint): Update the macro.
3219 (target_supports_stopped_by_hw_breakpoint): Update the macro.
3220 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
3221 (process_target::supports_stopped_by_hw_breakpoint): Define.
3223 Update the derived classes and callers below.
3225 * linux-low.cc (linux_target_ops): Update.
3226 (linux_stopped_by_hw_breakpoint): Turn into ...
3227 (linux_process_target::stopped_by_hw_breakpoint): ... this.
3228 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
3229 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
3230 * linux-low.h (class linux_process_target): Update.
3231 * lynx-low.cc (lynx_target_ops): Update.
3232 * nto-low.cc (nto_target_ops): Update.
3233 * win32-low.cc (win32_target_ops): Update.
3235 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3237 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
3238 ops into methods of process_target.
3240 * target.h (struct process_stratum_target): Remove the target ops.
3241 (class process_target): Add the target ops.
3242 (target_stopped_by_sw_breakpoint): Update the macro.
3243 (target_supports_stopped_by_sw_breakpoint): Update the macro.
3244 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
3245 (process_target::supports_stopped_by_sw_breakpoint): Define.
3247 Update the derived classes and callers below.
3249 * linux-low.cc (linux_target_ops): Update.
3250 (linux_stopped_by_sw_breakpoint): Turn into ...
3251 (linux_process_target::stopped_by_sw_breakpoint): ... this.
3252 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
3253 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
3254 * linux-low.h (class linux_process_target): Update.
3255 * lynx-low.cc (lynx_target_ops): Update.
3256 * nto-low.cc (nto_target_ops): Update.
3257 * win32-low.cc (win32_target_ops): Update.
3259 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3261 Turn process_stratum_target's insert_point and remove_point ops
3262 into methods of process_target.
3264 * target.h (struct process_stratum_target): Remove the target ops.
3265 (class process_target): Add the target ops.
3266 * target.cc (process_target::insert_point): Define.
3267 (process_target::remove_point): Define.
3269 Update the derived classes and callers below.
3271 * mem-break.cc (set_raw_breakpoint_at): Update.
3272 (delete_raw_breakpoint): Update.
3273 (uninsert_raw_breakpoint): Update.
3274 (reinsert_raw_breakpoint): Update.
3275 * linux-low.cc (linux_target_ops): Update.
3276 (linux_insert_point): Turn into ...
3277 (linux_process_target::insert_point): ... this.
3278 (linux_remove_point): Turn into ...
3279 (linux_process_target::remove_point): ... this.
3280 * linux-low.h (class linux_process_target): Update.
3281 * lynx-low.cc (lynx_target_ops): Update.
3282 * nto-low.cc (nto_target_ops): Update.
3283 (nto_insert_point): Turn into ...
3284 (nto_process_target::insert_point): ... this.
3285 (nto_remove_point): Turn into ...
3286 (nto_process_target::remove_point): ... this.
3287 * nto-low.h (class nto_process_target): Update.
3288 * win32-low.cc (win32_target_ops): Update.
3289 (win32_insert_point): Turn into ...
3290 (win32_process_target::insert_point): ... this.
3291 (win32_remove_point): Turn into ...
3292 (win32_process_target::remove_point): ... this.
3293 * win32-low.h (class win32_process_target): Update.
3295 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3297 Turn process_stratum_target's supports_z_point_type op into a
3298 method of process_target.
3300 * target.h (struct process_stratum_target): Remove the target op.
3301 (class process_target): Add the target op.
3302 * target.cc (process_target::supports_z_point_type): Define.
3304 Update the derived classes and callers below.
3306 * mem-break.cc (z_type_supported): Update.
3307 * linux-low.cc (linux_target_ops): Update.
3308 (linux_supports_z_point_type): Turn into ...
3309 (linux_process_target::supports_z_point_type): ... this.
3310 * linux-low.h (class linux_process_target): Update.
3311 * lynx-low.cc (lynx_target_ops): Update.
3312 * nto-low.cc (nto_target_ops): Update.
3313 (nto_supports_z_point_type): Turn into ...
3314 (nto_process_target::supports_z_point_type): ... this.
3315 * nto-low.h (class nto_process_target): Update.
3316 * win32-low.cc (win32_target_ops): Update.
3317 (win32_supports_z_point_type): Turn into ...
3318 (win32_process_target::supports_z_point_type): ... this.
3319 * win32-low.h (class win32_process_target): Update.
3321 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3323 Turn process_stratum_target's read_auxv op into a method of
3326 * target.h (class process_stratum_target): Remove the target op.
3327 (struct process_target): Add the target op. Also add
3328 'supports_read_auxv'.
3329 * target.cc (process_target::read_auxv): Define.
3330 (process_target::supports_read_auxv): Define.
3332 Update the derived classes and callers below.
3334 * server.cc (handle_qxfer_auxv): Update.
3335 (handle_query): Update.
3336 * linux-low.cc (linux_target_ops): Update.
3337 (linux_process_target::supports_read_auxv): Define.
3338 (linux_read_auxv): Turn into ...
3339 (linux_process_target::read_auxv): ... this.
3340 * linux-low.h (class linux_process_target): Update.
3341 * lynx-low.cc (lynx_target_ops): Update.
3342 * nto-low.cc (nto_target_ops): Update.
3343 (nto_process_target::supports_read_auxv): Define.
3344 (nto_read_auxv): Turn into ...
3345 (nto_process_target::read_auxv): ... this.
3346 * nto-low.h (class nto_process_target): Update.
3347 * win32-low.cc (win32_target_ops): Update.
3349 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3351 Turn process_stratum_target's request_interrupt op into a method of
3354 * target.h (struct process_stratum_target): Remove the target op.
3355 (class process_target): Add the target op.
3357 Update the derived classes and callers below.
3359 * remote-utils.cc (putpkt_binary_1): Update.
3360 (input_interrupt): Update.
3362 * server.cc (handle_v_requests): Update.
3363 * linux-low.cc (linux_target_ops): Update.
3364 (linux_request_interrupt): Turn into ...
3365 (linux_process_target::request_interrupt): ... this.
3366 * linux-low.h (class linux_process_target): Update.
3367 * lynx-low.cc (lynx_target_ops): Update.
3368 (lynx_request_interrupt): Turn into ...
3369 (lynx_process_target::request_interrupt): ... this.
3370 * lynx-low.h (class lynx_process_target): Update.
3371 * nto-low.cc (nto_target_ops): Update.
3372 (nto_request_interrupt): Turn into ...
3373 (nto_process_target::request_interrupt): ... this.
3374 * nto-low.h (class nto_process_target): Update.
3375 * win32-low.cc (win32_target_ops): Update.
3376 (win32_request_interrupt): Turn into ...
3377 (win32_process_target::request_interrupt): ... this.
3378 * win32-low.h (class win32_process_target): Update.
3380 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3382 Turn process_stratum_target's look_up_symbols op into a method of
3385 * target.h (struct process_stratum_target): Remove the target op.
3386 (class process_target): Add the target op.
3387 * target.cc (process_target::look_up_symbols): Define.
3389 Update the derived classes and callers below.
3391 * server.cc (handle_query): Update.
3392 * linux-low.cc (linux_target_ops): Update.
3393 (linux_look_up_symbols): Turn into ...
3394 (linux_process_target::look_up_symbols): ... this.
3395 * linux-low.h (class linux_process_target): Update.
3396 * lynx-low.cc (lynx_target_ops): Update.
3397 * nto-low.cc (nto_target_ops): Update.
3398 * win32-low.cc (win32_target_ops): Update.
3400 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3402 Turn process_stratum_target's read_memory and write_memory
3403 ops into methods of process_target.
3405 * target.h (struct process_stratum_target): Remove the target ops.
3406 (class process_target): Add the target ops.
3408 Update the derived classes and callers below.
3410 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
3411 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
3412 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
3413 (arm_get_syscall_trapinfo): Update.
3414 * linux-cris-low.cc (cris_breakpoint_at): Update.
3415 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
3416 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
3417 * linux-mips-low.cc (mips_breakpoint_at): Update.
3418 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
3419 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
3420 * linux-sh-low.cc (sh_breakpoint_at): Update.
3421 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
3422 (sparc_store_gregset_from_stack): Update.
3423 (sparc_breakpoint_at): Update.
3424 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
3425 * linux-tile-low.cc (tile_breakpoint_at): Update.
3426 * linux-x86-low.cc (x86_breakpoint_at): Update.
3427 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
3428 * mem-brea.cc (insert_memory_breakpoint): Update.
3429 (validate_inserted_breakpoint): Update.
3430 * target.cc (read_inferior_memory): Update.
3431 (target_write_memory): Update.
3432 * linux-low.cc (linux_target_ops): Update.
3433 (linux_read_memory): Make a wrapper around the read_memory target
3435 (linux_process_target::read_memory): Rename from linux_read_memory.
3436 (linux_write_memory): Turn into ...
3437 (linux_process_target::write_memory): ... this.
3438 * linux-low.h (class linux_process_target): Update.
3439 * lynx-low.cc (lynx_target_ops): Update.
3440 (lynx_read_memory): Turn into ...
3441 (lynx_process_target::read_memory): ... this.
3442 (lynx_write_memory): Turn into ...
3443 (lynx_process_target::write_memory): ... this.
3444 * lynx-low.h (class lynx_process_target): Update.
3445 * nto-low.cc (nto_target_ops): Update.
3446 (nto_read_memory): Turn into ...
3447 (nto_process_target::read_memory): ... this.
3448 (nto_write_memory): Turn into ...
3449 (nto_process_target::write_memory): ... this.
3450 * nto-low.h (class nto_process_target): Update.
3451 * win32-low.cc (win32_target_ops): Update.
3452 (win32_read_inferior_memory): Turn into ...
3453 (win32_process_target::read_memory): ... this.
3454 (win32_write_inferior_memory): Turn into ...
3455 (win32_process_target::write_memory): ... this.
3456 * win32-low.h (class win32_process_target): Update.
3458 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3460 Turn process_stratum_target's prepare_to_access_memory and
3461 done_accessing_memory ops into methods of process_target.
3463 * target.h (struct process_stratum_target): Remove the target ops.
3464 (class process_target): Add the target ops.
3465 * target.cc (process_target::prepare_to_access_memory): Define.
3466 (process_target::done_accessing_memory): Define.
3467 (prepare_to_access_memory): Update.
3468 (done_accessing_memory): Update.
3470 Update the derived classes and callers below.
3472 * linux-low.cc (linux_target_ops): Update.
3473 (linux_prepare_to_access_memory): Turn into ...
3474 (linux_process_target::prepare_to_access_memory): ... this.
3475 (linux_done_accessing_memory): Turn into ...
3476 (linux_process_target::done_accessing_memory): ... this.
3477 * linux-low.h (class linux_process_target): Update.
3478 * lynx-low.cc (lynx_target_ops): Update.
3479 * nto-low.cc (nto_target_ops): Update.
3480 * win32-low.cc (win32_target_ops): Update.
3482 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3484 Turn process_stratum_target's fetch_registers and store_registers
3485 ops into methods of process_target.
3487 * target.h (struct process_stratum_target): Remove the target ops.
3488 (class process_target): Add the target ops.
3489 (fetch_inferior_registers): Update the macro.
3490 (store_inferior_registers): Update the macro.
3492 Update the derived classes and callers below.
3494 * linux-low.cc (linux_target_ops): Update.
3495 (linux_fetch_registers): Turn into ...
3496 (linux_process_target::fetch_registers): ... this.
3497 (linux_store_registers): Turn into ...
3498 (linux_process_target::store_registers): ... this.
3499 * linux-low.h (class linux_process_target): Update.
3500 * lynx-low.cc (lynx_target_ops): Update.
3501 (lynx_fetch_registers): Turn into ...
3502 (lynx_process_target::fetch_registers): ... this.
3503 (lynx_store_registers): Turn into ...
3504 (lynx_process_target::store_registers): ... this.
3505 * lynx-low.h (class lynx_process_target): Update.
3506 * nto-low.cc (nto_target_ops): Update.
3507 (nto_fetch_registers): Turn into ...
3508 (nto_process_target::fetch_registers): ... this.
3509 (nto_store_registers): Turn into ...
3510 (nto_process_target::store_registers): ... this.
3511 * nto-low.h (class nto_process_target): Update.
3512 * win32-low.cc (win32_target_ops): Update.
3513 (win32_fetch_inferior_registers): Turn into ...
3514 (win32_process_target::fetch_registers): ... this.
3515 (win32_store_inferior_registers): Turn into ...
3516 (win32_process_target::store_registers): ... this.
3517 * win32-low.h (class win32_process_target): Update.
3519 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3521 Turn process_stratum_target's wait op into a method of
3524 * target.h (struct process_stratum_target): Remove the target op.
3525 (class process_target): Add the target op.
3527 Update the derived classes and callers below.
3529 * target.cc (target_wait): Update.
3530 * linux-low.cc (linux_target_ops): Update.
3531 (linux_wait): Turn into ...
3532 (linux_process_target::wait): ... this.
3533 * linux-low.h (class linux_process_target): Update.
3534 * lynx-low.cc (lynx_target_ops): Update.
3535 (lynx_wait): Turn into ...
3536 (lynx_process_target::wait): ... this.
3537 * lynx-low.h (class lynx_process_target): Update.
3538 * nto-low.cc (nto_target_ops): Update.
3539 (nto_wait): Turn into ...
3540 (nto_process_target::wait): ... this.
3541 * nto-low.h (class nto_process_target): Update.
3542 * win32-low.cc (win32_target_ops): Update.
3543 (win32_wait): Turn into ...
3544 (win32_process_target::wait): ... this.
3545 (do_initial_child_stuff): Update.
3546 * win32-low.h (class win32_process_target): Update.
3548 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3550 Turn process_stratum_target's resume op into a method of
3553 * target.h (struct process_stratum_target): Remove the target op.
3554 (class process_target): Add the target op.
3556 Update the derived classes and callers below.
3558 * server.cc (resume): Update.
3559 * target.cc (target_stop_and_wait): Update.
3560 (target_continue_no_signal): Update.
3561 (target_continue): Update.
3562 * linux-low.cc (linux_target_ops): Update.
3563 (linux_resume): Turn into ...
3564 (linux_process_target::resume): ... this.
3565 * linux-low.h (class linux_process_target): Update.
3566 * lynx-low.cc (lynx_target_ops): Update.
3567 (lynx_resume): Turn into ...
3568 (lynx_process_target::resume): ... this.
3569 * lynx-low.h (class lynx_process_target): Update.
3570 * nto-low.cc (nto_target_ops): Update.
3571 (nto_resume): Turn into ...
3572 (nto_process_target::resume): ... this.
3573 * nto-low.h (class nto_process_target): Update.
3574 * win32-low.cc (win32_target_ops): Update.
3575 (win32_resume): Turn into ...
3576 (win32_process_target::resume): ... this.
3577 (win32_process_target::detach): Update.
3578 (do_initial_child_stuff): Update.
3579 * win32-low.h (class win32_process_target): Update.
3581 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3583 Turn process_stratum_target's thread_alive op into a method of
3586 * target.h (struct process_stratum_target): Remove the target op.
3587 (class process_target): Add the target op.
3588 (mythread_alive): Update the macro.
3590 Update the derived classes and callers below.
3592 * linux-low.cc (linux_target_ops): Update.
3593 (linux_thread_alive): Turn into ...
3594 (linux_process_target::thread_alive): ... this.
3595 (wait_for_sigstop): Update.
3596 * linux-low.h (class linux_process_target): Update.
3597 * lynx-low.cc (lynx_target_ops): Update.
3598 (lynx_thread_alive): Turn into ...
3599 (lynx_process_target::thread_alive): ... this.
3600 * lynx-low.h (class lynx_process_target): Update.
3601 * nto-low.cc (nto_target_ops): Update.
3602 (nto_thread_alive): Turn into ...
3603 (nto_process_target::thread_alive): ... this.
3604 * nto-low.h (class nto_process_target): Update.
3605 * win32-low.cc (win32_target_ops): Update.
3606 (win32_thread_alive): Turn into ...
3607 (win32_process_target::thread_alive): ... this.
3608 * win32-low.h (class win32_process_target): Update.
3610 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3612 Turn process_stratum_target's join op into a method of
3615 * target.h (struct process_stratum_target): Remove the target op.
3616 (class process_target): Add the target op.
3617 (join_inferior): Update the macro.
3619 Update the derived classes and callers below.
3621 * linux-low.cc (linux_target_ops): Update.
3622 (linux_join): Turn into ...
3623 (linux_process_target::join): ... this.
3624 * linux-low.h (class linux_process_target): Update.
3625 * lynx-low.cc (lynx_target_ops): Update.
3626 (lynx_join): Turn into ...
3627 (lynx_process_target::join): ... this.
3628 * lynx-low.h (class lynx_process_target): Update.
3629 * nto-low.cc (nto_target_ops): Update.
3630 (nto_process_target::join): Define.
3631 * nto-low.h (class nto_process_target): Update.
3632 * win32-low.cc (win32_target_ops): Update.
3633 (win32_join): Turn into ...
3634 (win32_process_target::join): ... this.
3635 * win32-low.h (class win32_process_target): Update.
3637 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3639 Turn process_stratum_target's mourn op into a method of
3642 * target.h (struct process_stratum_target): Remove the target op.
3643 (class process_target): Add the target op.
3645 Update the derived classes and callers below.
3647 * target.cc (target_mourn_inferior): Update.
3648 * linux-low.cc (linux_target_ops): Update.
3649 (linux_mourn): Turn into ...
3650 (linux_process_target::mourn): ... this.
3651 (handle_extended_wait): Update.
3652 (linux_process_target::kill): Update.
3653 (linux_process_target::detach): Update.
3654 * linux-low.h (class linux_process_target): Update.
3655 * lynx-low.cc (lynx_target_ops): Update.
3656 (lynx_mourn): Turn into ...
3657 (lynx_process_target::mourn): ... this.
3658 * lynx-low.h (class lynx_process_target): Update.
3659 * nto-low.cc (nto_target_ops): Update.
3660 (nto_mourn): Turn into ...
3661 (nto_process_target::mourn): ... this.
3662 * nto-low.h (class nto_process_target): Update.
3663 * win32-low.cc (win32_target_ops): Update.
3664 (win32_mourn): Turn into ...
3665 (win32_process_target::mourn): ... this.
3666 * win32-low.h (class win32_process_target): Update.
3668 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3670 Turn process_stratum_target's detach op into a method of
3673 * target.h (struct process_stratum_target): Remove the target op.
3674 (class process_target): Add the target op.
3675 (detach_inferior): Update the macro.
3677 Update the derived classes and callers below.
3679 * linux-low.cc (linux_target_ops): Update.
3680 (linux_detach): Turn into ...
3681 (linux_process_target::detach): ... this.
3682 * linux-low.h (class linux_process_target): Update.
3683 * lynx-low.cc (lynx_target_ops): Update.
3684 (lynx_detach): Turn into ...
3685 (lynx_process_target::detach): ... this.
3686 * lynx-low.h (class lynx_process_target): Update.
3687 * nto-low.cc (nto_target_ops): Update.
3688 (nto_detach): Turn into ...
3689 (nto_process_target::detach): ... this.
3690 * nto-low.h (class nto_process_target): Update.
3691 * win32-low.cc (win32_target_ops): Update.
3692 (win32_detach): Turn into ...
3693 (win32_process_target::detach): ... this.
3694 * win32-low.h (class win32_process_target): Update.
3696 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3698 Turn process_stratum_target's kill op into a method of
3701 * target.h (struct process_stratum_target): Remove the target op.
3702 (class process_target): Add the target op.
3704 Update the derived classes and callers below.
3706 * target.cc (kill_inferior): Update.
3707 * linux-low.cc (linux_target_ops): Update.
3708 (linux_kill): Turn into ...
3709 (linux_process_target::kill): ... this.
3710 * linux-low.h (class linux_process_target): Update.
3711 * lynx-low.cc (lynx_target_ops): Update.
3712 (lynx_kill): Turn into ...
3713 (lynx_process_target::kill): ... this.
3714 * lynx-low.h (class lynx_process_target): Update.
3715 * nto-low.cc (nto_target_ops): Update.
3716 (nto_kill): Turn into ...
3717 (nto_process_target::kill): ... this.
3718 * nto-low.h (class nto_process_target): Update.
3719 * win32-low.cc (win32_target_ops): Update.
3720 (win32_kill): Turn into ...
3721 (win32_process_target::kill): ... this.
3722 * win32-low.h (class win32_process_target): Update.
3724 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3726 Turn process_stratum_target's attach op into a method of
3729 * target.h (struct process_stratum_target): Remove the target op.
3730 (class process_target): Add the target op.
3731 (myattach): Update the macro.
3733 Update the derived classes and callers below.
3735 * linux-low.cc (linux_target_ops): Update.
3736 (linux_attach): Turn into ...
3737 (linux_process_target::attach): ... this.
3738 * linux-low.h (class linux_process_target): Update.
3739 * lynx-low.cc (lynx_target_ops): Update.
3740 (lynx_attach): Turn into ...
3741 (lynx_process_target::attach): ... this.
3742 * lynx-low.h (class lynx_process_target): Update.
3743 * nto-low.cc (nto_target_ops): Update.
3744 (nto_attach): Turn into ...
3745 (nto_process_target::attach): ... this.
3746 * nto-low.h (class nto_process_target): Update.
3747 * win32-low.cc (win32_target_ops): Update.
3748 (win32_attach): Turn into ...
3749 (win32_process_target::attach): ... this.
3750 * win32-low.h (class win32_process_target): Update.
3752 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3754 Turn process_stratum_target's post_create_inferior op into a method
3757 * target.h (struct process_stratum_target): Remove the target op.
3758 (class process_target): Add the target op.
3759 (target_post_create_inferior): Update the macro.
3760 * target.cc (process_target::post_create_inferior): Define.
3762 Update the derived classes and callers below.
3764 * linux-low.cc (linux_target_ops): Update.
3765 (linux_post_create_inferior): Turn into ...
3766 (linux_process_target::post_create_inferior): ... this.
3767 * linux-low.h (class linux_process_target): Update.
3768 * lynx-low.cc (lynx_target_ops): Update.
3769 * nto-low.cc (nto_target_ops): Update.
3770 * win32-low.cc (win32_target_ops): Update.
3772 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3774 Turn process_stratum_target's create_inferior op into a method of
3777 * target.h (struct process_stratum_target): Remove the target op.
3778 (class process_target): Add the target op.
3779 (create_inferior): Rename the macro to ...
3780 (target_create_inferior): ... this.
3782 Update the derived classes and callers below.
3784 * server.cc (handle_v_run): Update.
3785 (captured_main): Update.
3786 (process_serial_event): Update.
3787 * linux-low.cc (linux_target_ops): Update.
3788 (linux_create_inferior): Turn into ...
3789 (linux_process_target::create_inferior): ... this.
3790 * linux-low.h (class linux_process_target): Update.
3791 * lynx-low.cc (lynx_target_ops): Update.
3792 (lynx_create_inferior): Turn into ...
3793 (lynx_process_target::create_inferior): ... this.
3794 * lynx-low.h (class lynx_process_target): Update.
3795 * nto-low.cc (nto_target_ops): Update.
3796 (nto_create_inferior): Turn into ...
3797 (nto_process_target::create_inferior): ... this.
3798 * nto-low.h (class nto_process_target): Update.
3799 * win32-low.cc (win32_target_ops): Update.
3800 (win32_create_inferior): Turn into ...
3801 (win32_process_target::create_inferior): ... this.
3802 * win32-low.h (class win32_process_target): Update.
3804 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3806 * target.h (class process_target): New class definition.
3807 (struct process_stratum_target) <pt>: New field with type
3809 * linux-low.h (class linux_process_target): Define as a derived
3810 class of 'process_target'.
3811 * linux-low.cc (linux_target_ops): Add a linux_process_target*
3813 * lynx-low.h (class lynx_process_target): Define as a derived
3814 class of 'process_target'.
3815 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
3817 * nto-low.h (class nto_process_target): Define as a derived
3818 class of 'process_target'.
3819 * nto-low.cc (nto_target_ops): Add an nto_process_target*
3821 * win32-low.h (class win32_process_target): Define as a derived
3822 class of 'process_target'.
3823 * win32-low.cc (win32_target_ops): Add a win32_process_target*
3826 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
3828 * configure: Regenerate.
3830 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
3831 Andrew Burgess <andrew.burgess@embecosm.com>
3833 * linux-riscv-low.cc: New file.
3834 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
3835 and nat/riscv-linux-tdesc.c.
3836 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
3837 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
3840 2020-02-14 Tom Tromey <tom@tromey.com>
3842 * acinclude.m4: Don't include acx_configure_dir.m4.
3843 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
3844 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
3845 (all, install-only, uninstall, clean-info, clean)
3846 (maintainer-clean): Don't recurse.
3847 (subdir_do, all-lib): Remove.
3848 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
3850 (generated_files): Update.
3851 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
3852 * configure: Rebuild.
3853 * configure.ac: Don't configure gnulib or libiberty.
3856 2020-02-14 Eli Zaretskii <eliz@gnu.org>
3858 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
3859 preparing the command line for CreateProcess.
3860 (win32_create_inferior): Reflect the program name in debugging
3861 output that shows the process and its command line.
3863 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
3865 * Makefile.in: Rename source files from .c to .cc.
3866 * %.c: Rename to %.cc.
3867 * configure.ac: Rename server.c to server.cc.
3868 * configure: Re-generate.
3870 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
3872 * Makefile.in: Rename gdbsupport source files from .c to .cc.
3874 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
3876 * win32-low.c (win32_create_inferior): Set signal_pid.
3878 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
3879 Pedro Alves <palves@redhat.com>
3881 Skip building gdbserver in a cross-configuration.
3882 * configure.srv: Set $gdbserver_host depending on whether $target
3883 is $host. Use $gdbserver_host instead of $host.
3885 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3887 * configure: Re-generate.
3889 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3891 * configure: Re-generate.
3893 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3895 * acinclude.m4: Update warning.m4 path.
3897 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
3899 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
3900 (handle_exception): Set siginfo_er.
3901 (win32_xfer_siginfo): New function.
3903 2020-02-07 Tom Tromey <tom@tromey.com>
3904 Pedro Alves <palves@redhat.com>
3906 * README: Update build documentation.
3907 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
3909 * configure.ac: Update paths.
3910 * configure: Rebuild.
3911 * acinclude.m4: Update paths.
3912 * Makefile.in: Update include paths.
3913 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
3914 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
3915 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
3916 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
3917 (%-generated.c): Update paths.
3918 * Move entire directory from ../gdb/gdbserver.
3920 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
3922 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
3924 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3926 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
3927 assignment instead of srv_linux_obj.
3929 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
3931 * server.c (handle_qxfer_libraries): Write segment-address with
3934 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
3936 * Makefile.in (install-strip): New target.
3937 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
3938 * aclocal.m4: Regenerate.
3939 * configure: Regenerate.
3940 * configure.ac: Add AM_PROG_INSTALL_STRIP.
3942 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
3944 * Makefile.in (SFILES): Adjust paths to point to real files.
3945 (OBS): Move waitstatus.o to target/waitstatus.o.
3946 (TAGS): Transform paths appropriately.
3948 (nat/%.o): ... this pattern rule.
3950 (target/%.o): ... this pattern rule.
3951 * configure.srv: Adjust paths throughout to include nat/ prefix
3952 with the revant files.
3953 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
3954 * configure: Regenerate.
3956 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
3958 * Makefile.in (TAGS): Remove config files from the recipe.
3960 2020-01-14 Tom Tromey <tom@tromey.com>
3962 * configure: Rebuild.
3963 * configure.ac: Remove any checks that were added to common.m4.
3964 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
3967 2020-01-14 Tom Tromey <tom@tromey.com>
3969 * server.h: Include config.h.
3970 * gdbreplay.c: Include config.h.
3971 * configure: Rebuild.
3972 * configure.ac: Don't source common.host.
3973 * acinclude.m4: Update path.
3974 * Makefile.in (INCSUPPORT): New variable.
3975 (INCLUDE_CFLAGS): Add INCSUPPORT.
3976 (SFILES): Update paths.
3977 (version-generated.c): Update path to create-version.sh.
3978 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
3980 2020-01-14 Tom Tromey <tom@tromey.com>
3982 * configure.ac (LIBS): Use WIN32APILIBS.
3983 (USE_WIN32API): Don't define.
3984 * configure: Rebuild.
3986 2020-01-14 Tom Tromey <tom@tromey.com>
3988 * configure: Rebuild.
3990 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3992 * Makefile.in (%-generated.c): Remove rule for files from
3995 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3997 * configure: Re-generate.
3999 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4001 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4003 * tracepoint.c (stop_tracing, flush_trace_buffer,
4004 about_to_request_buffer_space, get_trace_state_variable_value,
4005 set_trace_state_variable_value, gdb_collect): Add declaration.
4007 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4009 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4010 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4011 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4012 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4013 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4016 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4018 * inferiors.c: Include gdbsupport/common-inferior.h.
4020 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4022 * hostio-errno.c: Include hostio.h.
4024 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4026 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4029 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4031 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4032 * linux-arm-tdesc.h: Include arch/arm.h.
4034 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4036 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4038 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4040 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4041 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4043 2020-01-10 Pedro Alves <palves@redhat.com>
4045 * fork-child.c (post_fork_inferior): Pass target down to
4047 * inferiors.c (switch_to_thread): Add process_stratum_target
4049 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4050 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4051 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4052 * remote-utils.c (prepare_resume_reply): Pass the target to
4054 * target.c (the_target): Now a process_stratum_target.
4055 (done_accessing_memory): Pass the target to switch_to_thread.
4056 (set_target_ops): Ajust to use process_stratum_target.
4057 * target.h (struct target_ops): Rename to ...
4058 (struct process_stratum_target): ... this.
4059 (the_target, set_target_ops): Adjust.
4060 (prepare_to_access_memory): Adjust comment.
4061 * win32-low.c (child_xfer_memory): Adjust to use
4062 process_stratum_target.
4063 (win32_target_ops): Now a process_stratum_target.
4065 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4066 Pedro Alves <palves@redhat.com>
4068 * win32-low.c (get_child_debug_event): Extract the fatal exception
4069 from the exit status and convert to the equivalent Posix signal
4071 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
4072 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
4074 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
4076 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4078 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4080 * server.c (gdbserver_version): Change copyright year to 2020.
4081 * gdbreplay.c (gdbreplay_version): Likewise.
4083 2019-12-19 Christian Biesinger <cbiesinger@google.com>
4085 * configure: Regenerate.
4086 * configure.ac: Quote variable arguments of test.
4088 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4090 * Makefile.in: Fix build with GNU Make 3.81
4092 2019-12-16 Tom Tromey <tromey@adacore.com>
4094 * server.c (get_exec_file): Constify result.
4096 2019-12-10 Christian Biesinger <cbiesinger@google.com>
4098 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4099 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4100 * config.in: Regenerate.
4101 * configure: Regenerate.
4102 * configure.ac: Don't check for strerror.
4103 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4104 Call safe_strerror instead of strerror.
4105 * server.h (strerror): Remove this now-unnecessary declaration.
4106 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4108 (gdb_agent_helper_thread): Likewise.
4109 * utils.c (perror_with_name): Likewise.
4111 2019-11-26 Tom Tromey <tom@tromey.com>
4113 * configure, config.in: Rebuild.
4115 2019-11-26 Tom Tromey <tom@tromey.com>
4117 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4118 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4120 * configure, config.in: Rebuild.
4122 2019-11-26 Tom Tromey <tom@tromey.com>
4124 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4125 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4126 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4127 * acinclude.m4: Include ax_pthread.m4.
4128 * config.in, configure: Rebuild.
4130 2019-11-26 Christian Biesinger <cbiesinger@google.com>
4132 * debug.c (debug_set_output): Call safe_strerror instead of
4134 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4135 (linux_kill_one_lwp): Likewise.
4136 (linux_detach_one_lwp): Likewise.
4137 (linux_wait_for_event_filtered): Likewise.
4138 (store_register): Likewise.
4139 * lynx-low.c (lynx_attach): Likewise.
4140 * mem-break.c (insert_memory_breakpoint): Likewise.
4141 (remove_memory_breakpoint): Likewise.
4142 (delete_fast_tracepoint_jump): Likewise.
4143 (set_fast_tracepoint_jump): Likewise.
4144 (uninsert_fast_tracepoint_jumps_at): Likewise.
4145 (reinsert_fast_tracepoint_jumps_at): Likewise.
4146 * nto-low.c (nto_xfer_memory): Likewise.
4147 (nto_resume): Likewise.
4149 2019-11-20 Luis Machado <luis.machado@linaro.org>
4151 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4152 instead of register count.
4153 * tdesc.c (tdesc_contains_feature): New function.
4154 * tdesc.h (tdesc_contains_feature): New prototype.
4156 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4158 * Makefile.in: Add safe-strerror.c.
4159 * configure: Regenerate.
4160 * configure.ac: Don't source common.host.
4162 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4164 * config.in: Regenerate.
4165 * configure: Regenerate.
4167 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4169 * ax.c (ax_printf): Handle size_t_arg.
4171 2019-11-06 Christian Biesinger <cbiesinger@google.com>
4173 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4174 * mi/mi-main.c (output_cores): Likewise.
4175 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
4176 (linux_xfer_osdata_modules): Likewise.
4177 * remote.c (register_remote_support_xml): Likewise.
4178 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
4179 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
4181 2019-11-01 Christian Biesinger <cbiesinger@google.com>
4183 * configure: Regenerate.
4184 * configure.ac: Remove check for strerror_r.
4186 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4188 * config.in: Regenerate.
4189 * configure: Regenerate.
4190 * configure.ac: Also check for strerror_r.
4192 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4194 * ax.h (debug_agent): Remove duplicate declaration.
4196 2019-10-26 Tom de Vries <tdevries@suse.de>
4198 * linux-aarch64-low.c: Fix typos in comments.
4199 * linux-arm-low.c: Same.
4200 * linux-low.c: Same.
4201 * linux-ppc-low.c: Same.
4202 * proc-service.c: Same.
4205 * tracepoint.c: Same.
4206 * win32-low.c: Same.
4208 2019-10-25 Tom Tromey <tromey@adacore.com>
4210 * utils.c (xstrdup): Remove.
4212 2019-10-23 Tom Tromey <tom@tromey.com>
4214 * configure, config.in: Rebuild.
4216 2019-10-23 Tom Tromey <tom@tromey.com>
4218 * configure: Rebuild.
4219 * acinclude.m4: Use m4_include, not sinclude.
4221 2019-10-17 Tom Tromey <tromey@adacore.com>
4223 * configure: Rebuild.
4224 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
4225 in AC_CONFIG_FILES invocation.
4226 * Makefile.in (stamp-h, Makefile): Use new-style config.status
4229 2019-10-16 Christian Biesinger <cbiesinger@google.com>
4231 * server.c: Include xml-builtin.h.
4232 (get_xml_features): Don't declare xml_builtins here.
4234 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4236 * Makefile.in: Remove references to vec-ipa.o.
4238 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4240 * Makefile.in: Remove references to vec.c.
4242 2019-10-02 Christian Biesinger <cbiesinger@google.com>
4244 * server.c (server_waiting): Change to bool.
4245 (extended_protocol): Likewise.
4246 (response_needed): Likewise.
4247 (exit_requested): Likewise.
4248 (run_once): Likewise.
4249 (report_no_resumed): Likewise.
4250 (non_stop): Likewise.
4251 (disable_packet_vCont): Likewise.
4252 (disable_packet_Tthread): Likewise.
4253 (disable_packet_qC): Likewise.
4254 (disable_packet_qfThreadInfo): Likewise.
4255 (handle_general_set): Update.
4256 (handle_detach): Update.
4257 (handle_monitor_command): Update.
4258 (handle_query): Update.
4259 (captured_main): Update.
4260 (process_serial_event): Update.
4261 * server.h (server_waiting): Change to bool.
4262 (disable_packet_vCont): Likewise.
4263 (disable_packet_Tthread): Likewise.
4264 (disable_packet_qC): Likewise.
4265 (disable_packet_qfThreadInfo): Likewise.
4266 (run_once): Likewise.
4267 (non_stop): Likewise.
4268 * target.c (target_stop_and_wait): Update.
4270 2019-10-02 Tom Tromey <tromey@adacore.com>
4272 * Makefile.in (SFILES): Add common-inferior.c.
4273 (OBS): Add common-inferior.o.
4274 * server.c (startup_with_shell): Don't define.
4276 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
4278 * linux-low.c (linux_low_read_btrace): Update for change to
4281 2019-09-20 Christian Biesinger <cbiesinger@google.com>
4283 * debug.c (debug_threads): Remove comment in favor of the header.
4284 * debug.h (using_threads): Add declaration.
4285 (debug_threads): Add comment.
4286 * linux-aarch64-low.c: Include debug.h and remove declaration of
4288 * nto-low.c: Likewise.
4289 * remote-utils.c: Likewise.
4290 * thread-db.c: Likewise.
4292 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
4294 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4295 and powerpc-cell64l-ipa.o.
4296 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
4297 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
4298 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
4301 * spu-low.c: Remove file.
4303 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
4304 (parse_spufs_run): Remove.
4305 (ppc_get_pc): Remove Cell/B.E. support.
4306 (ppc_set_pc): Likewise.
4307 (ppc_breakpoint_at): Likewise.
4308 (ppc_arch_setup): Likewise.
4309 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
4310 tdesc_powerpc_cell32l.
4311 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
4312 or init_registers_powerpc_cell32l.
4313 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
4314 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
4315 or init_registers_powerpc_cell32l.
4316 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
4317 (init_registers_powerpc_cell32l): Remove prototype.
4318 (init_registers_powerpc_cell64l): Likewise.
4320 * target.h (struct target_ops): Remove qxfer_spu member.
4321 * server.c (handle_qxfer_spu): Remove.
4322 (qxfer_packets): Remove entry for "spu".
4323 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
4324 * linux-low.c (SPUFS_MAGIC): Remove.
4325 (spu_enumerate_spu_ids): Remove.
4326 (linux_qxfer_spu): Remove.
4327 (linux_target_ops): Remove qxfer_spu member.
4328 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
4329 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
4330 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
4332 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
4334 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
4335 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
4336 * config.in: Regenerate.
4337 * configure: Regenerate.
4339 2019-08-15 Tom Tromey <tromey@adacore.com>
4341 * target.c (target_write_memory): Use gdb::byte_vector.
4343 2019-08-15 Tom Tromey <tromey@adacore.com>
4345 * tracepoint.c (write_inferior_data_pointer)
4346 (write_inferior_integer, write_inferior_int8)
4347 (write_inferior_uinteger, m_tracepoint_action_download)
4348 (r_tracepoint_action_download, x_tracepoint_action_download)
4349 (l_tracepoint_action_download, clear_inferior_trace_buffer)
4350 (download_agent_expr, download_tracepoint_1)
4351 (download_trace_state_variables, upload_fast_traceframes): Update.
4352 * server.c (gdb_write_memory): Update.
4353 * remote-utils.c (relocate_instruction): Update.
4354 * proc-service.c (ps_pdwrite): Update.
4355 * mem-break.c (remove_memory_breakpoint)
4356 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
4357 (uninsert_fast_tracepoint_jumps_at)
4358 (reinsert_fast_tracepoint_jumps_at): Update.
4359 * linux-x86-low.c (append_insns)
4360 (i386_install_fast_tracepoint_jump_pad)
4361 (amd64_write_goto_address, i386_write_goto_address): Update.
4362 * linux-s390-low.c (append_insns, s390_write_goto_address):
4364 * linux-ppc-low.c (ppc_relocate_instruction)
4365 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
4366 (ppc_write_goto_address): Update.
4367 * linux-aarch64-low.c (append_insns): Update.
4368 * target.h (struct target_ops): Update.
4369 (write_inferior_memory): Don't declare.
4370 * target.c (target_write_memory): Rename from
4371 write_inferior_memory. Remove old target_write_memory.
4373 2019-08-15 Tom Tromey <tromey@adacore.com>
4375 * target.c (write_inferior_memory): Use std::vector.
4377 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
4380 * configure.ac: Drop enable-libmcheck support.
4381 * configure, config.in: Rebuild.
4382 * acinclude.m4: Don't include it.
4384 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4386 * configure.srv: Remove Arm xml files.
4388 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4390 * configure.srv: Add new files. Remove xml generated files.
4391 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
4393 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
4394 * linux-aarch32-tdesc.c: New file.
4395 * linux-aarch32-tdesc.h: New file.
4396 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
4397 * linux-arm-low.c (init_registers_arm, tdesc_arm)
4398 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
4399 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
4400 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
4401 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4402 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
4403 (arm_read_description): Call arm_linux_read_description.
4404 (initialize_low_arch): Don't init registers.
4405 * linux-arm-tdesc.c: New file.
4406 * linux-arm-tdesc.h: New file.
4408 2019-07-10 Alan Hayward <alan.hayward@arm.com>
4410 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
4411 Move counter inside for.
4412 (arm_read_description): Check ptrace earlier.
4413 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
4415 2019-07-09 Tom Tromey <tom@tromey.com>
4417 * configure: Rebuild.
4418 * configure.ac: Change common to gdbsupport.
4419 * acinclude.m4: Change common to gdbsupport.
4420 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
4421 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
4422 common to gdbsupport.
4423 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
4424 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
4425 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
4426 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
4427 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
4428 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
4429 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
4430 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
4431 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
4432 common to gdbsupport.
4434 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4436 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
4438 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
4440 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4442 * configure.srv: Remove legacy xml.
4443 * linux-aarch64-low.c (initialize_low_arch): Remove
4444 initialize_low_tdesc call.
4445 * linux-aarch64-tdesc-selftest.c: Remove file.
4446 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
4447 * linux-x86-low.c (initialize_low_arch): Remove
4448 initialize_low_tdesc call.
4449 * linux-x86-tdesc-selftest.c: Remove file.
4450 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
4452 2019-06-20 Tom de Vries <tdevries@suse.de>
4454 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
4455 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
4457 2019-06-19 Tom de Vries <tdevries@suse.de>
4459 * debug.h (debug_write): Change return type to ssize_t.
4460 * debug.c (debug_write): Same.
4462 2019-06-14 Tom Tromey <tom@tromey.com>
4464 * configure.ac: Use new path to gnulib.
4465 * configure: Rebuild.
4466 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
4469 2019-06-11 Tom Tromey <tom@tromey.com>
4471 * Makefile.in (SFILES): Add alloc.c.
4473 (IPA_OBJS): Add alloc-ipa.o.
4474 (alloc-ipa.o): New target.
4475 (%.o: ../%.c): New pattern rule.
4477 2019-06-10 Tom Tromey <tromey@adacore.com>
4479 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
4480 end warning with a newline.
4481 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
4483 * thread-db.c (attach_thread): Don't end warning with a newline.
4484 (thread_db_notice_clone): Likewise.
4485 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
4487 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
4488 end warning with a newline.
4490 2019-06-04 Pedro Alves <palves@redhat.com>
4492 * server.c (captured_main): Use make_unique_xstrdup.
4494 2019-06-02 Tom Tromey <tom@tromey.com>
4496 * gdbreplay.c (fromhex): Remove.
4497 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
4499 2019-05-29 Tom Tromey <tromey@adacore.com>
4501 * configure: Rebuild.
4503 2019-05-06 Kevin Buettner <kevinb@redhat.com>
4505 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
4506 sign extension code on 32-bit builds.
4508 2019-05-03 Eli Zaretskii <eliz@gnu.org>
4511 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
4513 2019-04-19 Tom Tromey <tom@tromey.com>
4515 * server.c (struct vstop_notif): Derive from notif_event.
4517 (queue_stop_reply): Update.
4518 (remove_all_on_match_ptid): Change type. Rewrite.
4519 (discard_queued_stop_replies): Rewrite.
4520 (in_queued_stop_replies_ptid): Change type.
4521 (in_queued_stop_replies): Rewrite.
4522 (notif_stop): Update.
4523 (queue_stop_reply_callback): Update.
4524 (captured_main): Don't call initialize_notif.
4525 (push_stop_notification): Update.
4526 * notif.c (notif_write_event, handle_notif_ack)
4527 (notif_event_enque, notif_push): Update.
4528 (notif_event_xfree, initialize_notif): Remove.
4529 * notif.h (struct notif_event): Include <list>, not
4531 (struct notif_server) <queue>: Now a std::list.
4532 (notif_event_p): Remove typedef.
4533 (initialize_notif): Don't declare.
4534 (struct notif_event): Add virtual destructor.
4536 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4538 * ax.c (ax_vdebug): Call debug_printf.
4539 * debug.c (debug_write): New function.
4540 * debug.h (debug_write): New declaration.
4541 * linux-low.c (sigchld_handler): Call debug_write.
4543 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4545 * debug.c (debug_set_output): New function.
4546 (debug_vprintf): Send output to debug_file.
4547 (debug_flush): Likewise.
4548 * debug.h (debug_set_output): New declaration.
4549 * server.c (handle_monitor_command): Add debug-file option.
4550 (captured_main): Likewise.
4552 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4554 * debug.c (remote_debug): Add definition.
4555 * debug.h (remote_debug): Add declaration.
4556 * hostio.c (remote_debug): Remove declaration.
4557 * remote-utils.c (struct ui_file): Likewise.
4558 (remote_debug): Likewise.
4559 * remote-utils.h (remote_debug): Likewise,
4560 * server.c (remote_debug): Remove definition.
4562 2019-04-10 Kevin Buettner <kevinb@redhat.com>
4564 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
4565 when using a 64-bit gdbserver.
4567 2019-04-09 Tom Tromey <tromey@adacore.com>
4569 * linux-low.c (select_event_lwp): Use find_thread_in_random.
4571 2019-04-08 Tom Tromey <tom@tromey.com>
4573 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
4575 (linux_resume_one_lwp): Likewise.
4577 2019-04-08 Tom Tromey <tom@tromey.com>
4579 * gdbreplay.c: Update.
4580 * linux-low.c: Update.
4583 2019-04-08 Tom Tromey <tom@tromey.com>
4585 * server.c: Use C++ exception handling.
4586 * linux-low.c: Use C++ exception handling.
4587 * gdbreplay.c: Use C++ exception handling.
4589 2019-04-08 Tom Tromey <tom@tromey.com>
4591 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
4592 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
4593 (captured_main, main): Update.
4594 * gdbreplay.c (main): Update.
4596 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4598 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
4599 value in argument pointer, return 1 if the entry is found and 0
4600 otherwise. Move comment.
4601 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
4602 * linux-low.h (linux_get_auxv): Declare.
4603 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
4605 2019-04-05 Tom Tromey <tromey@adacore.com>
4607 * server.c (gdbserver_usage): Use upper-case for metasyntactic
4610 2019-03-28 Alan Hayward <alan.hayward@arm.com>
4612 * linux-low.c (AT_HWCAP2): Add define if not already included.
4614 2019-03-26 Alan Hayward <alan.hayward@arm.com>
4616 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
4617 (aarch64_arch_setup): Call linux_get_hwcap.
4618 * linux-arm-low.c (arm_get_hwcap): Remove function.
4619 (arm_read_description): Call linux_get_hwcap.
4620 * linux-low.c (linux_get_auxv): New function.
4621 (linux_get_hwcap): Likewise.
4622 (linux_get_hwcap2): Likewise.
4623 * linux-low.h (linux_get_hwcap): New declaration.
4624 (linux_get_hwcap2): Likewise.
4625 * linux-ppc-low.c (ppc_get_auxv): Remove function.
4626 (ppc_arch_setup): Call linux_get_hwcap.
4627 * linux-s390-low.c (s390_get_hwcap): Remove function.
4628 (s390_arch_setup): Call linux_get_hwcap.
4630 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4631 Jiong Wang <jiong.wang@arm.com>
4633 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
4634 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
4636 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
4638 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4639 Jiong Wang <jiong.wang@arm.com>
4641 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
4642 (aarch64_get_hwcap): New function.
4643 (aarch64_arch_setup): Read APIA hwcap.
4645 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4646 Jiong Wang <jiong.wang@arm.com>
4648 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
4649 (initialize_low_tracepoint): Likewise.
4650 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
4651 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
4652 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
4653 (aarch64_linux_read_description): Likewise.
4654 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
4656 2019-03-12 John Baldwin <jhb@FreeBSD.org>
4658 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
4659 i386_create_target_description for 'segments' parameter.
4660 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
4661 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4662 * win32-i386-low.c (i386_arch_setup): Likewise.
4664 2019-03-12 Tom Tromey <tromey@adacore.com>
4666 * linux-low.c (iterate_over_lwps): Update.
4668 2019-03-06 Tom Tromey <tom@tromey.com>
4670 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
4671 (captured_main): Use SCOPE_EXIT.
4673 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
4675 * configure.srv: Use '$enable_unittest' instead of '$development'
4676 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
4679 2019-02-27 Tom Tromey <tromey@adacore.com>
4681 * gdbreplay.c (logchar): Handle \r\n.
4683 2019-02-07 Alan Hayward <alan.hayward@arm.com>
4685 * linux-low.c (linux_attach): Add process before lwp.
4686 * server.c (attach_inferior): Check if already attached.
4688 2019-02-07 Tom Tromey <tom@tromey.com>
4690 * x86-tdesc.h: Rename include guard.
4691 * x86-low.h: Add include guard.
4692 * wincecompat.h: Rename include guard.
4693 * win32-low.h: Add include guard.
4694 * utils.h: Rename include guard.
4695 * tracepoint.h: Rename include guard.
4696 * tdesc.h: Rename include guard.
4697 * target.h: Rename include guard.
4698 * server.h: Rename include guard.
4699 * remote-utils.h: Rename include guard.
4700 * regcache.h: Rename include guard.
4701 * nto-low.h: Rename include guard.
4702 * notif.h: Add include guard.
4703 * mem-break.h: Rename include guard.
4704 * lynx-low.h: Add include guard.
4705 * linux-x86-tdesc.h: Add include guard.
4706 * linux-s390-tdesc.h: Add include guard.
4707 * linux-ppc-tdesc-init.h: Add include guard.
4708 * linux-low.h: Add include guard.
4709 * linux-aarch64-tdesc.h: Add include guard.
4710 * linux-aarch32-low.h: Add include guard.
4711 * inferiors.h: Rename include guard.
4712 * i387-fp.h: Rename include guard.
4713 * hostio.h: Rename include guard.
4714 * gdbthread.h: Rename include guard.
4715 * gdb_proc_service.h: Rename include guard.
4716 * event-loop.h: Rename include guard.
4717 * dll.h: Rename include guard.
4718 * debug.h: Rename include guard.
4719 * ax.h: Rename include guard.
4721 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
4724 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
4725 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
4727 2019-01-25 Tom Tromey <tom@tromey.com>
4729 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
4731 2019-01-25 Tom Tromey <tom@tromey.com>
4733 * win32-low.c: Fix common/ includes.
4734 * win32-i386-low.c: Fix common/ includes.
4735 * tracepoint.c: Fix common/ includes.
4736 * thread-db.c: Fix common/ includes.
4737 * target.h: Fix common/ includes.
4738 * symbol.c: Fix common/ includes.
4739 * spu-low.c: Fix common/ includes.
4740 * server.h: Fix common/ includes.
4741 * server.c: Fix common/ includes.
4742 * remote-utils.c: Fix common/ includes.
4743 * regcache.h: Fix common/ includes.
4744 * regcache.c: Fix common/ includes.
4745 * nto-x86-low.c: Fix common/ includes.
4746 * notif.h: Fix common/ includes.
4747 * mem-break.h: Fix common/ includes.
4748 * lynx-low.c: Fix common/ includes.
4749 * lynx-i386-low.c: Fix common/ includes.
4750 * linux-x86-tdesc-selftest.c: Fix common/ includes.
4751 * linux-x86-low.c: Fix common/ includes.
4752 * linux-low.c: Fix common/ includes.
4753 * inferiors.h: Fix common/ includes.
4754 * i387-fp.c: Fix common/ includes.
4755 * hostio.c: Fix common/ includes.
4756 * hostio-errno.c: Fix common/ includes.
4757 * gdbthread.h: Fix common/ includes.
4758 * gdbreplay.c: Fix common/ includes.
4759 * fork-child.c: Fix common/ includes.
4760 * event-loop.c: Fix common/ includes.
4762 (enum gdb_agent_op): Fix common/ includes.
4764 2019-01-21 Tom Tromey <tom@tromey.com>
4766 * tracepoint.c: Fix includes.
4767 * remote-utils.c: Fix includes.
4768 * linux-x86-low.c: Fix includes.
4770 2019-01-01 Joel Brobecker <brobecker@adacore.com>
4772 * gdbreplay.c (gdbreplay_version): Update copyright year in
4774 * server.c (gdbserver_version): Likewise.
4776 2018-12-05 Alan Hayward <alan.hayward@arm.com>
4778 * linux-low.c (add_lwp): Switch ordering.
4780 2018-11-29 Tom Tromey <tom@tromey.com>
4782 * win32-low.c (win32_join): Take pid, not process.
4783 * target.h (struct target_ops) <join>: Change argument type.
4784 (join_inferior): Change argument name.
4785 * spu-low.c (spu_join): Take pid, not process.
4786 * server.c (handle_detach): Preserve pid before destroying
4788 * lynx-low.c (lynx_join): Take pid, not process.
4789 * linux-low.c (linux_join): Take pid, not process.
4791 2018-11-23 Alan Hayward <alan.hayward@arm.com>
4793 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
4794 (aarch64_cannot_fetch_register): Likewise.
4795 (struct linux_target_ops): Update references.
4797 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4799 * linux-ppc-low.c: Include nat/linux-ptrace.h.
4801 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4803 * configure.srv (ipa_ppc_linux_regobj): Add
4804 powerpc-isa207-htm-vsx32l-ipa.o and
4805 powerpc-isa207-htm-vsx64l-ipa.o.
4806 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
4807 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
4808 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
4809 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
4810 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
4811 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
4812 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
4813 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
4814 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4815 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
4816 (init_registers_powerpc_isa207_htm_vsx32l)
4817 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
4818 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
4819 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
4820 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
4821 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
4822 (ppc_store_tm_ctarregset): New functions.
4823 (ppc_regsets): Add entries for HTM regsets.
4824 (ppc_arch_setup): Set htm in features struct when needed. Set
4825 sizes for the HTM regsets.
4826 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
4827 (initialize_low_arch): Call
4828 init_registers_powerpc_isa207_htm_vsx32l and
4829 init_registers_powerpc_isa207_htm_vsx64l.
4830 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4831 PPC_TDESC_ISA207_HTM_VSX.
4832 (initialize_low_tracepoint): Call
4833 init_registers_powerpc_isa207_htm_vsx32l and
4834 init_registers_powerpc_isa207_htm_vsx64l.
4836 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4838 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
4839 rs6000/power-linux-pmu.xml to srv_xmlfiles.
4840 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
4841 (ppc_store_pmuregset): New functions.
4842 (ppc_regsets): Add entries for ebb and pmu regsets.
4843 (ppc_arch_setup): Set isa207 in features struct if the ebb and
4844 pmu regsets are available. Set sizes for these regsets.
4846 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4848 * configure.srv (ipa_ppc_linux_regobj): Add
4849 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
4850 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
4851 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
4852 rs6000/powerpc-isa207-vsx32l.xml, and
4853 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
4854 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4855 <PPC_TDESC_ISA207_VSX>: New enum value.
4856 (init_registers_powerpc_isa207_vsx32l): Declare.
4857 (init_registers_powerpc_isa207_vsx64l): Declare.
4858 * linux-ppc-low.c (ppc_fill_tarregset): New function.
4859 (ppc_store_tarregset): New function.
4860 (ppc_regsets): Add entry for the TAR regset.
4861 (ppc_arch_setup): Set isa207 in features struct when needed. Set
4862 size for the TAR regsets.
4863 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
4864 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
4865 and init_registers_powerpc_isa207_vsx64l.
4866 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
4867 (initialize_low_tracepoint): Call
4868 init_registers_powerpc_isa207_vsx32l and
4869 init_registers_powerpc_isa207_vsx64l.
4871 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4872 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4874 * configure.srv (ipa_ppc_linux_regobj): Add
4875 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
4876 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
4877 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
4878 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
4879 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
4880 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
4881 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
4882 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4883 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
4884 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
4885 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
4886 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
4887 (ppc_hwcap): Add comment.
4888 (ppc_hwcap2): New global.
4889 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
4890 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
4891 (ppc_regsets): Add entries for the DSCR and PPR regsets.
4892 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
4893 when needed. Set sizes for the the DSCR and PPR regsets.
4894 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
4895 (initialize_low_arch): Call
4896 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4897 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4898 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4899 PPC_TDESC_ISA205_PPR_DSCR_VSX.
4900 (initialize_low_tracepoint): Call
4901 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4902 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4904 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4906 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
4908 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
4909 Simon Marchi <simark@simark.ca>
4911 * acinclude.m4: Include "../selftest.m4".
4912 * configure: Regenerate.
4913 * configure.ac: Use "GDB_AC_SELFTEST".
4914 * configure.srv: Use "$enable_unittests" instead of
4915 "$development" when checking whether unit tests have been
4917 * server.c (captured_main): Update message informing that
4918 selftests have been disabled.
4920 2018-10-04 Tom Tromey <tom@tromey.com>
4922 * configure: Rebuild.
4924 2018-10-04 Tom Tromey <tom@tromey.com>
4926 * server.c (handle_status): Rename inner "thread".
4927 (process_serial_event): Declare "res" in 'm' case.
4928 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
4929 (iterate_over_lwps): Rename inner "thread".
4930 (linux_qxfer_libraries_svr4): Rename inner "len".
4931 * gdbthread.h (find_thread_in_random): Rename inner "thread".
4933 2018-10-01 Gary Benson <gbenson@redhat.com>
4935 * gdb_proc_service.h: Moved common code to
4936 common/gdb_proc_service.h.
4938 2018-10-01 Gary Benson <gbenson@redhat.com>
4940 * gdb_proc_service.h: Synchronize comments and whitespace with
4941 GDB's version of this file.
4943 2018-09-25 Tom Tromey <tom@tromey.com>
4945 * configure: Rebuild.
4946 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
4948 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4950 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
4951 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
4952 ($(IPA_LIB)): Sort IPA_OBJS.
4954 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4956 * Makefile.in: Remove references to $(ADD_DEPS).
4958 2018-09-16 Tom Tromey <tom@tromey.com>
4960 * remote-utils.c (remote_open): Use GNU style for metasyntactic
4962 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
4965 2018-09-05 Tom Tromey <tom@tromey.com>
4967 * configure: Rebuild.
4969 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
4972 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
4974 2018-08-27 Tom Tromey <tom@tromey.com>
4977 * configure: Rebuild.
4979 2018-08-27 Tom Tromey <tom@tromey.com>
4981 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
4982 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
4983 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
4984 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
4985 (s390x_emit_stack_adjust): Add casts to unsigned char.
4987 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
4991 * server.h (struct client_state) <disable_randomization>:
4994 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4996 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
4998 (mips_supply_ptrace_register): Likewise.
5000 2018-07-22 Tom Tromey <tom@tromey.com>
5002 * configure: Rebuild.
5004 2018-07-22 Tom Tromey <tom@tromey.com>
5006 * win32-low.c (win32_create_inferior): Remove unused variables.
5007 * gdbreplay.c (remote_open): Remove unused variable.
5008 * remote-utils.c (remote_prepare): Remove unused variable.
5009 * x86-tdesc.h (X86_TDESC_H): Define.
5010 (amd64_expedite_regs): Define conditionally.
5011 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5012 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5013 * remote-utils.c (readchar): Remove unused variable.
5015 2018-07-13 Pedro Alves <palves@redhat.com>
5017 * linux-low.c (linux_kill): Change parameter to process_info
5018 pointer instead of pid. Adjust.
5019 * lynx-low.c (lynx_kill): Likewise.
5020 * nto-low.c (nto_kill): Likewise.
5021 * spu-low.c (spu_kill): Likewise.
5022 * win32-low.c (win32_kill): Likewise.
5023 * server.c (handle_v_kill, kill_inferior_callback)
5024 (detach_or_kill_for_exit): Adjust.
5025 * target.c (kill_inferior): Change parameter to process_info
5026 pointer instead of pid. Adjust.
5027 * target.h (struct target_ops) <kill>: Change parameter to
5028 process_info pointer instead of pid. Adjust all implementations
5030 (kill_inferior): Likewise.
5032 2018-07-13 Pedro Alves <palves@redhat.com>
5034 * linux-low.c (linux_detach, linux_join): Change parameter to
5035 process_info pointer instead of pid. Adjust.
5036 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5037 * nto-low.c (nto_detach): Likewise.
5038 * spu-low.c (spu_detach, spu_join): Likewise.
5039 * win32-low.c (win32_detach, win32_join): Likewise.
5040 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5041 * target.h (struct target_ops) <detach, join>: Change parameter to
5042 process_info pointer instead of pid. Adjust all implementations
5044 (detach_inferior, join_inferior): Rename 'pid' parameter to
5047 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5048 Jan Kratochvil <jan.kratochvil@redhat.com>
5049 Paul Fertser <fercerpav@gmail.com>
5050 Tsutomu Seki <sekiriki@gmail.com>
5052 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5053 (OBS): Add 'common/netstuff.o'.
5054 (GDBREPLAY_OBS): Likewise.
5055 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
5056 (remote_open): Implement support for IPv6
5058 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
5060 (handle_accept_event): Accept connections from IPv6 sources.
5061 (remote_prepare): Handle IPv6-style hostnames; implement
5062 support for IPv6 connections.
5063 (remote_open): Implement support for printing connections from
5066 2018-07-11 Pedro Alves <palves@redhat.com>
5069 * mem-break.c (any_persistent_commands): Add process_info
5070 parameter and use it instead of relying on the current process.
5071 Change return type to bool.
5072 * mem-break.h (any_persistent_commands): Add process_info
5073 parameter and change return type to bool.
5074 * server.c (handle_detach): Remove require_running_or_return call.
5075 Look up the process_info for the process we're about to detach.
5076 If not found, return back error to GDB. Adjust
5077 any_persistent_commands call to pass down a process pointer.
5079 2018-07-11 Pedro Alves <palves@redhat.com>
5081 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
5082 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
5083 instead of collect_register_by_name.
5084 * regcache.c (regcache_raw_get_unsigned_by_name): New.
5085 * regcache.h (regcache_raw_get_unsigned_by_name): New.
5087 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5088 Pedro Alves <palves@redhat.com>
5090 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5092 2018-07-03 Tom Tromey <tom@tromey.com>
5094 * linux-low.c: Update.
5095 * lynx-low.c: Update.
5096 * mem-break.c: Update.
5097 * nto-low.c: Update.
5098 * remote-utils.c: Update.
5100 * spu-low.c: Update.
5102 * win32-low.c: Update.
5104 2018-07-03 Tom Tromey <tom@tromey.com>
5108 2018-07-03 Tom Tromey <tom@tromey.com>
5110 * linux-low.c: Update.
5112 2018-07-03 Tom Tromey <tom@tromey.com>
5116 2018-07-03 Tom Tromey <tom@tromey.com>
5118 * linux-low.c: Update.
5119 * linux-mips-low.c: Update.
5120 * lynx-low.c: Update.
5121 * nto-low.c: Update.
5122 * remote-utils.c: Update.
5124 * spu-low.c: Update.
5126 * thread-db.c: Update.
5128 2018-07-03 Tom Tromey <tom@tromey.com>
5130 * linux-low.c: Update.
5131 * linux-mips-low.c: Update.
5132 * lynx-low.c: Update.
5133 * mem-break.c: Update.
5134 * nto-low.c: Update.
5135 * remote-utils.c: Update.
5137 * spu-low.c: Update.
5139 * tracepoint.c: Update.
5141 2018-07-03 Tom Tromey <tom@tromey.com>
5143 * linux-low.c: Update.
5144 * linux-ppc-low.c: Update.
5145 * linux-x86-low.c: Update.
5146 * proc-service.c: Update.
5148 * spu-low.c: Update.
5149 * thread-db.c: Update.
5150 * win32-low.c: Update.
5152 2018-07-03 Tom Tromey <tom@tromey.com>
5154 * linux-low.c: Update.
5155 * lynx-low.c: Update.
5156 * nto-low.c: Update.
5157 * remote-utils.c: Update.
5158 * spu-low.c: Update.
5159 * thread-db.c: Update.
5160 * win32-low.c: Update.
5162 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5164 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5165 parameter in call to 'amd64_create_target_description'.
5167 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5169 * x86-tdesc.h: Remove executable permission flag.
5171 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5173 * configure.ac: Remove AC_PREREQ, add missing quoting.
5174 * configure: Re-generate.
5175 * config.in: Re-generate.
5176 * aclocal.m4: Re-generate.
5178 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
5180 * tracepoint.h (current_traceframe): Remove declaration.
5182 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5184 * linux-aarch64-low.c (is_sve_tdesc): New function.
5185 (aarch64_sve_regs_copy_to_regcache): Likewise.
5186 (aarch64_sve_regs_copy_from_regcache): Likewise.
5187 (aarch64_regs_info): Add SVE checks.
5188 (initialize_low_arch): Initialize SVE.
5190 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5192 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
5194 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5196 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
5197 (initialize_low_tracepoint): Likewise
5198 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
5199 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
5201 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
5203 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
5205 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5207 * server.h (PBUFSIZ): Increase size
5209 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5211 * regcache.c (regcache::raw_compare): New function.
5212 * regcache.h (regcache::raw_compare): New declaration.
5214 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5216 * regcache.c (new_register_cache): Use new.
5217 (free_register_cache): Use delete.
5218 (register_data): Use const.
5219 (supply_register): Move body inside regcache.
5220 (regcache::raw_supply): New override function.
5221 (collect_register): Move body inside regcache.
5222 (regcache::raw_collect): New override function.
5223 (regcache::get_register_status): New override function.
5224 * regcache.h (struct regcache): Inherit from reg_buffer_common.
5226 2018-06-09 Tom Tromey <tom@tromey.com>
5228 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
5230 (event_queue): Use std::queue.
5231 (gdb_event_xfree): Remove.
5232 (initialize_event_loop, process_event, wait_for_event): Update.
5234 2018-06-08 Stan Cox <scox@redhat.com>
5236 * win32-low.c (win32_create_inferior): last_ptid and last_status
5237 moved to client_state.
5239 2018-06-08 Pedro Alves <palves@redhat.com>
5241 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
5242 common/common-exceptions.o, common/common-utils.o,
5243 common/errors.o, common/print-utils.o and utils.o.
5244 * gdbreplay.c: Include "common-defs.h" instead of the two
5245 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
5246 string.h or alloca.h.
5247 (perror_with_name): Delete.
5248 (remote_open): Use xstrdup instead of strdup.
5249 (main): Rename to ...
5250 (captured_main): ... this.
5253 2018-06-08 Tom Tromey <tom@tromey.com>
5255 * linux-low.c (linux_low_read_btrace): Update.
5257 2018-06-04 Stan Cox <scox@redhat.com>
5259 * server.h (struct client_state): New.
5260 * server.c (cont_thread, general_thread, multi_process)
5261 (report_fork_events, report_vfork_events, report_exec_events)
5262 (report_thread_events, swbreak_feature, hwbreak_feature)
5263 (vCont_supported, disable_randomization, pass_signals)
5264 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
5265 Moved to client_state.
5266 * remote-utils.c (remote_debug, noack_mode)
5267 (transport_is_reliable): Moved to client_state.
5268 * tracepoint.c (current_traceframe): Moved to client_state.
5271 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
5272 linux-low.c, remote-utils.h, target.c: Use client_state.
5274 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5276 * configure.srv: Add new c/h file.
5278 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5280 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
5283 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5285 * gdb.arch/mips-fpregset-core.exp: New test.
5286 * gdb.arch/mips-fpregset-core.c: New test source.
5288 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
5291 * hostio.c (require_int): Do not report overflow for integers
5292 between 0xfffffff and 0x7fffffff.
5294 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5296 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
5297 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
5298 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
5300 (the_low_target): Wire them.
5302 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5304 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
5305 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
5306 mode. Call collect_register_by_name with vscr using
5307 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
5308 (ppc_store_vrregset): Add and set vscr_offset variable as in
5309 ppc_fill_vrregset. Call supply_register_by_name with vscr using
5312 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5314 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5315 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
5316 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
5318 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5320 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
5321 (ppc_store_vsxregset): Likewise.
5322 (ppc_fill_vrregset): Likewise.
5323 (ppc_store_vrregset): Likewise.
5324 (ppc_fill_evrregset): Likewise.
5325 (ppc_store_evrregset): Likewise.
5326 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
5327 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
5330 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5332 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
5333 wordsize of the inferior. Call ppc_linux_target_wordsize.
5335 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5337 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
5338 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
5339 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
5340 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5341 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5342 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5343 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5344 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5345 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5346 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5347 (tdesc_powerpc_e500l): Remove.
5348 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
5349 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
5350 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
5351 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
5353 (ppc_arch_setup): Remove target description matching code. Fill a
5354 ppc_linux_features struct and call ppc_linux_match_description
5357 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5359 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
5360 width of the requested register exceeds the width of the
5362 (mips_cannot_store_register): Likewise.
5364 2018-05-21 Maciej W. Rozycki <macro@mips.com>
5366 * linux-mips-low.c (mips_fetch_register): New function. Update
5368 (mips_store_gregset): Supply 0 rather than $restart for $zero.
5369 (the_low_target): Wire `mips_fetch_register'.
5371 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5373 * lynx-i386-low.c (LYNXOS_178): New macro.
5374 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
5375 the layout on LynxOS-178.
5376 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
5377 handle floating point registers that are not supported by
5380 2018-05-10 Tom Tromey <tom@tromey.com>
5382 * configure: Rebuild.
5384 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5387 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
5388 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
5389 Use it to set the expedite_regs field in the given tdesc.
5390 * x86-tdesc.h: New file.
5391 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
5392 Adjust following the addition of the new expedite_regs parameter
5393 to init_target_desc.
5394 * linux-tic6x-low.c (tic6x_read_description): Likewise.
5395 * linux-x86-tdesc.c: #include "x86-tdesc.h".
5396 (i386_linux_read_description, amd64_linux_read_description):
5397 Adjust following the addition of the new expedite_regs parameter
5398 to init_target_desc.
5399 * lynx-i386-low.c: #include "x86-tdesc.h".
5400 (lynx_i386_arch_setup): Adjust following the addition of the new
5401 expedite_regs parameter to init_target_desc.
5402 * nto-x86-low.c: #include "x86-tdesc.h".
5403 (nto_x86_arch_setup): Adjust following the addition of the new
5404 expedite_regs parameter to init_target_desc.
5405 * win32-i386-low.c: #include "x86-tdesc.h".
5406 (i386_arch_setup): Adjust following the addition of the new
5407 expedite_regs parameter to init_target_desc.
5409 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5412 * win32-low.c (win32_create_inferior): Add call to my_wait
5413 setting last_status global.
5415 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5418 * win32-low.c (create_process): Only call gdb_tilde_expand if
5419 inferior_cwd is not NULL.
5421 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5423 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
5424 registers to the cache if their values have changed.
5425 (i387_xsave_to_cache): Provide default values for x87 control
5426 registers when these features are available, but disabled.
5427 * regcache.c (supply_register_by_name_zeroed): New function.
5428 * regcache.h (supply_register_by_name_zeroed): Declare new
5431 2018-05-07 Tom Tromey <tom@tromey.com>
5433 * configure: Rebuild.
5435 2018-05-04 Tom Tromey <tom@tromey.com>
5437 * configure: Rebuild.
5439 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5440 Pedro Alves <palves@redhat.com>
5442 * linux-aarch64-low.c (aarch64_stopped_data_address):
5445 2018-04-27 Tom Tromey <tom@tromey.com>
5447 * configure: Rebuild.
5449 2018-04-23 Tom Tromey <tom@tromey.com>
5451 * configure: Rebuild.
5453 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
5455 * Makefile.in (depcomp): Add "..".
5456 (all_deps_files): New and use it.
5458 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5460 * configure.srv (aarch64*-*-linux*): Don't include xml.
5461 (i[34567]86-*-cygwin*): Likewise.
5462 (i[34567]86-*-linux*): Likewise.
5463 (i[34567]86-*-lynxos*): Likewise.
5464 (i[34567]86-*-mingw32ce*): Likewise.
5465 (i[34567]86-*-mingw*): Likewise.
5466 (i[34567]86-*-nto*): Likewise.
5467 (tic6x-*-uclinux): Likewise.
5468 (x86_64-*-linux*): Likewise.
5469 (x86_64-*-mingw*): Likewise.
5470 (x86_64-*-cygwin*): Likewise.
5472 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5474 * tdesc.c: Remove xml parameter.
5476 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5478 * server.c (get_features_xml): Remove cast.
5479 * tdesc.c (void target_desc::accept): Fill in function.
5480 (tdesc_get_features_xml): Remove old xml creation.
5481 (print_xml_feature::visit_pre): Add xml vistor.
5482 * tdesc.h (struct target_desc): Make xmltarget mutable.
5483 (tdesc_get_features_xml): Remove declaration.
5485 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5487 * tdesc.c (tdesc_architecture_name): Add new function.
5488 (tdesc_osabi_name): Likewise.
5489 (tdesc_get_features_xml): Use new functions.
5491 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5493 * tdesc.c (tdesc_create_flags): Remove.
5494 (tdesc_add_flag): Likewise.
5495 (tdesc_named_type): Likewise.
5496 (tdesc_create_union): Likewise.
5497 (tdesc_create_struct): Likewise.
5498 (tdesc_create_vector): Likewise.
5499 (tdesc_add_bitfield): Likewise.
5500 (tdesc_add_field): Likewise.
5501 (tdesc_set_struct_size): Likewise.
5503 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5505 * tdesc.c (~target_desc): Remove implictly deleted items.
5506 (init_target_desc): Iterate all features.
5507 (tdesc_get_features_xml): Use vector.
5508 (tdesc_create_feature): Create feature.
5509 * tdesc.h (tdesc_feature) Remove
5510 (target_desc): Add features.
5512 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5514 * Makefile.in: Add common/tdesc.c
5515 * tdesc.c (init_target_desc): init all reg_defs from register
5517 (tdesc_create_reg): Create tdesc_reg.
5518 * tdesc.h (tdesc_feature): Add register vector.
5520 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5522 * tdesc.h (struct target_desc) <features>: Change type to
5523 std::vector<std::string>.
5524 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
5526 (tdesc_get_features_xml): Likewise.
5527 (tdesc_create_feature): Likewise.
5529 2018-03-26 Alan Hayward <alan.hayward@arm.com>
5531 * regcache.c (find_register_by_number): Return a ref.
5532 (find_regno): Use references.
5533 (register_size): Likewise.
5534 (register_data): Likewise.
5535 * tdesc.c (target_desc::~target_desc): Remove free calls.
5536 (target_desc::operator==): Use std::vector compare.
5537 (init_target_desc): Use reference.
5538 (tdesc_create_reg): Use reg constructors.
5539 * tdesc.h (struct target_desc): Replace pointer with object.
5541 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5543 * regcache.c (find_register_by_number): Make static.
5544 (find_regno): Use find_register_by_number
5545 * regcache.h (struct reg): Remove declaration.
5547 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5549 * tdesc.c (target_desc::~target_desc): Move to here.
5550 (target_desc::operator==): Likewise.
5551 * tdesc.h (target_desc::~target_desc): Move from here.
5552 (target_desc::operator==): Likewise.
5554 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5556 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
5558 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5560 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
5562 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
5563 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
5564 and init_registers_s390_gs_linux64.
5566 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5568 * linux-s390-low.c (s390_fill_gs): Remove function.
5569 (s390_fill_gsbc): Remove function.
5570 (s390_regsets): Set fill functions for the guarded storage regsets
5573 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5575 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
5576 the word size. Add comment.
5577 (s390_get_wordsize): New function.
5578 (s390_arch_setup): No longer select a temporary tdesc to fetch the
5579 pswm with it. Instead, use s390_get_wordsize to determine the
5580 word size first and derive the correct tdesc from that directly.
5582 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5584 * Makefile.in: Include silent-rules.mk.
5585 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
5586 (COMPILE): Add ECHO_CXX.
5587 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5588 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5589 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
5590 (version-generated.c): Add ECHO_GEN.
5591 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
5592 (IPAGENT_COMPILE): Add ECHO_CXX.
5593 (%-generated.c): Add ECHO_REGDAT.
5595 2018-03-14 Tom Tromey <tom@tromey.com>
5598 * ax.c (ax_printf): Special case for NULL.
5600 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5602 * linux-low.c (linux_qxfer_libraries_svr4): Use
5603 xml_escape_text_append.
5605 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5607 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
5609 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5611 * server.c (handle_general_set): Remove unnecessary xstrdup.
5613 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5615 * server.c (parse_debug_format_options): Adjust to
5616 delim_string_to_char_ptr_vec changes.
5617 * thread-db.c (thread_db_load_search): Adjust to
5618 dirnames_to_char_ptr_vec changes.
5620 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
5622 * target.h (target_enable_btrace, target_disable_btrace)
5623 (target_read_btrace, target_read_btrace_conf): Turn macro into
5624 inline function. Throw error if target method is not defined.
5625 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
5626 check for btrace target method. Be prepared to handle exceptions
5627 from btrace target methods.
5629 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5631 * server.c (captured_main): Change order of error message printed
5632 when the current working directory cannot be found.
5634 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5636 * server.c: Include "filenames.h" and "pathstuff.h".
5637 (program_name): Delete variable.
5638 (program_path): New anonymous class.
5639 (get_exec_wrapper): Use "program_path" instead of
5641 (handle_v_run): Likewise.
5642 (captured_main): Likewise.
5643 (process_serial_event): Likewise.
5645 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5647 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
5648 (OBJS): Add "pathstuff.o".
5649 * server.c (current_directory): New global variable.
5650 (captured_main): Initialize "current_directory".
5652 2018-02-26 Alan Hayward <alan.hayward@arm.com>
5654 * tdesc.c: Use common/tdesc.h.
5655 * tdesc.h: Likewise.
5657 2018-02-20 Alan Hayward <alan.hayward@arm.com>
5658 Simon Marchi <simon.marchi@ericsson.com>
5660 * Makefile.in: Switch order of make rules.
5662 2018-02-19 Alan Hayward <alan.hayward@arm.com>
5664 * Makefile.in: Add common directory in build.
5665 * configure.ac: Add common reference.
5666 * configure: Regenerate.
5668 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5670 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
5671 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
5672 * spu-low.c (spu_target_ops): Likewise.
5673 * win32-low.c (win32_target_ops): Likewise.
5674 * server.c (supported_btrace_packets): Report packets unconditionally.
5675 * target.h (target_ops) <supports_btrace>: Remove.
5676 (target_supports_btrace): Remove.
5678 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5680 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
5681 (handle_btrace_disable): Change return type to void. Use exceptions
5683 (handle_btrace_general_set): Catch exception and copy message to
5686 2018-02-08 Tom Tromey <tom@tromey.com>
5688 * linux-low.c (install_software_single_step_breakpoints): Use
5689 make_scoped_restore.
5690 * inferiors.c (make_cleanup_restore_current_thread): Remove.
5691 (do_restore_current_thread_cleanup): Remove.
5692 * gdbthread.h (make_cleanup_restore_current_thread): Don't
5695 2018-02-08 Tom Tromey <tom@tromey.com>
5697 * mem-break.c (set_raw_breakpoint_at): Use
5698 gdb::unique_xmalloc_ptr.
5700 2018-01-30 Pedro Alves <palves@redhat.com>
5703 * target.c (target_terminal::terminal_state): Rename to ...
5704 (target_terminal::m_terminal_state): ... this.
5706 2018-01-19 James Clarke <jrtc27@jrtc27.com>
5708 * linux-low.c (handle_extended_wait): Surround call to
5709 thread_db_notice_clone with #ifdef USE_THREAD_DB.
5711 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5713 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
5714 linux_ptrace_attach_fail_reason_string now returning an
5716 (linux_attach): Likewise.
5717 * thread-db.c (attach_thread): Likewise.
5719 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
5722 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5723 checking for fs_base/gs_base fields in struct user_regs_struct.
5724 * configure: Regenerate.
5726 2018-01-16 Yao Qi <yao.qi@linaro.org>
5729 * linux-low.c (fetch_register): Call supply_register instead of
5732 2018-01-08 Yao Qi <yao.qi@linaro.org>
5733 Simon Marchi <simon.marchi@ericsson.com>
5735 * Makefile.in (OBS): Remove selftest.o.
5736 * configure.ac: Set srv_selftest_objs if $development is true.
5737 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
5738 * configure: Re-generated.
5739 * server.c (captured_main): Wrap variable selftest_filter with
5742 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
5744 * server.c (parse_debug_format_options): Return std::string.
5745 (handle_monitor_command, captured_main): Adjust.
5747 2018-01-05 Pedro Alves <palves@redhat.com>
5750 * server.c (captured_main): Pass quiet=false to
5751 save_original_signals_state.
5753 2018-01-01 Joel Brobecker <brobecker@adacore.com>
5755 * gdbreplay.c (gdbreplay_version): Update copyright year in
5757 * server.c (gdbserver_version): Likewise.
5759 2017-12-08 Tom Tromey <tom@tromey.com>
5761 * ax.c (ax_printf): Update.
5763 2017-12-07 Yao Qi <yao.qi@linaro.org>
5765 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
5766 aarch64_linux_read_description.
5767 * linux-amd64-ipa.c (idx2mask): New array.
5768 (get_ipa_tdesc): Move idx2mask out.
5769 (initialize_low_tracepoint): Initialize target descriptions.
5770 * linux-i386-ipa.c (idx2mask): New array.
5771 (get_ipa_tdesc): Move idx2mask out.
5772 (initialize_low_tracepoint): Initialize target descriptions.
5774 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
5776 * tdesc.c (struct tdesc_type): Change return type.
5777 (tdesc_add_flag): Change parameter type.
5778 (tdesc_add_bitfield): Likewise.
5779 (tdesc_add_field): Likewise.
5780 (tdesc_set_struct_size): Likewise.
5782 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
5784 * regcache.c (registers_to_string): Remove unused variable.
5786 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5788 * inferiors.c (for_each_inferior_with_data): Remove.
5789 * inferiors.h (for_each_inferior_with_data): Remove.
5790 * server.c (handle_qxfer_threads_worker): Change parameter type.
5791 (handle_qxfer_threads_proper): Use for_each_thread.
5793 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5795 * inferiors.c (for_each_inferior): Remove.
5796 (clear_inferiors): Use for_each_thread.
5797 * inferiors.h (for_each_inferior): Remove.
5798 * linux-low.c (linux_wait_for_event_filtered): Use
5800 (linux_stabilize_threads): Likewise.
5801 * regcache.c (regcache_release): Likewise.
5802 * server.c (gdb_wants_all_threads_stopped): Likewise.
5803 (clear_pending_status_callback): Remove.
5804 (handle_status): Use for_each_thread.
5805 (captured_main): Likewise.
5806 * win32-low.c (child_init_thread_list): Likewise.
5807 (win32_clear_inferiors): Likewise.
5808 (fake_breakpoint_event): Likewise.
5810 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5812 * inferiors.h (find_inferior): Remove.
5813 * inferiors.c (find_inferior): Remove.
5815 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5817 * linux-low.c (resume_status_pending_p): Update comment.
5818 (need_step_over_p): Update comment.
5820 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5822 * linux-low.c (proceed_one_lwp): Return void, change parameter
5824 (unsuspend_and_proceed_one_lwp): Likewise.
5825 (proceed_all_lwps): Use for_each_thread.
5826 (unstop_all_lwps): Likewise.
5828 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5830 * linux-low.c (linux_resume_one_thread): Return void, take
5832 (linux_resume): Use for_each_thread.
5834 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5836 * linux-low.c (send_sigstop_callback): Return void, change
5837 parameter type. Rename to...
5838 (send_sigstop): ... this.
5839 (suspend_and_send_sigstop_callback): Return void, change parameter
5841 (suspend_and_send_sigstop): ... this.
5842 (stop_all_lwps): Use for_each_thread.
5844 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5846 * linux-low.c (lwp_running): Return bool, remove unused
5848 (linux_stabilize_threads): Use find_thread.
5850 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5852 * linux-low.c (select_singlestep_lwp_callback): Remove.
5853 (count_events_callback): Remove.
5854 (select_event_lwp_callback): Remove.
5855 (select_event_lwp): Use find_thread/for_each_thread.
5857 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5859 * linux-low.c (not_stopped_callback): Return bool, take filter
5861 (linux_wait_for_event_filtered): Use find_thread.
5862 (linux_wait_1): Likewise.
5864 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5866 * linux-low.c (same_lwp): Remove.
5867 (find_lwp_pid): Use find_thread.
5869 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5871 * linux-low.c (delete_lwp_callback): Remove.
5872 (linux_mourn): Use for_each_thread.
5874 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5876 * linux-low.c (linux_detach_lwp_callback): Return void, remove
5877 args parameter, don't check for pid.
5878 (linux_detach): Use for_each_thread.
5880 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5882 * linux-low.c (struct counter): Remove.
5883 (second_thread_of_pid_p): Remove.
5884 (last_thread_of_process_p): Use find_thread.
5886 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5888 * inferiors.c (find_inferior_in_random): Remove.
5889 * inferiors.h (find_inferior_in_random): Remove.
5890 * linux-low.c (status_pending_p_callback): Return bool, accept
5891 parameter ptid directly.
5892 (linux_wait_for_event_filtered): Use find_thread_in_random.
5893 (linux_wait_1): Likewise.
5895 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5897 * inferiors.c (find_inferior_id): Remove.
5898 (find_thread_ptid): Move implemention from find_inferior_id to
5900 * inferiors.h (find_inferior_id): Remove.
5901 * server.c (handle_status): Use find_thread_ptid.
5902 (process_serial_event): Likewise.
5903 * thread-db.c (find_one_thread): Likewise.
5904 (thread_db_thread_handle): Likewise.
5905 * win32-low.c (thread_rec): Likewise.
5906 (child_delete_thread): Likewise.
5907 (win32_thread_alive): Likewise.
5908 (get_child_debug_event): Likewise.
5910 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5912 * linux-mips-low.c (update_watch_registers_callback): Return
5913 void, remove pid_p parameter, don't check for pid.
5914 (mips_insert_point, mips_remove_point): Use for_each_thread.
5916 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5918 * lynx.low (lynx_delete_thread_callback): Remove.
5919 (lynx_mourn): Use for_each_thread.
5921 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5923 * regcache.c (regcache_invalidate_one): Remove.
5924 (regcache_invalidate_pid): use for_each_thread.
5926 2017-11-26 Tom Tromey <tom@tromey.com>
5928 * linux-low.c (linux_create_inferior): Update.
5930 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
5932 * spu-low.c (spu_create_inferior): Fix typo in argument name.
5934 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5936 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
5937 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5938 * linux-aarch64-tdesc-selftest.c: New file.
5939 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5941 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5943 * configure.srv: Add new file.
5944 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5945 * linux-aarch64-tdesc-selftest.c: New file.
5946 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5948 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5950 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
5951 * linux-aarch64-low.c (initialize_low_arch): Remove init.
5952 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
5954 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5956 * configure.srv: Add new files.
5957 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
5958 aarch64_linux_read_description.
5959 * linux-aarch64-low.c (aarch64_linux_read_description):
5960 Merge with aarch64_arch_setup.
5961 (aarch64_arch_setup): Call aarch64_linux_read_description.
5962 * linux-aarch64-tdesc.c: New file.
5963 * linux-aarch64-tdesc.h: New file.
5965 2017-11-24 Yao Qi <yao.qi@linaro.org>
5967 * configure.srv: Set $srv_regobj for tic6x-linux.
5968 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
5969 (tic6x_read_description): Move some code to tic6x_arch_setup.
5970 (tic6x_tdesc_test): New function.
5971 (initialize_low_arch): Call selftests::register_test.
5973 2017-11-22 Yao Qi <yao.qi@linaro.org>
5975 * remote-utils.c (prepare_resume_reply): Use memcpy.
5977 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5979 * linux-low.c (kill_one_lwp_callback): Return void, take
5980 argument directly, don't filter on pid.
5981 (linux_kill): Use for_each_thread.
5983 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5985 * linux-low.c (need_step_over_p): Return bool, remove dummy
5987 (linux_resume, proceed_all_lwps): Use find_thread.
5989 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5991 * linux-low.c (resume_status_pending_p): Return bool, remove
5993 (linux_resume): Use find_thread.
5995 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5997 * linux-low.c (struct thread_resume_array): Remove.
5998 (linux_set_resume_request): Return void, take arguments
6000 (linux_resume): Use for_each_thread.
6002 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6004 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6005 return bool, remove data argument.
6006 (linux_stabilize_threads): Use find_thread.
6008 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6010 * linux-low.c (unsuspend_one_lwp): Remove.
6011 (unsuspend_all_lwps): Use for_each_thread, inline code from
6014 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6016 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6017 * linux-low.c (struct iterate_over_lwps_args): Remove.
6018 (iterate_over_lwps_filter): Remove.
6019 (iterate_over_lwps): Use find_thread.
6021 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6023 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6024 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6025 code from reset_lwp_ptrace_options_callback.
6027 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6029 * linux-arm-low.c (struct update_registers_data): Remove.
6030 (update_registers_callback): Return void, take arguments
6031 directly, don't check thread's pid.
6032 (arm_insert_point, arm_remove_point): Use for_each_thread.
6034 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6036 * win32-low.c (continue_one_thread): Return void, take argument
6038 (child_continue): Use for_each_thread.
6040 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6042 * win32-i386-low.c (update_debug_registers_callback): Rename
6044 (update_debug_registers): ... this, return void, remove pid_p arg.
6045 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6047 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6049 * inferiors.h (struct process_info): Add constructor, initialize
6051 <syscalls_to_catch>: Change type to std::vector<int>.
6052 * inferiors.c (add_process): Allocate process_info with new.
6053 (remove_process): Free process_info with delete.
6054 * linux-low.c (handle_extended_wait): Adjust.
6055 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
6056 * server.c (handle_general_set): Adjust.
6058 2017-11-16 Pedro Alves <palves@redhat.com>
6060 * remote-utils.c (remote_close): Block SIGIO signals instead of
6061 uninstalling the SIGIO handler.
6063 2017-11-16 Alan Hayward <alan.hayward@arm.com>
6065 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
6067 2017-11-16 Yao Qi <yao.qi@linaro.org>
6069 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
6070 (tic6x_store_gregset): Likewise.
6071 (tic6x_usrregs_info): Move it up.
6073 2017-11-15 Alan Hayward <alan.hayward@arm.com>
6075 * Makefile.in: Update arch rules.
6076 * configure.srv: Explicitly mark arch/ files.
6078 2017-11-13 Andreas Schwab <schwab@suse.de>
6080 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
6082 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6084 2017-11-06 Pedro Alves <palves@redhat.com>
6086 * config.in, configure: Regenerate.
6088 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6090 * target.c (struct thread_search): Remove.
6091 (thread_search_callback): Remove.
6092 (prepare_to_access_memory): Use for_each_thread instead of
6093 find_inferior. Inline code from thread_search_callback.
6095 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6097 * server.c (struct visit_actioned_threads_data): Remove.
6098 (visit_actioned_threads): Change prototype to take arguments
6100 (resume): Use find_thread instead of find_inferior.
6102 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6104 * server.c (queue_stop_reply_callback): Change prototype, return
6106 (find_status_pending_thread_callback): Remove.
6107 (handle_status): Replace find_inferior with find_thread and
6110 2017-10-25 Alan Hayward <alan.hayward@arm.com>
6112 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6114 (aarch64_store_gregset): Likewise.
6115 (aarch64_fill_fpregset): Likewise.
6116 (aarch64_store_fpregset): Likewise.
6118 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6120 * gdbthread.h (find_thread, for_each_thread): New functions.
6121 * inferiors.c (thread_of_pid): Remove.
6122 (find_any_thread_of_pid): Use find_thread.
6123 * linux-low.c (num_lwps): Use for_each_thread.
6125 2017-10-17 Yao Qi <yao.qi@linaro.org>
6127 * Makefile.in: Remove one rule.
6128 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6130 2017-10-17 Yao Qi <yao.qi@linaro.org>
6132 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6133 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6135 2017-10-17 Yao Qi <yao.qi@linaro.org>
6137 * configure.srv: Rename arm.o with arch/arm.o.
6139 2017-10-17 Yao Qi <yao.qi@linaro.org>
6141 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6142 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6143 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6144 (arch-i386.o, arch-amd64.o): Remove rules.
6145 (arch/%.o): New rule.
6146 Update POSTCOMPILE and COMPILE.pre.
6147 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6148 * configure: Re-generated.
6149 * configure.srv: Replace arch-i386.o with arch/i386.o.
6150 Replace arch-amd64.o with arch/amd64.o.
6152 2017-10-16 Yao Qi <yao.qi@linaro.org>
6154 * configure: Regenerated.
6156 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6158 * inferiors.h: (struct inferior_list): Remove.
6159 (struct inferior_list_entry); Remove.
6160 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6161 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6162 get_first_inferior): Remove.
6163 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6164 find_inferior_id, find_inferior_in_random): Change signature.
6165 * inferiors.c (all_threads): Change type to
6166 std::list<thread_info *>.
6167 (get_thread): Remove macro.
6168 (find_inferior, find_inferior_id): Change signature, implement
6170 (find_inferior_in_random): Change signature, implement using
6171 find_thread_in_random.
6172 (for_each_inferior, for_each_inferior_with_data): Change
6173 signature, implement using for_each_thread.
6174 (add_inferior_to_list, remove_inferior): Remove.
6175 (add_thread, get_first_thread, thread_of_pid,
6176 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
6177 (get_first_inferior, one_inferior_p, clear_inferior_list):
6179 (clear_inferiors, get_thread_process): Update.
6180 * gdbthread.h: Include <list>.
6181 (struct thread_info) <entry>: Remove field.
6183 (all_threads): Change type to std::list<thread_info *>.
6184 (get_first_inferior): Add doc.
6185 (find_thread, for_each_thread, find_thread_in_random): New
6187 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
6188 * linux-arm-low.c (update_registers_callback): Update.
6189 * linux-low.c (second_thread_of_pid_p): Update.
6190 (kill_one_lwp_callback, linux_detach_lwp_callback,
6191 delete_lwp_callback, status_pending_p_callback, same_lwp,
6192 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
6193 iterate_over_lwps, not_stopped_callback,
6194 resume_stopped_resumed_lwps, count_events_callback,
6195 select_singlestep_lwp_callback, select_event_lwp_callback,
6196 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
6197 suspend_and_send_sigstop_callback, wait_for_sigstop,
6198 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
6199 lwp_running, linux_set_resume_request, resume_status_pending_p,
6200 need_step_over_p, start_step_over, linux_resume_one_thread,
6201 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
6202 reset_lwp_ptrace_options_callback): Update.
6203 * linux-mips-low.c (update_watch_registers_callback): Update.
6204 * regcache.c (regcache_invalidate_one, regcache_invalidate):
6206 (free_register_cache_thread_one): Remove.
6207 (regcache_release): Update.
6208 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
6209 handle_qxfer_threads_worker): Update.
6210 (handle_query): Update, use list iterator.
6211 (visit_actioned_threads, handle_pending_status,
6212 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
6213 clear_pending_status_callback, set_pending_status_callback,
6214 find_status_pending_thread_callback, handle_status,
6215 process_serial_event): Update.
6216 * target.c (thread_search_callback): Update.
6217 * thread-db.c (thread_db_get_tls_address): Update.
6218 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
6220 * win32-i386-low.c (update_debug_registers_callback): Update.
6221 * win32-low.c (delete_thread_info, child_delete_thread,
6222 continue_one_thread, suspend_one_thread,
6223 get_child_debug_event): Adjust.
6225 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6227 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
6228 * inferiors.h: Include <list>.
6229 (struct process_info) <entry>: Remove field.
6231 (pid_of): Change macro to function.
6232 (ptid_of, lwpid_of): Remove macro.
6233 (all_processes): Change type to std::list<process_info *>.
6234 (ALL_PROCESSES): Remove macro.
6235 (for_each_process, find_process): New function.
6236 * inferiors.c (all_processes): Change type to
6237 std::list<process_info *>.
6238 (find_thread_process): Adjust.
6239 (add_process): Likewise.
6240 (remove_process): Likewise.
6241 (find_process_pid): Likewise.
6242 (get_first_process): Likewise.
6243 (started_inferior_callback): Remove.
6244 (have_started_inferiors_p): Adjust.
6245 (attached_inferior_callback): Remove.
6246 (have_attached_inferiors_p): Adjust.
6247 * linux-low.c (check_zombie_leaders): Likewise.
6248 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
6249 (x86_linux_update_xmltarget): Adjust.
6250 * server.c (handle_query): Likewise.
6251 (gdb_reattached_process): Remove.
6252 (handle_status): Adjust.
6253 (kill_inferior_callback): Likewise.
6254 (detach_or_kill_inferior): Remove.
6255 (print_started_pid): Likewise.
6256 (print_attached_pid): Likewise.
6257 (detach_or_kill_for_exit): Update.
6258 (process_serial_event): Likewise.
6259 * linux-arm-low.c (arm_new_fork): Likewise.
6261 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6263 * dll.h: Include <list>.
6264 (struct dll_info): Add constructor.
6265 <entry>: Remove field.
6266 (all_dlls): Change type to std::list<dll_info>.
6267 * dll.c: Include <algorithm>.
6268 (get_dll): Remove macro.
6269 (all_dlls): Change type to std::list<dll_info *>.
6270 (free_one_dll): Remove.
6271 (match_dll): Likewise.
6272 (loaded_dll): Adjust.
6273 (unloaded_dll): Adjust to all_dlls type change, use
6274 std::find_if. Inline code from match_dll.
6275 (clear_dlls): Adjust to all_dlls type change.
6276 * server.c (emit_dll_description): Remove.
6277 (handle_qxfer_libraries): Adjust to all_dlls type change,
6278 integrate emit_dll_description's functionality.
6280 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6282 * linux-low.h (struct linux_target_ops) <delete_process>: New
6284 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
6285 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
6286 (struct linux_target_ops): Add delete_process callback.
6287 * linux-arm-low.c (arm_delete_process): New.
6288 (struct linux_target_ops): Add delete_process callback.
6289 * linux-bfin-low.c (struct linux_target_ops): Likewise.
6290 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
6291 * linux-m32r-low.c (struct linux_target_ops): Likewise.
6292 * linux-mips-low.c (mips_linux_delete_process): New.
6293 (struct linux_target_ops): Add delete_process callback.
6294 * linux-ppc-low.c (struct linux_target_ops): Likewise.
6295 * linux-s390-low.c (struct linux_target_ops): Likewise.
6296 * linux-sh-low.c (struct linux_target_ops): Likewise.
6297 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
6298 * linux-tile-low.c (struct linux_target_ops): Likewise.
6299 * linux-x86-low.c (x86_linux_delete_process): New.
6300 (struct linux_target_ops): Add delete_process callback.
6301 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
6303 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6305 * linux-aarch64-low.c (the_low_target): Add thread delete
6307 * linux-arm-low.c (arm_delete_thread): New function.
6308 (the_low_target): Add thread delete callback.
6309 * linux-bfin-low.c (the_low_target): Likewise.
6310 * linux-crisv32-low.c (the_low_target): Likewise.
6311 * linux-low.c (delete_lwp): Invoke delete_thread callback if
6313 * linux-low.h (struct linux_target_ops) <delete_thread>: New
6315 * linux-m32r-low.c (the_low_target): Add thread delete callback.
6316 * linux-mips-low.c (mips_linux_delete_thread): New function.
6317 (the_low_target): Add thread delete callback.
6318 * linux-ppc-low.c (the_low_target): Likewise.
6319 * linux-s390-low.c (the_low_target): Likewise.
6320 * linux-sh-low.c (the_low_target): Likewise.
6321 * linux-tic6x-low.c (the_low_target): Likewise.
6322 * linux-tile-low.c (the_low_target): Likewise.
6323 * linux-x86-low.c (the_low_target): Likewise.
6324 * linux-xtensa-low.c (the_low_target): Likewise.
6326 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
6328 * win32-low.c: Include "common-inferior.h".
6330 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6332 * inferiors.c (set_inferior_cwd): New function.
6333 * server.c (handle_general_set): Handle QSetWorkingDir packet.
6334 (handle_query): Inform that QSetWorkingDir is supported.
6335 * win32-low.c (create_process): Pass the inferior's cwd to
6338 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6340 * inferiors.c (current_inferior_cwd): New global variable.
6341 (get_inferior_cwd): New function.
6342 * inferiors.h (struct process_info) <cwd>: New field.
6344 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6346 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
6347 (OBS): Add gdb_tilde_expand.o.
6349 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
6351 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
6352 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
6354 2017-09-29 Pedro Alves <palves@redhat.com>
6356 * ax.c (gdb_parse_agent_expr): Constify.
6357 * ax.h (gdb_parse_agent_expr): Constify.
6358 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6360 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
6361 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
6362 * remote-utils.h (read_ptid): Constify.
6363 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
6364 (process_point_options, process_serial_event): Constify.
6365 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
6366 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
6367 (cmd_qtbuffer): Constify.
6369 2017-09-29 Pedro Alves <palves@redhat.com>
6371 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
6374 2017-09-29 Pedro Alves <palves@redhat.com>
6376 * linux-low.c (handle_extended_wait): Pass parent thread instead
6377 of process to thread_db_notice_clone.
6378 * linux-low.h (thread_db_notice_clone): Replace parent process
6379 parameter with parent thread parameter.
6380 * thread-db.c (find_one_thread): Add comment.
6381 (thread_db_notice_clone): Replace parent process parameter with
6382 parent thread parameter. Temporarily switch to the parent thread.
6384 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
6386 * gdbthread.h: Include "common-gdbthread.h".
6387 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
6388 "if" when validating the ptid.
6389 * remote-utils.c: Include "gdbthread.h".
6390 (prepare_resume_reply): Use "switch_to_thread".
6391 * target.c (done_accessing_memory): Likewise.
6393 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6395 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
6396 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
6397 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
6398 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
6399 s390x-gs-linux64-ipa.o to ipa_obj.
6400 * linux-s390-low.c (HWCAP_S390_GS): New define.
6401 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
6403 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
6404 (s390_arch_setup): Check for guarded-storage support and choose
6406 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
6407 init_registers_s390x_gs_linux64.
6408 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
6410 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
6411 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
6413 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
6415 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
6417 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6419 * linux-low.h (struct lwp_info): Add new field, thread_handle.
6420 (thread_db_thread_handle): Declare.
6421 * linux-low.c (linux_target_ops): Initialize thread_handle.
6422 * server.c (handle_qxfer_threads_worker): Add support for
6424 * target.h (struct target_ops): Add new function pointer,
6426 (target_thread_handle): Define.
6427 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
6429 (thread_db_thread_handle): New function.
6431 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6433 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
6434 * linux-low.h (thread_db_notice_clone): Declare.
6435 * thread-db.c (thread_db_notice_clone): New function.
6437 2017-09-21 Pedro Alves <palves@redhat.com>
6439 * server.c (gdb_read_memory, handle_status, process_serial_event)
6440 (handle_serial_event, handle_target_event): Adjust to
6441 set_desired_thread prototype change.
6442 * target.c (set_desired_thread): Remove 'use_general' parameter
6444 * target.h (set_desired_thread): Remove 'use_general' parameter.
6446 2017-09-20 Tom Tromey <tom@tromey.com>
6448 * target.c (target_terminal::terminal_state): Define.
6449 (target_terminal::init): Rename from target_terminal_init.
6450 (target_terminal::inferior): Rename from
6451 target_terminal_inferior.
6452 (target_terminal::ours): Rename from target_terminal_ours.
6453 (target_terminal::ours_for_output, target_terminal::info): New.
6455 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6457 * server.c (accumulate_file_name_length): Remove.
6458 (emit_dll_description): Adjust to std::string change.
6459 (handle_qxfer_libraries): Use std::string to hold document.
6461 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6463 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
6464 return type of xml_escape_text.
6465 * server.c (emit_dll_description): Likewise.
6467 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6469 * server.c (captured_main): Accept argument for --selftest.
6470 Update run_tests call.
6471 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
6472 when registering selftests.
6474 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
6476 * regcache.c (get_thread_regcache): Update code to use "std::vector"
6477 instead of "VEC" for "target_desc.reg_defs".
6478 (regcache_cpy): Likewise.
6479 (registers_to_string): Likewise.
6480 (registers_from_string): Likewise.
6481 (find_regno): Likewise.
6482 (supply_regblock): Likewise.
6483 (regcache_raw_read_unsigned): Likewise.
6484 * tdesc.c (init_target_desc): Likewise.
6485 (tdesc_create_reg): Likewise.
6486 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
6487 (struct target_desc) <reg_defs>: Convert to "std::vector".
6488 (target_desc): Do not initialize "reg_defs".
6489 (~target_desc): Update code to use "std::vector" instead of "VEC"
6490 for "target_desc.reg_defs".
6491 (operator==): Likewise.
6493 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6495 * inferiors.h (thread_to_gdb_id): Remove.
6496 * inferiors.c (thread_to_gdb_id): Remove.
6497 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
6498 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
6499 lynx_store_registers, lynx_read_memory, lynx_write_memory):
6501 * nto-low.c (nto_fetch_registers, nto_store_registers,
6502 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
6504 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6506 * inferiors.h (gdb_id_to_thread_id): Remove.
6507 * inferiors.c (gdb_id_to_thread_id): Remove.
6508 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
6509 removal. Move pid declaration closer to where it's used.
6511 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6513 * server.c (handle_detach): New function.
6514 (process_serial_event): Move code out, call handle_detach.
6516 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6518 * server.c (require_running): Rename to ...
6519 (require_running_or_return): ... this ...
6520 (require_running_or_break): ... and this.
6521 (handle_query, process_serial_event): Adjust.
6523 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6525 * linux-low.c (linux_set_resume_request): Remove unused
6528 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6530 * server.c (first_thread_of): Remove.
6531 (process_serial_event): Replace usage of first_thread_of with
6532 find_any_thread_of_pid.
6533 * tracepoint.c (same_process_p): Remove.
6534 (gdb_agent_about_to_close): Replace usage of same_process_p with
6535 find_any_thread_of_pid.
6536 * linux-x86-low.c (same_process_callback): Remove.
6537 (x86_arch_setup_process_callback): Replace usage of
6538 same_process_callback with find_any_thread_of_pid.
6539 * thread-db.c (any_thread_of): Remove.
6540 (switch_to_process): Replace usage of any_thread_of with
6541 find_any_thread_of_pid.
6542 * inferiors.c (thread_pid_matches_callback): Remove.
6543 (find_thread_process): Adjust to use find_any_thread_of_pid.
6545 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6547 * regcache.c (get_thread_regcache): Guard calls to "memset"
6550 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6552 * linux-low.c (handle_extended_wait): Use
6553 "allocate_target_description" instead of "XNEW".
6554 * linux-x86-low.c (initialize_low_arch): Likewise.
6556 2017-09-05 Yao Qi <yao.qi@linaro.org>
6558 * configure.srv (srv_i386_regobj): Remove.
6559 (srv_amd64_regobj): Remove.
6560 (srv_regobj): Set it to "" for x86 non-linux targets.
6561 * linux-x86-tdesc.c (i386_linux_read_description):
6562 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
6563 (init_registers_i386): Remove the declaration.
6564 (tdesc_i386): Remove the declaration.
6565 (lynx_i386_arch_setup): Call i386_create_target_description.
6566 * nto-x86-low.c: Likewise.
6567 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
6568 [!__x86_64__]: include arch/i386.h.
6569 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
6571 2017-09-05 Yao Qi <yao.qi@linaro.org>
6573 * configure.srv (srv_amd64_linux_xmlfiles): Remove
6574 i386/amd64-XXX-linux from it.
6576 2017-09-05 Yao Qi <yao.qi@linaro.org>
6578 * configure.srv: Empty srv_amd64_linux_regobj if $development is
6580 (ipa_amd64_linux_regobj): Remove.
6581 (ipa_x32_linux_regobj): Remove.
6583 2017-09-05 Yao Qi <yao.qi@linaro.org>
6585 * Makefile.in (arch-amd64.o): New rule.
6586 * configure.srv: Append arch-amd64.o.
6587 * linux-amd64-ipa.c: Include common/x86-xstate.h.
6588 (get_ipa_tdesc): Call amd64_linux_read_description.
6589 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
6590 and init_registers_amd64_XXX.
6591 * linux-x86-low.c (x86_linux_read_description): Call
6592 amd64_linux_read_description.
6593 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
6594 (initialize_low_arch): Don't call init_registers_x32_XXX and
6595 init_registers_amd64_XXX.
6596 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
6597 and tdesc_amd64_XXX.
6598 [__x86_64__] (amd64_tdesc_test): New function.
6599 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
6600 and init_registers_amd64_XXX.
6601 * linux-x86-tdesc.c: Include arch/amd64.h.
6602 (xcr0_to_tdesc_idx): New function.
6603 (i386_linux_read_description): New function.
6604 (amd64_get_ipa_tdesc_idx): New function.
6605 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
6606 (amd64_get_ipa_tdesc): Declare.
6608 2017-09-05 Yao Qi <yao.qi@linaro.org>
6610 * configure.srv (srv_i386_linux_xmlfiles): Remove
6611 i386/i386-XXX-linux.xml from it.
6613 2017-09-05 Yao Qi <yao.qi@linaro.org>
6615 * configure.srv: Set srv_i386_linux_regobj empty if $development
6617 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
6618 initialize_low_tdesc.
6619 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
6620 with #if initialize_low_tdesc.
6621 * linux-x86-tdesc-selftest.c: New file.
6622 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
6624 2017-09-05 Yao Qi <yao.qi@linaro.org>
6626 * Makefile.in (arch-i386.o): New rule.
6627 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
6628 (x86_64-*-linux*): Likewise.
6629 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
6630 include arch/i386.h.
6631 (i386_linux_read_description): Remove code and call
6632 i386_create_target_description.
6633 * tdesc.c (allocate_target_description): New function.
6634 * tdesc.h (set_tdesc_architecture): Remove declaration.
6635 (set_tdesc_osabi): Likewise.
6637 2017-09-05 Yao Qi <yao.qi@linaro.org>
6639 * linux-x86-tdesc.c: Don't include <inttypes.h>.
6640 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
6641 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
6643 * server.c (get_features_xml): Call tdesc_get_features_xml.
6644 * tdesc.c (set_tdesc_architecture): New function.
6645 (set_tdesc_osabi): New function.
6646 (tdesc_get_features_xml): New function.
6647 (tdesc_create_feature): Add an argument.
6648 * tdesc.h (struct target_desc) <features>: New field.
6649 <arch, osabi>: New field.
6650 (~target_desc): xfree features, arch, and osabi.
6651 (target_desc::oerator==): Don't compare .xmltarget.
6652 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
6653 (set_tdesc_osabi): Likewise.
6654 (tdesc_get_features_xml): Likewise.
6656 2017-09-05 Yao Qi <yao.qi@linaro.org>
6658 * linux-x86-tdesc.c: Include selftest.h.
6659 (i386_tdesc_test): New function.
6660 (initialize_low_tdesc): Call selftests::register_test.
6661 * tdesc.h: Include regdef.h.
6662 (target_desc): Override operator == and !=.
6664 2017-09-05 Yao Qi <yao.qi@linaro.org>
6666 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
6667 (ipa_obj): Likewise.
6668 * linux-i386-ipa.c: Include common/x86-xstate.h
6669 (get_ipa_tdesc): Call i386_linux_read_description.
6670 (initialize_low_tracepoint): Don't call init_registers_XXX
6671 functions, call initialize_low_tdesc instead.
6672 * linux-x86-low.c (x86_linux_read_description): Call
6673 i386_linux_read_description.
6674 (initialize_low_arch): Don't call init_registers_i386_XXX
6675 functions, call initialize_low_tdesc.
6676 * linux-x86-tdesc.c: New file.
6677 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
6678 (i386_get_ipa_tdesc_idx): Declare.
6679 (i386_get_ipa_tdesc): Declare.
6680 (initialize_low_tdesc): Declare.
6682 2017-09-05 Yao Qi <yao.qi@linaro.org>
6684 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
6687 2017-09-05 Yao Qi <yao.qi@linaro.org>
6689 * Makefile.in (IPA_OBJS): Add vec-ipa.o
6690 * regcache.c (get_thread_regcache): Use VEC_length.
6691 (init_register_cache): Likewise.
6692 (regcache_cpy): Likewise.
6693 (registers_to_string): Iterate reg_defs via VEC_iterate.
6694 (find_regno): Likewise.
6695 (find_register_by_number): Use VEC_index.
6696 (register_size): Call find_register_by_number.
6697 (register_data): Call find_register_by_number.
6698 (supply_regblock): Use VEC_length.
6699 (regcache_raw_read_unsigned): Likewise.
6700 * tdesc.c (init_target_desc): Iterate reg_defs via
6702 (default_description): Update initializer.
6703 (copy_target_description): Don't update field num_registers.
6704 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
6705 <num_registers>: Remove.
6707 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6709 * Makefile.in (.SECONDARY): Define target.
6711 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6713 * linux-low.c (linux_wait_1): Adjust.
6714 * server.c (queue_stop_reply_callback): Adjust.
6716 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6718 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
6719 QEnvironmentUnset and QEnvironmentReset packets.
6720 (handle_query): Inform remote that QEnvironmentHexEncoded,
6721 QEnvironmentUnset and QEnvironmentReset are supported.
6723 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
6725 * inferiors.h (inferior_target_data): Rename to ...
6726 (thread_target_data): ... this.
6727 (inferior_regcache_data): Rename to ...
6728 (thread_regcache_data): ... this.
6729 (set_inferior_regcache_data): Rename to ...
6730 (set_thread_regcache_data): ... this.
6731 * inferiors.c (inferior_target_data): Rename to ...
6732 (thread_target_data): ... this.
6733 (inferior_regcache_data): Rename to ...
6734 (thread_regcache_data): ... this.
6735 (set_inferior_regcache_data): Rename to ...
6736 (set_thread_regcache_data): ... this.
6737 (free_one_thread): Update.
6738 * linux-low.h (get_thread_lwp): Update.
6739 * regcache.c (get_thread_regcache): Update.
6740 (regcache_invalidate_thread): Update.
6741 (free_register_cache_thread): Update.
6742 * win32-i386-low.c (update_debug_registers_callback): Update.
6743 (win32_get_current_dr): Update.
6744 * win32-low.c (thread_rec): Update.
6745 (delete_thread_info): Update.
6746 (continue_one_thread): Update.
6747 (suspend_one_thread): Update.
6749 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
6751 * inferiors.c (set_inferior_target_data): Remove.
6752 * inferiors.h (set_inferior_target_data): Remove.
6754 2017-08-18 Yao Qi <yao.qi@linaro.org>
6756 * Makefile.in (OBS): Add selftest.o.
6757 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
6758 * configure, config.in: Re-generated.
6759 * server.c: Include common/sefltest.h.
6760 (captured_main): Handle option --selftest.
6762 2017-08-09 Yao Qi <yao.qi@linaro.org>
6764 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
6765 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
6766 i386-avx-mpx.o and i386-mmx.o.
6767 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
6768 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
6769 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
6770 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
6771 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
6772 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
6773 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
6774 i386/amd64-avx-mpx.xml.
6776 2017-08-09 Yao Qi <yao.qi@linaro.org>
6778 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
6779 and x32-avx-avx512.o.
6780 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
6781 i386/x32-avx-avx512.xml.
6783 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
6785 * tracepoint.h (enum class fast_tpoint_collect_result): New
6787 (fast_tracepoint_collecting): Change return type to
6788 fast_tpoint_collect_result.
6789 * tracepoint.c (fast_tracepoint_collecting): Likewise.
6790 * linux-low.h: Include tracepoint.h.
6791 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
6792 fast_tpoint_collect_result.
6793 * linux-low.c (handle_tracepoints): Adjust.
6794 (linux_fast_tracepoint_collecting): Change return type to
6795 fast_tpoint_collect_result.
6796 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
6797 linux_wait_1, stuck_in_jump_pad_callback,
6798 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
6799 proceed_one_lwp): Adjust to type change.
6801 2017-07-10 Yao Qi <yao.qi@linaro.org>
6803 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
6805 2017-06-29 Yao Qi <yao.qi@linaro.org>
6807 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
6809 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
6811 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
6813 * Makefile.in (IPA_OBJS): Sort and format one item per line.
6815 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6817 * linux-low.c (linux_create_inferior): Adjust code to access the
6818 environment information via 'gdb_environ' class.
6819 * lynx-low.c (lynx_create_inferior): Likewise.
6820 * server.c (our_environ): Make it an instance of 'gdb_environ'.
6821 (get_environ): Return a pointer to 'our_environ'.
6822 (captured_main): Initialize 'our_environ'.
6823 * server.h (get_environ): Adjust prototype.
6824 * spu-low.c (spu_create_inferior): Adjust code to access the
6825 environment information via 'gdb_environ' class.
6827 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6829 * linux-low.c (linux_read_memory, linux_write_memory): Remove
6830 usage of "register" keyword.
6832 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6834 * configure: Re-generate.
6836 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6838 * configure: Re-generate.
6840 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6842 * Makefile.in (COMPILE.pre): Add "-x c++".
6844 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
6846 * fork-child.c: Conditionally include <signal.h>.
6848 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6850 * server.c (handle_general_set): Handle new packet
6851 "QStartupWithShell".
6852 (handle_query): Add "QStartupWithShell" to the list of supported
6854 (gdbserver_usage): Add help text explaining the
6855 new "--startup-with-shell" and "--no-startup-with-shell" CLI
6857 (captured_main): Recognize and act upon the presence of the new
6860 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6861 Pedro Alves <palves@redhat.com>
6863 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
6864 * configure: Regenerate.
6865 * configure.srv (srv_linux_obj): Add "fork-child.o" and
6867 (i[34567]86-*-lynxos*): Likewise.
6868 (spu*-*-*): Likewise.
6869 * fork-child.c: New file.
6870 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
6872 (linux_ptrace_fun): New function.
6873 (linux_create_inferior): Adjust function prototype to reflect
6874 change on "target.h". Adjust function code to use
6876 (linux_request_interrupt): Delete "signal_pid".
6877 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6878 (lynx_ptrace_fun): New function.
6879 (lynx_create_inferior): Adjust function prototype to reflect
6880 change on "target.h". Adjust function code to use
6882 * nto-low.c (nto_create_inferior): Adjust function prototype and
6883 code to reflect change on "target.h". Update comments.
6884 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
6885 "common-terminal.h" and "environ.h".
6886 (terminal_fd): Moved to fork-child.c.
6887 (old_foreground_pgrp): Likewise.
6888 (restore_old_foreground_pgrp): Likewise.
6889 (last_status): Make it global.
6890 (last_ptid): Likewise.
6891 (our_environ): New variable.
6892 (startup_with_shell): Likewise.
6893 (program_name): Likewise.
6894 (program_argv): Rename to...
6895 (program_args): ...this.
6896 (wrapper_argv): New variable.
6897 (start_inferior): Delete function.
6898 (get_exec_wrapper): New function.
6899 (get_exec_file): Likewise.
6900 (get_environ): Likewise.
6901 (prefork_hook): Likewise.
6902 (post_fork_inferior): Likewise.
6903 (postfork_hook): Likewise.
6904 (postfork_child_hook): Likewise.
6905 (handle_v_run): Update code to deal with arguments coming from the
6906 remote host. Update calls from "start_inferior" to
6908 (captured_main): Likewise. Initialize environment variable. Call
6910 * server.h (post_fork_inferior): New prototype.
6911 (get_environ): Likewise.
6912 (last_status): Declare.
6913 (last_ptid): Likewise.
6914 (signal_pid): Likewise.
6915 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6916 (spu_ptrace_fun): New function.
6917 (spu_create_inferior): Adjust function prototype to reflect change
6918 on "target.h". Adjust function code to use "fork_inferior".
6919 * target.c (target_terminal_init): New function.
6920 (target_terminal_inferior): Likewise.
6921 (target_terminal_ours): Likewise.
6922 * target.h: Include <vector>.
6923 (struct target_ops) <create_inferior>: Update prototype.
6924 (create_inferior): Update macro.
6925 * utils.c (gdb_flush_out_err): New function.
6926 * win32-low.c (win32_create_inferior): Adjust function prototype
6927 and code to reflect change on "target.h".
6929 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6931 * inferiors.c (switch_to_thread): New function.
6933 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6935 * Makefile.in (SFILE): Add "common/job-control.c".
6936 (OBS): Add "job-control.o".
6938 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6940 * Makefile: Remove "@host_makefile_frag@".
6942 2017-05-05 Pedro Alves <palves@redhat.com>
6944 * configure: Regenerate.
6946 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6948 * configure: Regenerate.
6950 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6952 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
6953 software_single_step change of return type to
6954 std::vector<CORE_ADDR>.
6955 * linux-low.c (install_software_single_step_breakpoints):
6957 * linux-low.h (install_software_single_step_breakpoints):
6960 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6962 * remote-utils.c: Include "gdb_termios.h" instead of
6964 * terminal.h: Delete file.
6966 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6968 * server.c: Include <vector>.
6969 <program_argv, wrapper_argv>: Convert to std::vector.
6970 (start_inferior): Rewrite function to use C++.
6971 (handle_v_run): Likewise. Update code that calculates the argv
6972 based on the vRun packet; use C++.
6973 (captured_main): Likewise.
6975 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
6977 * server.c (handle_v_cont): Initialize thread_resume::thread
6980 2017-04-05 Pedro Alves <palves@redhat.com>
6982 * configure: Regenerate.
6984 2017-04-05 Pedro Alves <palves@redhat.com>
6986 * gdbreplay.c (sync_error): Constify.
6987 * linux-x86-low.c (push_opcode): Constify.
6989 2017-04-05 Pedro Alves <palves@redhat.com>
6991 * win32-low.c (get_child_debug_event)
6992 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
6993 Report TARGET_WAITKIND_SPURIOUS instead.
6995 2017-04-05 Pedro Alves <palves@redhat.com>
6997 * remote-utils.c (remote_prepare, remote_open): Constify.
6998 * remote-utils.h (remote_prepare, remote_open): Constify.
6999 * server.c (captured_main): Constify 'port' handling.
7001 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7003 * Makefile.in (clean): Clear .deps.
7005 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7007 * .gitignore: Remove generated files, replace with wildcard.
7008 * (clean): Replace removal of generated files with wildcard.
7009 (version.c): Replace with...
7010 (version-generated.c): ...this.
7011 (xml-builtin.c): Replace with...
7012 (xml-builtin-generated.c): ...this.
7013 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7014 (%.c: *regformats*): Replace with...
7015 (%-generated.c: *regformats*): ...this.
7017 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7019 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7020 (xtensa_fill_gregset): Call collect_register_by_name for
7022 (xtensa_store_gregset): Call supply_register_by_name for
7025 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7027 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7028 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7029 (xtensa_store_gregset): Call supply_register for all registers in
7030 a0_regnum..a0_regnum + C0_NREGS range.
7032 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7034 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7035 (ax-ipa.o: ax.c): Remove.
7036 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7037 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7038 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7039 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7040 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7042 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7044 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7045 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7046 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7047 (errors-ipa.o: ../common/errors.c): Remove.
7048 (format-ipa.o: ../common/format.c): Remove.
7049 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7051 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7053 * Makefile.in (%-ipa.o: %.c): New rule.
7054 (tracepoint-ipa.o: tracepoint.c): Remove.
7055 (utils-ipa.o: utils.c): Remove.
7056 (remote-utils-ipa.o: remote-utils.c): Remove.
7057 (regcache-ipa.o: regcache.c): Remove.
7058 (i386-linux-ipa.o: i386-linux.c): Remove.
7059 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
7060 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
7061 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
7062 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
7063 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
7064 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
7065 (amd64-linux-ipa.o: amd64-linux.c): Remove.
7066 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
7067 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
7068 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
7069 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
7070 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
7071 (aarch64-ipa.o: aarch64.c): Remove.
7072 (s390-linux32-ipa.o: s390-linux32.c): Remove.
7073 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
7074 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
7075 (s390-linux64-ipa.o: s390-linux64.c): Remove.
7076 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
7077 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
7078 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
7079 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
7080 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
7081 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
7082 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
7083 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
7084 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
7085 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
7086 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
7087 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
7088 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
7089 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7090 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7091 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7092 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7093 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7094 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7095 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7096 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7097 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7098 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7099 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7100 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7101 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7102 (tdesc-ipa.o: tdesc.c): Remove.
7103 (x32-linux-ipa.o: x32-linux.c): Remove.
7104 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7105 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7107 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7109 * Makefile.in (%.o: ../arch/%.c): New rule.
7110 (arm.o: ../arch/arm.c): Remove.
7111 (arm-linux.o: ../arch/arm-linux.c): Remove.
7112 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7113 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7115 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7117 * Makefile.in (%.o: ../nat/%.c): New rule.
7118 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7119 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7120 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7121 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7122 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7123 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7124 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7125 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7126 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7127 (linux-personality.o: ../nat/linux-personality.c): Remove.
7128 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7129 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7130 (x86-linux.o: ../nat/x86-linux.c): Remove.
7131 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7132 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7134 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7136 * Makefile.in (%.o: ../common/%.c): New rule.
7137 (signals.o: ../common/signals.c): Remove.
7138 (print-utils.o: ../common/print-utils.c): Remove.
7139 (rsp-low.o: ../common/rsp-low.c): Remove.
7140 (common-utils.o: ../common/common-utils.c): Remove.
7141 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7142 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7143 (vec.o: ../common/vec.c): Remove.
7144 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7145 (xml-utils.o: ../common/xml-utils.c): Remove.
7146 (ptid.o: ../common/ptid.c): Remove.
7147 (buffer.o: ../common/buffer.c): Remove.
7148 (format.o: ../common/format.c): Remove.
7149 (filestuff.o: ../common/filestuff.c): Remove.
7150 (agent.o: ../common/agent.c): Remove.
7151 (errors.o: ../common/errors.c): Remove.
7152 (environ.o: ../common/environ.c): Remove.
7153 (common-debug.o: ../common/common-debug.c): Remove.
7154 (cleanups.o: ../common/cleanups.c): Remove.
7155 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7156 (fileio.o: ../common/fileio.c): Remove.
7157 (common-regcache.o: ../common/common-regcache.c): Remove.
7158 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7159 (new-op.o: ../common/new-op.c): Remove.
7160 (btrace-common.o: ../common/btrace-common.c): Remove.
7162 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7164 * Makefile.in (%.o: ../target/%.c): New rule.
7165 (waitstatus.o: ../target/waitstatus.c): Remove.
7167 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7170 (%.c: ../regformats/%.dat,
7171 (%.c: ../regformats/arm/%.dat,
7172 (%.c: ../regformats/i386/%.dat,
7173 (%.c: ../regformats/rs6000/%.dat): New rules.
7174 (aarch64.c): Remove.
7175 (reg-arm.c): Remove.
7176 (arm-with-iwmmxt.c): Remove.
7177 (arm-with-vfpv2.c): Remove.
7178 (arm-with-vfpv3.c): Remove.
7179 (arm-with-neon.c): Remove.
7180 (reg-bfin.c): Remove.
7181 (reg-cris.c): Remove.
7182 (reg-crisv32.c): Remove.
7184 (i386-linux.c): Remove.
7185 (i386-avx.c): Remove.
7186 (i386-avx-linux.c): Remove.
7187 (i386-avx-avx512.c): Remove.
7188 (i386-avx-avx512-linux.c): Remove.
7189 (i386-mpx.c): Remove.
7190 (i386-mpx-linux.c): Remove.
7191 (i386-avx-mpx-avx512-pku.c): Remove.
7192 (i386-avx-mpx-avx512-pku-linux.c): Remove.
7193 (i386-avx-mpx.c): Remove.
7194 (i386-avx-mpx-linux.c): Remove.
7195 (i386-mmx.c): Remove.
7196 (i386-mmx-linux.c): Remove.
7197 (reg-ia64.c): Remove.
7198 (reg-m32r.c): Remove.
7199 (reg-m68k.c): Remove.
7201 (mips-linux.c): Remove.
7202 (mips-dsp-linux.c): Remove.
7203 (mips64-linux.c): Remove.
7204 (mips64-dsp-linux.c): Remove.
7205 (nios2-linux.c): Remove.
7206 (powerpc-32.c): Remove.
7207 (powerpc-32l.c): Remove.
7208 (powerpc-altivec32l.c): Remove.
7209 (powerpc-cell32l.c): Remove.
7210 (powerpc-vsx32l.c): Remove.
7211 (powerpc-isa205-32l.c): Remove.
7212 (powerpc-isa205-altivec32l.c): Remove.
7213 (powerpc-isa205-vsx32l.c): Remove.
7214 (powerpc-e500l.c): Remove.
7215 (powerpc-64l.c): Remove.
7216 (powerpc-altivec64l.c): Remove.
7217 (powerpc-cell64l.c): Remove.
7218 (powerpc-vsx64l.c): Remove.
7219 (powerpc-isa205-64l.c): Remove.
7220 (powerpc-isa205-altivec64l.c): Remove.
7221 (powerpc-isa205-vsx64l.c): Remove.
7222 (s390-linux32.c): Remove.
7223 (s390-linux32v1.c): Remove.
7224 (s390-linux32v2.c): Remove.
7225 (s390-linux64.c): Remove.
7226 (s390-linux64v1.c): Remove.
7227 (s390-linux64v2.c): Remove.
7228 (s390-te-linux64.c): Remove.
7229 (s390-vx-linux64.c): Remove.
7230 (s390-tevx-linux64.c): Remove.
7231 (s390x-linux64.c): Remove.
7232 (s390x-linux64v1.c): Remove.
7233 (s390x-linux64v2.c): Remove.
7234 (s390x-te-linux64.c): Remove.
7235 (s390x-vx-linux64.c): Remove.
7236 (s390x-tevx-linux64.c): Remove.
7237 (tic6x-c64xp-linux.c): Remove.
7238 (tic6x-c64x-linux.c): Remove.
7239 (tic6x-c62x-linux.c): Remove.
7241 (reg-sparc64.c): Remove.
7242 (reg-spu.c): Remove.
7244 (amd64-linux.c): Remove.
7245 (amd64-avx.c): Remove.
7246 (amd64-avx-linux.c): Remove.
7247 (amd64-avx-avx512.c): Remove.
7248 (amd64-avx-avx512-linux.c): Remove.
7249 (amd64-mpx.c): Remove.
7250 (amd64-mpx-linux.c): Remove.
7251 (amd64-avx-mpx-avx512-pku.c): Remove.
7252 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
7253 (amd64-avx-mpx.c): Remove.
7254 (amd64-avx-mpx-linux.c): Remove.
7256 (x32-linux.c): Remove.
7257 (x32-avx.c): Remove.
7258 (x32-avx-linux.c): Remove.
7259 (x32-avx-avx512.c): Remove.
7260 (x32-avx-avx512-linux.c): Remove.
7261 (reg-xtensa.c): Remove.
7262 (reg-tilegx.c): Remove.
7263 (reg-tilegx32.c): Remove.
7265 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7267 * Makefile.in (SFILES): Add "common/environ.c".
7268 (OBJS): Add "common/environ.h".
7270 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7272 * configure.ac: Check if the fs_base and gs_base members of
7273 `struct user_regs_struct' exist.
7274 * config.in: Regenerated.
7275 * configure: Likewise.
7277 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
7279 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
7281 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
7282 (get_next_pcs_syscall_next_pc): Likewise.
7284 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
7286 * win32-i386-low.c: Fix incorrect reference to a couple source files.
7287 * nto-x86-low.c: Likewise.
7289 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
7291 * Makefile.in: Include disable-implicit-rules.mk.
7293 2016-11-23 Pedro Alves <palves@redhat.com>
7295 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
7296 (debug_vprintf): Use std::chrono::steady_clock instead of
7297 gettimeofday. Use '.' instead of ':'.
7298 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
7299 (get_timestamp): Use std::chrono::steady_clock instead of
7302 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7304 * Makefile.in: Fix whitespace formatting.
7306 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7308 * Makefile.in (SFILES, OBS): Flatten list and order
7311 2016-11-23 Pedro Alves <palves@redhat.com>
7313 * event-loop.c (handle_file_event): Use warning.
7314 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
7315 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7318 2016-11-23 Pedro Alves <palves@redhat.com>
7320 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
7322 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
7323 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
7324 debug_printf and debug_flush for debug output.
7325 * server.c (handle_general_set): Likewise.
7326 * thread-db.c (try_thread_db_load): Use debug_printf for debug
7329 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7331 * Makefile.in (.c.o): Replace rule with ...
7332 (%.o: %.c): ... this one.
7334 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7336 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
7337 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
7339 * configure.ac: Remove checks for the make program.
7340 * configure: Re-generate.
7342 2016-10-28 Pedro Alves <palves@redhat.com>
7344 * Makefile.in (CXX_DIALECT): Get from configure.
7345 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
7346 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
7347 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
7348 * config.in: Regenerate.
7349 * configure: Regenerate.
7351 2016-10-27 Yao Qi <yao.qi@linaro.org>
7353 * linux-low.c (linux_supports_range_stepping): Return true if
7354 can_software_single_step return true.
7356 2016-10-27 Yao Qi <yao.qi@linaro.org>
7358 * inferiors.c (find_inferior_in_random): New function.
7359 * inferiors.h (find_inferior_in_random): Declare.
7360 * linux-low.c (linux_wait_for_event_filtered): Call
7361 find_inferior_in_random instead of find_inferior.
7363 2016-10-27 Yao Qi <yao.qi@linaro.org>
7365 * linux-low.c (linux_wait_1): If single-step breakpoints are
7366 inserted, remove them.
7368 2016-10-26 Pedro Alves <palves@redhat.com>
7370 * linux-low.c (handle_extended_wait): Link parent/child fork
7372 (linux_wait_1): Unlink them.
7373 (linux_set_resume_request): Ignore resume requests for
7374 already-resumed and unhandled fork child threads.
7375 * linux-low.h (struct lwp_info) <fork_relative>: New field.
7376 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
7378 (handle_v_requests) <vCont>: Don't call require_running.
7379 * server.h (in_queued_stop_replies): New declaration.
7381 2016-10-24 Yao Qi <yao.qi@linaro.org>
7384 * linux-aarch64-low.c (append_insns): Cast the return value to
7387 2016-10-10 Yao Qi <yao.qi@linaro.org>
7389 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
7391 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
7393 * target.c (target_supports_multi_process): New function, moved
7395 * target.h (target_supports_multi_process): ... here. Remove
7398 2016-10-05 Tom Tromey <tom@tromey.com>
7401 * tracepoint.c (handle_tracepoint_bkpts): Check
7402 ipa_error_tracepoint, not ipa_stopping_tracepoint.
7404 2016-10-05 Yao Qi <yao.qi@linaro.org>
7406 * configure.srv: Update the path of arm-*.xml files.
7408 2016-10-05 Terry Guo <terry.guo@arm.com>
7409 Yao Qi <yao.qi@linaro.org>
7411 * Makefile.in: Adjust the path of rules.
7412 * configure.srv: Update the path of xml files.
7413 * regformats/arm-with-iwmmxt.dat: Regenerated.
7414 * regformats/arm-with-neon.dat: Likewise.
7415 * regformats/arm-with-vfpv2.dat: Likewise.
7416 * regformats/arm-with-vfpv3.dat Likewise.
7418 2016-09-30 Yao Qi <yao.qi@linaro.org>
7421 * target.c (target_stop_and_wait): Don't call
7422 target_continue_no_signal, use resume_stop instead.
7424 2016-09-26 Yao Qi <yao.qi@linaro.org>
7426 * linux-low.c (linux_wait_1): Call debug_exit.
7428 2016-09-23 Pedro Alves <palves@redhat.com>
7430 * Makefile.in (SFILES): Add common/new-op.c.
7431 (OBS): Add common/new-op.o.
7432 (new-op.o): New rule.
7434 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
7436 * .gitinore: Ignore more files.
7438 2016-09-21 Yao Qi <yao.qi@linaro.org>
7440 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
7443 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
7445 * server.c (start_inferior): Call target_mourn_inferior instead of
7446 mourn_inferior; pass ptid_t argument to it.
7448 (handle_target_event): Likewise.
7449 * target.c (target_mourn_inferior): New function.
7450 * target.h (mourn_inferior): Delete macro.
7452 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
7454 * linux-low.c (lwp_is_stepping): New function.
7456 2016-09-06 Carl Love <cel@us.ibm.com>
7458 * server.c (start_inferior): Fixed comment, requested comment change
7459 didn't get updated correctly. Removed reference to ptrace () call as
7460 it is only true on Linux systems.
7462 2016-09-06 Carl Love <cel@us.ibm.com>
7464 * server.c (start_inferior): Do not call
7465 function target_post_create_inferior () if the
7466 inferior process has already exited.
7468 2016-09-05 Pedro Alves <palves@redhat.com>
7470 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
7471 (COMPILE.pre, CC_LD): Use CXX directly.
7472 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
7473 * acinclude.m4: Don't include build-with-cxx.m4.
7474 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
7475 * configure: Regenerate.
7477 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
7480 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
7481 call writing data to own_buf.
7483 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7485 * target.c (mywait): Call target_wait instead of
7487 (target_wait): New function.
7489 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7491 * server.c (start_inferior): New variable 'ptid'. Replace calls
7492 to the_target->resume by target_continue{,_no_signal}, depending
7494 * target.c (target_stop_and_wait): Call target_continue_no_signal
7495 instead of the_target->resume.
7496 (target_continue): New function.
7498 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
7500 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
7502 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
7505 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
7507 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
7508 * linux-arm-low.c (ps_get_thread_area): Likewise.
7509 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
7510 * linux-m68k-low.c (ps_get_thread_area): Likewise.
7511 * linux-mips-low.c (ps_get_thread_area): Likewise.
7512 * linux-nios2-low.c (ps_get_thread_area): Likewise.
7513 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
7514 * linux-x86-low.c (ps_get_thread_area): Likewise.
7515 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
7517 2016-08-19 Pedro Alves <palves@redhat.com>
7519 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
7521 2016-08-19 Pedro Alves <palves@redhat.com>
7523 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
7524 comment. Use memcpy instead of casting through unsigned long.
7526 2016-08-19 Pedro Alves <palves@redhat.com>
7528 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
7529 allocating around 0x80000000.
7531 2016-08-19 Pedro Alves <palves@redhat.com>
7534 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
7535 (x32-avx512-linux-ipa.o): New rules.
7536 * configure.ac (x86_64-*-linux*): New x32 check.
7537 * configure.srv (ipa_x32_linux_regobj): New.
7538 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
7539 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
7541 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
7543 * configure: Regenerate.
7545 2016-08-09 Pedro Alves <palves@redhat.com>
7548 * Makefile.in (OBS): Add signals-state-save-restore.o.
7549 (signals-state-save-restore.o): New rule.
7550 * config.in: Regenerate.
7551 * configure: Regenerate.
7552 * linux-low.c: Include "signals-state-save-restore.h".
7553 (linux_create_inferior): Call
7554 restore_original_signals_state.
7555 * server.c: Include "dispositions-save-restore.h".
7556 (captured_main): Call save_original_signals_state.
7558 2016-08-05 Pedro Alves <palves@redhat.com>
7560 * configure: Regenerate.
7562 2016-08-04 Yao Qi <yao.qi@linaro.org>
7564 * linux-low.c (regsets_fetch_inferior_registers): Check
7565 errno is ESRCH or not.
7567 2016-08-02 Yao Qi <yao.qi@linaro.org>
7569 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
7570 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
7571 (thread_db_load_search): Update.
7572 (try_thread_db_load_1): Don't look for td_ta_event_addr,
7573 td_ta_set_event and td_ta_event_getmsg.
7575 2016-07-26 Pedro Alves <palves@redhat.com>
7578 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
7579 of unsigned long for 64-bit registers and use uint32_t instead of
7580 unsigned int for 32-bit registers.
7582 2016-07-26 Pedro Alves <palves@redhat.com>
7584 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
7587 2016-07-21 Tom Tromey <tom@tromey.com>
7589 * configure: Rebuild.
7591 2016-07-21 Yao Qi <yao.qi@linaro.org>
7593 * mem-break.c (find_gdb_breakpoint): Cast bp to
7594 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
7596 2016-07-21 Yao Qi <yao.qi@linaro.org>
7598 * server.c (handle_v_requests): Support s and S actions
7599 if target_supports_software_single_step return true.
7601 2016-07-21 Yao Qi <yao.qi@linaro.org>
7603 * linux-low.c (resume_stopped_resumed_lwps): If resume request
7604 is resume_step, call maybe_hw_step.
7605 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
7607 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
7609 (proceed_one_lwp): If resume request is resume_step, install
7610 reinsert breakpoints and call maybe_hw_step.
7612 2016-07-21 Yao Qi <yao.qi@linaro.org>
7614 * linux-low.c (proceed_one_lwp): Declare.
7615 (linux_resume_one_thread): Remove local variable 'step'.
7616 Lift code enqueue signal. Call proceed_one_lwp instead of
7617 linux_resume_one_lwp.
7619 2016-07-21 Yao Qi <yao.qi@linaro.org>
7621 * linux-low.c (linux_resume_one_thread): Call
7622 enqueue_pending_signal.
7624 2016-07-21 Yao Qi <yao.qi@linaro.org>
7626 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
7627 * inferiors.c (do_restore_current_thread_cleanup): New function.
7628 (make_cleanup_restore_current_thread): Likewise.
7629 * linux-low.c (install_software_single_step_breakpoints): Call
7630 make_cleanup_restore_current_thread. Switch current_thread to
7633 2016-07-21 Yao Qi <yao.qi@linaro.org>
7635 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
7636 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
7637 (clone_one_breakpoint): Likewise.
7638 (delete_reinsert_breakpoints): Change parameter to thread.
7640 (has_reinsert_breakpoints): Likewise.
7641 (uninsert_reinsert_breakpoints): Likewise.
7642 (reinsert_reinsert_breakpoints): Likewise.
7643 * mem-break.h (set_reinsert_breakpoint): Update declaration.
7644 (delete_reinsert_breakpoints): Likewise.
7645 (reinsert_reinsert_breakpoints): Likewise.
7646 (uninsert_reinsert_breakpoints): Likewise.
7647 (has_reinsert_breakpoints): Likewise.
7649 2016-07-21 Yao Qi <yao.qi@linaro.org>
7651 * inferiors.c (get_thread_process): Make parameter const.
7652 * inferiors.h (get_thread_process): Update declaration.
7653 * mem-break.c (clone_all_breakpoints): Remove all parameters.
7654 Add new parameters child_thread and parent_thread. Callers
7656 * mem-break.h (clone_all_breakpoints): Update declaration.
7658 2016-07-21 Yao Qi <yao.qi@linaro.org>
7660 * mem-break.c (struct breakpoint) <cond_list>: Remove.
7661 <command_list, handler>: Remove.
7662 (struct gdb_breakpoint): New.
7663 (struct other_breakpoint): New.
7664 (struct reinsert_breakpoint): New.
7665 (is_gdb_breakpoint): New function.
7666 (any_persistent_commands): Update command_list if
7667 is_gdb_breakpoint returns true.
7668 (set_breakpoint): Create breakpoints according to their types.
7669 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
7670 (set_gdb_breakpoint_1): Likewise.
7671 (set_gdb_breakpoint): Likewise.
7672 (clear_breakpoint_conditions): Change parameter type to
7673 'struct gdb_breakpoint *'.
7674 (clear_breakpoint_commands): Likewise.
7675 (clear_breakpoint_conditions_and_commands): Likewise.
7676 (add_condition_to_breakpoint): Likewise.
7677 (add_breakpoint_condition): Likewise.
7678 (add_commands_to_breakpoint): Likewise.
7679 (check_breakpoints): Check other_breakpoint.
7680 (clone_one_breakpoint): Clone breakpopint according to its type.
7681 * mem-break.h (struct gdb_breakpoint): Declare.
7682 (set_gdb_breakpoint): Update declaration.
7683 (clear_breakpoint_conditions_and_commands): Likewise.
7684 (add_breakpoint_condition): Likewise.
7685 (add_breakpoint_commands): Likewise.
7686 * server.c (process_point_options): Change parameter type to
7687 'struct gdb_breakpoint *'.
7689 2016-07-21 Yao Qi <yao.qi@linaro.org>
7691 * mem-break.c (set_breakpoint_at): Rename it to ...
7692 (set_breakpoint_type_at): ... it.
7693 (set_breakpoint_at): Call set_breakpoint_type_at.
7694 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
7695 * mem-break.h (set_breakpoint_at): Update comments.
7697 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
7699 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
7701 (nios2_store_gregset): Likewise.
7703 2016-07-01 Pedro Alves <palves@redhat.com>
7704 Antoine Tremblay <antoine.tremblay@ericsson.com>
7706 * linux-low.c: Change interface to take the target lwp_info
7707 pointer directly and return void. Handle detaching from a zombie
7709 (linux_detach_lwp_callback): New function.
7710 (linux_detach): Detach from the leader thread after detaching from
7713 2016-06-28 Yao Qi <yao.qi@linaro.org>
7715 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
7716 for variable new_offset.
7717 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7718 (aarch64_ftrace_insn_reloc_cb): Likewise.
7719 (aarch64_ftrace_insn_reloc_tb): Likewise.
7720 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
7721 PRIx64 instead of PRIx32.
7723 2016-06-28 Yao Qi <yao.qi@linaro.org>
7725 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
7726 (the_low_target): Install arm_get_syscall_trapinfo.
7728 2016-06-28 Yao Qi <yao.qi@linaro.org>
7730 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
7732 (the_low_target): Install aarch64_get_syscall_trapinfo.
7734 2016-06-28 Yao Qi <yao.qi@linaro.org>
7736 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
7738 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
7739 Remove parameter sysno.
7740 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
7743 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
7745 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
7746 (s390_emit_ne_goto): Likewise.
7747 (s390_emit_lt_goto): Likewise.
7748 (s390_emit_le_goto): Likewise.
7749 (s390_emit_gt_goto): Likewise.
7750 (s390_emit_ge_goto): Likewise.
7751 (s390x_emit_eq_goto): Likewise.
7752 (s390x_emit_ne_goto): Likewise.
7753 (s390x_emit_lt_goto): Likewise.
7754 (s390x_emit_le_goto): Likewise.
7755 (s390x_emit_gt_goto): Likewise.
7756 (s390x_emit_ge_goto): Likewise.
7757 (s390_emit_ops_impl): Mark variable static.
7758 (s390x_emit_ops): Likewise.
7760 2016-06-17 Yao Qi <yao.qi@linaro.org>
7762 * linux-low.c (handle_extended_wait): Call
7763 uninsert_reinsert_breakpoints for the parent process. Remove
7764 reinsert breakpoints from the child process. Reinsert them to
7765 the parent process when vfork is done.
7766 * mem-break.c (uninsert_reinsert_breakpoints): New function.
7767 (reinsert_reinsert_breakpoints): New function.
7768 * mem-break.h (uninsert_reinsert_breakpoints): Declare
7769 (reinsert_reinsert_breakpoints): Declare.
7771 2016-06-17 Yao Qi <yao.qi@linaro.org>
7773 * linux-low.c (handle_extended_wait): If the parent is doing
7774 step-over, remove the reinsert breakpoints from the forked child.
7776 2016-06-17 Yao Qi <yao.qi@linaro.org>
7778 * linux-low.c (unsuspend_all_lwps): Declare.
7779 (linux_low_filter_event): If thread exited, call finish_step_over.
7780 If step-over is finished, unsuspend other threads.
7782 2016-06-17 Yao Qi <yao.qi@linaro.org>
7784 * linux-low.c (linux_resume_one_lwp_throw): Assert
7785 has_reinsert_breakpoints returns false.
7786 * mem-break.c (delete_disabled_breakpoints): Assert
7787 bp type isn't reinsert_breakpoint.
7789 2016-06-17 Yao Qi <yao.qi@linaro.org>
7791 * linux-low.c (maybe_hw_step): New function.
7792 (linux_resume_one_lwp_throw): Call maybe_hw_step.
7793 (finish_step_over): Switch current_thread to lwp temporarily,
7794 and assert has_reinsert_breakpoints returns true.
7795 (proceed_one_lwp): Call maybe_hw_step.
7796 * mem-break.c (has_reinsert_breakpoints): New function.
7797 * mem-break.h (has_reinsert_breakpoints): Declare.
7799 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
7801 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
7803 2016-05-17 Yao Qi <yao.qi@linaro.org>
7805 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
7806 instead of find_inferior.
7808 2016-05-05 Yao Qi <yao.qi@linaro.org>
7810 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
7811 Initialize res to zero.
7813 2016-05-05 Yao Qi <yao.qi@linaro.org>
7815 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
7818 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7820 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
7821 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
7822 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
7824 2016-04-28 Par Olsson <par.olsson@windriver.com>
7825 Simon Marchi <simon.marchi@ericsson.com>
7827 * tracepoint.c (write_inferior_int8): New function.
7828 (cmd_qtenable_disable): Write enable flag using
7829 write_inferior_int8.
7831 2016-04-25 Yao Qi <yao.qi@linaro.org>
7833 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
7834 (need_step_over_p): Return zero if the LWP has pending signals
7835 can be delivered on software single step target.
7837 2016-04-25 Yao Qi <yao.qi@linaro.org>
7839 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
7840 return instead of error.
7842 2016-04-22 Yao Qi <yao.qi@linaro.org>
7844 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
7847 2016-04-22 Yao Qi <yao.qi@linaro.org>
7849 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
7850 signal when stepping over breakpoint with software single
7853 2016-04-21 Pedro Alves <palves@redhat.com>
7855 * linux-s390-low.c (s390_collect_ptrace_register)
7856 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
7858 (s390_check_regset): Use void * instead of gdb_byte *.
7860 2016-04-20 Pedro Alves <palves@redhat.com>
7862 * configure: Renegerate.
7864 2016-04-20 Yao Qi <yao.qi@linaro.org>
7866 * linux-aarch32-low.c: Include "arch/arm-linux.h".
7867 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
7869 (arm_store_gregset): Likewise.
7871 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
7873 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
7874 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
7875 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
7876 (amd64-avx-mpx-linux.c): New rules.
7877 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
7878 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
7879 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
7880 (srv_amd64_regobj): Add amd64-avx-mpx.o.
7881 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
7882 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
7883 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
7884 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
7885 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
7886 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
7887 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
7888 * linux-x86-low.c (x86_linux_read_description): Add case for
7889 X86_XSTATE_AVX_MPX_MASK.
7890 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
7891 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
7892 init_registers_i386_avx_mpx_linux.
7893 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7894 (initialize_low_tracepoint): Call
7895 init_registers_i386_avx_mpx_linux.
7896 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7897 (initialize_low_tracepoint): Call
7898 init_registers_amd64_avx_mpx_linux.
7899 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
7900 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
7901 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
7904 2016-04-18 Pedro Alves <palves@redhat.com>
7906 * configure: Regenerate.
7908 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
7910 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
7911 (aarch64_emit_sub): Likewise.
7913 2016-04-12 Pedro Alves <palves@redhat.com>
7915 * utils.c (prepare_to_throw_exception): Delete.
7917 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
7919 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
7921 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
7923 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
7925 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
7927 * linux-aarch64-ipa.c: Add <elf.h> include.
7928 * linux-ppc-ipa.c: Add <elf.h> include.
7929 * linux-s390-ipa.c: Add <elf.h> include.
7931 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
7933 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
7934 (get_raw_reg_ptr): Likewise.
7935 (get_trace_state_variable_value_ptr): Likewise.
7936 (set_trace_state_variable_value_ptr): Likewise.
7937 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
7940 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
7941 Marcin Kościelnicki <koriakin@0x04.net>
7944 * linux-ppc-low.c (emit_insns): New function.
7945 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
7946 (ppc_emit_prologue): New function.
7947 (ppc_emit_epilogue): New function.
7948 (ppc_emit_add): New function.
7949 (ppc_emit_sub): New function.
7950 (ppc_emit_mul): New function.
7951 (ppc_emit_lsh): New function.
7952 (ppc_emit_rsh_signed): New function.
7953 (ppc_emit_rsh_unsigned): New function.
7954 (ppc_emit_ext): New function.
7955 (ppc_emit_zero_ext): New function.
7956 (ppc_emit_log_not): New function.
7957 (ppc_emit_bit_and): New function.
7958 (ppc_emit_bit_or): New function.
7959 (ppc_emit_bit_xor): New function.
7960 (ppc_emit_bit_not): New function.
7961 (ppc_emit_equal): New function.
7962 (ppc_emit_less_signed): New function.
7963 (ppc_emit_less_unsigned): New function.
7964 (ppc_emit_ref): New function.
7965 (ppc_emit_const): New function.
7966 (ppc_emit_reg): New function.
7967 (ppc_emit_pop): New function.
7968 (ppc_emit_stack_flush): New function.
7969 (ppc_emit_swap): New function.
7970 (ppc_emit_stack_adjust): New function.
7971 (ppc_emit_call): New function.
7972 (ppc_emit_int_call_1): New function.
7973 (ppc_emit_void_call_2): New function.
7974 (ppc_emit_if_goto): New function.
7975 (ppc_emit_goto): New function.
7976 (ppc_emit_eq_goto): New function.
7977 (ppc_emit_ne_goto): New function.
7978 (ppc_emit_lt_goto): New function.
7979 (ppc_emit_le_goto): New function.
7980 (ppc_emit_gt_goto): New function.
7981 (ppc_emit_ge_goto): New function.
7982 (ppc_write_goto_address): New function.
7983 (ppc_emit_ops_impl): New static variable.
7984 (ppc64v1_emit_prologue): New function.
7985 (ppc64v2_emit_prologue): New function.
7986 (ppc64_emit_epilogue): New function.
7987 (ppc64_emit_add): New function.
7988 (ppc64_emit_sub): New function.
7989 (ppc64_emit_mul): New function.
7990 (ppc64_emit_lsh): New function.
7991 (ppc64_emit_rsh_signed): New function.
7992 (ppc64_emit_rsh_unsigned): New function.
7993 (ppc64_emit_ext): New function.
7994 (ppc64_emit_zero_ext): New function.
7995 (ppc64_emit_log_not): New function.
7996 (ppc64_emit_bit_and): New function.
7997 (ppc64_emit_bit_or): New function.
7998 (ppc64_emit_bit_xor): New function.
7999 (ppc64_emit_bit_not): New function.
8000 (ppc64_emit_equal): New function.
8001 (ppc64_emit_less_signed): New function.
8002 (ppc64_emit_less_unsigned): New function.
8003 (ppc64_emit_ref): New function.
8004 (ppc64_emit_const): New function.
8005 (ppc64v1_emit_reg): New function.
8006 (ppc64v2_emit_reg): New function.
8007 (ppc64_emit_pop): New function.
8008 (ppc64_emit_stack_flush): New function.
8009 (ppc64_emit_swap): New function.
8010 (ppc64v1_emit_call): New function.
8011 (ppc64v2_emit_call): New function.
8012 (ppc64v1_emit_int_call_1): New function.
8013 (ppc64v2_emit_int_call_1): New function.
8014 (ppc64v1_emit_void_call_2): New function.
8015 (ppc64v2_emit_void_call_2): New function.
8016 (ppc64_emit_if_goto): New function.
8017 (ppc64_emit_eq_goto): New function.
8018 (ppc64_emit_ne_goto): New function.
8019 (ppc64_emit_lt_goto): New function.
8020 (ppc64_emit_le_goto): New function.
8021 (ppc64_emit_gt_goto): New function.
8022 (ppc64_emit_ge_goto): New function.
8023 (ppc64v1_emit_ops_impl): New static variable.
8024 (ppc64v2_emit_ops_impl): New static variable.
8025 (ppc_emit_ops): New function.
8026 (linux_low_target): Wire in ppc_emit_ops.
8028 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8029 Marcin Kościelnicki <koriakin@0x04.net>
8032 * Makefile.in: Add powerpc-*-ipa.o
8033 * configure.srv: Add ipa_obj for powerpc*-linux.
8034 * linux-ppc-ipa.c: New file.
8035 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8037 (PPC_FIELD): New macro.
8038 (PPC_SEXT): New macro.
8039 (PPC_OP6): New macro.
8040 (PPC_BO): New macro.
8041 (PPC_LI): New macro.
8042 (PPC_BD): New macro.
8043 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8044 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8045 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8046 (ppc_get_thread_area): New function.
8047 (is_elfv2_inferior): New function.
8048 (gen_ds_form): New function.
8049 (GEN_STD): New macro.
8050 (GEN_STDU): New macro.
8051 (GEN_LD): New macro.
8052 (GEN_LDU): New macro.
8053 (gen_d_form): New function.
8054 (GEN_ADDI): New macro.
8055 (GEN_ADDIS): New macro.
8056 (GEN_LI): New macro.
8057 (GEN_LIS): New macro.
8058 (GEN_ORI): New macro.
8059 (GEN_ORIS): New macro.
8060 (GEN_LWZ): New macro.
8061 (GEN_STW): New macro.
8062 (GEN_STWU): New macro.
8063 (gen_xfx_form): New function.
8064 (GEN_MFSPR): New macro.
8065 (GEN_MTSPR): New macro.
8066 (GEN_MFCR): New macro.
8067 (GEN_MTCR): New macro.
8068 (GEN_SYNC): New macro.
8069 (GEN_LWSYNC): New macro.
8070 (gen_x_form): New function.
8071 (GEN_OR): New macro.
8072 (GEN_MR): New macro.
8073 (GEN_LWARX): New macro.
8074 (GEN_STWCX): New macro.
8075 (GEN_CMPW): New macro.
8076 (gen_md_form): New function.
8077 (GEN_RLDICL): New macro.
8078 (GEN_RLDICR): New macro.
8079 (gen_i_form): New function.
8081 (GEN_BL): New macro.
8082 (gen_b_form): New function.
8083 (GEN_BNE): New macro.
8084 (GEN_LOAD): New macro.
8085 (GEN_STORE): New macro.
8086 (gen_limm): New function.
8087 (gen_atomic_xchg): New function.
8088 (gen_call): New function.
8089 (ppc_relocate_instruction): New function.
8090 (ppc_install_fast_tracepoint_jump_pad): New function.
8091 (ppc_get_min_fast_tracepoint_insn_len): New function.
8092 (ppc_get_ipa_tdesc_idx): New function.
8093 (the_low_target): Wire in the new functions.
8094 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8096 * linux-ppc-tdesc.h: New file.
8098 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8100 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8101 (alloc_jump_pad_buffer): New function.
8102 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8103 (alloc_jump_pad_buffer): New function.
8104 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8105 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8106 (alloc_jump_pad_buffer): New function.
8107 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8108 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8109 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8110 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8112 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8114 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8115 * linux-amd64-ipa.c: Likewise.
8116 * linux-i386-ipa.c: Likewise.
8117 * linux-s390-ipa.c: Likewise.
8118 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8119 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8120 set_trace_state_variable_value_ptr.
8121 (struct ipa_sym_addresses): Likewise.
8122 (symbol_list): Likewise.
8123 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8124 accessing gdb_collect directly.
8125 (gdb_collect_ptr_type): New typedef.
8126 (get_raw_reg_ptr_type): New typedef.
8127 (get_trace_state_variable_value_ptr_type): New typedef.
8128 (set_trace_state_variable_value_ptr_type): New typedef.
8129 (gdb_collect_ptr): New global.
8130 (get_raw_reg_ptr): New global.
8131 (get_trace_state_variable_value_ptr): New global.
8132 (set_trace_state_variable_value_ptr): New global.
8133 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8134 accessing get_raw_reg directly.
8135 (get_get_tsv_func_addr): Likewise for
8136 get_trace_state_variable_value_ptr.
8137 (get_set_tsv_func_addr): Likewise for
8138 set_trace_state_variable_value_ptr.
8139 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8141 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8143 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8145 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8147 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8149 (relocate_instruction): Remove own_buf.
8150 * server.c (own_buf): Make global.
8151 (handle_v_requests): Make global.
8152 * server.h (own_buf): New declaration.
8153 (handle_v_requests): New prototype.
8155 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8158 * linux-s390-low.c (add_insns): New function.
8159 (s390_emit_prologue): New function.
8160 (s390_emit_epilogue): New function.
8161 (s390_emit_add): New function.
8162 (s390_emit_sub): New function.
8163 (s390_emit_mul): New function.
8164 (s390_emit_lsh): New function.
8165 (s390_emit_rsh_signed): New function.
8166 (s390_emit_rsh_unsigned): New function.
8167 (s390_emit_ext): New function.
8168 (s390_emit_log_not): New function.
8169 (s390_emit_bit_and): New function.
8170 (s390_emit_bit_or): New function.
8171 (s390_emit_bit_xor): New function.
8172 (s390_emit_bit_not): New function.
8173 (s390_emit_equal): New function.
8174 (s390_emit_less_signed): New function.
8175 (s390_emit_less_unsigned): New function.
8176 (s390_emit_ref): New function.
8177 (s390_emit_if_goto): New function.
8178 (s390_emit_goto): New function.
8179 (s390_write_goto_address): New function.
8180 (s390_emit_litpool): New function.
8181 (s390_emit_const): New function.
8182 (s390_emit_call): New function.
8183 (s390_emit_reg): New function.
8184 (s390_emit_pop): New function.
8185 (s390_emit_stack_flush): New function.
8186 (s390_emit_zero_ext): New function.
8187 (s390_emit_swap): New function.
8188 (s390_emit_stack_adjust): New function.
8189 (s390_emit_set_r2): New function.
8190 (s390_emit_int_call_1): New function.
8191 (s390_emit_void_call_2): New function.
8192 (s390_emit_eq_goto): New function.
8193 (s390_emit_ne_goto): New function.
8194 (s390_emit_lt_goto): New function.
8195 (s390_emit_le_goto): New function.
8196 (s390_emit_gt_goto): New function.
8197 (s390_emit_ge_goto): New function.
8198 (s390x_emit_prologue): New function.
8199 (s390x_emit_epilogue): New function.
8200 (s390x_emit_add): New function.
8201 (s390x_emit_sub): New function.
8202 (s390x_emit_mul): New function.
8203 (s390x_emit_lsh): New function.
8204 (s390x_emit_rsh_signed): New function.
8205 (s390x_emit_rsh_unsigned): New function.
8206 (s390x_emit_ext): New function.
8207 (s390x_emit_log_not): New function.
8208 (s390x_emit_bit_and): New function.
8209 (s390x_emit_bit_or): New function.
8210 (s390x_emit_bit_xor): New function.
8211 (s390x_emit_bit_not): New function.
8212 (s390x_emit_equal): New function.
8213 (s390x_emit_less_signed): New function.
8214 (s390x_emit_less_unsigned): New function.
8215 (s390x_emit_ref): New function.
8216 (s390x_emit_if_goto): New function.
8217 (s390x_emit_const): New function.
8218 (s390x_emit_call): New function.
8219 (s390x_emit_reg): New function.
8220 (s390x_emit_pop): New function.
8221 (s390x_emit_stack_flush): New function.
8222 (s390x_emit_zero_ext): New function.
8223 (s390x_emit_swap): New function.
8224 (s390x_emit_stack_adjust): New function.
8225 (s390x_emit_int_call_1): New function.
8226 (s390x_emit_void_call_2): New function.
8227 (s390x_emit_eq_goto): New function.
8228 (s390x_emit_ne_goto): New function.
8229 (s390x_emit_lt_goto): New function.
8230 (s390x_emit_le_goto): New function.
8231 (s390x_emit_gt_goto): New function.
8232 (s390x_emit_ge_goto): New function.
8233 (s390_emit_ops): New function.
8234 (struct linux_target_ops): Fill in emit_ops hook.
8236 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8239 * Makefile.in: Add s390 IPA files.
8240 * configure.srv: Build IPA for s390.
8241 * linux-s390-ipa.c: New file.
8242 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
8243 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
8244 (tdesc_s390_linux32): Likewise.
8245 (init_registers_s390_linux32v1): Likewise.
8246 (tdesc_s390_linux32v1): Likewise.
8247 (init_registers_s390_linux32v2): Likewise.
8248 (tdesc_s390_linux32v2): Likewise.
8249 (init_registers_s390_linux64): Likewise.
8250 (tdesc_s390_linux64): Likewise.
8251 (init_registers_s390_linux64v1): Likewise.
8252 (tdesc_s390_linux64v1): Likewise.
8253 (init_registers_s390_linux64v2): Likewise.
8254 (tdesc_s390_linux64v2): Likewise.
8255 (init_registers_s390_te_linux64): Likewise.
8256 (tdesc_s390_te_linux64): Likewise.
8257 (init_registers_s390_vx_linux64): Likewise.
8258 (tdesc_s390_vx_linux64): Likewise.
8259 (init_registers_s390_tevx_linux64): Likewise.
8260 (tdesc_s390_tevx_linux64): Likewise.
8261 (init_registers_s390x_linux64): Likewise.
8262 (tdesc_s390x_linux64): Likewise.
8263 (init_registers_s390x_linux64v1): Likewise.
8264 (tdesc_s390x_linux64v1): Likewise.
8265 (init_registers_s390x_linux64v2): Likewise.
8266 (tdesc_s390x_linux64v2): Likewise.
8267 (init_registers_s390x_te_linux64): Likewise.
8268 (tdesc_s390x_te_linux64): Likewise.
8269 (init_registers_s390x_vx_linux64): Likewise.
8270 (tdesc_s390x_vx_linux64): Likewise.
8271 (init_registers_s390x_tevx_linux64): Likewise.
8272 (tdesc_s390x_tevx_linux64): Likewise.
8273 (have_hwcap_s390_vx): New static variable.
8274 (s390_arch_setup): Fill have_hwcap_s390_vx.
8275 (s390_get_thread_area): New function.
8276 (s390_ft_entry_gpr_esa): New const.
8277 (s390_ft_entry_gpr_zarch): New const.
8278 (s390_ft_entry_misc): New const.
8279 (s390_ft_entry_fr): New const.
8280 (s390_ft_entry_vr): New const.
8281 (s390_ft_main_31): New const.
8282 (s390_ft_main_64): New const.
8283 (s390_ft_exit_fr): New const.
8284 (s390_ft_exit_vr): New const.
8285 (s390_ft_exit_misc): New const.
8286 (s390_ft_exit_gpr_esa): New const.
8287 (s390_ft_exit_gpr_zarch): New const.
8288 (append_insns): New function.
8289 (s390_relocate_instruction): New function.
8290 (s390_install_fast_tracepoint_jump_pad): New function.
8291 (s390_get_min_fast_tracepoint_insn_len): New function.
8292 (s390_get_ipa_tdesc_idx): New function.
8293 (struct linux_target_ops): Wire in the above functions.
8294 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
8295 * linux-s390-tdesc.h: New file.
8297 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8299 * linux-s390-low.c (s390_supports_tracepoints): New function.
8300 (struct linux_target_ops): Fill supports_tracepoints hook.
8302 2016-03-18 Yao Qi <yao.qi@linaro.org>
8304 * linux-low.c (lwp_signal_can_be_delivered): New function.
8305 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
8307 2016-03-18 Yao Qi <yao.qi@linaro.org>
8309 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
8310 0 if signal is enqueued. Remove 'signal' from one debugging
8311 message. Move one debugging message to some lines below.
8312 Remove code setting 'signal' to 0.
8314 2016-03-18 Yao Qi <yao.qi@linaro.org>
8316 * linux-low.c (linux_low_filter_event): Remove redundant
8317 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
8319 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
8321 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
8322 (struct linux_target_ops): Wire in the above.
8324 2016-03-03 Yao Qi <yao.qi@linaro.org>
8326 * linux-low.c: Update comments to start_step_over.
8328 2016-03-03 Yao Qi <yao.qi@linaro.org>
8331 * linux-low.c (handle_extended_wait): Set child suspended
8332 if event_lwp->bp_reinsert isn't zero.
8334 2016-03-02 Yao Qi <yao.qi@linaro.org>
8336 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
8337 enqueue_pending_signal.
8339 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
8341 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
8344 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8346 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
8347 (s390_regmap_3264) [!__s390x__]: New global.
8348 (s390_collect_ptrace_register): Skip map entries containing -1.
8349 (s390_supply_ptrace_register): Ditto.
8350 (s390_fill_gprs_high): New function.
8351 (s390_store_gprs_high): New function.
8352 (s390_regsets): Add NT_S390_HIGH_GPRS.
8353 (s390_get_hwcap): Enable on 31-bit.
8354 (have_hwcap_s390_high_gprs): Enable on 31-bit.
8355 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
8356 Detect NT_S390_HIGH_GPRS.
8357 (s390_usrregs_info_3264): Enable on 31-bit.
8358 (s390_regs_info): Enable regs_info_3264 on 31-bit.
8359 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
8361 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8364 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
8365 * configure.srv: Ditto.
8366 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
8367 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
8368 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
8369 (init_registers_amd64_linux): Remove prototype.
8370 (tdesc_amd64_linux): Remove declaration.
8371 (get_ipa_tdesc): New function.
8372 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8373 initialize remaining tdescs.
8374 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
8375 (init_registers_i386_linux): Remove prototype.
8376 (tdesc_i386_linux): Remove declaration.
8377 (get_ipa_tdesc): New function.
8378 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8379 initialize remaining tdescs.
8380 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
8381 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
8382 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
8383 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
8384 (x86_get_ipa_tdesc_idx): New function.
8385 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
8386 * linux-x86-tdesc.h: New file.
8387 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
8388 (target_get_ipa_tdesc_idx): New macro.
8389 * tracepoint.c (ipa_tdesc_idx): New macro.
8390 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
8391 (symbol_list): Add ipa_tdesc_idx.
8392 (cmd_qtstart): Write ipa_tdesc_idx in the target.
8393 (ipa_tdesc): Remove.
8394 (ipa_tdesc_idx): New variable.
8395 (get_context_regcache): Use get_ipa_tdesc.
8396 (gdb_collect): Ditto.
8398 * tracepoint.h (get_ipa_tdesc): New prototype.
8399 (ipa_tdesc): Remove.
8401 2016-02-24 Pedro Alves <palves@redhat.com>
8403 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
8404 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
8405 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
8406 Factor out common code between the USE_SIGTRAP_SIGINFO and
8407 !USE_SIGTRAP_SIGINFO blocks.
8408 (linux_low_filter_event): Call save_stop_reason instead of
8409 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
8411 (linux_wait_1): Update comments.
8413 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
8415 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
8416 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
8417 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
8418 ppc_insert_point, ppc_remove_point.
8420 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
8422 * linux-s390-low.c (s390_supports_z_point_type): New function.
8423 (struct linux_target_ops): Wire s390_supports_z_point_type in.
8425 2016-02-16 Yao Qi <yao.qi@linaro.org>
8427 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
8428 PC. Get pc from regcache_read_pc.
8430 2016-02-12 Yao Qi <yao.qi@linaro.org>
8432 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
8433 or linux_get_pc_32bit.
8434 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
8436 2016-02-12 Yao Qi <yao.qi@linaro.org>
8438 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
8439 arm_linux_get_next_pcs_fixup.
8441 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
8443 * tracepoint.c (x_tracepoint_action_download): Change
8444 write_inferior_data_ptr to write_inferior_data_pointer.
8445 (cmd_qtstart): Likewise.
8446 (write_inferior_data_ptr): Remove.
8447 (download_agent_expr): Change write_inferior_data_ptr to
8448 write_inferior_data_pointer.
8449 (download_tracepoint_1): Likewise.
8450 (download_tracepoint): Likewise.
8451 (download_trace_state_variables): Likewise.
8453 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
8454 Marcin Kościelnicki <koriakin@0x04.net>
8456 * tracepoint.c (struct tracepoint_action_ops): Remove.
8457 (struct tracepoint_action): Remove ops.
8458 (m_tracepoint_action_download, r_tracepoint_action_download)
8459 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
8460 size and offset accordingly.
8461 (m_tracepoint_action_ops, r_tracepoint_action_ops)
8462 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
8463 (tracepoint_action_send, tracepoint_action_download): New functions.
8464 Helpers for trace action handlers.
8465 (add_tracepoint_action): Remove setup actions ops.
8466 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
8468 2016-02-10 Yao Qi <yao.qi@linaro.org>
8470 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
8472 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8474 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
8476 * configure: Regenerate.
8478 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8480 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
8481 void * to gdb_byte *.
8482 * linux-low.c (siginfo_fixup): Likewise.
8483 (linux_xfer_siginfo): Likewise.
8484 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
8486 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8488 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
8490 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
8492 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
8494 * linux-x86-low.c [__x86_64__]: Include
8495 "nat/amd64-linux-siginfo.h".
8496 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
8497 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
8498 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
8499 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
8500 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
8501 (cpt_si_fd, si_timerid, si_overrun): Move from
8502 nat/amd64-linux-siginfo.c.
8503 * Makefile.in (amd64-linux-siginfo.o:): New rule.
8505 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
8507 * server.c (skip_to_semicolon): Remove.
8508 (process_point_options): Use strchrnul instead of
8511 2016-01-26 Yao Qi <yao.qi@linaro.org>
8513 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
8514 * linux-low.c (install_software_single_step_breakpoints): Don't
8515 call regcache_read_pc.
8516 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
8519 2016-01-26 Yao Qi <yao.qi@linaro.org>
8521 * linux-low.c (install_software_single_step_breakpoints): Call
8522 regcache_read_pc instead of get_pc.
8524 2016-01-26 Yao Qi <yao.qi@linaro.org>
8526 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
8527 (unblock_async_io): Rename to ...
8528 (block_unblock_async_io): ... it. New function.
8529 (enable_async_io): Don't install SIGIO handler. Unblock it
8531 (disable_async_io): Don't ignore SIGIO. Block it instead.
8532 (initialize_async_io): Install SIGIO handler. Don't call
8535 2016-01-26 Yao Qi <yao.qi@linaro.org>
8537 * remote-utils.c (getpkt): If the buffer isn't empty, and the
8538 first character is '\003', call *the_target->request_interrupt.
8540 2016-01-25 Yao Qi <yao.qi@linaro.org>
8542 * remote-utils.c (new_thread_notify): Remove.
8543 (dead_thread_notify): Likewise.
8544 * remote-utils.h (new_thread_notify): Remove declaration.
8545 (dead_thread_notify): Likewise.
8547 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
8549 * gdb.trace/pending.exp: Fix expected message on continue.
8551 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
8553 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
8554 it works properly on big-endian machines where sizeof (CORE_ADDR)
8557 2016-01-21 Pedro Alves <palves@redhat.com>
8559 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
8560 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
8561 * configure: Regenerate.
8563 2016-01-21 Yao Qi <yao.qi@linaro.org>
8565 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
8566 is_thumb and set it according to CPSR saved on the stack.
8567 (get_next_pcs_syscall_next_pc): Pass is_thumb to
8568 arm_sigreturn_next_pc.
8570 2016-01-18 Yao Qi <yao.qi@linaro.org>
8572 * linux-low.c (linux_set_pc_64bit): New function.
8573 (linux_get_pc_64bit): New function.
8574 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
8576 * linux-sparc-low.c (debug_threads): Remove declaration.
8577 (sparc_get_pc): Remove.
8578 (the_low_target): Use linux_get_pc_64bit instead of
8580 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
8581 (the_low_target): Use linux_get_pc_64bit and
8584 2016-01-18 Yao Qi <yao.qi@linaro.org>
8586 * linux-arm-low.c (debug_threads): Remove declaration.
8587 (arm_get_pc, arm_set_pc): Remove.
8588 (the_low_target): Use linux_get_pc_32bit and
8590 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
8591 (the_low_target): Use linux_get_pc_32bit and
8593 * linux-cris-low.c (debug_threads): Remove declaration.
8594 (cris_get_pc, cris_set_pc,): Remove.
8595 (the_low_target): Use linux_get_pc_32bit and
8597 * linux-crisv32-low.c (debug_threads): Remove declaration.
8598 (cris_get_pc, cris_set_pc): Remove.
8599 (the_low_target): Use linux_get_pc_32bit and
8601 * linux-low.c: Include inttypes.h.
8602 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
8603 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
8604 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
8605 (the_low_target): Use linux_get_pc_32bit and
8607 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
8608 (the_low_target): Use linux_get_pc_32bit and
8610 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
8611 (the_low_target): Use linux_get_pc_32bit and
8613 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
8614 (the_low_target): Use linux_get_pc_32bit and
8616 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
8617 (the_low_target): Use linux_get_pc_32bit and
8620 2016-01-18 Gary Benson <gbenson@redhat.com>
8622 * configure.ac (AC_FUNC_FORK): New check.
8623 * config.in: Regenerate.
8624 * configure: Likewise.
8626 2016-01-14 Yao Qi <yao.qi@linaro.org>
8628 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
8629 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
8630 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
8631 arm_get_next_pcs_ctor.
8633 2016-01-12 Josh Stone <jistone@redhat.com>
8634 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8636 * inferiors.h: Include "gdb_vecs.h".
8637 (struct process_info): Add syscalls_to_catch.
8638 * inferiors.c (remove_process): Free syscalls_to_catch.
8639 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
8640 syscall_return stops.
8641 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
8642 * server.c (handle_general_set): Handle QCatchSyscalls.
8643 (handle_query): Report support for QCatchSyscalls.
8644 * target.h (struct target_ops): Add supports_catch_syscall.
8645 (target_supports_catch_syscall): New macro.
8646 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
8647 (struct lwp_info): Add syscall_state.
8648 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
8649 Maintain syscall_state and syscalls_to_catch across exec.
8650 (get_syscall_trapinfo): New function, proxy to the_low_target.
8651 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
8652 (linux_low_filter_event): Toggle syscall_state entry/return for
8653 syscall traps, and set it ignored for all others.
8654 (gdb_catching_syscalls_p): New function.
8655 (gdb_catch_this_syscall_p): New function.
8656 (linux_wait_1): Handle SYSCALL_SIGTRAP.
8657 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
8658 (linux_supports_catch_syscall): New function.
8659 (linux_target_ops): Install it.
8660 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
8661 (the_low_target): Install it.
8663 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8665 * acinclude.m4: Include new ../warning.m4 file.
8666 * configure: Regenerated.
8667 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
8669 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8671 * ax.c (is_goto_target): Mark static.
8672 * linux-low.c (register_addr): Likewise.
8673 (linux_fetch_registers, linux_store_registers): Likewise.
8674 * mem-break.c (any_persistent_commands): Fix old prototype.
8675 (add_commands_to_breakpoint): Mark static.
8676 * regcache.c (find_register_by_name): Delete unused func.
8677 * remote-utils.c (hex_or_minus_one): Mark static.
8678 * server.c (monitor_show_help): Mark static.
8679 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
8680 handle_v_requests): Likewise.
8682 2016-01-12 Pedro Alves <palves@redhat.com>
8684 Remove use of the registered trademark symbol throughout.
8686 2016-01-08 Yao Qi <yao.qi@linaro.org>
8688 * remote-utils.c (getpkt): If c is '\003', call target hook
8691 2016-01-06 Yao Qi <yao.qi@linaro.org>
8693 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
8694 linux-aarch32-low.c.
8695 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8696 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8697 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8698 (thumb2_breakpoint): Declare.
8699 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
8700 linux-aarch32-low.h.
8701 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8702 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8703 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8705 2016-01-01 Joel Brobecker <brobecker@adacore.com>
8707 * gdbreplay.c (gdbreplay_version): Change copyright year in
8709 * server.c (gdbserver_version): Likewise.
8711 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
8713 * server.c (crc32_table): Delete.
8714 (crc32): Use libiberty's xcrc32 function.
8716 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8718 * lynx-low.c (lynx_delete_thread_callback): New function.
8719 (lynx_mourn): Properly delete our process and all of its
8720 threads. Remove call to clear_inferiors.
8722 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8724 * target.c (thread_search_callback): Add check that
8725 the thread_stopped target callback is not NULL before
8728 2015-12-21 Yao Qi <yao.qi@linaro.org>
8730 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
8733 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8735 * server.c (handle_query): Call target_supports_software_single_step.
8737 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8739 * linux-low.c (single_step): New function.
8740 (linux_resume_one_lwp_throw): Call single_step.
8741 (start_step_over): Likewise.
8743 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8745 * Makefile.in (SFILES): Append arch/arm-linux.c,
8746 arch/arm-get-next-pcs.c.
8747 (arm-linux.o): New rule.
8748 (arm-get-next-pcs.o): New rule.
8749 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
8751 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
8752 to linux-aarch32-low.c.
8753 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8754 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8755 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8756 (thumb2_breakpoint_len): Likewise.
8757 (arm_is_thumb_mode): Make non-static.
8758 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
8759 from linux-aarch32-low.c.
8760 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8761 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8762 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8763 (thumb2_breakpoint_len): Likewise.
8764 (arm_is_thumb_mode): New declaration.
8765 * linux-arm-low.c: Include arch/arm-linux.h
8766 aarch/arm-get-next-pcs.h, sys/syscall.h.
8767 (get_next_pcs_ops): New struct.
8768 (get_next_pcs_addr_bits_remove): New function.
8769 (get_next_pcs_is_thumb): New function.
8770 (get_next_pcs_read_memory_unsigned_integer): Likewise.
8771 (arm_sigreturn_next_pc): Likewise.
8772 (get_next_pcs_syscall_next_pc): Likewise.
8773 (arm_gdbserver_get_next_pcs): Likewise.
8774 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
8776 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
8777 * server.h: Include gdb_vecs.h.
8779 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8781 * Makefile.in (SFILES): Append common/common-regcache.c.
8782 (OBS): Append common-regcache.o.
8783 (common-regcache.o): New rule.
8784 * regcache.c (init_register_cache): Initialize cache to
8786 (regcache_raw_read_unsigned): New function.
8787 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
8788 register_status enum.
8790 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8792 * linux-aarch64-low.c (the_low_targets): Rename
8793 breakpoint_reinsert_addr to get_next_pcs.
8794 * linux-arm-low.c (the_low_targets): Likewise.
8795 * linux-bfin-low.c (the_low_targets): Likewise.
8796 * linux-cris-low.c (the_low_targets): Likewise.
8797 * linux-crisv32-low.c (the_low_targets): Likewise.
8798 * linux-low.c (can_software_single_step): Likewise.
8799 (install_software_single_step_breakpoints): New function.
8800 (start_step_over): Use install_software_single_step_breakpoints.
8801 * linux-low.h: New CORE_ADDR vector.
8802 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
8804 * linux-mips-low.c (the_low_targets): Likewise.
8805 * linux-nios2-low.c (the_low_targets): Likewise.
8806 * linux-sparc-low.c (the_low_targets): Likewise.
8808 2015-12-17 Pedro Alves <palves@redhat.com>
8810 * linux-low.c (linux_kill_one_lwp): Remove references to
8812 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
8814 (linux_init_signals): Delete.
8815 (initialize_low): Adjust.
8816 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
8818 2015-12-16 Pedro Alves <palves@redhat.com>
8820 * configure.ac (compiler warning flags): When testing a
8821 -Wno-foo option, check whether -Wfoo works instead.
8822 * configure: Regenerate.
8824 2015-12-11 Don Breazeal <donb@codesourcery.com>
8826 * server.c (process_serial_event): Don't exit from gdbserver
8827 in remote mode if there are still active inferiors.
8829 2015-12-11 Yao Qi <yao.qi@linaro.org>
8831 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
8832 arm_breakpoint_at if the process is 32-bit.
8834 2015-12-11 Yao Qi <yao.qi@linaro.org>
8836 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
8839 2015-12-07 Yao Qi <yao.qi@linaro.org>
8841 * configure.srv: Append arm.o to srv_tgtobj for
8842 aarch64*-*-linux* target.
8843 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
8844 from linux-arm-low.c.
8845 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8846 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8847 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8848 (thumb2_breakpoint_len): Likewise.
8849 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
8850 (arm_breakpoint_kinds): Likewise.
8851 (arm_breakpoint_kind_from_pc): Likewise.
8852 (arm_sw_breakpoint_from_kind): Likewise.
8853 (arm_breakpoint_kind_from_current_state): Likewise.
8854 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
8855 (arm_sw_breakpoint_from_kind): Declare.
8856 (arm_breakpoint_kind_from_current_state): Declare.
8857 (arm_breakpoint_at): Declare.
8858 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
8859 arm_sw_breakpoint_from_kind if process is 32-bit.
8860 (aarch64_breakpoint_kind_from_pc): New function.
8861 (aarch64_breakpoint_kind_from_current_state): New function.
8862 (the_low_target): Initialize fields breakpoint_kind_from_pc
8863 and breakpoint_kind_from_current_state.
8864 * linux-arm-low.c (arm_breakpoint_kinds): Move to
8865 linux-aarch32-low.c.
8866 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
8867 (arm_breakpoint, arm_breakpoint_len): Likewise.
8868 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
8869 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8870 (arm_is_thumb_mode): Likewise.
8871 (arm_breakpoint_at): Likewise.
8872 (arm_breakpoint_kind_from_pc): Likewise.
8873 (arm_sw_breakpoint_from_kind): Likewise.
8874 (arm_breakpoint_kind_from_current_state): Likewise.
8877 2015-08-04 Yao Qi <yao.qi@linaro.org>
8879 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
8880 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
8881 * server.c (extended_protocol): Remove "static".
8882 * server.h (extended_protocol): Declare it.
8884 2015-12-04 Josh Stone <jistone@redhat.com>
8886 * target.h (struct target_ops) <arch_setup>: Rename to ...
8887 (struct target_ops) <post_create_inferior>: ... this.
8888 (target_arch_setup): Rename to ...
8889 (target_post_create_inferior): ... this, calling post_create_inferior.
8890 * server.c (start_inferior): Update target_arch_setup calls to
8891 target_post_create_inferior.
8892 * linux-low.c (linux_low_ptrace_options): Forward declare.
8893 (linux_arch_setup): Update its comment for general use.
8894 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
8895 (struct linux_target_ops): Use linux_post_create_inferior.
8896 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
8897 to post_create_inferior.
8898 * nto-low.c (struct nto_target_ops): Likewise.
8899 * spu-low.c (struct spu_target_ops): Likewise.
8900 * win32-low.c (struct win32_target_ops): Likewise.
8902 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
8904 * linux-arm-low.c: Remove duplicate arch/arm.h include.
8906 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8908 * linux-arm-low.c (arm_reinsert_addr): Remove function.
8909 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
8910 * linux-cris-low.c (cris_reinsert_addr> Remove function.
8911 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8912 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
8913 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8914 * linux-mips-low.c (mips_reinsert_addr): Remove function.
8915 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8916 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
8917 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8918 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
8919 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8921 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8923 * linux-low.c (linux_look_up_symbols): Don't call
8924 linux_supports_traceclone.
8925 * linux-low.h (thread_db_init): Remove use_events argument.
8926 * thread-db.c (thread_db_use_event): Remove global variable.
8927 (struct thread_db) <td_thr_event_enable_p>: Remove field.
8928 (struct thread_db) <td_create_bp>: Remove field.
8929 (thread_db_create_event): Remove function.
8930 (thread_db_enable_reporting): Likewise.
8931 (find_one_thread): Don't check for thread_db_use_events.
8932 (attach_thread): Likewise.
8933 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
8934 (try_thread_db_load_1): Don't check for thread_db_use_events.
8935 (thread_db_init): Remove use_events argument and thread events
8937 (remove_thread_event_breakpoints): Remove function.
8938 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
8940 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8942 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
8944 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8945 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
8946 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8947 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
8948 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
8950 * linux-crisv32-low.c (cris_supports_hardware_single_step):
8952 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8953 * linux-low.c (can_hardware_single_step): Use
8954 supports_hardware_single_step.
8955 (can_software_single_step): New function.
8956 (start_step_over): Call can_software_single_step.
8957 (linux_supports_hardware_single_step): New function.
8958 (struct target_ops) <supports_software_single_step>: Initialize.
8959 * linux-low.h (struct linux_target_ops)
8960 <supports_hardware_single_step>: Initialize.
8961 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
8962 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8963 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
8964 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
8965 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
8966 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8967 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
8968 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8969 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
8970 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
8972 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
8973 (struct linux_target_ops) <tile_supports_hardware_single_step>:
8975 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
8976 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8977 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
8979 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8980 * target.h (struct target_ops): <supports_software_single_step>:
8982 (target_supports_software_single_step): New macro.
8984 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8986 * linux-low.c (linux_wait_1): Fix pc advance condition.
8987 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
8988 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
8990 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8992 * linux-arm-low.c (arm_is_thumb_mode): New function.
8993 (arm_breakpoint_at): Use arm_is_thumb_mode.
8994 (arm_breakpoint_kind_from_current_state): New function.
8995 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
8997 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
8998 (linux_breakpoint_kind_from_current_state): New function.
8999 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9000 * linux-low.h (struct linux_target_ops)
9001 <breakpoint_kind_from_current_state>: New field.
9002 * target.h (struct target_ops): Likewise.
9003 (target_breakpoint_kind_from_current_state): New macro.
9005 2015-11-30 Pedro Alves <palves@redhat.com>
9007 * linux-low.c (linux_resume): Wake up the event loop before
9010 2015-11-30 Pedro Alves <palves@redhat.com>
9012 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9014 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9016 * target.c (struct thread_search): New structure.
9017 (thread_search_callback): New function.
9018 (prev_general_thread): New global.
9019 (prepare_to_access_memory, done_accessing_memory): New functions.
9020 * target.h (prepare_to_access_memory, done_accessing_memory):
9021 Replace macros with function declarations.
9023 2015-11-30 Pedro Alves <palves@redhat.com>
9026 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9027 report TARGET_WAITKIND_NO_RESUMED.
9028 * remote-utils.c (prepare_resume_reply): Handle
9029 TARGET_WAITKIND_NO_RESUMED.
9030 * server.c (report_no_resumed): New global.
9031 (handle_query) <qSupported>: Handle "no-resumed+". Report
9032 "no-resumed+" support.
9033 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9034 return error if the client doesn't support no-resumed events.
9035 (push_stop_notification): New function.
9036 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9037 events if the client supports them.
9039 2015-11-30 Pedro Alves <palves@redhat.com>
9041 * linux-low.c (thread_still_has_status_pending_p): Don't check
9043 (lwp_resumed): New function.
9044 (status_pending_p_callback): Return early if the LWP is not
9045 supposed to be resumed.
9047 2015-11-30 Pedro Alves <palves@redhat.com>
9049 * linux-low.c (handle_extended_wait): Assert that the LWP's
9050 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9051 thread create events, leave the new child's status pending.
9052 (linux_low_filter_event): If GDB wants to hear about thread exit
9053 events, leave the LWP marked dead and don't delete it.
9054 (linux_wait_for_event_filtered): Don't check for thread exit.
9055 (filter_exit_event): New function.
9056 (linux_wait_1): Use it, when returning an exit event.
9057 (linux_resume_one_lwp_throw): Assert that the LWP's
9058 waitstatus is TARGET_WAITKIND_IGNORE.
9059 * remote-utils.c (prepare_resume_reply): Handle
9060 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
9061 * server.c (report_thread_events): New global.
9062 (handle_general_set): Handle QThreadEvents.
9063 (handle_query) <qSupported>: Handle and report QThreadEvents+;
9064 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
9065 TARGET_WAITKIND_THREAD_EXITED.
9066 * server.h (report_thread_events): Declare.
9068 2015-11-30 Pedro Alves <palves@redhat.com>
9070 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
9071 the thread's last_resume_kind was resume_stop.
9073 2015-11-30 Pedro Alves <palves@redhat.com>
9075 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
9078 2015-11-30 Pedro Alves <palves@redhat.com>
9080 * server.c (handle_v_requests): Handle vCtrlC.
9082 2015-11-30 Pedro Alves <palves@redhat.com>
9084 * gdbthread.h (find_any_thread_of_pid): Declare.
9085 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
9087 * server.c (handle_query): If current_thread is NULL, look for
9088 another thread of the selected process.
9090 2015-11-26 Daniel Colascione <dancol@dancol.org>
9091 Simon Marchi <simon.marchi@ericsson.com>
9093 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9094 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9096 * target.h (struct target_ops) <thread_name>: New field.
9097 (target_thread_name): New macro.
9099 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9101 * regcache.h (regcache_invalidate_pid): Add declaration.
9102 * regcache.c (regcache_invalidate_pid): New function, extracted
9103 from regcache_invalidate.
9104 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9105 Add trivial documentation comment.
9106 * lynx-low.c: Use regcache_invalidate_pid instead of
9107 regcache_invalidate.
9109 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9111 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9112 and Elf64_auxv_t if the target is Android.
9114 2015-11-22 Doug Evans <xdje42@gmail.com>
9116 * target.h: #include <sys/types.h>.
9118 2015-11-19 Pedro Alves <palves@redhat.com>
9120 * linux-low.c (linux_process_qsupported): Change prototype.
9122 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9124 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9125 and adjust to loop over all features.
9126 * server.c (handle_query) <qSupported>: Adjust to call
9127 target_process_qsupported once, passing it a vector of unprocessed
9129 * target.h (struct target_ops) <process_qsupported>: Change
9131 (target_process_qsupported): Adjust.
9133 2015-11-19 Pedro Alves <palves@redhat.com>
9135 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9137 * configure: Regenerate.
9139 2015-11-19 Pedro Alves <palves@redhat.com>
9141 * configure: Regenerate.
9143 2015-11-19 Yao Qi <yao.qi@linaro.org>
9145 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9148 2015-11-19 Yao Qi <yao.qi@linaro.org>
9150 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9151 (struct aarch64_operand): Move enum out.
9153 2015-11-19 Yao Qi <yao.qi@linaro.org>
9155 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9156 struct user_fpsimd_state *.
9157 (aarch64_store_fpregset): Likewise.
9159 2015-11-19 Yao Qi <yao.qi@linaro.org>
9161 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9162 struct user_pt_regs *.
9163 (aarch64_store_gregset): Likewise.
9165 2015-11-18 Pedro Alves <palves@redhat.com>
9167 * Makefile.in (all_object_files): Add $IPA_OBJS.
9169 2015-11-17 Pedro Alves <palves@redhat.com>
9171 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9172 GDB_SIGNAL_0 and gdb_signal_to_string.
9174 2015-11-17 Pedro Alves <palves@redhat.com>
9176 * win32-low.c (handle_output_debug_string): Remove parameter.
9177 (win32_kill): Remove our_status local and adjust call to
9178 handle_output_debug_string.
9179 (get_child_debug_event): Adjust call to
9180 handle_output_debug_string.
9182 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9184 * linux-mips-low.c (mips_fill_gregset): Add cast.
9185 (mips_store_gregset): Likewise.
9186 (mips_fill_fpregset): Likewise.
9187 (mips_store_fpregset): Likewise.
9189 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9191 * linux-mips-low.c (mips_add_watchpoint): Rename private to
9194 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9196 * linux-mips-low.c (mips_linux_new_thread): Change type of
9197 watch_type to enum target_hw_bp_type.
9199 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9201 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
9202 Change return type to arm_hwbp_type.
9204 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9206 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
9207 (arm_store_gregset): Likewise.
9208 * linux-arm-low.c (arm_get_hwcap): Likewise.
9209 (arm_read_description): Likewise.
9211 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9213 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
9215 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9217 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
9218 (ppc_fill_vsxregset): Likewise.
9219 (ppc_store_vsxregset): Likewise.
9220 (ppc_fill_vrregset): Likewise.
9221 (ppc_store_vrregset): Likewise.
9222 (ppc_fill_evrregset): Likewise.
9223 (ppc_store_evrregset): Likewise.
9225 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9227 * linux-ppc-low.c (ppc_usrregs_info): Remove
9228 forward-declaration.
9229 (ppc_arch_setup): Move lower in file.
9231 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
9233 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
9234 (ps_pdwrite): Likewise.
9236 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
9238 * linux-arm-low.c (arm_new_thread): Move pointer dereference
9239 to after assert checks.
9241 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
9243 * proc-service.c (ps_pdread): Add/adjust casts.
9244 (ps_pdwrite): Add/adjust casts.
9246 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9248 * server.c (handle_search_memory_1): Cast return value of
9251 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9253 * server.c (write_qxfer_response): Change type of data to
9256 2015-10-29 Pedro Alves <palves@redhat.com>
9258 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
9260 2015-10-29 Pedro Alves <palves@redhat.com>
9262 * tracepoint.c (clear_installed_tracepoints): Add casts.
9264 2015-10-29 Pedro Alves <palves@redhat.com>
9266 * server.c (handle_v_cont, process_serial_event): Add enum
9267 gdb_signal casts to signal parsing code.
9269 2015-10-29 Pedro Alves <palves@redhat.com>
9271 * linux-low.h (NULL_REGSET): Define.
9272 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9273 * linux-arm-low.c (arm_regsets): Likewise.
9274 * linux-crisv32-low.c (cris_regsets): Likewise.
9275 * linux-m68k-low.c (m68k_regsets): Likewise.
9276 * linux-mips-low.c (mips_regsets): Likewise.
9277 * linux-nios2-low.c (nios2_regsets): Likewise.
9278 * linux-ppc-low.c (ppc_regsets): Likewise.
9279 * linux-s390-low.c (s390_regsets): Likewise.
9280 * linux-sh-low.c (sh_regsets): Likewise.
9281 * linux-sparc-low.c (sparc_regsets): Likewise.
9282 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9283 * linux-tile-low.c (tile_regsets): Likewise.
9284 * linux-x86-low.c (x86_regsets): Likewise.
9285 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9287 2015-10-29 Pedro Alves <palves@redhat.com>
9289 * linux-low.h (NULL_REGSET): Define.
9290 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9291 * linux-arm-low.c (arm_regsets): Likewise.
9292 * linux-crisv32-low.c (cris_regsets): Likewise.
9293 * linux-m68k-low.c (m68k_regsets): Likewise.
9294 * linux-mips-low.c (mips_regsets): Likewise.
9295 * linux-nios2-low.c (nios2_regsets): Likewise.
9296 * linux-ppc-low.c (ppc_regsets): Likewise.
9297 * linux-s390-low.c (s390_regsets): Likewise.
9298 * linux-sh-low.c (sh_regsets): Likewise.
9299 * linux-sparc-low.c (sparc_regsets): Likewise.
9300 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9301 * linux-tile-low.c (tile_regsets): Likewise.
9302 * linux-x86-low.c (x86_regsets): Likewise.
9303 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9305 2015-10-26 Doug Evans <dje@google.com>
9307 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
9309 2015-10-26 Doug Evans <dje@google.com>
9311 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
9313 2015-10-26 Doug Evans <dje@google.com>
9315 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
9317 (attach_thread, find_new_threads_callback): Ditto.
9319 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9321 * mem-break.h (set_breakpoint_data): Remove.
9323 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9325 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
9326 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9327 (initialize_low): Remove set_breakpoint_data call.
9328 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
9329 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
9330 (initialize_low): Remove set_breakpoint_data call.
9331 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
9332 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9333 (initialize_low): Remove set_breakpoint_data call.
9335 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9337 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
9338 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
9339 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
9340 * target.h (target_breakpoint_kind_from_pc): New macro.
9342 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
9344 * linux-low.c (default_breakpoint_kind_from_pc): New function.
9345 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
9346 the default breakpoint kind.
9348 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9350 * linux-arm-low.c (arm_supports_z_point_type): Add software
9353 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9355 * linux-arm-low.c: Refactor breakpoint definitions.
9356 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
9357 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
9359 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9361 * Makefile.in: Add arm.c/o.
9362 * configure.srv: Likewise.
9363 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
9364 (arm_breakpoint_kind_from_pc): New function.
9365 (arm_sw_breakpoint_from_kind): Return proper kind.
9366 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
9368 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9370 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
9372 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
9373 (struct raw_breakpoint) <size>: Remove.
9374 (struct raw_breakpoint) <kind>: Add.
9375 (bp_size): New function.
9376 (bp_opcode): Likewise.
9377 (find_raw_breakpoint_at): Adjust for kind.
9378 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
9379 (remove_memory_breakpoint): Adjust for kind call bp_size.
9380 (set_raw_breakpoint_at): Adjust for kind.
9381 (set_breakpoint): Likewise.
9382 (set_breakpoint_at): Call breakpoint_kind_from_pc.
9383 (delete_raw_breakpoint): Adjust for kind.
9384 (delete_breakpoint): Likewise.
9385 (find_gdb_breakpoint): Likewise.
9386 (set_gdb_breakpoint_1): Likewise.
9387 (set_gdb_breakpoint): Likewise.
9388 (delete_gdb_breakpoint_1): Likewise.
9389 (delete_gdb_breakpoint): Likewise.
9390 (uninsert_raw_breakpoint): Likewise.
9391 (reinsert_raw_breakpoint): Likewise.
9392 (set_breakpoint_data): Remove.
9393 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
9394 (check_mem_read): Adjust for kind call bp_size.
9395 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
9396 (clone_one_breakpoint): Adjust for kind.
9397 * mem-break.h (set_gdb_breakpoint): Likewise.
9398 (delete_gdb_breakpoint): Likewise.
9399 * server.c (process_serial_event): Likewise.
9401 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9403 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
9404 (struct linux_target_ops) <breakpoint>: Remove.
9405 (struct linux_target_ops) <breakpoint_len>: Remove.
9406 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9407 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9408 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
9409 (arm_sw_breakpoint_from_kind): New function.
9410 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
9411 (struct linux_target_ops) <breakpoint>: Remove.
9412 (struct linux_target_ops) <breakpoint_len>: Remove.
9413 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9414 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9415 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
9416 (struct linux_target_ops) <breakpoint>: Remove.
9417 (struct linux_target_ops) <breakpoint_len>: Remove.
9418 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9419 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9420 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
9421 (struct linux_target_ops) <breakpoint>: Remove.
9422 (struct linux_target_ops) <breakpoint_len>: Remove.
9423 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9424 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9425 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
9426 and sw_breakpoint_from_kind to increment the pc.
9427 (linux_breakpoint_kind_from_pc): New function.
9428 (linux_sw_breakpoint_from_kind): New function.
9429 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
9430 (initialize_low): Call breakpoint_kind_from_pc and
9431 sw_breakpoint_from_kind to replace breakpoint_data/len.
9432 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
9434 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
9435 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
9436 (struct linux_target_ops) <breakpoint>: Remove.
9437 (struct linux_target_ops) <breakpoint_len>: Remove.
9438 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9439 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9440 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
9441 (struct linux_target_ops) <breakpoint>: Remove.
9442 (struct linux_target_ops) <breakpoint_len>: Remove.
9443 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9444 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9445 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
9446 (struct linux_target_ops) <breakpoint>: Remove.
9447 (struct linux_target_ops) <breakpoint_len>: Remove.
9448 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9449 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9450 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
9451 (struct linux_target_ops) <breakpoint>: Remove.
9452 (struct linux_target_ops) <breakpoint_len>: Remove.
9453 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9454 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9455 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
9456 (struct linux_target_ops) <breakpoint>: Remove.
9457 (struct linux_target_ops) <breakpoint_len>: Remove.
9458 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9459 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9460 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
9461 (struct linux_target_ops) <breakpoint>: Remove.
9462 (struct linux_target_ops) <breakpoint_len>: Remove.
9463 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9464 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9465 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
9466 (struct linux_target_ops) <breakpoint>: Remove.
9467 (struct linux_target_ops) <breakpoint_len>: Remove.
9468 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9469 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9470 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
9471 (struct linux_target_ops) <breakpoint>: Remove.
9472 (struct linux_target_ops) <breakpoint_len>: Remove.
9473 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9474 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9475 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
9476 (struct linux_target_ops) <breakpoint>: Remove.
9477 (struct linux_target_ops) <breakpoint_len>: Remove.
9478 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9479 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9480 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
9481 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
9482 (struct linux_target_ops) <breakpoint>: Remove.
9483 (struct linux_target_ops) <breakpoint_len>: Remove.
9484 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9485 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9486 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
9487 (struct linux_target_ops) <breakpoint>: Remove.
9488 (struct linux_target_ops) <breakpoint_len>: Remove.
9489 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9490 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9492 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9494 * linux-cris-low.c (cris_get_pc): Remove void arg.
9496 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9498 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
9501 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9503 * inferiors.c (thread_pid_matches_callback): New function.
9504 (find_thread_process): New function.
9505 (remove_thread): Reset current_thread.
9506 (remove_process): Assert threads have been removed first.
9508 2015-10-15 Yao Qi <yao.qi@linaro.org>
9510 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
9512 (aarch64_remove_point): Likewise.
9513 * regcache.c (regcache_register_size): New function.
9515 2015-10-12 Yao Qi <yao.qi@linaro.org>
9517 * linux-aarch64-low.c: Update all callers as emit_load_store
9518 is renamed to aarch64_emit_load_store.
9520 2015-10-12 Yao Qi <yao.qi@linaro.org>
9522 * linux-aarch64-low.c: Update all callers of function renaming
9523 from emit_insn to aarch64_emit_insn.
9525 2015-10-12 Yao Qi <yao.qi@linaro.org>
9527 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
9528 arch/aarch64-insn.h.
9529 (struct aarch64_memory_operand): Likewise.
9531 (emit_insn): Move to arch/aarch64-insn.c.
9532 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
9533 (emit_load_store): Move to arch/aarch64-insn.c.
9534 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
9535 (can_encode_int32): Remove.
9537 2015-10-12 Yao Qi <yao.qi@linaro.org>
9539 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
9540 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
9541 (aarch64_relocate_instruction): Likewise.
9542 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
9543 (struct aarch64_insn_visitor): Likewise.
9545 2015-10-12 Yao Qi <yao.qi@linaro.org>
9547 * linux-aarch64-low.c (struct aarch64_insn_data): New.
9548 (struct aarch64_insn_visitor): New.
9549 (struct aarch64_insn_relocation_data): New.
9550 (aarch64_ftrace_insn_reloc_b): New function.
9551 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
9552 (aarch64_ftrace_insn_reloc_cb): Likewise.
9553 (aarch64_ftrace_insn_reloc_tb): Likewise.
9554 (aarch64_ftrace_insn_reloc_adr): Likewise.
9555 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
9556 (aarch64_ftrace_insn_reloc_others): Likewise.
9558 (aarch64_relocate_instruction): Use visitor.
9560 2015-10-12 Yao Qi <yao.qi@linaro.org>
9562 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
9563 int. Add argument buf.
9564 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
9565 aarch64_relocate_instruction.
9567 2015-10-12 Yao Qi <yao.qi@linaro.org>
9569 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
9570 argument insn. Remove local variable insn. Don't call
9572 (aarch64_install_fast_tracepoint_jump_pad): Call
9575 2015-09-30 Yao Qi <yao.qi@linaro.org>
9577 * linux-aarch64-low.c (emit_movk): Shorten a long line.
9578 (emit_load_store_pair): Likewise.
9580 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9582 * dll.c (match_dll): Add cast(s).
9583 (unloaded_dll): Likewise.
9584 * linux-low.c (second_thread_of_pid_p): Likewise.
9585 (delete_lwp_callback): Likewise.
9586 (count_events_callback): Likewise.
9587 (select_event_lwp_callback): Likewise.
9588 (linux_set_resume_request): Likewise.
9589 * server.c (accumulate_file_name_length): Likewise.
9590 (emit_dll_description): Likewise.
9591 (handle_qxfer_threads_worker): Likewise.
9592 (visit_actioned_threads): Likewise.
9593 * thread-db.c (any_thread_of): Likewise.
9594 * tracepoint.c (same_process_p): Likewise.
9595 (match_blocktype): Likewise.
9596 (build_traceframe_info_xml): Likewise.
9598 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9600 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
9602 (gdb_unparse_agent_expr): Likewise.
9603 * hostio.c (require_data): Likewise.
9604 (handle_pread): Likewise.
9605 * linux-low.c (disable_regset): Likewise.
9606 (fetch_register): Likewise.
9607 (store_register): Likewise.
9608 (get_dynamic): Likewise.
9609 (linux_qxfer_libraries_svr4): Likewise.
9610 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
9611 (set_fast_tracepoint_jump): Likewise.
9612 (uninsert_fast_tracepoint_jumps_at): Likewise.
9613 (reinsert_fast_tracepoint_jumps_at): Likewise.
9614 (validate_inserted_breakpoint): Likewise.
9615 (clone_agent_expr): Likewise.
9616 * regcache.c (init_register_cache): Likewise.
9617 * remote-utils.c (putpkt_binary_1): Likewise.
9618 (decode_M_packet): Likewise.
9619 (decode_X_packet): Likewise.
9620 (look_up_one_symbol): Likewise.
9621 (relocate_instruction): Likewise.
9622 (monitor_output): Likewise.
9623 * server.c (handle_search_memory): Likewise.
9624 (handle_qxfer_exec_file): Likewise.
9625 (handle_qxfer_libraries): Likewise.
9626 (handle_qxfer): Likewise.
9627 (handle_query): Likewise.
9628 (handle_v_cont): Likewise.
9629 (handle_v_run): Likewise.
9630 (captured_main): Likewise.
9631 * target.c (write_inferior_memory): Likewise.
9632 * thread-db.c (try_thread_db_load_from_dir): Likewise.
9633 * tracepoint.c (init_trace_buffer): Likewise.
9634 (add_tracepoint_action): Likewise.
9635 (add_traceframe): Likewise.
9636 (add_traceframe_block): Likewise.
9637 (cmd_qtdpsrc): Likewise.
9638 (cmd_qtdv): Likewise.
9639 (cmd_qtstatus): Likewise.
9640 (response_source): Likewise.
9641 (response_tsv): Likewise.
9642 (cmd_qtnotes): Likewise.
9643 (gdb_collect): Likewise.
9644 (initialize_tracepoint): Likewise.
9646 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9648 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
9649 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
9650 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
9652 (enum aarch64_condition_codes): New enum.
9653 (w0): New static global.
9656 (struct aarch64_memory_operand) <type>: New
9657 MEMORY_OPERAND_POSTINDEX type.
9658 (postindex_memory_operand): New helper function.
9659 (emit_ret): New function.
9660 (emit_load_store_pair): New function, factored out of emit_stp
9661 with support for MEMORY_OPERAND_POSTINDEX.
9662 (emit_stp): Rewrite using emit_load_store_pair.
9663 (emit_ldp): New function.
9664 (emit_load_store): Likewise.
9665 (emit_ldr): Mention post-index instruction in comment.
9666 (emit_ldrh): New function.
9667 (emit_ldrb): New function.
9668 (emit_ldrsw): Mention post-index instruction in comment.
9669 (emit_str): Likewise.
9670 (emit_subs): New function.
9671 (emit_cmp): Likewise.
9672 (emit_and): Likewise.
9673 (emit_orr): Likewise.
9674 (emit_orn): Likewise.
9675 (emit_eor): Likewise.
9676 (emit_mvn): Likewise.
9677 (emit_lslv): Likewise.
9678 (emit_lsrv): Likewise.
9679 (emit_asrv): Likewise.
9680 (emit_mul): Likewise.
9681 (emit_sbfm): Likewise.
9682 (emit_sbfx): Likewise.
9683 (emit_ubfm): Likewise.
9684 (emit_ubfx): Likewise.
9685 (emit_csinc): Likewise.
9686 (emit_cset): Likewise.
9687 (emit_nop): Likewise.
9688 (emit_ops_insns): New helper function.
9689 (emit_pop): Likewise.
9690 (emit_push): Likewise.
9691 (aarch64_emit_prologue): New function.
9692 (aarch64_emit_epilogue): Likewise.
9693 (aarch64_emit_add): Likewise.
9694 (aarch64_emit_sub): Likewise.
9695 (aarch64_emit_mul): Likewise.
9696 (aarch64_emit_lsh): Likewise.
9697 (aarch64_emit_rsh_signed): Likewise.
9698 (aarch64_emit_rsh_unsigned): Likewise.
9699 (aarch64_emit_ext): Likewise.
9700 (aarch64_emit_log_not): Likewise.
9701 (aarch64_emit_bit_and): Likewise.
9702 (aarch64_emit_bit_or): Likewise.
9703 (aarch64_emit_bit_xor): Likewise.
9704 (aarch64_emit_bit_not): Likewise.
9705 (aarch64_emit_equal): Likewise.
9706 (aarch64_emit_less_signed): Likewise.
9707 (aarch64_emit_less_unsigned): Likewise.
9708 (aarch64_emit_ref): Likewise.
9709 (aarch64_emit_if_goto): Likewise.
9710 (aarch64_emit_goto): Likewise.
9711 (aarch64_write_goto_address): Likewise.
9712 (aarch64_emit_const): Likewise.
9713 (aarch64_emit_call): Likewise.
9714 (aarch64_emit_reg): Likewise.
9715 (aarch64_emit_pop): Likewise.
9716 (aarch64_emit_stack_flush): Likewise.
9717 (aarch64_emit_zero_ext): Likewise.
9718 (aarch64_emit_swap): Likewise.
9719 (aarch64_emit_stack_adjust): Likewise.
9720 (aarch64_emit_int_call_1): Likewise.
9721 (aarch64_emit_void_call_2): Likewise.
9722 (aarch64_emit_eq_goto): Likewise.
9723 (aarch64_emit_ne_goto): Likewise.
9724 (aarch64_emit_lt_goto): Likewise.
9725 (aarch64_emit_le_goto): Likewise.
9726 (aarch64_emit_gt_goto): Likewise.
9727 (aarch64_emit_ge_got): Likewise.
9728 (aarch64_emit_ops_impl): New static global variable.
9729 (aarch64_emit_ops): New target function, return
9730 &aarch64_emit_ops_impl.
9731 (struct linux_target_ops): Install it.
9733 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9735 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
9736 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
9738 * linux-aarch64-ipa.c: New file.
9739 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
9741 (aarch64_get_thread_area): New target method.
9742 (extract_signed_bitfield): New helper function.
9743 (aarch64_decode_ldr_literal): New function.
9744 (enum aarch64_opcodes): New enum.
9745 (struct aarch64_register): New struct.
9746 (struct aarch64_operand): New struct.
9747 (x0): New static global.
9756 (aarch64_register): New helper function.
9757 (register_operand): Likewise.
9758 (immediate_operand): Likewise.
9759 (struct aarch64_memory_operand): New struct.
9760 (offset_memory_operand): New helper function.
9761 (preindex_memory_operand): Likewise.
9762 (enum aarch64_system_control_registers): New enum.
9763 (ENCODE): New macro.
9764 (emit_insn): New helper function.
9765 (emit_b): New function.
9766 (emit_bcond): Likewise.
9767 (emit_cb): Likewise.
9768 (emit_tb): Likewise.
9769 (emit_blr): Likewise.
9770 (emit_stp): Likewise.
9771 (emit_ldp_q_offset): Likewise.
9772 (emit_stp_q_offset): Likewise.
9773 (emit_load_store): Likewise.
9774 (emit_ldr): Likewise.
9775 (emit_ldrsw): Likewise.
9776 (emit_str): Likewise.
9777 (emit_ldaxr): Likewise.
9778 (emit_stxr): Likewise.
9779 (emit_stlr): Likewise.
9780 (emit_data_processing_reg): Likewise.
9781 (emit_data_processing): Likewise.
9782 (emit_add): Likewise.
9783 (emit_sub): Likewise.
9784 (emit_mov): Likewise.
9785 (emit_movk): Likewise.
9786 (emit_mov_addr): Likewise.
9787 (emit_mrs): Likewise.
9788 (emit_msr): Likewise.
9789 (emit_sevl): Likewise.
9790 (emit_wfe): Likewise.
9791 (append_insns): Likewise.
9792 (can_encode_int32_in): New helper function.
9793 (aarch64_relocate_instruction): New function.
9794 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
9795 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
9796 (struct linux_target_ops): Install aarch64_get_thread_area,
9797 aarch64_install_fast_tracepoint_jump_pad and
9798 aarch64_get_min_fast_tracepoint_insn_len.
9800 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9802 * Makefile.in (aarch64-insn.o): New rule.
9803 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
9805 2015-09-21 Yao Qi <yao.qi@linaro.org>
9807 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
9809 2015-09-21 Yao Qi <yao.qi@linaro.org>
9811 * tracepoint.c (max_jump_pad_size): Remove.
9813 2015-09-18 Yao Qi <yao.qi@linaro.org>
9815 * linux-aarch64-low.c: Don't include sys/uio.h.
9816 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
9818 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
9820 * tracepoint.c (eval_result_type): Change prototype.
9821 (condition_true_at_tracepoint): Fix argument to compiled_cond.
9823 2015-09-15 Pedro Alves <palves@redhat.com>
9825 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
9826 Check whether to report exec events instead of checking whether
9827 multiprocess is enabled.
9829 2015-09-15 Pedro Alves <palves@redhat.com>
9832 * remote-utils.c (prepare_resume_reply): Merge
9833 TARGET_WAITKIND_VFORK_DONE switch case with the
9834 TARGET_WAITKIND_FORKED case.
9836 2015-09-15 Yao Qi <yao.qi@linaro.org>
9838 * server.c (handle_query): Check string comparison using
9839 "else if" instead of "if".
9841 2015-09-15 Yao Qi <yao.qi@linaro.org>
9843 * server.c (vCont_supported): New global variable.
9844 (handle_query): Set vCont_supported to 1 if "vContSupported+"
9845 matches. Append ";vContSupported+" to own_buf.
9846 (handle_v_requests): Append ";s;S" to own_buf if target supports
9847 hardware single step or vCont_supported is false.
9848 (capture_main): Set vCont_supported to zero.
9850 2015-09-15 Yao Qi <yao.qi@linaro.org>
9852 * linux-low.c (linux_supports_conditional_breakpoints): Rename
9854 (linux_supports_hardware_single_step): ... New function.
9855 (linux_target_ops): Update.
9856 * lynx-low.c (lynx_target_ops): Set field
9857 supports_hardware_single_step to target_can_do_hardware_single_step.
9858 * nto-low.c (nto_target_ops): Likewise.
9859 * spu-low.c (spu_target_ops): Likewise.
9860 * win32-low.c (win32_target_ops): Likewise.
9861 * target.c (target_can_do_hardware_single_step): New function.
9862 * target.h (struct target_ops) <supports_conditional_breakpoints>:
9863 Remove. <supports_hardware_single_step>: New field.
9864 (target_supports_conditional_breakpoints): Remove.
9865 (target_supports_hardware_single_step): New macro.
9866 (target_can_do_hardware_single_step): Declare.
9867 * server.c (handle_query): Use target_supports_hardware_single_step
9868 instead of target_supports_conditional_breakpoints.
9870 2015-09-15 Yao Qi <yao.qi@linaro.org>
9872 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
9874 (struct linux_target_ops the_low_target): Install
9875 aarch64_linux_siginfo_fixup.
9877 2015-09-11 Don Breazeal <donb@codesourcery.com>
9878 Luis Machado <lgustavo@codesourcery.com>
9880 * linux-low.c (linux_mourn): Static declaration.
9881 (linux_arch_setup): Move in front of
9882 handle_extended_wait.
9883 (linux_arch_setup_thread): New function.
9884 (handle_extended_wait): Handle exec events. Call
9885 linux_arch_setup_thread. Make event_lwp argument a
9886 pointer-to-a-pointer.
9887 (check_zombie_leaders): Do not check stopped threads.
9888 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
9889 (linux_low_filter_event): Add lwp and thread for exec'ing
9890 non-leader thread if leader thread has been deleted.
9891 Refactor code into linux_arch_setup_thread and call it.
9892 Pass child lwp pointer by reference to handle_extended_wait.
9893 (linux_wait_for_event_filtered): Update comment.
9894 (linux_wait_1): Prevent clobbering exec event status.
9895 (linux_supports_exec_events): New function.
9896 (linux_target_ops) <supports_exec_events>: Initialize new member.
9897 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
9899 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
9900 * server.c (report_exec_events): New global variable.
9901 (handle_query): Handle qSupported query for exec-events feature.
9902 (captured_main): Initialize report_exec_events.
9903 * server.h (report_exec_events): Declare new global variable.
9904 * target.h (struct target_ops) <supports_exec_events>: New
9906 (target_supports_exec_events): New macro.
9907 * win32-low.c (win32_target_ops) <supports_exec_events>:
9908 Initialize new member.
9910 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
9912 * linux-low.c (linux_low_enable_btrace): Remove.
9913 (linux_target_ops): Replace linux_low_enable_btrace with
9914 linux_enable_btrace.
9916 2015-09-03 Yao Qi <yao.qi@linaro.org>
9918 * linux-aarch64-low.c (aarch64_insert_point): Call
9919 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
9922 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9924 * linux-low.c (check_stopped_by_breakpoint): Use
9925 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
9927 2015-08-27 Pedro Alves <palves@redhat.com>
9929 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
9931 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
9933 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
9934 the XNEW-family equivalent.
9935 (compile_bytecodes): Likewise.
9936 * dll.c (loaded_dll): Likewise.
9937 * event-loop.c (append_callback_event): Likewise.
9938 (create_file_handler): Likewise.
9939 (create_file_event): Likewise.
9940 * hostio.c (handle_open): Likewise.
9941 * inferiors.c (add_thread): Likewise.
9942 (add_process): Likewise.
9943 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
9944 * linux-arm-low.c (arm_new_process): Likewise.
9945 (arm_new_thread): Likewise.
9946 * linux-low.c (add_to_pid_list): Likewise.
9947 (linux_add_process): Likewise.
9948 (handle_extended_wait): Likewise.
9949 (add_lwp): Likewise.
9950 (enqueue_one_deferred_signal): Likewise.
9951 (enqueue_pending_signal): Likewise.
9952 (linux_resume_one_lwp_throw): Likewise.
9953 (linux_resume_one_thread): Likewise.
9954 (linux_read_memory): Likewise.
9955 (linux_write_memory): Likewise.
9956 * linux-mips-low.c (mips_linux_new_process): Likewise.
9957 (mips_linux_new_thread): Likewise.
9958 (mips_add_watchpoint): Likewise.
9959 * linux-x86-low.c (initialize_low_arch): Likewise.
9960 * lynx-low.c (lynx_add_process): Likewise.
9961 * mem-break.c (set_raw_breakpoint_at): Likewise.
9962 (set_breakpoint): Likewise.
9963 (add_condition_to_breakpoint): Likewise.
9964 (add_commands_to_breakpoint): Likewise.
9965 (clone_agent_expr): Likewise.
9966 (clone_one_breakpoint): Likewise.
9967 * regcache.c (new_register_cache): Likewise.
9968 * remote-utils.c (look_up_one_symbol): Likewise.
9969 * server.c (queue_stop_reply): Likewise.
9970 (start_inferior): Likewise.
9971 (queue_stop_reply_callback): Likewise.
9972 (handle_target_event): Likewise.
9973 * spu-low.c (fetch_ppc_memory): Likewise.
9974 (store_ppc_memory): Likewise.
9975 * target.c (set_target_ops): Likewise.
9976 * thread-db.c (thread_db_load_search): Likewise.
9977 (try_thread_db_load_1): Likewise.
9978 * tracepoint.c (add_tracepoint): Likewise.
9979 (add_tracepoint_action): Likewise.
9980 (create_trace_state_variable): Likewise.
9981 (cmd_qtdpsrc): Likewise.
9982 (cmd_qtro): Likewise.
9983 (add_while_stepping_state): Likewise.
9984 * win32-low.c (child_add_thread): Likewise.
9985 (get_image_name): Likewise.
9987 2015-08-25 Yao Qi <yao.qi@linaro.org>
9989 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
9991 2015-08-25 Yao Qi <yao.qi@linaro.org>
9993 * Makefile.in (aarch64-linux.o): New rule.
9994 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
9996 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
9997 (aarch64_init_debug_reg_state): Make it extern.
9998 (aarch64_linux_prepare_to_resume): Remove.
10000 2015-08-25 Yao Qi <yao.qi@linaro.org>
10002 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10003 lwp_arch_private_info and ptid_of_lwp.
10005 2015-08-25 Yao Qi <yao.qi@linaro.org>
10007 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10008 Find proc_info by find_process_pid. All callers updated.
10010 2015-08-25 Yao Qi <yao.qi@linaro.org>
10012 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10014 (debug_reg_change_callback): Remove.
10015 (aarch64_notify_debug_reg_change): Remove.
10017 2015-08-25 Yao Qi <yao.qi@linaro.org>
10019 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10020 Call current_lwp_ptid.
10022 2015-08-25 Yao Qi <yao.qi@linaro.org>
10024 * linux-aarch64-low.c (debug_reg_change_callback): Use
10027 2015-08-25 Yao Qi <yao.qi@linaro.org>
10029 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10031 2015-08-25 Yao Qi <yao.qi@linaro.org>
10033 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10035 2015-08-25 Yao Qi <yao.qi@linaro.org>
10037 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10040 2015-08-25 Yao Qi <yao.qi@linaro.org>
10042 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10044 (debug_reg_change_callback): Remove argument entry and add argument
10045 lwp. Remove local variable thread. Don't print thread id in the
10046 debugging output. Don't check whether pid of thread equals to pid.
10047 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10048 iterate_over_lwps instead find_inferior.
10050 2015-08-24 Pedro Alves <palves@redhat.com>
10052 * inferiors.c (get_first_process): New function.
10053 * inferiors.h (get_first_process): New declaration.
10054 * remote-utils.c (read_ptid): Default to the first process in the
10055 list, instead of to the current thread's process.
10057 2015-08-24 Pedro Alves <palves@redhat.com>
10059 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
10060 * event-loop.c: Likewise.
10061 * remote-utils.c: Likewise.
10062 * tracepoint.c: Likewise.
10064 2015-08-24 Pedro Alves <palves@redhat.com>
10066 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
10069 2015-08-21 Pedro Alves <palves@redhat.com>
10071 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
10072 instead of literal 1.
10074 2015-08-21 Pedro Alves <palves@redhat.com>
10076 * tdesc.c (default_description): Explicitly zero-initialize.
10078 2015-08-21 Pedro Alves <palves@redhat.com>
10081 * inferiors.c (remove_thread): Discard any pending stop reply for
10083 * server.c (remove_all_on_match_pid): Rename to ...
10084 (remove_all_on_match_ptid): ... this. Work with a filter ptid
10086 (discard_queued_stop_replies): Change parameter to a ptid. Now
10088 (handle_v_kill, kill_inferior_callback, captured_main)
10089 (process_serial_event): Adjust.
10090 * server.h (discard_queued_stop_replies): Declare.
10092 2015-08-21 Pedro Alves <palves@redhat.com>
10094 * linux-low.c (wait_for_sigstop): Always switch to no thread
10095 selected if the previously current thread dies.
10096 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10097 process instead of the current thread's.
10098 * remote-utils.c (input_interrupt): Don't check if there's no
10100 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10101 current thread to the general thread fails, error out.
10102 (handle_qxfer_auxv, handle_qxfer_libraries)
10103 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10104 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10105 (handle_query): Check if there's a thread selected instead of
10106 checking whether there's any thread in the thread list.
10107 (handle_qxfer_threads, handle_qxfer_btrace)
10108 (handle_qxfer_btrace_conf): Don't error out early if there's no
10109 thread in the thread list.
10110 (handle_v_cont, myresume): Don't set the current thread to the
10112 (process_serial_event) <Hg handling>: Also set thread_id if the
10113 previous general thread is still alive.
10114 (process_serial_event) <g/G handling>: If setting the current
10115 thread to the general thread fails, error out.
10116 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10117 thread's lwp instead of the current thread's.
10118 * target.c (set_desired_thread): If the desired thread was not
10119 found, leave the current thread pointing to NULL. Return an int
10120 (boolean) indicating success.
10121 * target.h (set_desired_thread): Change return type to int.
10123 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10125 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10126 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10128 (ps_get_thread_area): New function.
10130 2015-08-19 Gary Benson <gbenson@redhat.com>
10132 * hostio.c (handle_pread): Do not attempt to read more data
10133 than hostio_reply_with_data can fit in a packet.
10135 2015-08-18 Joel Brobecker <brobecker@adacore.com>
10137 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10139 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10141 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10143 2015-08-06 Pedro Alves <palves@redhat.com>
10145 * tracepoint.c (expr_eval_result): Now an int.
10147 2015-08-06 Pedro Alves <palves@redhat.com>
10149 * gdbthread.h (struct regcache): Forward declare.
10150 (struct thread_info) <regcache_data>: Now a struct regcache
10152 * inferiors.c (inferior_regcache_data)
10153 (set_inferior_regcache_data): Now work with struct regcache
10155 * inferiors.h (struct regcache): Forward declare.
10156 (inferior_regcache_data, set_inferior_regcache_data): Now work
10157 with struct regcache pointers.
10158 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10159 (free_register_cache_thread): Remove struct regcache pointer
10162 2015-08-06 Pedro Alves <palves@redhat.com>
10164 * server.c (captured_main): On error, print the exception message
10165 to stderr, and if run_once is set, throw a quit.
10167 2015-08-06 Pedro Alves <palves@redhat.com>
10169 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10170 the current thread.
10172 2015-08-06 Pedro Alves <palves@redhat.com>
10174 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10175 reading beyond the passed in buffer length.
10177 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
10179 * tracepoint.c (symbol_list) <required>: Remove.
10181 2015-08-06 Pedro Alves <palves@redhat.com>
10183 * linux-low.c (handle_extended_wait): Set the fork child's suspend
10184 count if stopping and suspending threads.
10185 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
10186 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
10187 (linux_detach): Complete an ongoing step-over.
10188 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
10190 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
10191 (linux_wait_1): If passing a signal to the inferior after
10192 finishing a step-over, unsuspend and re-resume all lwps. If we
10193 see a single-step event but the thread should be continuing, don't
10194 pass the trap to gdb.
10195 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
10196 internal_error instead of gdb_assert.
10197 (enqueue_pending_signal): New function.
10198 (check_ptrace_stopped_lwp_gone): Add debug output.
10199 (start_step_over): Use internal_error instead of gdb_assert.
10200 (complete_ongoing_step_over): New function.
10201 (linux_resume_one_thread): Don't resume a suspended thread.
10202 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
10205 2015-08-06 Pedro Alves <palves@redhat.com>
10207 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
10208 (linux_thread_alive): Use lwp_is_marked_dead.
10209 (extended_event_reported): Delete.
10210 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
10211 instead of extended_event_reported.
10212 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
10214 (lwp_is_marked_dead): New function.
10215 (lwp_running): Use lwp_is_marked_dead.
10216 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
10219 2015-08-06 Pedro Alves <palves@redhat.com>
10221 * linux-low.c (linux_wait_1): Move fork event output out of the
10222 !report_to_gdb check. Pass event_child->waitstatus to
10223 target_waitstatus_to_string instead of ourstatus.
10225 2015-08-04 Yao Qi <yao.qi@linaro.org>
10227 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
10228 if current_thread is 32 bit.
10230 2015-08-04 Yao Qi <yao.qi@linaro.org>
10232 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
10233 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
10234 * server.c (extended_protocol): Remove "static".
10235 * server.h (extended_protocol): Declare it.
10237 2015-08-04 Yao Qi <yao.qi@linaro.org>
10239 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
10240 both aarch64 and aarch32.
10241 (aarch64_set_pc): Likewise.
10243 2015-08-04 Yao Qi <yao.qi@linaro.org>
10245 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
10246 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
10247 arm-with-neon.xml to srv_xmlfiles.
10248 * linux-aarch64-low.c: Include linux-aarch32-low.h.
10249 (is_64bit_tdesc): New function.
10250 (aarch64_linux_read_description): New function.
10251 (aarch64_arch_setup): Call aarch64_linux_read_description.
10252 (regs_info): Rename to regs_info_aarch64.
10253 (aarch64_regs_info): Return right regs_info.
10254 (initialize_low_arch): Call initialize_low_arch_aarch32.
10256 2015-08-04 Yao Qi <yao.qi@linaro.org>
10258 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
10259 * linux-aarch32-low.c: New file.
10260 * linux-aarch32-low.h: New file.
10261 * linux-arm-low.c (arm_fill_gregset): Move it to
10262 linux-aarch32-low.c.
10263 (arm_store_gregset): Likewise.
10264 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
10265 (arm_store_vfpregset): Call arm_store_vfpregset_num.
10266 (arm_arch_setup): Check if PTRACE_GETREGSET works.
10267 (regs_info): Rename to regs_info_arm.
10268 (arm_regs_info): Return regs_info_aarch32 if
10269 have_ptrace_getregset is 1 and target description is
10270 arm_with_neon or arm_with_vfpv3.
10271 (initialize_low_arch): Don't call init_registers_arm_with_neon.
10272 Call initialize_low_arch_aarch32 instead.
10274 2015-08-04 Yao Qi <yao.qi@linaro.org>
10276 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
10277 * linux-low.c: ... here.
10278 * linux-low.h (have_ptrace_getregset): Declare it.
10280 2015-08-04 Pedro Alves <palves@redhat.com>
10282 * thread-db.c (struct thread_db): Use new typedefs.
10283 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
10285 (disable_thread_event_reporting): Cast result of dlsym to
10286 destination function pointer type.
10287 (thread_db_mourn): Use td_ta_delete_ftype.
10289 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
10291 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
10293 (CDX_BREAKPOINT): Define for R2.
10294 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
10295 (the_low_target): Add comments.
10297 2015-07-30 Yao Qi <yao.qi@linaro.org>
10299 * linux-arm-low.c (arm_hwcap): Remove it.
10300 (arm_read_description): New local variable arm_hwcap. Don't
10301 set arm_hwcap to zero.
10303 2015-07-30 Yao Qi <yao.qi@linaro.org>
10305 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
10306 Use regcache->tdesc instead.
10307 (arm_store_wmmxregset): Likewise.
10308 (arm_fill_vfpregset): Likewise.
10309 (arm_store_vfpregset): Likewise.
10311 2015-07-30 Yao Qi <yao.qi@linaro.org>
10313 * linux-arm-low.c: Include arch/arm.h.
10314 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
10315 (arm_store_gregset): Likewise.
10317 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
10319 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
10320 ptrace's 4th parameter.
10322 2015-07-27 Yao Qi <yao.qi@linaro.org>
10324 * configure.srv (case aarch64*-*-linux*): Don't set
10327 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
10329 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
10331 * linux-arm-low.c: Likewise.
10332 * linux-cris-low.c: Likewise.
10333 * linux-crisv32-low.c: Likewise.
10334 * linux-low.c: Likewise.
10335 * linux-m68k-low.c: Likewise.
10336 * linux-mips-low.c: Likewise.
10337 * linux-nios2-low.c: Likewise.
10338 * linux-s390-low.c: Likewise.
10339 * linux-sparc-low.c: Likewise.
10340 * linux-tic6x-low.c: Likewise.
10341 * linux-tile-low.c: Likewise.
10342 * linux-x86-low.c: Likewise.
10344 2015-07-24 Pedro Alves <palves@redhat.com>
10346 * config.in: Regenerate.
10347 * configure: Regenerate.
10349 2015-07-24 Pedro Alves <palves@redhat.com>
10351 * acinclude.m4: Include ../ptrace.m4.
10352 * configure.ac: Call GDB_AC_PTRACE.
10353 * config.in, configure: Regenerate.
10355 2015-07-24 Yao Qi <yao.qi@linaro.org>
10357 * linux-low.c (linux_create_inferior): Remove setting to
10358 proc->priv->new_inferior.
10359 (linux_attach): Likewise.
10360 (linux_low_filter_event): Likewise.
10361 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
10363 2015-07-24 Yao Qi <yao.qi@linaro.org>
10365 * linux-low.c (linux_arch_setup): New function.
10366 (linux_low_filter_event): If proc->tdesc is NULL and
10367 proc->attached is true, call the_low_target.arch_setup.
10368 Otherwise, keep status pending, and return.
10369 (linux_resume_one_lwp_throw): Don't call get_pc if
10370 thread->while_stepping isn't NULL. Don't call
10371 get_thread_regcache if proc->tdesc is NULL.
10372 (need_step_over_p): Return 0 if proc->tdesc is NULL.
10373 (linux_target_ops): Install arch_setup.
10374 * server.c (start_inferior): Call the_target->arch_setup.
10375 * target.h (struct target_ops) <arch_setup>: New field.
10376 (target_arch_setup): New marco.
10377 * lynx-low.c (lynx_target_ops): Update.
10378 * nto-low.c (nto_target_ops): Update.
10379 * spu-low.c (spu_target_ops): Update.
10380 * win32-low.c (win32_target_ops): Update.
10382 2015-07-24 Yao Qi <yao.qi@linaro.org>
10384 * linux-low.c (linux_add_process): Don't set
10385 proc->priv->new_inferior.
10386 (linux_create_inferior): Set proc->priv->new_inferior to 1.
10387 (linux_attach): Likewise.
10389 2015-07-24 Yao Qi <yao.qi@linaro.org>
10391 * server.c (start_inferior): Code refactor.
10393 2015-07-24 Yao Qi <yao.qi@linaro.org>
10395 * server.c (process_serial_event): Set general_thread.
10397 2015-07-21 Yao Qi <yao.qi@linaro.org>
10399 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
10400 aarch64_linux_get_debug_reg_capacity.
10402 2015-07-17 Yao Qi <yao.qi@linaro.org>
10404 * Makefile.in (aarch64-linux-hw-point.o): New rule.
10405 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
10406 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
10407 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
10408 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
10409 (AARCH64_HWP_ALIGNMENT): Likewise.
10410 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
10411 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
10412 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
10413 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
10414 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
10415 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
10416 (struct aarch64_debug_reg_state): Likewise.
10417 (struct arch_lwp_info): Likewise.
10418 (aarch64_align_watchpoint): Likewise.
10419 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
10420 (aarch64_watchpoint_length): Likewise.
10421 (aarch64_point_encode_ctrl_reg): Likewise
10422 (aarch64_point_is_aligned): Likewise.
10423 (aarch64_align_watchpoint): Likewise.
10424 (aarch64_linux_set_debug_regs):
10425 (aarch64_dr_state_insert_one_point): Likewise.
10426 (aarch64_dr_state_remove_one_point): Likewise.
10427 (aarch64_handle_breakpoint): Likewise.
10428 (aarch64_handle_aligned_watchpoint): Likewise.
10429 (aarch64_handle_unaligned_watchpoint): Likewise.
10430 (aarch64_handle_watchpoint): Likewise.
10432 2015-07-17 Yao Qi <yao.qi@linaro.org>
10434 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
10435 and don't aarch64_get_debug_reg_state. All callers update.
10436 (aarch64_handle_aligned_watchpoint): Likewise.
10437 (aarch64_handle_unaligned_watchpoint): Likewise.
10438 (aarch64_handle_watchpoint): Likewise.
10439 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
10440 (aarch64_remove_point): Likewise.
10442 2015-07-17 Yao Qi <yao.qi@linaro.org>
10444 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
10446 (aarch64_handle_unaligned_watchpoint): Likewise.
10448 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10450 Revert the previous 3 commits:
10451 Move gdb_regex* to common/
10452 Move linux_find_memory_regions_full & co.
10453 gdbserver build-id attribute generator
10455 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10456 Jan Kratochvil <jan.kratochvil@redhat.com>
10458 gdbserver build-id attribute generator.
10459 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
10460 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
10461 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
10463 (get_dynamic): Use find_pdhr to traverse program headers.
10464 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
10465 (compare_mapping_entry_range, struct find_memory_region_callback_data)
10466 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
10467 (get_hex_build_id): New.
10468 (linux_qxfer_libraries_svr4): Add optional build-id attribute
10469 to reply XML document.
10471 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10472 Jan Kratochvil <jan.kratochvil@redhat.com>
10474 * target.c: Include target/target-utils.h and fcntl.h.
10475 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
10476 (target_fileio_read_stralloc): New functions.
10478 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10480 * Makefile.in (OBS): Add gdb_regex.o.
10481 (gdb_regex.o): New.
10482 * config.in: Rebuilt.
10483 * configure: Rebuilt.
10485 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10486 Jan Kratochvil <jan.kratochvil@redhat.com>
10488 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
10489 * Makefile.in (OBS): Add target-utils.o.
10490 (linux-maps.o, target-utils.o): New.
10491 * configure.srv (srv_linux_obj): Add linux-maps.o.
10493 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
10495 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
10496 function, return 1.
10497 (the_low_target): Install it.
10499 2015-07-14 Pedro Alves <palves@redhat.com>
10501 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
10502 Instead, ignore ECHILD, and throw an error for other errnos.
10504 2015-07-10 Pedro Alves <palves@redhat.com>
10506 * event-loop.c (struct callback_event) <data>: Change type to
10507 gdb_client_data instance instead of gdb_client_data pointer.
10508 (append_callback_event): Adjust.
10510 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
10512 * linux-aarch64-low.c: Add comments for each linux_target_ops
10513 method. Remove comments already covered in target_ops and
10514 linux_target_ops definitions.
10515 (the_low_target): Add comments for each unimplemented method.
10517 2015-07-09 Yao Qi <yao.qi@linaro.org>
10519 * linux-aarch64-low.c (aarch64_regmap): Remove.
10520 (aarch64_usrregs_info): Remove.
10521 (regs_info): Set field usrregs to NULL.
10523 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
10525 * linux-low.c: Include "rsp-low.h"
10526 (linux_low_encode_pt_config, linux_low_encode_raw): New.
10527 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
10528 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
10529 (handle_btrace_enable_pt): New.
10530 (handle_btrace_general_set): Support "pt".
10531 (handle_btrace_conf_general_set): Support "pt:size".
10533 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10535 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
10538 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10540 * linux-aarch64-low.c: Remove comment about endianness.
10541 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
10542 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
10545 2015-06-24 Gary Benson <gbenson@redhat.com>
10547 * linux-i386-ipa.c (stdint.h): Do not include.
10548 * lynx-i386-low.c (stdint.h): Likewise.
10549 * lynx-ppc-low.c (stdint.h): Likewise.
10550 * mem-break.c (stdint.h): Likewise.
10551 * thread-db.c (stdint.h): Likewise.
10552 * tracepoint.c (stdint.h): Likewise.
10553 * win32-low.c (stdint.h): Likewise.
10555 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
10557 * server.c (write_qxfer_response): Update call to
10558 remote_escape_output.
10560 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
10561 Jan Kratochvil <jan.kratochvil@redhat.com>
10563 Merge multiple hex conversions.
10564 * gdbreplay.c (tohex): Rename to 'fromhex'.
10565 (logchar): Use fromhex.
10567 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
10569 * server.c (handle_qxfer_libraries): Set `version' attribute for
10572 2015-06-10 Gary Benson <gbenson@redhat.com>
10574 * target.h (struct target_ops) <multifs_open>: New field.
10575 <multifs_unlink>: Likewise.
10576 <multifs_readlink>: Likewise.
10577 * linux-low.c (nat/linux-namespaces.h): New include.
10578 (linux_target_ops): Initialize the_target->multifs_open,
10579 the_target->multifs_unlink and the_target->multifs_readlink.
10580 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
10581 * hostio.c (hostio_fs_pid): New static variable.
10582 (hostio_handle_new_gdb_connection): New function.
10583 (handle_setfs): Likewise.
10584 (handle_open): Use the_target->multifs_open as appropriate.
10585 (handle_unlink): Use the_target->multifs_unlink as appropriate.
10586 (handle_readlink): Use the_target->multifs_readlink as
10588 (handle_vFile): Handle vFile:setfs packets.
10589 * server.c (handle_query): Call hostio_handle_new_gdb_connection
10590 after target_handle_new_gdb_connection.
10592 2015-06-10 Gary Benson <gbenson@redhat.com>
10594 * configure.ac (AC_CHECK_FUNCS): Add setns.
10595 * config.in: Regenerate.
10596 * configure: Likewise.
10597 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
10598 (linux-namespaces.o): New rule.
10599 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
10601 2015-06-09 Gary Benson <gbenson@redhat.com>
10603 * hostio.c (handle_open): Process mode argument with
10604 fileio_to_host_mode.
10606 2015-06-01 Yao Qi <yao.qi@linaro.org>
10608 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
10609 * linux-x86-low.c: Likewise.
10611 2015-05-28 Don Breazeal <donb@codesourcery.com>
10613 * linux-low.c (handle_extended_wait): Initialize
10614 thread_info.last_resume_kind for new fork children.
10616 2015-05-15 Pedro Alves <palves@redhat.com>
10618 * target.h (target_handle_new_gdb_connection): Rewrite using if
10619 wrapped in do/while.
10621 2015-05-14 Joel Brobecker <brobecker@adacore.com>
10623 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
10624 * configure, config.in: Regenerate.
10625 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
10628 2015-05-12 Don Breazeal <donb@codesourcery.com>
10630 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
10631 PTRACE_EVENT_VFORK_DONE.
10632 (linux_low_ptrace_options, extended_event_reported): Add vfork
10634 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
10635 and "vforkdone" for RSP 'T' Stop Reply Packet.
10636 * server.h (report_vfork_events): Declare
10639 2015-05-12 Don Breazeal <donb@codesourcery.com>
10641 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
10642 (the_low_target) <new_fork>: Initialize new member.
10643 * linux-arm-low.c (arm_new_fork): New function.
10644 (the_low_target) <new_fork>: Initialize new member.
10645 * linux-low.c (handle_extended_wait): Call new target function
10647 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
10648 * linux-mips-low.c (mips_add_watchpoint): New function
10649 extracted from mips_insert_point.
10650 (the_low_target) <new_fork>: Initialize new member.
10651 (mips_linux_new_fork): New function.
10652 (mips_insert_point): Call mips_add_watchpoint.
10653 * linux-x86-low.c (x86_linux_new_fork): New function.
10654 (the_low_target) <new_fork>: Initialize new member.
10656 2015-05-12 Don Breazeal <donb@codesourcery.com>
10658 * linux-low.c (handle_extended_wait): Implement return value,
10659 rename argument 'event_child' to 'event_lwp', handle
10660 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
10661 (linux_low_ptrace_options): New function.
10662 (linux_low_filter_event): Call linux_low_ptrace_options,
10663 use different argument fo linux_enable_event_reporting,
10664 use return value from handle_extended_wait.
10665 (extended_event_reported): New function.
10666 (linux_wait_1): Call extended_event_reported and set
10667 status to report fork events.
10668 (linux_write_memory): Add pid to debug message.
10669 (reset_lwp_ptrace_options_callback): New function.
10670 (linux_handle_new_gdb_connection): New function.
10671 (linux_target_ops): Initialize new structure member.
10672 * linux-low.h (struct lwp_info) <waitstatus>: New member.
10673 * lynx-low.c: Initialize new structure member.
10674 * remote-utils.c (prepare_resume_reply): Implement stop reason
10675 "fork" for "T" stop message.
10676 * server.c (handle_query): Call handle_new_gdb_connection.
10677 * server.h (report_fork_events): Declare global flag.
10678 * target.h (struct target_ops) <handle_new_gdb_connection>:
10680 (target_handle_new_gdb_connection): New macro.
10681 * win32-low.c: Initialize new structure member.
10683 2015-05-12 Don Breazeal <donb@codesourcery.com>
10685 * mem-break.c (APPEND_TO_LIST): Define macro.
10686 (clone_agent_expr): New function.
10687 (clone_one_breakpoint): New function.
10688 (clone_all_breakpoints): New function.
10689 * mem-break.h: Declare new functions.
10691 2015-05-12 Don Breazeal <donb@codesourcery.com>
10693 * linux-low.c (linux_supports_fork_events): New function.
10694 (linux_supports_vfork_events): New function.
10695 (linux_target_ops): Initialize new structure members.
10696 (initialize_low): Call linux_check_ptrace_features.
10697 * lynx-low.c (lynx_target_ops): Initialize new structure
10699 * server.c (report_fork_events, report_vfork_events):
10701 (handle_query): Add new features to qSupported packet and
10703 (captured_main): Initialize new global variables.
10704 * target.h (struct target_ops) <supports_fork_events>:
10706 <supports_vfork_events>: New member.
10707 (target_supports_fork_events): New macro.
10708 (target_supports_vfork_events): New macro.
10709 * win32-low.c (win32_target_ops): Initialize new structure
10712 2015-05-12 Gary Benson <gbenson@redhat.com>
10714 * server.c (handle_qxfer_exec_file): Use current process
10717 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
10719 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
10720 Remove HAVE_PTRACE_GETREGS conditionals.
10721 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
10722 instead of PTRACE_GETREGS and PTRACE_SETREGS.
10724 2015-05-08 Yao Qi <yao.qi@linaro.org>
10726 * linux-low.c (linux_supports_conditional_breakpoints): New
10728 (linux_target_ops): Install new target method.
10729 * lynx-low.c (lynx_target_ops): Install NULL hook for
10730 supports_conditional_breakpoints.
10731 * nto-low.c (nto_target_ops): Likewise.
10732 * spu-low.c (spu_target_ops): Likewise.
10733 * win32-low.c (win32_target_ops): Likewise.
10734 * server.c (handle_query): Check
10735 target_supports_conditional_breakpoints.
10736 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10738 (target_supports_conditional_breakpoints): New macro.
10740 2015-05-06 Pedro Alves <palves@redhat.com>
10743 * server.c (start_inferior): If the process exits, mourn it.
10745 2015-04-21 Gary Benson <gbenson@redhat.com>
10747 * hostio.c (fileio_open_flags_to_host): Factored out to
10748 fileio_to_host_openflags in common/fileio.c. Single use
10751 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10753 * linux-xtensa-low.c (xtensa_fill_gregset)
10754 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
10757 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10759 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
10760 (regs_info): Replace usrregs pointer with NULL.
10762 2015-04-17 Gary Benson <gbenson@redhat.com>
10764 * target.h (struct target_ops) <pid_to_exec_file>: New field.
10765 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
10766 * server.c (handle_qxfer_exec_file): New function.
10767 (qxfer_packets): Add exec-file entry.
10768 (handle_query): Report qXfer:exec-file:read as supported packet.
10770 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
10772 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
10774 2015-04-09 Gary Benson <gbenson@redhat.com>
10776 * hostio-errno.c (errno_to_fileio_error): Remove function.
10777 Update caller to use remote_fileio_to_fio_error.
10779 2015-04-09 Yao Qi <yao.qi@linaro.org>
10781 * linux-low.c (linux_insert_point): Call
10782 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
10783 (linux_remove_point): Call remove_memory_breakpoint if type is
10785 * linux-x86-low.c (x86_insert_point): Don't call
10786 insert_memory_breakpoint.
10787 (x86_remove_point): Don't call remove_memory_breakpoint.
10789 2015-04-01 Pedro Alves <palves@redhat.com>
10790 Cleber Rosa <crosa@redhat.com>
10792 * server.c (gdbserver_usage): Reorganize and extend the usage
10795 2015-03-24 Pedro Alves <palves@redhat.com>
10797 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
10798 output. Also dump TRAP_TRACE.
10799 (linux_low_filter_event): In debug output, distinguish a
10800 resume_stop SIGSTOP from a delayed SIGSTOP.
10802 2015-03-24 Gary Benson <gbenson@redhat.com>
10804 * linux-x86-low.c (x86_linux_new_thread): Moved to
10806 (x86_linux_prepare_to_resume): Likewise.
10808 2015-03-24 Gary Benson <gbenson@redhat.com>
10810 * Makefile.in (x86-linux-dregs.o): New rule.
10811 * configure.srv: Add x86-linux-dregs.o to relevant targets.
10812 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
10813 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
10814 (x86_linux_dr_get): Likewise.
10815 (x86_linux_dr_set): Likewise.
10816 (update_debug_registers_callback): Likewise.
10817 (x86_linux_dr_set_addr): Likewise.
10818 (x86_linux_dr_get_addr): Likewise.
10819 (x86_linux_dr_set_control): Likewise.
10820 (x86_linux_dr_get_control): Likewise.
10821 (x86_linux_dr_get_status): Likewise.
10822 (x86_linux_update_debug_registers): Likewise.
10824 2015-03-24 Gary Benson <gbenson@redhat.com>
10826 * linux-x86-low.c (x86_linux_update_debug_registers):
10827 New function, factored out from...
10828 (x86_linux_prepare_to_resume): ...this.
10830 2015-03-24 Gary Benson <gbenson@redhat.com>
10832 * linux-x86-low.c (x86_linux_dr_get): Update comments.
10833 (x86_linux_dr_set): Likewise.
10834 (update_debug_registers_callback): Likewise.
10835 (x86_linux_dr_set_addr): Likewise.
10836 (x86_linux_dr_get_addr): Likewise.
10837 (x86_linux_dr_set_control): Likewise.
10838 (x86_linux_dr_get_control): Likewise.
10839 (x86_linux_dr_get_status): Likewise.
10840 (x86_linux_prepare_to_resume): Likewise.
10842 2015-03-24 Gary Benson <gbenson@redhat.com>
10844 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
10845 Use perror_with_name. Pass string through gettext.
10846 (x86_linux_dr_set): Likewise.
10848 2015-03-24 Gary Benson <gbenson@redhat.com>
10850 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
10851 (x86_linux_dr_set_addr): ...this.
10852 (x86_dr_low_get_addr): Rename to...
10853 (x86_linux_dr_get_addr): ...this.
10854 (x86_dr_low_set_control): Rename to...
10855 (x86_linux_dr_set_control): ...this.
10856 (x86_dr_low_get_control): Rename to...
10857 (x86_linux_dr_get_control): ...this.
10858 (x86_dr_low_get_status): Rename to...
10859 (x86_linux_dr_get_status): ...this.
10860 (x86_dr_low): Update with new function names.
10862 2015-03-24 Gary Benson <gbenson@redhat.com>
10864 * Makefile.in (x86-linux.o): New rule.
10865 * configure.srv: Add x86-linux.o to relevant targets.
10866 * linux-low.c (lwp_set_arch_private_info): New function.
10867 (lwp_arch_private_info): Likewise.
10868 * linux-x86-low.c: Include nat/x86-linux.h.
10869 (arch_lwp_info): Removed structure.
10870 (update_debug_registers_callback):
10871 Use lwp_set_debug_registers_changed.
10872 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
10873 and lwp_set_debug_registers_changed.
10874 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
10876 2015-03-24 Gary Benson <gbenson@redhat.com>
10878 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
10879 * linux-arm-low.c (arm_new_thread): Likewise.
10880 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
10881 * linux-mips-low.c (mips_linux_new_thread): Likewise.
10882 * linux-x86-low.c (x86_linux_new_thread): Likewise.
10883 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
10885 2015-03-24 Gary Benson <gbenson@redhat.com>
10887 * linux-low.c (ptid_of_lwp): New function.
10888 (lwp_is_stopped): Likewise.
10889 (lwp_stop_reason): Likewise.
10890 * linux-x86-low.c (update_debug_registers_callback):
10891 Use lwp_is_stopped.
10892 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
10895 2015-03-24 Gary Benson <gbenson@redhat.com>
10897 * linux-low.h (linux_stop_lwp): Remove declaration.
10899 2015-03-24 Gary Benson <gbenson@redhat.com>
10901 * linux-low.h: Include nat/linux-nat.h.
10902 * linux-low.c (iterate_over_lwps_args): New structure.
10903 (iterate_over_lwps_filter): New function.
10904 (iterate_over_lwps): Likewise.
10905 * linux-x86-low.c (update_debug_registers_callback):
10906 Update signature to what iterate_over_lwps expects.
10907 Remove PID check that iterate_over_lwps now performs.
10908 (x86_dr_low_set_addr): Use iterate_over_lwps.
10909 (x86_dr_low_set_control): Likewise.
10911 2015-03-24 Gary Benson <gbenson@redhat.com>
10913 * linux-x86-low.c (x86_debug_reg_state): New function.
10914 (x86_linux_prepare_to_resume): Use the above.
10916 2015-03-24 Gary Benson <gbenson@redhat.com>
10918 * linux-low.c (current_lwp_ptid): New function.
10919 * linux-x86-low.c: Include nat/linux-nat.h.
10920 (x86_dr_low_get_addr): Use current_lwp_ptid.
10921 (x86_dr_low_get_control): Likewise.
10922 (x86_dr_low_get_status): Likewise.
10924 2015-03-20 Pedro Alves <palves@redhat.com>
10926 * tracepoint.c (cmd_qtstatus): Make "str" const.
10928 2015-03-20 Pedro Alves <palves@redhat.com>
10930 * server.c (handle_general_set): Make "req_str" const.
10932 2015-03-19 Pedro Alves <palves@redhat.com>
10934 * linux-low.c (linux_resume_one_lwp): Rename to ...
10935 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
10936 instead call perror_with_name.
10937 (check_ptrace_stopped_lwp_gone): New function.
10938 (linux_resume_one_lwp): Reimplement as wrapper around
10939 linux_resume_one_lwp_throw that swallows errors if the LWP is
10942 2015-03-19 Pedro Alves <palves@redhat.com>
10944 * linux-low.c (count_events_callback, select_event_lwp_callback):
10945 No longer check whether the thread has resume_stop as last resume
10948 2015-03-19 Pedro Alves <palves@redhat.com>
10950 * linux-low.c (count_events_callback, select_event_lwp_callback):
10951 Use the lwp's status_pending_p field, not the thread's.
10953 2015-03-19 Pedro Alves <palves@redhat.com>
10955 * linux-low.c (select_event_lwp_callback): Update comments to
10956 no longer mention SIGTRAP.
10958 2015-03-18 Gary Benson <gbenson@redhat.com>
10960 * server.c (handle_query): Do not report vFile:fstat as supported.
10962 2015-03-11 Gary Benson <gbenson@redhat.com>
10964 * hostio.c (sys/types.h): New include.
10965 (sys/stat.h): Likewise.
10966 (common-remote-fileio.h): Likewise.
10967 (handle_fstat): New function.
10968 (handle_vFile): Handle vFile:fstat packets.
10970 2015-03-11 Gary Benson <gbenson@redhat.com>
10972 * configure.ac (AC_CHECK_MEMBERS): Add checks for
10973 struct stat.st_blocks and struct stat.st_blksize.
10974 * configure: Regenerate.
10975 * config.in: Likewise.
10976 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
10977 (OBS): Add common-remote-fileio.o.
10978 (common-remote-fileio.o): New rule.
10980 2015-03-09 Pedro Alves <palves@redhat.com>
10982 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
10983 'struct sockaddr' pointer in 'accept' call.
10985 2015-03-09 Pedro Alves <palves@redhat.com>
10988 2015-03-07 Pedro Alves <palves@redhat.com>
10989 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
10990 or <winsock2.h> here. Instead include "gdb_socket.h".
10991 (remote_open): Use union gdb_sockaddr_u.
10992 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
10993 or <winsock2.h> here. Instead include "gdb_socket.h".
10994 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
10995 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
10997 (init_named_socket, gdb_agent_helper_thread): Use union
11000 2015-03-07 Pedro Alves <palves@redhat.com>
11002 * configure.ac (build_warnings): Move
11003 -Wdeclaration-after-statement to the C-specific set.
11004 * configure: Regenerate.
11006 2015-03-07 Pedro Alves <palves@redhat.com>
11008 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11009 or <winsock2.h> here. Instead include "gdb_socket.h".
11010 (remote_open): Use union gdb_sockaddr_u.
11011 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11012 or <winsock2.h> here. Instead include "gdb_socket.h".
11013 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11014 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11016 (init_named_socket, gdb_agent_helper_thread): Use union
11019 2015-03-07 Pedro Alves <palves@redhat.com>
11021 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11024 2015-03-06 Yao Qi <yao.qi@linaro.org>
11026 * linux-aarch64-low.c (aarch64_insert_point): Use
11027 show_debug_regs as a boolean.
11028 (aarch64_remove_point): Likewise.
11030 2015-03-05 Pedro Alves <palves@redhat.com>
11032 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11033 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11034 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11035 * nto-low.c (nto_target_ops): Likewise.
11036 * spu-low.c (spu_target_ops): Likewise.
11037 * win32-low.c (win32_target_ops): Likewise.
11039 2015-03-04 Pedro Alves <palves@redhat.com>
11041 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
11042 Decide whether a breakpoint triggered based on the SIGTRAP's
11044 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11045 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
11046 (linux_low_filter_event): Check for breakpoints before checking
11048 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11050 (linux_stopped_by_sw_breakpoint)
11051 (linux_supports_stopped_by_sw_breakpoint)
11052 (linux_stopped_by_hw_breakpoint)
11053 (linux_supports_stopped_by_hw_breakpoint): New functions.
11054 (linux_target_ops): Install new target methods.
11056 2015-03-04 Pedro Alves <palves@redhat.com>
11058 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
11059 * server.c (swbreak_feature, hwbreak_feature): New globals.
11060 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
11061 (captured_main): Clear swbreak_feature and hwbreak_feature.
11062 * server.h (swbreak_feature, hwbreak_feature): Declare.
11063 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
11064 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
11065 supports_stopped_by_hw_breakpoint>: New fields.
11066 (target_supports_stopped_by_sw_breakpoint)
11067 (target_stopped_by_sw_breakpoint)
11068 (target_supports_stopped_by_hw_breakpoint)
11069 (target_stopped_by_hw_breakpoint): Declare.
11071 2015-03-04 Pedro Alves <palves@redhat.com>
11073 enum lwp_stop_reason -> enum target_stop_reason
11074 * linux-low.c (check_stopped_by_breakpoint): Adjust.
11075 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
11076 (linux_wait_1, stuck_in_jump_pad_callback)
11077 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
11078 (linux_stopped_by_watchpoint):
11079 * linux-low.h (enum lwp_stop_reason): Delete.
11080 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
11081 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11083 2015-03-04 Yao Qi <yao.qi@linaro.org>
11085 * Makefile.in (SFILES): Add linux-aarch64-low.c.
11087 2015-03-03 Gary Benson <gbenson@redhat.com>
11089 * hostio.c (handle_vFile): Fix prefix lengths.
11091 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11093 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11096 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11098 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11099 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11100 (clean): Add "rm -f" for above C files.
11101 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11102 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11103 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11104 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11105 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11106 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11107 (init_registers_s390x_vx_linux64)
11108 (init_registers_s390x_tevx_linux64)
11109 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11110 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11112 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11113 (s390_store_vxrs_high): New functions.
11114 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11116 (s390_arch_setup): Add logic for selecting one of the new target
11117 descriptions. Activate the new vector regsets if applicable.
11118 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11119 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11120 and init_registers_s390x_tevx_linux64.
11122 2015-03-01 Pedro Alves <palves@redhat.com>
11124 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11127 2015-02-27 Pedro Alves <palves@redhat.com>
11129 * linux-x86-low.c (u_debugreg_offset): New function.
11130 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11132 2015-02-27 Pedro Alves <palves@redhat.com>
11134 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11135 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11136 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11137 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11138 (ps_lsetfpregs, ps_getpid)
11139 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11140 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11141 (ps_lsetxregs, ps_plog): Declare.
11143 2015-02-27 Pedro Alves <palves@redhat.com>
11145 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11146 IP_AGENT_EXPORT_FUNC.
11147 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11148 IP_AGENT_EXPORT_FUNC.
11149 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11150 (IP_AGENT_EXPORT): Delete.
11151 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11152 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11153 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11154 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11155 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11156 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11157 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11158 (traceframe_read_count, traceframe_write_count)
11159 (traceframes_created, trace_state_variables, get_raw_reg)
11160 (get_trace_state_variable_value, set_trace_state_variable_value)
11161 (ust_loaded, helper_thread_id, cmd_buf): Use
11162 IPA_SYM_EXPORTED_NAME.
11163 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11164 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11165 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11166 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11167 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11168 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11169 EXTERN_C_PUSH/EXTERN_C_POP.
11170 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11171 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11172 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11173 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11174 (traceframe_write_count, traceframe_read_count)
11175 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
11176 (about_to_request_buffer_space, get_trace_state_variable_value)
11177 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
11178 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
11179 EXTERN_C_PUSH/EXTERN_C_POP.
11180 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
11181 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
11182 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
11183 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11184 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11185 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11186 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
11187 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
11189 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
11190 (IP_AGENT_EXPORT_VAR_DECL): Define.
11191 (tracing): Declare.
11192 (gdb_agent_get_raw_reg): Declare.
11194 2015-02-27 Tom Tromey <tromey@redhat.com>
11195 Pedro Alves <palves@redhat.com>
11197 Rename symbols whose names are reserved C++ keywords throughout.
11199 2015-02-27 Pedro Alves <palves@redhat.com>
11201 * Makefile.in (COMPILER): New, get it from autoconf.
11202 (CXX): Get from autoconf instead.
11203 (COMPILE.pre): Use COMPILER.
11204 (CC-LD): Rename to ...
11205 (CC_LD): ... this. Use COMPILER.
11206 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
11207 (CXX_FOR_TARGET): Default to g++ instead of gcc.
11208 * acinclude.m4: Include build-with-cxx.m4.
11209 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
11210 Disable -Werror by default if building in C++ mode.
11211 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
11212 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
11213 the C++ compiler. Save/restore CXXFLAGS too.
11214 * configure: Regenerate.
11216 2015-02-27 Pedro Alves <palves@redhat.com>
11218 * acinclude.m4: Include libiberty.m4.
11219 * configure.ac: Call libiberty_INIT.
11220 * config.in, configure: Regenerate.
11222 2015-02-26 Pedro Alves <palves@redhat.com>
11224 * linux-low.c (linux_wait_1): When incrementing the PC past a
11225 program breakpoint always use the_low_target.breakpoint_len as
11226 increment, rather than the maximum between that and
11227 the_low_target.decr_pc_after_break.
11229 2015-02-23 Pedro Alves <palves@redhat.com>
11231 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
11232 thread was doing a step-over; always adjust the PC if
11233 we stepped over a permanent breakpoint.
11234 (linux_wait_1): If we stepped over breakpoint that was on top of a
11235 permanent breakpoint, manually advance the PC past it.
11237 2015-02-23 Pedro Alves <palves@redhat.com>
11239 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
11241 (x86_fill_gregset, x86_store_gregset): Use it when handling
11244 2015-02-20 Pedro Alves <palves@redhat.com>
11246 * thread-db.c: Include "nat/linux-procfs.h".
11247 (thread_db_init): Skip listing new threads if the kernel supports
11248 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
11250 2015-02-20 Pedro Alves <palves@redhat.com>
11252 * linux-low.c (status_pending_p_callback): Use ptid_match.
11254 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
11256 PR breakpoints/16812
11257 * linux-low.c (wstatus_maybe_breakpoint): Remove.
11258 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
11259 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
11261 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
11263 PR breakpoints/15956
11264 * tracepoint.c (cmd_qtinit): Add check for current_thread.
11266 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11268 * linux-low.c (linux_low_btrace_conf): Print size.
11269 * server.c (handle_btrace_conf_general_set): New.
11270 (hanle_general_set): Call handle_btrace_conf_general_set.
11271 (handle_query): Report Qbtrace-conf:bts:size as supported.
11273 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11275 * linux-low.c (linux_low_enable_btrace): Update parameters.
11276 (linux_low_btrace_conf): New.
11277 (linux_target_ops)<to_btrace_conf>: Initialize.
11278 * server.c (current_btrace_conf): New.
11279 (handle_btrace_enable): Rename to ...
11280 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
11281 to target_enable_btrace. Update comment. Update users.
11282 (handle_qxfer_btrace_conf): New.
11283 (qxfer_packets): Add btrace-conf entry.
11284 (handle_query): Report qXfer:btrace-conf:read as supported packet.
11285 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
11286 (target_ops)<read_btrace_conf>: New.
11287 (target_enable_btrace): Update parameters.
11288 (target_read_btrace_conf): New.
11290 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11292 * server.c (handle_btrace_general_set): Remove call to
11293 target_supports_btrace.
11294 (supported_btrace_packets): New.
11295 (handle_query): Call supported_btrace_packets.
11296 * target.h: include btrace-common.h.
11297 (btrace_target_info): Removed.
11298 (supports_btrace, target_supports_btrace): Update parameters.
11300 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11302 * Makefile.in (SFILES): Add common/btrace-common.c.
11303 (OBS): Add common/btrace-common.o.
11304 (btrace-common.o): Add build rules.
11305 * linux-low: Include btrace-common.h.
11306 (linux_low_read_btrace): Use struct btrace_data. Call
11307 btrace_data_init and btrace_data_fini.
11309 2015-02-06 Pedro Alves <palves@redhat.com>
11311 * thread-db.c (find_new_threads_callback): Add debug output.
11313 2015-02-04 Pedro Alves <palves@redhat.com>
11315 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
11316 (resume_stopped_resumed_lwps): New function.
11317 (linux_wait_for_event_filtered): Use it.
11319 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11321 * Makefile.in (SFILES): Add linux-personality.c.
11322 (linux-personality.o): New rule.
11323 * configure.srv (srv_linux_obj): Add linux-personality.o to the
11324 list of objects to be built.
11325 * linux-low.c: Include nat/linux-personality.h.
11326 (linux_create_inferior): Remove code to disable address space
11327 randomization (moved to ../nat/linux-personality.c). Create
11328 cleanup to disable address space randomization.
11330 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11332 * Makefile.in (posix-strerror.o): New rule.
11333 (mingw-strerror.o): Likewise.
11334 * configure: Regenerated.
11335 * configure.ac: Source file ../common/common.host. Initialize new
11336 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
11338 2015-01-14 Yao Qi <yao@codesourcery.com>
11340 * Makefile.in (SFILES): Add nat/ppc-linux.c.
11341 (ppc-linux.o): New rule.
11342 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
11343 * configure.ac: AC_CHECK_FUNCS(getauxval).
11344 * config.in: Re-generated.
11345 * configure: Re-generated.
11346 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
11347 ppc64_64bit_inferior_p
11349 2015-01-14 Yao Qi <yao@codesourcery.com>
11351 * linux-ppc-low.c: Include "nat/ppc-linux.h".
11352 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
11353 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
11354 (PT_ORIG_R3, PT_TRAP): Likewise.
11355 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
11356 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
11357 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
11359 2015-01-10 Joel Brobecker <brobecker@adacore.com>
11361 * i387-fp.c (i387_cache_to_xsave): In look over
11362 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
11363 zmmh_low_space field by use of zmmh_high_space.
11365 2015-01-09 Pedro Alves <palves@redhat.com>
11367 * linux-low.c (step_over_bkpt): Move higher up in the file.
11368 (handle_extended_wait): Don't store the stop_pc here.
11369 (get_stop_pc): Adjust comments and rename to ...
11370 (check_stopped_by_breakpoint): ... this. Record whether the LWP
11371 stopped for a software breakpoint or hardware breakpoint.
11372 (thread_still_has_status_pending_p): New function.
11373 (status_pending_p_callback): Use
11374 thread_still_has_status_pending_p. If the event is no longer
11375 interesting, resume the LWP.
11376 (handle_tracepoints): Add assert.
11377 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
11378 (wstatus_maybe_breakpoint): New function.
11379 (cancel_breakpoint): Delete function.
11380 (check_stopped_by_watchpoint): New function, factored out from
11381 linux_low_filter_event.
11382 (lp_status_maybe_breakpoint): Delete function.
11383 (linux_low_filter_event): Remove filter_ptid argument.
11384 Leave thread group exits pending here. Store the LWP's stop PC.
11385 Always leave events pending.
11386 (linux_wait_for_event_filtered): Pull all events out of the
11387 kernel, and leave them all pending.
11388 (count_events_callback, select_event_lwp_callback): Consider all
11390 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
11391 (select_event_lwp): Only give preference to the stepping LWP in
11392 all-stop mode. Adjust comments.
11393 (ignore_event): New function.
11394 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
11395 references to cancel_breakpoints. Adjust to renames. Also give
11396 equal priority to all LWPs that have had events in non-stop mode.
11397 If reporting a software breakpoint event, unadjust the LWP's PC.
11398 (linux_wait): If linux_wait_1 returned an ignored event, retry.
11399 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
11401 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
11402 (resume_status_pending_p): Use thread_still_has_status_pending_p.
11403 (linux_stopped_by_watchpoint): Adjust.
11404 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
11405 * linux-low.h (enum lwp_stop_reason): New.
11406 (struct lwp_info) <stop_pc>: Adjust comment.
11407 <stopped_by_watchpoint>: Delete field.
11408 <stop_reason>: New field.
11409 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11410 * mem-break.c (software_breakpoint_inserted_here)
11411 (hardware_breakpoint_inserted_here): New function.
11412 * mem-break.h (software_breakpoint_inserted_here)
11413 (hardware_breakpoint_inserted_here): Declare.
11414 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
11415 (cancel_breakpoints): Delete.
11416 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
11417 (upload_fast_traceframes): Remove references to
11418 cancel_breakpoints.
11420 2015-01-09 Pedro Alves <palves@redhat.com>
11422 * thread-db.c (find_new_threads_callback): Ignore thread if the
11423 kernel thread ID is -1.
11425 2015-01-09 Pedro Alves <palves@redhat.com>
11427 * linux-low.c (linux_attach_fail_reason_string): Move to
11428 nat/linux-ptrace.c, and rename.
11429 (linux_attach_lwp): Update comment.
11430 (attach_proc_task_lwp_callback): New function.
11431 (linux_attach): Adjust to rename and use
11432 linux_proc_attach_tgid_threads.
11433 (linux_attach_fail_reason_string): Delete declaration.
11435 2015-01-01 Joel Brobecker <brobecker@adacore.com>
11437 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
11438 * server.c (gdbserver_version): Likewise.
11440 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
11442 * remote-utils.c: Include ctype.h.
11443 (input_interrupt): Explicitly handle the case when the char
11444 received is the NUL byte. Improve the printing of non-ASCII
11447 2014-12-16 Joel Brobecker <brobecker@adacore.com>
11449 * linux-low.c (linux_low_filter_event): Update call to
11450 linux_enable_event_reporting following the addition of
11451 a new parameter to that function.
11453 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
11456 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
11457 (AARCH64_FPCR_REGNO): Likewise.
11458 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
11459 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
11460 (aarch64_store_fpregset): Likewise.
11462 2014-12-15 Joel Brobecker <brobecker@adacore.com>
11464 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
11465 Remove FIXME comment about assumption about N.
11467 2014-12-13 Joel Brobecker <brobecker@adacore.com>
11469 * configure.ac: If large-file support is disabled in GDBserver,
11470 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
11471 * configure: Regenerate.
11473 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11475 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
11476 warning upon ENODATA from ptrace.
11477 * linux-s390-low.c (s390_store_tdb): New.
11478 (s390_regsets): Add regset for NT_S390_TDB.
11480 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11482 * linux-low.c (regsets_store_inferior_registers): Skip regsets
11483 without a fill_function.
11484 * linux-s390-low.c (s390_fill_last_break): Remove.
11485 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
11486 (s390_arch_setup): Use regset's size instead of fill_function for
11487 loop end condition.
11489 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11491 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
11492 the regset's store function when ptrace returned an error.
11493 * regcache.c (get_thread_regcache): Invalidate register cache
11494 before fetching inferior's registers.
11496 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11498 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
11499 while-loop as for-loop.
11500 (regsets_store_inferior_registers): Likewise.
11502 2014-11-28 Yao Qi <yao@codesourcery.com>
11504 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
11505 * config.in, configure: Re-generate.
11506 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
11509 2014-11-21 Yao Qi <yao@codesourcery.com>
11511 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
11512 (AC_CHECK_HEADERS): Remove malloc.h.
11513 * configure: Re-generated.
11514 * config.in: Re-generated.
11515 * server.h: Don't include alloca.h and malloc.h.
11516 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
11517 Don't include malloc.h.
11519 2014-11-17 Joel Brobecker <brobecker@adacore.com>
11521 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
11522 corresponding ERRNO check in same block.
11524 2014-11-12 Pedro Alves <palves@redhat.com>
11526 * server.c (cont_thread): Update comment.
11527 (start_inferior, attach_inferior): No longer clear cont_thread.
11528 (handle_v_cont): No longer set cont_thread.
11529 (captured_main): Clear cont_thread each time a GDB connects.
11531 2014-11-12 Pedro Alves <palves@redhat.com>
11533 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
11534 thread, and don't resume all threads if the Hc thread has exited.
11536 2014-11-12 Pedro Alves <palves@redhat.com>
11538 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
11539 the process group instead of to a specific LWP.
11541 2014-10-15 Pedro Alves <palves@redhat.com>
11544 * win32-arm-low.c (arm_set_thread_context): Remove current_event
11546 (arm_set_thread_context): Delete.
11547 (the_low_target): Adjust.
11548 * win32-i386-low.c (debug_registers_changed)
11549 (debug_registers_used): Delete.
11550 (update_debug_registers_callback): New function.
11551 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
11552 needing to update their debug registers.
11553 (win32_get_current_dr): New function.
11554 (x86_dr_low_get_addr, x86_dr_low_get_control)
11555 (x86_dr_low_get_status): Fetch the debug register from the thread
11557 (i386_initial_stuff): Adjust.
11558 (i386_get_thread_context): Remove current_event parameter. Don't
11559 clear debug_registers_changed nor copy DR values to
11561 (i386_set_thread_context): Delete.
11562 (i386_prepare_to_resume): New function.
11563 (i386_thread_added): Mark the thread as needing to update irs
11565 (the_low_target): Remove i386_set_thread_context and install
11566 i386_prepare_to_resume.
11567 * win32-low.c (win32_get_thread_context): Adjust.
11568 (win32_set_thread_context): Use SetThreadContext
11570 (win32_prepare_to_resume): New function.
11571 (win32_require_context): New function, factored out from ...
11572 (thread_rec): ... this.
11573 (continue_one_thread): Call win32_prepare_to_resume on each thread
11574 we're about to continue.
11575 (win32_resume): Call win32_prepare_to_resume on the event thread.
11576 * win32-low.h (struct win32_thread_info)
11577 <debug_registers_changed>: New field.
11578 (struct win32_target_ops): Change prototype of set_thread_context,
11579 delete set_thread_context and add prepare_to_resume.
11580 (win32_require_context): New declaration.
11582 2014-10-08 Gary Benson <gbenson@redhat.com>
11584 * server.h: Do not include common-exceptions.h.
11586 2014-10-08 Gary Benson <gbenson@redhat.com>
11588 * server.h: Do not include cleanups.h.
11590 2014-09-30 James Hogan <james.hogan@imgtec.com>
11592 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
11593 mips64-dsp-linux.c.
11595 2014-09-23 Yao Qi <yao@codesourcery.com>
11597 * linux-low.c (lp_status_maybe_breakpoint): New function.
11598 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
11599 (count_events_callback): Likewise.
11600 (select_event_lwp_callback): Likewise.
11601 (cancel_breakpoints_callback): Likewise.
11603 2014-09-19 Don Breazeal <donb@codesourcery.com>
11605 * linux-low.c (handle_extended_wait): Call
11606 linux_ptrace_get_extended_event.
11607 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
11608 linux_is_extended_waitstatus.
11610 2014-09-16 Joel Brobecker <brobecker@adacore.com>
11612 * Makefile.in (CPPFLAGS): Define.
11613 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
11614 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
11616 2014-09-16 Gary Benson <gbenson@redhat.com>
11618 * inferiors.h (current_inferior): Renamed as...
11619 (current_thread): New variable. All uses updated.
11620 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
11621 (maybe_move_out_of_jump_pad): Likewise.
11622 (cancel_breakpoint): Likewise.
11623 (linux_low_filter_event): Likewise.
11624 (wait_for_sigstop): Likewise.
11625 (linux_resume_one_lwp): Likewise.
11626 (need_step_over_p): Likewise.
11627 (start_step_over): Likewise.
11628 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
11629 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
11630 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
11631 and save_inferior as saved_thread.
11632 * regcache.c (get_thread_regcache): Renamed saved_inferior as
11634 (regcache_invalidate_thread): Likewise.
11635 * remote-utils.c (prepare_resume_reply): Likewise.
11636 * thread-db.c (thread_db_get_tls_address): Likewise.
11637 (disable_thread_event_reporting): Likewise.
11638 (remove_thread_event_breakpoints): Likewise.
11639 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
11641 * target.h (set_desired_inferior): Renamed as...
11642 (set_desired_thread): New declaration. All uses updated.
11643 * server.c (myresume): Updated comment to reference thread instead
11645 (handle_serial_event): Likewise.
11646 (handle_target_event): Likewise.
11648 2014-09-12 Tom Tromey <tromey@redhat.com>
11649 Gary Benson <gbenson@redhat.com>
11651 * regcache.h: Include common-regcache.h.
11652 (regcache_read_pc): Don't declare.
11653 * regcache.c (get_thread_regcache_for_ptid): New function.
11655 2014-09-11 Tom Tromey <tromey@redhat.com>
11656 Gary Benson <gbenson@redhat.com>
11658 * symbol.c: New file.
11659 * Makefile.in (SFILES): Add symbol.c.
11660 (OBS): Add symbol.o.
11662 2014-09-11 Gary Benson <gbenson@redhat.com>
11664 * target.c (target_stop_ptid, target_continue_ptid): New
11667 2014-09-11 Tom Tromey <tromey@redhat.com>
11668 Gary Benson <gbenson@redhat.com>
11670 * target.h: Include target/target.h.
11671 * target.c (target_read_memory, target_read_uint32)
11672 (target_write_memory): New functions.
11674 2014-09-11 Gary Benson <gbenson@redhat.com>
11676 * server.h (debug_hw_points): Don't declare.
11677 * server.c (debug_hw_points): Don't define. Replace all uses
11678 with show_debug_regs.
11679 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
11680 all uses with show_debug_regs.
11682 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
11684 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
11685 endianness into account.
11686 (ppc_supply_ptrace_register): Likewise.
11688 2014-09-03 James Hogan <james.hogan@imgtec.com>
11690 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
11691 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
11693 2014-09-03 Gary Benson <gbenson@redhat.com>
11695 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
11696 ALL_DEBUG_ADDRESS_REGISTERS.
11698 2014-09-02 Gary Benson <gbenson@redhat.com>
11700 * i386-low.h: Renamed as...
11701 * x86-low.h: New file. All type, function and variable name
11702 prefixes changed from "i386_" to "x86_". All references updated.
11703 * i386-low.c: Renamed as...
11704 * x86-low.c: New file. All type, function and variable name
11705 prefixes changed from "i386_" to "x86_". All references updated.
11707 2014-09-02 Gary Benson <gbenson@redhat.com>
11709 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
11710 (x86_linux_new_thread): Likewise.
11712 2014-08-29 Gary Benson <gbenson@redhat.com>
11714 * server.h (setjmp.h): Do not include.
11715 (toplevel): Do not declare.
11716 (common-exceptions.h): Include.
11717 (cleanups.h): Likewise.
11718 * server.c (toplevel): Do not define.
11719 (exit_code): New static global.
11720 (detach_or_kill_for_exit_cleanup): New function.
11721 (main): New function. Original main renamed to...
11722 (captured_main): New function.
11723 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
11725 2014-08-29 Gary Benson <gbenson@redhat.com>
11727 * Makefile.in (SFILES): Add common/common-exceptions.c.
11728 (OBS): Add common-exceptions.o.
11729 (common-exceptions.o): New rule.
11730 * utils.c (prepare_to_throw_exception): New function.
11732 2014-08-29 Gary Benson <gbenson@redhat.com>
11734 * config.in: Regenerate.
11735 * configure: Likewise.
11737 2014-08-29 Gary Benson <gbenson@redhat.com>
11739 * Makefile.in (SFILES): Add common/cleanups.c.
11741 (cleanups.o): New rule.
11743 2014-08-29 Gary Benson <gbenson@redhat.com>
11745 * utils.c (internal_vwarning): New function.
11747 2014-08-28 Gary Benson <gbenson@redhat.com>
11749 * utils.h (fatal): Remove declaration.
11750 * utils.c (fatal): Remove function.
11752 2014-08-28 Gary Benson <gbenson@redhat.com>
11754 * tracepoint.c (gdb_agent_init): Replace fatal with
11756 (initialize_tracepoint): Likewise.
11758 2014-08-28 Gary Benson <gbenson@redhat.com>
11760 * remote-utils.c (remote_prepare): Replace fatal with error.
11762 2014-08-28 Gary Benson <gbenson@redhat.com>
11764 * linux-low.c (linux_async): Replace fatal with warning.
11765 Tidy up and return.
11766 (linux_start_non_stop): Return -1 if linux_async failed.
11768 2014-08-28 Gary Benson <gbenson@redhat.com>
11770 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
11772 (i386_dr_low_get_addr): Remove vague comment.
11773 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
11776 2014-08-28 Gary Benson <gbenson@redhat.com>
11778 * inferiors.c (get_thread_process): Replace check with gdb_assert.
11779 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
11781 (linux_resume_one_lwp): Likewise.
11782 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
11784 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
11785 with internal_error.
11786 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
11787 (init_register_cache): Replace fatal with gdb_assert_not_reached.
11788 (find_register_by_name): Replace fatal with internal_error.
11789 (find_regno): Likewise.
11790 * tdesc.c (init_target_desc): Replace check with gdb_assert.
11791 * thread-db.c (thread_db_create_event): Likewise.
11792 (thread_db_load_search): Likewise.
11793 (try_thread_db_load_1): Likewise.
11794 * tracepoint.c (get_jump_space_head): Replace fatal with
11796 (claim_trampoline_space): Likewise.
11797 (have_fast_tracepoint_trampoline_buffer): Likewise.
11798 (cmd_qtstart): Likewise.
11799 (stop_tracing): Likewise.
11800 (fast_tracepoint_collecting): Likewise.
11801 (target_malloc): Likewise.
11802 (download_tracepoint): Likewise.
11803 (download_trace_state_variables): Replace check with gdb_assert.
11804 (upload_fast_traceframes): Replace fatal with internal_error.
11806 2014-08-19 Tom Tromey <tromey@redhat.com>
11807 Gary Benson <gbenson@redhat.com>
11809 * Makefile.in (SFILES): Add common/common-debug.c.
11810 (OBS): Add common-debug.o.
11811 (common-debug.o): New rule.
11812 * debug.h (debug_printf): Don't declare.
11813 * debug.c (debug_printf): Renamed and rewritten as...
11814 (debug_vprintf): New function.
11816 2014-08-19 Gary Benson <gbenson@redhat.com>
11818 * utils.h: Do not include print-utils.h.
11820 2014-08-19 Tom Tromey <tromey@redhat.com>
11821 Gary Benson <gbenson@redhat.com>
11823 * server.h: Add static assertion.
11824 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
11826 2014-08-19 Tom Tromey <tromey@redhat.com>
11827 Gary Benson <gbenson@redhat.com>
11829 * Makefile.in (SFILES): Add common/errors.c.
11830 (OBS): Add errors.o.
11831 (IPA_OBS): Add errors-ipa.o.
11832 (errors.o): New rule.
11833 (errors-ipa.o): Likewise.
11834 * utils.h (perror_with_name, error, warning): Don't declare.
11835 * utils.c (warning): Renamed and rewritten as...
11836 (vwarning): New function.
11837 (error): Renamed and rewritten as...
11838 (verror): New function.
11839 (internal_error): Renamed and rewritten as...
11840 (internal_verror): New function.
11842 2014-08-07 Gary Benson <gbenson@redhat.com>
11844 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
11845 * configure: Regenerate.
11846 * config.in: Likewise.
11847 * server.h: Do not include errno.h.
11848 * event-loop.c: Likewise.
11849 * hostio-errno.c: Likewise.
11850 * linux-low.c: Likewise.
11851 * remote-utils.c: Likewise.
11852 * spu-low.c: Likewise.
11853 * utils.c: Likewise.
11854 * gdbreplay.c: Unconditionally include errno.h.
11856 2014-08-07 Gary Benson <gbenson@redhat.com>
11858 * server.h: Do not include string.h.
11859 * event-loop.c: Likewise.
11860 * linux-low.c: Likewise.
11861 * regcache.c: Likewise.
11862 * remote-utils.c: Likewise.
11863 * spu-low.c: Likewise.
11864 * utils.c: Likewise.
11866 2014-08-07 Gary Benson <gbenson@redhat.com>
11868 * server.h: Do not include gdb_assert.h.
11870 2014-08-07 Gary Benson <gbenson@redhat.com>
11872 * server.h: Do not include common-utils.h.
11874 2014-08-07 Gary Benson <gbenson@redhat.com>
11876 * server.h: Do not include ptid.h.
11877 * notif.h: Likewise.
11879 2014-08-07 Gary Benson <gbenson@redhat.com>
11881 * server.h: Do not include gdb_locale.h.
11883 2014-08-07 Gary Benson <gbenson@redhat.com>
11885 * server.h: Do not include gdb/signals.h.
11886 * win32-low.c: Likewise.
11888 2014-08-07 Gary Benson <gbenson@redhat.com>
11890 * server.h: Do not include pathmax.h.
11892 2014-08-07 Gary Benson <gbenson@redhat.com>
11894 * server.h: Do not include libiberty.h.
11895 * linux-bfin-low.c: Likewise.
11897 2014-08-07 Gary Benson <gbenson@redhat.com>
11899 * server.h: Do not include ansidecl.h.
11901 2014-08-07 Gary Benson <gbenson@redhat.com>
11903 * linux-x86-low.c: Do not include stddef.h.
11904 * lynx-ppc-low.c: Likewise.
11905 * tracepoint.c: Likewise.
11907 2014-08-07 Gary Benson <gbenson@redhat.com>
11909 * server.h: Do not include stdarg.h.
11910 * nto-low.c: Likewise.
11912 2014-08-07 Gary Benson <gbenson@redhat.com>
11914 * server.h: Do not include stdlib.h.
11915 * inferiors.c: Likewise.
11916 * linux-low.c: Likewise.
11917 * regcache.c: Likewise.
11918 * spu-low.c: Likewise.
11919 * tracepoint.c: Likewise.
11920 * utils.c: Likewise.
11922 2014-08-07 Gary Benson <gbenson@redhat.com>
11924 * server.h: Do not include stdio.h.
11925 * linux-low.c: Likewise.
11926 * remote-utils.c: Likewise.
11927 * spu-low.c: Likewise.
11928 * utils.c: Likewise.
11929 * wincecompat.c: Likewise.
11931 2014-08-06 Gary Benson <gbenson@redhat.com>
11933 * regcache.c (init_register_cache): Move conditionals inside if.
11935 2014-08-06 Gary Benson <gbenson@redhat.com>
11937 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
11939 2014-07-31 Gary Benson <gbenson@redhat.com>
11941 * ax.h: Do not include server.h.
11942 * gdbthread.h: Likewise.
11943 * lynx-low.h: Likewise.
11944 * notif.h: Likewise.
11946 2014-07-30 Gary Benson <gbenson@redhat.com>
11948 * server.h: Include common-defs.h.
11949 Do not include config.h or build-gnulib-gdbserver/config.h.
11951 2014-07-30 Gary Benson <gbenson@redhat.com>
11953 * hostio-errno.c: Move server.h to top of includes list.
11954 * inferiors.c: Likewise.
11955 * linux-x86-low.c: Likewise.
11956 * notif.c: Include server.h.
11958 2014-07-24 Tom Tromey <tromey@redhat.com>
11959 Gary Benson <gbenson@redhat.com>
11961 * server.h (CORE_ADDR): Now unsigned.
11963 2014-07-16 Pedro Alves <palves@redhat.com>
11965 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
11967 2014-07-15 Pedro Alves <palves@redhat.com>
11969 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
11972 2014-07-11 Pedro Alves <palves@redhat.com>
11974 * linux-low.c (kill_wait_lwp): New function, based on
11975 kill_one_lwp_callback, but use my_waitpid directly.
11976 (kill_one_lwp_callback, linux_kill): Use it.
11978 2014-06-23 Pedro Alves <palves@redhat.com>
11980 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
11981 before setting DR0..DR3.
11983 2014-06-20 Gary Benson <gbenson@redhat.com>
11985 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
11986 * configure: Regenerated.
11987 * config.in: Likewise.
11989 2014-06-20 Gary Benson <gbenson@redhat.com>
11991 * Makefile.in (SFILES): Update locations for files moved
11992 from common to nat.
11993 (object file files): Reordered.
11995 2014-06-20 Gary Benson <gbenson@redhat.com>
11997 * i386-low.h (i386_dr_low_can_set_addr): Removed.
11998 (i386_dr_low_set_addr): Likewise.
11999 (i386_dr_low_get_addr): Likewise.
12000 (i386_dr_low_can_set_control): Likewise.
12001 (i386_dr_low_set_control): Likewise.
12002 (i386_dr_low_get_control): Likewise.
12003 (i386_dr_low_get_status): Likewise.
12004 (i386_get_debug_register_length): Likewise.
12005 * linux-x86-low.c (i386_dr_low_set_addr):
12006 Changed signature. Made static.
12007 (i386_dr_low_get_addr): Likewise.
12008 (i386_dr_low_set_control): Likewise.
12009 (i386_dr_low_get_control): Likewise.
12010 (i386_dr_low_get_status): Likewise.
12011 (i386_dr_low): New global variable.
12012 * win32-i386-low.c (i386_dr_low_set_addr):
12013 Changed signature. Made static.
12014 (i386_dr_low_get_addr): Likewise.
12015 (i386_dr_low_set_control): Likewise.
12016 (i386_dr_low_get_control): Likewise.
12017 (i386_dr_low_get_status): Likewise.
12018 (i386_dr_low): New global variable.
12020 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12022 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12023 * Makefile.in (AR, AR_FLAGS): Define.
12024 * configure: Regenerate.
12026 2014-06-19 Gary Benson <gbenson@redhat.com>
12028 * Makefile.in (i386-dregs.o): New rule.
12029 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12030 * i386-low.c (target.h): Remove include.
12031 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12032 (DR_CONTROL_SHIFT): Likewise.
12033 (DR_CONTROL_SIZE): Likewise.
12034 (DR_RW_EXECUTE): Likewise.
12035 (DR_RW_WRITE): Likewise.
12036 (DR_RW_READ): Likewise.
12037 (DR_RW_IORW): Likewise.
12038 (DR_LEN_1): Likewise.
12039 (DR_LEN_2): Likewise.
12040 (DR_LEN_4): Likewise.
12041 (DR_LEN_8): Likewise.
12042 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12043 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12044 (DR_ENABLE_SIZE): Likewise.
12045 (DR_LOCAL_SLOWDOWN): Likewise.
12046 (DR_GLOBAL_SLOWDOWN): Likewise.
12047 (DR_CONTROL_RESERVED): Likewise.
12048 (I386_DR_CONTROL_MASK): Likewise.
12049 (I386_DR_VACANT): Likewise.
12050 (I386_DR_LOCAL_ENABLE): Likewise.
12051 (I386_DR_GLOBAL_ENABLE): Likewise.
12052 (I386_DR_DISABLE): Likewise.
12053 (I386_DR_SET_RW_LEN): Likewise.
12054 (I386_DR_GET_RW_LEN): Likewise.
12055 (I386_DR_WATCH_HIT): Likewise.
12056 (i386_wp_op_t): Likewise.
12057 (i386_show_dr): Likewise.
12058 (i386_length_and_rw_bits): Likewise.
12059 (i386_insert_aligned_watchpoint): Likewise.
12060 (i386_remove_aligned_watchpoint): Likewise.
12061 (i386_handle_nonaligned_watchpoint): Likewise.
12062 i386_update_inferior_debug_regs(): Likewise.
12063 (i386_dr_insert_watchpoint): Likewise.
12064 (i386_dr_remove_watchpoint): Likewise.
12065 (i386_dr_region_ok_for_watchpoint): Likewise.
12066 (i386_dr_stopped_data_address): Likewise.
12067 (i386_dr_stopped_by_watchpoint): Likewise.
12069 2014-06-19 Gary Benson <gbenson@redhat.com>
12071 * i386-low.c (i386_dr_show): Renamed to
12072 i386_show_dr and made static. All uses updated.
12073 (i386_dr_length_and_rw_bits): Renamed to
12074 i386_length_and_rw_bits and made static.
12076 (i386_dr_insert_aligned_watchpoint): Renamed to
12077 i386_insert_aligned_watchpoint and made static.
12079 (i386_dr_remove_aligned_watchpoint): Renamed to
12080 i386_remove_aligned_watchpoint and made static.
12082 (i386_dr_update_inferior_debug_regs): Renamed to
12083 i386_update_inferior_debug_regs and made static.
12086 2014-06-18 Gary Benson <gbenson@redhat.com>
12088 * i386-low.h (i386_dr_low_can_set_addr): New macro.
12089 (i386_dr_low_can_set_control): Likewise.
12090 (i386_get_debug_register_length): Likewise.
12091 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12092 (i386_dr_low_can_set_control): Likewise.
12093 (i386_get_debug_register_length): Likewise.
12095 2014-06-17 Gary Benson <gbenson@redhat.com>
12097 * i386-low.h (i386-dregs.h): New include.
12098 (DR_FIRSTADDR): Now in i386-dregs.h.
12099 (DR_LASTADDR): Likewise.
12100 (DR_NADDR): Likewise.
12101 (DR_STATUS): Likewise.
12102 (DR_CONTROL): Likewise.
12103 (i386_debug_reg_state): Likewise.
12104 (i386_dr_insert_watchpoint): Likewise.
12105 (i386_dr_remove_watchpoint): Likewise.
12106 (i386_dr_region_ok_for_watchpoint): Likewise.
12107 (i386_dr_stopped_data_address): Likewise.
12108 (i386_dr_stopped_by_watchpoint): Likewise.
12109 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12111 2014-06-18 Gary Benson <gbenson@redhat.com>
12113 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12114 i386_dr_insert_watchpoint.
12115 (i386_low_remove_watchpoint): Renamed to
12116 i386_dr_remove_watchpoint.
12117 (i386_low_region_ok_for_watchpoint): Renamed to
12118 i386_dr_region_ok_for_watchpoint.
12119 (i386_low_stopped_data_address): Renamed to
12120 i386_dr_stopped_data_address.
12121 (i386_low_stopped_by_watchpoint): Renamed to
12122 i386_dr_stopped_by_watchpoint.
12123 * i386-low.c (i386_show_dr): Renamed to
12124 i386_dr_show and made nonstatic. All uses updated.
12125 (i386_length_and_rw_bits): Renamed to
12126 i386_dr_length_and_rw_bits and made nonstatic.
12128 (i386_insert_aligned_watchpoint): Renamed to
12129 i386_dr_insert_aligned_watchpoint and made nonstatic.
12131 (i386_remove_aligned_watchpoint): Renamed to
12132 i386_dr_remove_aligned_watchpoint and made nonstatic.
12134 (i386_update_inferior_debug_regs): Renamed to
12135 i386_dr_update_inferior_debug_regs and made nonstatic.
12137 (i386_low_insert_watchpoint): Renamed to
12138 i386_dr_insert_watchpoint. All uses updated.
12139 (i386_low_remove_watchpoint): Renamed to
12140 i386_dr_remove_watchpoint. All uses updated.
12141 (i386_low_region_ok_for_watchpoint): Renamed to
12142 i386_dr_region_ok_for_watchpoint. All uses updated.
12143 (i386_low_stopped_data_address): Renamed to
12144 i386_dr_stopped_data_address. All uses updated.
12145 (i386_low_stopped_by_watchpoint): Renamed to
12146 i386_dr_stopped_by_watchpoint. All uses updated.
12148 2014-06-18 Gary Benson <gbenson@redhat.com>
12150 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12151 (i386_dr_low_can_set_control): Likewise.
12152 (i386_insert_aligned_watchpoint): New check.
12154 2014-06-18 Gary Benson <gbenson@redhat.com>
12156 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12159 2014-06-18 Gary Benson <gbenson@redhat.com>
12161 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12162 instead of fatal and error.
12163 (i386_handle_nonaligned_watchpoint): Likewise.
12165 2014-06-18 Gary Benson <gbenson@redhat.com>
12167 * i386-low.c (i386_get_debug_register_length): New macro.
12168 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12169 (i386_show_dr): Use debug_printf instead of fprintf. Use
12170 phex to format values.
12172 2014-06-18 Gary Benson <gbenson@redhat.com>
12174 * i386-low.h: Comment changes.
12175 * i386-low.c: Likewise.
12177 2014-06-18 Gary Benson <gbenson@redhat.com>
12179 * i386-low.c: Whitespace changes.
12181 2014-06-12 Tom Tromey <tromey@redhat.com>
12183 * utils.c (freeargv): Remove.
12185 2014-06-12 Tom Tromey <tromey@redhat.com>
12187 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
12188 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
12189 (parse_debug_format_options): Likewise.
12190 (gdbserver_usage): Likewise.
12191 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
12192 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
12193 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
12195 ($(LIBGNU)): Depend on libiberty.
12196 (all-lib): Recurse into all subdirs.
12197 (install-only): Invoke "install" target in subdirs.
12198 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
12200 * configure: Rebuild.
12201 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
12202 for vasprintf, vsnprintf, or gettimeofday.
12203 * configure.srv: Don't add safe-ctype.o or lbasename.o to
12206 2014-06-05 Joel Brobecker <brobecker@adacore.com>
12208 * development.sh: Delete.
12209 * Makefile.in (config.status): Adjust dependency on development.sh.
12210 * configure.ac: Adjust development.sh source call.
12211 * configure: Regenerate.
12213 2014-06-02 Pedro Alves <palves@redhat.com>
12215 * ax.c (gdb_free_agent_expr): New function.
12216 * ax.h (gdb_free_agent_expr): New declaration.
12217 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
12219 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
12221 (clear_breakpoint_conditions_and_commands): New function.
12222 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
12223 (clear_breakpoint_conditions_and_commands): New declaration.
12225 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12227 * linux-aarch64-low.c (asm/ptrace.h): Include.
12229 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12231 Fix TLS access for -static -pthread.
12232 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
12233 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
12234 (thread_db_load_search, try_thread_db_load_1): Initialize it.
12236 2014-05-20 Pedro Alves <palves@redhat.com>
12238 * linux-aarch64-low.c (aarch64_insert_point)
12239 (aarch64_remove_point): No longer check whether the type is
12240 supported here. Adjust to new interface.
12241 (the_low_target): Install aarch64_supports_z_point_type as
12242 supports_z_point_type method.
12243 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
12244 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
12245 instead of a Z packet char. Adjust.
12246 (arm_supports_z_point_type): New function.
12247 (arm_insert_point, arm_remove_point): Adjust to new interface.
12248 (the_low_target): Install arm_supports_z_point_type.
12249 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
12250 (cris_insert_point, cris_remove_point): Adjust to new interface.
12251 Don't check whether the type is supported here.
12252 (the_low_target): Install cris_supports_z_point_type.
12253 * linux-low.c (linux_supports_z_point_type): New function.
12254 (linux_insert_point, linux_remove_point): Adjust to new interface.
12255 * linux-low.h (struct linux_target_ops) <insert_point,
12256 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
12257 raw_breakpoint pointer parameter.
12258 <supports_z_point_type>: New method.
12259 * linux-mips-low.c (mips_supports_z_point_type): New function.
12260 (mips_insert_point, mips_remove_point): Adjust to new interface.
12261 Use mips_supports_z_point_type.
12262 (the_low_target): Install mips_supports_z_point_type.
12263 * linux-ppc-low.c (the_low_target): Install NULL as
12264 supports_z_point_type method.
12265 * linux-s390-low.c (the_low_target): Install NULL as
12266 supports_z_point_type method.
12267 * linux-sparc-low.c (the_low_target): Install NULL as
12268 supports_z_point_type method.
12269 * linux-x86-low.c (x86_supports_z_point_type): New function.
12270 (x86_insert_point): Adjust to new insert_point interface. Use
12271 insert_memory_breakpoint. Adjust to new
12272 i386_low_insert_watchpoint interface.
12273 (x86_remove_point): Adjust to remove_point interface. Use
12274 remove_memory_breakpoint. Adjust to new
12275 i386_low_remove_watchpoint interface.
12276 (the_low_target): Install x86_supports_z_point_type.
12277 * lynx-low.c (lynx_target_ops): Install NULL as
12278 supports_z_point_type callback.
12279 * nto-low.c (nto_supports_z_point_type): New.
12280 (nto_insert_point, nto_remove_point): Adjust to new interface.
12281 (nto_target_ops): Install nto_supports_z_point_type.
12282 * mem-break.c: Adjust intro comment.
12283 (struct raw_breakpoint) <raw_type, size>: New fields.
12284 <inserted>: Update comment.
12285 <shlib_disabled>: Delete field.
12286 (enum bkpt_type) <gdb_breakpoint>: Delete value.
12287 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
12288 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
12289 (raw_bkpt_type_to_target_hw_bp_type): New function.
12290 (find_enabled_raw_code_breakpoint_at): New function.
12291 (find_raw_breakpoint_at): New type and size parameters. Use them.
12292 (insert_memory_breakpoint): New function, based off
12293 set_raw_breakpoint_at.
12294 (remove_memory_breakpoint): New function.
12295 (set_raw_breakpoint_at): Reimplement.
12296 (set_breakpoint): New, based on set_breakpoint_at.
12297 (set_breakpoint_at): Reimplement.
12298 (delete_raw_breakpoint): Go through the_target->remove_point
12299 instead of assuming memory breakpoints.
12300 (find_gdb_breakpoint_at): Delete.
12301 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
12302 (find_gdb_breakpoint): New function.
12303 (set_gdb_breakpoint_at): Delete.
12304 (z_type_supported): New function.
12305 (set_gdb_breakpoint_1): New function, loosely based off
12306 set_gdb_breakpoint_at.
12307 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
12308 (delete_gdb_breakpoint_at): Delete.
12309 (delete_gdb_breakpoint_1): New function, loosely based off
12310 delete_gdb_breakpoint_at.
12311 (delete_gdb_breakpoint): New function.
12312 (clear_gdb_breakpoint_conditions): Rename to ...
12313 (clear_breakpoint_conditions): ... this. Don't handle a NULL
12315 (add_condition_to_breakpoint): Make static.
12316 (add_breakpoint_condition): Take a struct breakpoint pointer
12317 instead of an address. Adjust.
12318 (gdb_condition_true_at_breakpoint): Rename to ...
12319 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
12321 (gdb_condition_true_at_breakpoint): Reimplement.
12322 (add_breakpoint_commands): Take a struct breakpoint pointer
12323 instead of an address. Adjust.
12324 (gdb_no_commands_at_breakpoint): Rename to ...
12325 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
12326 parameter. Return true if no breakpoint was found. Change debug
12328 (gdb_no_commands_at_breakpoint): Reimplement.
12329 (run_breakpoint_commands): Rename to ...
12330 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
12331 and change return type to boolean.
12332 (run_breakpoint_commands): New function.
12333 (gdb_breakpoint_here): Also check for Z1 breakpoints.
12334 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
12335 breakpoint. Go through the_target->remove_point instead of
12336 assuming memory breakpoint.
12337 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
12338 software and hardware breakpoints.
12339 (reinsert_raw_breakpoint): Go through the_target->insert_point
12340 instead of assuming memory breakpoint.
12341 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
12342 software and hardware breakpoints.
12343 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
12344 Check both software and hardware breakpoints.
12345 (validate_inserted_breakpoint): Assert the breakpoint is a
12346 software breakpoint. Set the inserted flag to -1 instead of
12347 setting shlib_disabled.
12348 (delete_disabled_breakpoints): Adjust.
12349 (validate_breakpoints): Only validate software breakpoints.
12350 Adjust to inserted flag change.
12351 (check_mem_read, check_mem_write): Skip breakpoint types other
12352 than software breakpoints. Adjust to inserted flag change.
12353 * mem-break.h (enum raw_bkpt_type): New enum.
12354 (raw_breakpoint, struct process_info): Forward declare.
12355 (Z_packet_to_target_hw_bp_type): Delete declaration.
12356 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
12357 (set_gdb_breakpoint, delete_gdb_breakpoint)
12358 (clear_breakpoint_conditions): New declarations.
12359 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
12360 (breakpoint_inserted_here): Update comment.
12361 (add_breakpoint_condition, add_breakpoint_commands): Replace
12362 address parameter with a breakpoint pointer parameter.
12363 (gdb_breakpoint_here): Update comment.
12364 (delete_gdb_breakpoint_at): Delete.
12365 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
12366 * server.c (process_point_options): Take a struct breakpoint
12367 pointer instead of an address. Adjust.
12368 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
12369 delete_gdb_breakpoint.
12370 * spu-low.c (spu_target_ops): Install NULL as
12371 supports_z_point_type method.
12372 * target.h: Include mem-break.h.
12373 (struct target_ops) <prepare_to_access_memory>: Update comment.
12374 <supports_z_point_type>: New field.
12375 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12376 instead of a char. Also take a raw breakpoint pointer.
12377 * win32-arm-low.c (the_low_target): Install NULL as
12378 supports_z_point_type.
12379 * win32-i386-low.c (i386_supports_z_point_type): New function.
12380 (i386_insert_point, i386_remove_point): Adjust to new interface.
12381 (the_low_target): Install i386_supports_z_point_type.
12382 * win32-low.c (win32_supports_z_point_type): New function.
12383 (win32_insert_point, win32_remove_point): Adjust to new interface.
12384 (win32_target_ops): Install win32_supports_z_point_type.
12385 * win32-low.h (struct win32_target_ops):
12386 <supports_z_point_type>: New method.
12387 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12388 instead of a char. Also take a raw breakpoint pointer.
12390 2014-05-20 Pedro Alves <palves@redhat.com>
12392 * mem-break.h: Include break-common.h.
12393 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12394 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
12395 (Z_packet_to_target_hw_bp_type): New declaration.
12396 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
12397 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
12398 (Z_PACKET_ACCESS_WP): Delete macros.
12399 (Z_packet_to_hw_type): Delete function.
12400 * i386-low.h: Don't include break-common.h here.
12401 (Z_packet_to_hw_type): Delete declaration.
12402 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
12403 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12404 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
12405 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12406 * linux-aarch64-low.c: Don't include break-common.h here.
12407 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12408 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
12409 (Z_packet_to_target_hw_bp_type): Delete function.
12410 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
12412 (mips_insert_point, mips_remove_point): Use
12413 Z_packet_to_target_hw_bp_type.
12415 2014-05-20 Pedro Alves <palves@redhat.com>
12417 * linux-aarch64-low.c: Include break-common.h.
12418 (enum target_point_type): Delete.
12419 (Z_packet_to_point_type): Rename to ...
12420 (Z_packet_to_target_hw_bp_type): ... this, and return a
12421 target_hw_bp_type instead.
12422 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
12423 instead of an enum target_point_type.
12424 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
12426 (aarch64_dr_state_insert_one_point)
12427 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
12428 (aarch64_handle_aligned_watchpoint)
12429 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
12430 Take an enum target_hw_bp_type instead of an enum
12432 (aarch64_supports_z_point_type): New function.
12433 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
12434 use Z_packet_to_target_hw_bp_type.
12436 2014-05-20 Joel Brobecker <brobecker@adacore.com>
12438 * configure.ac: Only use -Werror by default when DEVELOPMENT
12440 * configure: Regenerate.
12442 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
12444 Fix gdbserver qGetTLSAddr for x86_64 -m32.
12445 * linux-x86-low.c (X86_64_USER_REGS): New.
12446 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
12448 2014-04-28 Yao Qi <yao@codesourcery.com>
12450 * Makefile.in (i386-avx512.c): Fix the typo of generated file
12453 2014-04-25 Pedro Alves <palves@redhat.com>
12456 * linux-low.c (linux_attach_fail_reason_string): New function.
12457 (linux_attach_lwp): Delete.
12458 (linux_attach_lwp_1): Rename to ...
12459 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
12460 argument. Remove "initial" parameter. Return int instead of
12461 void. Don't error or warn here.
12462 (linux_attach): Adjust to call linux_attach_lwp. Call error on
12463 failure to attach to the tgid. Call warning when failing to
12465 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
12466 argument. Remove "initial" parameter. Return int instead of
12467 void. Don't error or warn here.
12468 (linux_attach_fail_reason_string): New declaration.
12469 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
12470 interface change. Use linux_attach_fail_reason_string.
12472 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
12473 Walfred Tedeschi <walfred.tedeschi@intel.com>
12475 * Makefile.in: Added rules to handle new files
12476 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
12477 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
12478 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
12479 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
12480 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
12481 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
12482 x32-avx512-linux.o.
12483 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
12484 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
12485 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
12486 i386/x32-avx512.xml.
12487 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
12488 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
12489 i386/x32-avx512-linux.xml.
12490 * i387-fp.c (num_avx512_k_registers): New constant for number
12492 (num_avx512_zmmh_low_registers): New constant for number of
12493 lower ZMM registers (0-15).
12494 (num_avx512_zmmh_high_registers): New constant for number of
12495 higher ZMM registers (16-31).
12496 (num_avx512_ymmh_registers): New contant for number of higher
12497 YMM registers (ymm16-31 added by avx521 on x86_64).
12498 (num_avx512_xmm_registers): New constant for number of higher
12499 XMM registers (xmm16-31 added by AVX512 on x86_64).
12500 (struct i387_xsave): Add space for AVX512 registers.
12501 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
12502 Add code to handle AVX512 registers.
12503 (i387_xsave_to_cache): Add code to handle AVX512 registers.
12504 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
12505 prototypei from generated file.
12506 (tdesc_amd64_avx512_linux): Likewise.
12507 (init_registers_x32_avx512_linux): Likewise.
12508 (tdesc_x32_avx512_linux): Likewise.
12509 (init_registers_i386_avx512_linux): Likewise.
12510 (tdesc_i386_avx512_linux): Likewise.
12511 (x86_64_regmap): Add AVX512 registers.
12512 (x86_linux_read_description): Add code to handle AVX512 XSTATE
12514 (initialize_low_arch): Add code to initialize AVX512 registers.
12516 2014-04-23 Pedro Alves <palves@redhat.com>
12518 * mem-break.c (find_gdb_breakpoint_at): Make static.
12519 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
12521 2014-04-23 Pedro Alves <palves@redhat.com>
12523 * i386-low.c: Don't include break-common.h here.
12524 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12525 prototype to take target_hw_bp_type as argument instead of a Z
12527 * i386-low.h: Include break-common.h here.
12528 (Z_packet_to_hw_type): Declare.
12529 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12531 * linux-x86-low.c (x86_insert_point): Convert the packet number to
12532 a target_hw_bp_type before calling i386_low_insert_watchpoint.
12533 (x86_remove_point): Convert the packet number to a
12534 target_hw_bp_type before calling i386_low_remove_watchpoint.
12535 * win32-i386-low.c (i386_insert_point): Convert the packet number
12536 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
12537 (i386_remove_point): Convert the packet number to a
12538 target_hw_bp_type before calling i386_low_remove_watchpoint.
12540 2014-04-23 Pedro Alves <palves@redhat.com>
12542 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
12544 2014-04-10 Pedro Alves <palves@redhat.com>
12546 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
12547 Check if the condition or command is NULL before checking if the
12548 breakpoint is known. On success, return true.
12549 * mem-break.h (add_breakpoint_condition): Document return.
12550 (add_breakpoint_commands): Add describing comment.
12551 * server.c (skip_to_semicolon): New function.
12552 (process_point_options): Use it.
12554 2014-04-09 Pedro Alves <palves@redhat.com>
12556 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
12559 2014-02-27 Pedro Alves <palves@redhat.com>
12562 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
12564 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
12566 (last_thread_of_process_p): Take a PID argument instead of a
12568 (linux_wait_for_lwp): Delete.
12569 (num_lwps, check_zombie_leaders, not_stopped_callback): New
12571 (linux_low_filter_event): New function, party factored out from
12572 linux_wait_for_event.
12573 (linux_wait_for_event): Rename to ...
12574 (linux_wait_for_event_filtered): ... this. Add new filter ptid
12575 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
12576 sigsuspend. Check for zombie leaders.
12577 (linux_wait_for_event): Reimplement as wrapper around
12578 linux_wait_for_event_filtered.
12579 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
12580 a normal or signal exit is seen, it's the whole process exiting.
12581 (wait_for_sigstop): No longer a for_each_inferior callback.
12582 Rewrite on top of linux_wait_for_event_filtered.
12583 (stop_all_lwps): Call wait_for_sigstop directly.
12584 * server.c (resume, handle_target_event): Handle
12585 TARGET_WAITKIND_NO_RESUMED.
12587 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12589 * win32-low.c (psapi_get_dll_name,
12590 * win32_CreateToolhelp32Snapshot): Delete.
12591 (win32_CreateToolhelp32Snapshot, win32_Module32First)
12592 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
12594 (handle_load_dll): Add function description.
12595 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
12597 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12599 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
12601 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
12602 base address when calling win32_add_one_solib.
12603 (handle_load_dll): Delete local variable load_addr.
12604 Remove 0x1000 offset applied to DLL base address when calling
12605 win32_add_one_solib.
12606 (handle_unload_dll): Add comment.
12608 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12610 * win32-low.c (win32_add_all_dlls): Renames
12611 win32_ensure_ntdll_loaded. Rewrite function documentation.
12612 Adjust implementation to always load all DLLs.
12613 Add 0x1000 offset to DLL base address when calling
12614 win32_add_one_solib.
12615 (child_initialization_done): New static global.
12616 (do_initial_child_stuff): Set child_initialization_done to
12617 zero during child initialization, and 1 after. Replace call
12618 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
12620 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
12621 (handle_unload_dll): Add function documentation.
12622 (get_child_debug_event): Ignore load and unload DLL events
12623 during child initialization.
12625 2014-02-20 Doug Evans <dje@google.com>
12627 Remove global all_lwps.
12628 * inferiors.h (ptid_of): Move here from linux-low.h.
12629 (pid_of, lwpid_of): Ditto.
12630 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
12631 parameter is a struct thread_info * now.
12632 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
12633 directly. Pass &all_threads to find_inferior instead of &all_lwps.
12634 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
12636 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
12637 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
12638 * linux-arm-low.c (update_registers_callback): Update, "entry"
12639 parameter is a struct thread_info * now.
12640 Fetch lwpid from current_inferior directly.
12641 (arm_insert_point): Pass &all_threads to find_inferior instead of
12643 (arm_remove_point): Ditto.
12644 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
12645 (arm_prepare_to_resume): Fetch pid from thread.
12646 (arm_read_description): Fetch lwpid from current_inferior directly.
12647 * linux-low.c (all_lwps): Delete.
12648 (delete_lwp): Delete call to remove_inferior.
12649 (handle_extended_wait): Fetch lwpid from thread.
12650 (add_lwp): Don't set lwp->entry.id. Remove call to
12651 add_inferior_to_list.
12652 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
12653 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
12654 (kill_one_lwp_callback): Ditto.
12655 (linux_kill): Don't dereference NULL pointer.
12656 Fetch ptid,lwpid from thread.
12657 (get_detach_signal): Fetch ptid from thread.
12658 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
12659 Simplify call to regcache_invalidate_thread.
12660 (delete_lwp_callback): Update, "entry" parameter is a
12661 struct thread_info * now. Fetch pid from thread.
12662 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
12663 (status_pending_p_callback): Update, "entry" parameter is a
12664 struct thread_info * now. Fetch ptid from thread.
12665 (find_lwp_pid): Update, "entry" parameter is a
12666 struct thread_info * now.
12667 (linux_wait_for_lwp): Fetch pid from thread.
12668 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
12669 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
12670 (enqueue_one_deferred_signal): Fetch lwpid from thread.
12671 (dequeue_one_deferred_signal): Ditto.
12672 (cancel_breakpoint): Fetch ptid from current_inferior.
12673 (linux_wait_for_event): Pass &all_threads to find_inferior,
12674 not &all_lwps. Fetch ptid, lwpid from thread.
12675 (count_events_callback): Update, "entry" parameter is a
12676 struct thread_info * now.
12677 (select_singlestep_lwp_callback): Ditto.
12678 (select_event_lwp_callback): Ditto.
12679 (cancel_breakpoints_callback): Ditto.
12680 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
12682 (select_event_lwp): Ditto. Fetch ptid from event_thread.
12683 (unsuspend_one_lwp): Update, "entry" parameter is a
12684 struct thread_info * now.
12685 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
12687 (linux_stabilize_threads): Ditto. And for for_each_inferior.
12688 Fetch lwpid from thread, not lwp.
12689 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
12690 Pass &all_threads to find_inferior, not &all_lwps.
12691 (send_sigstop): Fetch lwpid from thread, not lwp.
12692 (send_sigstop_callback): Update, "entry" parameter is a
12693 struct thread_info * now.
12694 (suspend_and_send_sigstop_callback): Ditto.
12695 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
12696 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
12697 struct thread_info * now.
12698 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
12700 (lwp_running): Update, "entry" parameter is a
12701 struct thread_info * now.
12702 (stop_all_lwps): Fetch ptid from thread.
12703 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
12704 (linux_resume_one_lwp): Fetch lwpid from thread.
12705 (linux_set_resume_request): Update, "entry" parameter is a
12706 struct thread_info * now. Fetch pid, lwpid from thread.
12707 (resume_status_pending_p): Update, "entry" parameter is a
12708 struct thread_info * now.
12709 (need_step_over_p): Ditto. Fetch lwpid from thread.
12710 (start_step_over): Fetch lwpid from thread.
12711 (linux_resume_one_thread): Update, "entry" parameter is a
12712 struct thread_info * now. Fetch lwpid from thread.
12713 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
12714 (proceed_one_lwp): Update, "entry" parameter is a
12715 struct thread_info * now. Fetch lwpid from thread.
12716 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
12717 struct thread_info * now.
12718 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
12719 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
12720 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
12722 (regsets_store_inferior_registers): Ditto.
12723 (fetch_register, store_register): Ditto.
12724 (linux_read_memory, linux_write_memory): Ditto.
12725 (linux_request_interrupt): Ditto.
12726 (linux_read_auxv): Ditto.
12727 (linux_xfer_siginfo): Ditto.
12728 (linux_qxfer_spu): Ditto.
12729 (linux_qxfer_libraries_svr4): Ditto.
12730 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
12731 moved to inferiors.h.
12733 (get_thread_lwp): Update.
12734 (struct lwp_info): Delete member "entry". Simplify comment for
12736 (all_lwps): Delete.
12737 * linux-mips-low.c (mips_read_description): Fetch lwpid from
12738 current_inferior directly.
12739 (update_watch_registers_callback): Update, "entry" parameter is a
12740 struct thread_info * now. Fetch pid from thread.
12741 (mips_linux_prepare_to_resume): Fetch ptid from thread.
12742 (mips_insert_point): Fetch lwpid from current_inferior.
12743 Pass &all_threads to find_inferior, not &all_lwps.
12744 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
12745 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
12747 (mips_stopped_data_address): Ditto.
12748 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
12750 * linux-tile-low.c (tile_arch_setup): Ditto.
12751 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
12752 (update_debug_registers_callback): Update, "entry" parameter is a
12753 struct thread_info * now. Fetch pid from thread.
12754 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
12755 Pass &all_threads to find_inferior, not &all_lwps.
12756 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
12757 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
12758 Pass &all_threads to find_inferior, not &all_lwps.
12759 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
12760 (i386_dr_low_get_status): Ditto.
12761 (x86_linux_prepare_to_resume): Fetch ptid from thread.
12762 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
12763 (x86_linux_read_description): Ditto.
12764 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
12766 2014-02-20 Doug Evans <dje@google.com>
12768 * inferiors.c (get_first_inferior): Fix buglet.
12770 2014-02-19 Doug Evans <dje@google.com>
12772 * gdbthread.h (add_thread): Change result type to struct thread_info *.
12773 * inferiors.c (add_thread): Change result type to struct thread_info *.
12774 All callers updated.
12775 (add_lwp): Call add_thread here instead of in callers.
12776 All callers updated.
12777 * linux-low.h (get_lwp_thread): Rewrite.
12778 (struct lwp_info): New member "thread".
12780 2014-02-19 Doug Evans <dje@google.com>
12782 * linux-low.c (add_lwp): Change result to struct lwp_info *.
12783 All callers updated.
12785 2014-02-19 Doug Evans <dje@google.com>
12787 * inferiors.c (add_thread): Fix whitespace.
12789 2014-02-19 Doug Evans <dje@google.com>
12791 * dll.c (clear_dlls): Replace accessing list implemention details
12793 * gdbthread.h (get_first_thread): Declare.
12794 * inferiors.c (for_each_inferior_with_data): New function.
12795 (get_first_thread): New function.
12796 (find_thread_ptid): Simplify.
12797 (get_first_inferior): New function.
12798 (clear_list): Delete.
12799 (one_inferior_p): New function.
12800 (clear_inferior_list): New function.
12801 (clear_inferiors): Update.
12802 * inferiors.h (for_each_inferior_with_data): Declare.
12803 (clear_inferior_list): Declare.
12804 (one_inferior_p): Declare.
12805 (get_first_inferior): Declare.
12806 * linux-low.c (linux_wait_for_event): Replace accessing list
12807 implemention details with API function.
12808 * server.c (target_running): Ditto.
12809 (accumulate_file_name_length): New function.
12810 (emit_dll_description): New function.
12811 (handle_qxfer_libraries): Replace accessing list implemention
12812 details with API function.
12813 (handle_qxfer_threads_worker): New function.
12814 (handle_qxfer_threads_proper): Replace accessing list implemention
12815 details with API function.
12816 (handle_query): Ditto.
12817 (visit_actioned_threads_callback_ftype): New typedef.
12818 (visit_actioned_threads_data): New struct.
12819 (visit_actioned_threads): Rewrite to be find_inferior callback.
12820 (resume): Call find_inferior.
12821 (handle_status): Replace accessing list implemention
12822 details with API function.
12823 (process_serial_event): Replace accessing list implemention details
12825 * target.c (set_desired_inferior): Replace accessing list implemention
12826 details with API function.
12827 * tracepoint.c (same_process_p): New function.
12828 (gdb_agent_about_to_close): Replace accessing list implemention
12829 details with API function.
12830 * win32-low.c (child_delete_thread): Replace accessing list
12831 implemention details with API function.
12832 (match_dll_by_basename): New function.
12833 (dll_is_loaded_by_basename): New function.
12834 (win32_ensure_ntdll_loaded): Replace accessing list implemention
12835 details call to dll_is_loaded_by_basename.
12837 2014-02-19 Doug Evans <dje@google.com>
12839 * dll.h (struct dll_info): Add comment.
12840 * gdbthread.h (struct thread_info): Add comment.
12841 (current_ptid): Simplify.
12842 * inferiors.c (add_process): Update.
12843 (remove_process): Update.
12844 * inferiors.h (struct process_info): Rename member "head" to "entry".
12845 * linux-low.c (delete_lwp): Update.
12847 (last_thread_of_process_p): Update.
12848 (kill_one_lwp_callback, linux_kill): Update.
12849 (status_pending_p_callback): Update.
12850 (wait_for_sigstop): Update. Simplify read of ptid.
12851 (start_step_over): Update.
12852 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
12853 (get_lwp_thread): Update.
12854 (struct lwp_info): Rename member "head" to "entry".
12855 * regcache.h (inferior_list_entry): Delete.
12856 * server.c (kill_inferior_callback): Update.
12857 (detach_or_kill_inferior_callback): Update.
12858 (print_started_pid): Update.
12859 (print_attached_pid): Update.
12860 (process_serial_event): Simplify read of ptid.
12861 * thread-db.c (thread_db_create_event): Update.
12862 (thread_db_get_tls_address): Update.
12863 * win32-low.c (current_inferior_ptid): Simplify.
12865 2014-02-19 Tom Tromey <tromey@redhat.com>
12867 * target.h (struct target_ops) <supports_btrace>: Add target_ops
12869 (target_supports_btrace): Update.
12871 2014-02-14 Yao Qi <yao@codesourcery.com>
12873 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
12874 (rsp-low-ipa.o): New target.
12876 2014-02-12 Tom Tromey <tromey@redhat.com>
12878 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
12879 convert_ascii_to_int.
12880 * regcache.c (registers_to_string): Likewise.
12881 * remote-utils.c (decode_M_packet): Likewise.
12882 * server.c (process_serial_event): Likewise.
12884 2014-02-12 Tom Tromey <tromey@redhat.com>
12886 * server.c (handle_query, handle_v_run): Use hex2bin, not
12888 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
12890 2014-02-12 Tom Tromey <tromey@redhat.com>
12892 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
12893 convert_int_to_ascii.
12894 * regcache.c (registers_to_string, collect_register_as_string):
12896 * remote-utils.c (look_up_one_symbol, relocate_instruction):
12898 * server.c (process_serial_event): Likewise.
12899 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
12900 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
12902 2014-02-12 Tom Tromey <tromey@redhat.com>
12904 * remote-utils.c (look_up_one_symbol, monitor_output): Use
12905 bin2hex, not hexify.
12906 * tracepoint.c (cmd_qtstatus): Likewise.
12908 2014-02-12 Tom Tromey <tromey@redhat.com>
12910 * remote-utils.c (monitor_output): Pass explicit length to
12913 2014-02-12 Tom Tromey <tromey@redhat.com>
12915 * tracepoint.c: Include rsp-low.h.
12916 * server.c: Include rsp-low.h.
12917 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
12918 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
12920 * remote-utils.c: Include rsp-low.h.
12921 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
12922 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
12923 (convert_int_to_ascii, convert_ascii_to_int): Move to
12925 * regcache.c: Include rsp-low.h.
12926 * ax.c: Include rsp-low.h.
12927 * Makefile.in (SFILES): Add common/rsp-low.c.
12928 (OBS): Add rsp-low.o.
12929 (rsp-low.o): New target.
12931 2014-02-12 Tom Tromey <tromey@redhat.com>
12933 * utils.h (pulongest, plongest, phex_nz): Don't declare.
12934 Include print-utils.h.
12935 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
12936 (plongest, thirty_two, phex_nz): Remove.
12937 * Makefile.in (SFILES): Add common/print-utils.c.
12938 (OBS): Add print-utils.o.
12939 (print-utils-ipa.o): New target.
12940 (print-utils.o): New target.
12941 (IPA_OBJS): Add print-utils-ipa.o.
12943 2014-02-06 Tom Tromey <tromey@redhat.com>
12945 * Makefile.in (SFILES): Fix indentation.
12947 2014-02-05 Doug Evans <dje@google.com>
12949 * linux-low.c (linux_wait_for_event): Improve comment.
12950 (linux_wait_1): Keep current_inferior in sync with event_child.
12952 2014-01-22 Doug Evans <dje@google.com>
12954 * gdbthread.h (gdb_id_to_thread): Delete, unused.
12956 2014-01-22 Doug Evans <dje@google.com>
12958 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
12959 * configure: Regenerate.
12960 * config.in: Regenerate.
12961 * Makefile.in (SFILES): Add debug.c.
12962 (OBS): Add debug.o.
12963 * debug.c: New file.
12964 * debug.h: New file.
12965 * linux-aarch64-low.c (*): Update all debugging printfs to use
12966 debug_printf instead of fprintf.
12967 * linux-arm-low.c (*): Ditto.
12968 * linux-cris-low.c (*): Ditto.
12969 * linux-crisv32-low.c (*): Ditto.
12970 * linux-m32r-low.c (*): Ditto.
12971 * linux-sparc-low.c (*): Ditto.
12972 * linux-x86.c (*): Ditto.
12973 * linux-low.c (*): Ditto.
12974 (linux_wait_1): Add calls to debug_enter, debug_exit.
12975 (linux_wait): Remove redundant debugging printf.
12976 (stop_all_lwps): Add calls to debug_enter, debug_exit.
12977 (linux_resume, unstop_all_lwps): Ditto.
12978 * mem-break.c (*): Update all debugging printfs to use
12979 debug_printf instead of fprintf.
12980 * remote-utils.c (*): Ditto.
12981 * thread-db.c (*): Ditto.
12982 * server.c #include <ctype.h>, "gdb_vecs.h".
12983 (debug_threads): Moved to debug.c.
12984 (*): Update all debugging printfs to use debug_printf instead of
12986 (start_inferior): Replace call to fflush with call to debug_flush.
12987 (monitor_show_help): Mention set debug-format.
12988 (parse_debug_format_options): New function.
12989 (handle_monitor_command): Handle "monitor set debug-format".
12990 (gdbserver_usage): Mention --debug-format.
12991 (main): Parse --debug-format.
12992 * server.h (debug_threads): Declaration moved to debug.h.
12993 #include "debug.h".
12994 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
12995 trace_debug_1 that uses debug_printf.
12996 (tracepoint_look_up_symbols): Update all debugging printfs to use
12997 debug_printf instead of fprintf.
12999 2014-01-20 Baruch Siach <baruch@tkos.co.il>
13001 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13004 2014-01-17 Pedro Alves <palves@redhat.com>
13007 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13008 defined after including gdb_proc_service.h.
13010 2014-01-16 Doug Evans <dje@google.com>
13012 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13013 (match_dll): Use it.
13015 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13017 * target.h (target_ops) <read_btrace>: Change parameters and
13018 return type to allow error reporting.
13019 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13020 trace reading errors on.
13021 * linux-low.c (linux_low_read_btrace): Pass trace reading
13023 (linux_low_disable_btrace): New.
13025 2014-01-15 Doug Evans <dje@google.com>
13027 * inferiors.c (thread_id_to_gdb_id): Delete.
13028 * inferiors.h (thread_id_to_gdb_id): Delete.
13030 2014-01-13 Eli Zaretskii <eliz@gnu.org>
13032 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13033 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13036 2014-01-08 Pedro Alves <palves@redhat.com>
13038 * server.c (handle_status): Don't discard previous queued stop
13039 replies or thread's pending status here.
13040 (main) <disconnection>: Do it here instead.
13042 2014-01-08 Pedro Alves <palves@redhat.com>
13044 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13045 * server.c (visit_actioned_threads, handle_pending_status): New
13047 (handle_v_cont): Factor out parts to ...
13048 (resume): ... this new function. If in all-stop, and a thread
13049 being resumed has a pending status, report it without actually
13051 (myresume): Adjust to use the new 'resume' function.
13052 (clear_pending_status_callback, set_pending_status_callback)
13053 (find_status_pending_thread_callback): New functions.
13054 (handle_status): Handle the case of multiple threads having
13055 interesting statuses to report. Report threads' real last signal
13056 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
13057 with an interesting thread to report the status for, instead of
13058 always reporting the status of the first thread.
13060 2014-01-01 Joel Brobecker <brobecker@adacore.com>
13062 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
13063 * gdbreplay.c (gdbreplay_version): Likewise.
13065 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
13067 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
13068 iov.iov_len with the real length in use.
13070 2013-12-13 Joel Brobecker <brobecker@adacore.com>
13072 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
13073 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
13074 for all targets that use win32-low.c.
13075 * win32-low.c (win32_ensure_ntdll_loaded): New function.
13076 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
13078 2013-12-13 Pedro Alves <palves@redhat.com>
13080 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
13081 if equal to TARGET_WAITKIND_LOADED.
13082 * win32-low.c (cached_status): New static global.
13083 (win32_wait): Add declaration.
13084 (do_initial_child_stuff): Flush all initial pending debug events
13085 up to the initial breakpoint.
13086 (win32_wait): If CACHED_STATUS was set, return that instead
13087 of doing a real wait. Remove the code resuming the execution
13088 of the inferior after receiving a TARGET_WAITKIND_LOADED event
13089 during the initial phase. Also remove the code changing
13090 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13091 TARGET_WAITKIND_STOPPED.
13093 2013-12-11 Yao Qi <yao@codesourcery.com>
13095 * notif.c (handle_notif_ack): Return 0 if no notification
13098 2013-11-20 Doug Evans <dje@google.com>
13100 * linux-low.c (linux_set_resume_request): Fix comment.
13102 2013-11-20 Doug Evans <dje@google.com>
13104 * linux-low.c (resume_status_pending_p): Tweak comment.
13106 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13108 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13109 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13110 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13111 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13112 (srv_amd64_regobj): Add amd64-mpx.o.
13113 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13114 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13115 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13116 * i387-fp.c (num_pl_bnd_register) Added constant.
13117 (num_pl_bnd_cfg_registers) Added constant.
13118 (struct i387_xsave) Added reserved area and MPX fields.
13119 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13120 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13122 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13123 (init_registers_amd64_mpx_linux): Declare new function.
13124 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13125 (x86_64_regmap): Add MPX registers.
13126 (x86_linux_read_description): Add MPX case.
13127 (initialize_low_arch): Initialize MPX targets.
13129 2013-11-18 Tom Tromey <tromey@redhat.com>
13131 * configure: Rebuild.
13132 * configure.ac: Don't check for stdlib.h.
13133 * gdbreplay.c: Unconditionally include stdlib.h.
13135 2013-11-18 Tom Tromey <tromey@redhat.com>
13137 * config.in: Rebuild.
13138 * configure: Rebuild.
13139 * configure.ac: Don't use AC_HEADER_DIRENT.
13141 2013-11-18 Tom Tromey <tromey@redhat.com>
13143 * server.h: Don't check HAVE_STRING_H.
13144 * gdbreplay.c: Don't check HAVE_STRING_H.
13145 * configure: Rebuild.
13147 2013-11-18 Tom Tromey <tromey@redhat.com>
13149 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13152 2013-11-08 Tom Tromey <tromey@redhat.com>
13154 * configure, config.in: Rebuild.
13155 * configure.ac: Remove unused configury.
13157 2013-11-08 Tom Tromey <tromey@redhat.com>
13159 * acinclude.m4: Include common.m4, codeset.m4.
13160 * configure, config.in: Rebuild.
13161 * configure.ac: Use GDB_AC_COMMON.
13163 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13165 * linux-s390-low.c (HWCAP_S390_TE): New define.
13166 (s390_arch_setup): Consider the TE field in the HWCAP for
13167 determining 'have_regset_tdb'.
13169 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13172 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13175 2013-10-02 Pedro Alves <palves@redhat.com>
13177 * server.c (process_serial_event): Don't output "GDBserver
13178 exiting" if GDB is connected through stdio.
13179 * target.c (mywait): Likewise, be silent if GDB is connected
13182 2013-10-01 Joel Brobecker <brobecker@adacore.com>
13184 * lynx-low.c (lynx_add_threads_after_attach): New function.
13185 (lynx_attach): Remove call to add_thread. Add call to
13186 lynx_add_threads_after_attach instead.
13188 2013-09-28 Mike Frysinger <vapier@gentoo.org>
13190 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
13191 * config.in, configure: Regenerated.
13193 2013-09-18 Yao Qi <yao@codesourcery.com>
13196 * server.c (start_inferior): Clear 'resume_info'.
13198 2013-09-16 Jiong Wang <jiwang@tilera.com>
13200 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
13203 2013-09-16 Jiong Wang <jiwang@tilera.com>
13205 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
13206 linux-tile-low.o to srv_tgtobj.
13208 2013-09-16 Will Newton <will.newton@linaro.org>
13210 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
13213 2013-09-06 Pedro Alves <palves@redhat.com>
13215 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
13216 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
13217 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
13218 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
13219 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
13220 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
13222 2013-09-06 Pedro Alves <palves@redhat.com>
13224 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
13225 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
13227 2013-09-06 Pedro Alves <palves@redhat.com>
13229 * linux-amd64-ipa.c: Include tracepoint.h.
13230 * linux-i386-ipa.c: Include tracepoint.h.
13232 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13234 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
13235 (ps_get_thread_area): New function.
13237 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13239 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
13240 (initialize_low_arch): Call init_registers_crisv32 rather than
13241 init_register_crisv32.
13243 2013-09-05 Pedro Alves <palves@redhat.com>
13245 * server.h (handle_vFile, hostio_last_error_from_errno): Move
13247 * hostio.h: ... this new file.
13248 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
13249 win32-low.c: Include hostio.h.
13251 2013-09-05 Pedro Alves <palves@redhat.com>
13253 * server.h (gdb_client_data, handler_func, callback_handler_func)
13254 (delete_file_handler, add_file_handler, append_callback_event)
13255 (delete_callback_event, start_event_loop, initialize_event_loop):
13256 Move to event-loop.h and include it.
13257 * event-loop.h: New file.
13259 2013-09-05 Pedro Alves <palves@redhat.com>
13261 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
13262 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
13263 (loaded_dll, unloaded_dll): Move to ...
13264 * dll.h: ... this new file.
13265 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
13267 2013-09-05 Pedro Alves <palves@redhat.com>
13269 * server.h (current_process, get_thread_process, all_processes)
13270 (add_inferior_to_list, for_each_inferior, current_inferior)
13271 (remove_inferior, add_process, remove_process, find_process_pid)
13272 (have_started_inferiors_p, have_attached_inferiors_p)
13273 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
13274 (clear_inferiors, find_inferior, find_inferior_id)
13275 (inferior_target_data, set_inferior_target_data)
13276 (inferior_regcache_data, set_inferior_regcache_data): Move to
13277 inferiors.h, and include it.
13278 * inferiors.h: New file.
13280 2013-09-05 Pedro Alves <palves@redhat.com>
13282 * server.h (struct emit_ops, current_insn_ptr, emit_error):
13286 2013-09-05 Pedro Alves <palves@redhat.com>
13288 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
13290 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
13291 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
13292 (handle_tracepoint_general_set, handle_tracepoint_query)
13293 (tracepoint_finished_step, tracepoint_was_hit)
13294 (release_while_stepping_state_list, current_traceframe)
13295 (in_readonly_region, traceframe_read_mem)
13296 (fetch_traceframe_registers, traceframe_read_sdata)
13297 (traceframe_read_info, struct fast_tpoint_collect_status)
13298 (fast_tracepoint_collecting, force_unlock_trace_buffer)
13299 (handle_tracepoit_bkpts, initialize_low_tracepoint)
13300 (supply_fast_tracepoint_registers)
13301 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
13302 (ipa_tdesc, claim_trampoline_space)
13303 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
13304 (agent_mem_read, agent_get_trace_state_variable_value)
13305 (agent_set_trace_state_variable_value, agent_tsv_read)
13306 (agent_mem_read_string, get_raw_reg_func_addr)
13307 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
13308 * tracepoint.h: ... this new file.
13310 2013-09-05 Pedro Alves <palves@redhat.com>
13312 * server.h (perror_with_name, error, fatal, warning, paddress)
13313 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
13315 * utils.h: New file.
13317 2013-09-05 Pedro Alves <palves@redhat.com>
13319 * server.h (remote_debug, noack_mode, transport_is_reliable)
13320 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
13321 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
13322 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
13323 (write_enn, initialize_async_io, enable_async_io)
13324 (disable_async_io, check_remote_input_interrupt_request)
13325 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
13326 (dead_thread_notify, prepare_resume_reply)
13327 (decode_address_to_semicolon, decode_address, decode_m_packet)
13328 (decode_M_packet, decode_X_packet, decode_xfer_write)
13329 (decode_search_memory_packet, unhexify, hexify)
13330 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
13331 (look_up_one_symbol, relocate_instruction)
13332 (monitor_output): Move to remote-utils.h, and include it.
13333 * remote-utils.h: New file.
13335 2013-09-05 Pedro Alves <palves@redhat.com>
13337 * server.h (_): Delete.
13339 2013-09-02 Pedro Alves <palves@redhat.com>
13341 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
13342 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
13344 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
13346 2013-09-02 Pierre Muller <muller@sourceware.org>
13348 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
13349 or WriteProcessMemory complete successfully and handle
13350 ERROR_PARTIAL_COPY error.
13352 2013-09-02 Pedro Alves <palves@redhat.com>
13354 * server.c (gdb_read_memory): Return -1 on traceframe memory read
13355 error instead of EIO.
13357 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13360 * linux-low.c: Include filestuff.h.
13361 (linux_create_inferior) <pid == 0>: Call close_most_fds.
13362 * lynx-low.c: Include filestuff.h.
13363 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
13364 * server.c: Include filestuff.h.
13365 (main): Call notice_open_fds.
13366 * spu-low.c: Include filestuff.h.
13367 (spu_create_inferior) <pid == 0>: Call close_most_fds.
13369 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
13371 * Makefile.in: Explain why ../target and ../nat are not
13372 listed as include file search paths.
13373 (linux-waitpid.o): New object file rule.
13374 * configure.srv (srv_native_linux_obj): New variable.
13375 Replace all occurrences of linux native object files with
13376 $srv_native_linux_obj.
13377 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
13378 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
13379 (linux_enable_event_reporting): Remove declaration.
13380 (my_waitpid): Moved to common/linux-waitpid.c.
13381 (linux_wait_for_event): Pass ptid when calling
13382 linux_enable_event_reporting.
13383 (linux_supports_tracefork_flag): Remove.
13384 (linux_enable_event_reporting): Likewise.
13385 (linux_tracefork_grandchild): Remove.
13386 (STACK_SIZE): Moved to common/linux-ptrace.c.
13387 (linux_tracefork_child): Remove.
13388 (linux_test_for_tracefork): Remove.
13389 (linux_look_up_symbols): Call linux_supports_traceclone.
13390 (initialize_low): Remove call to linux_test_for_tracefork.
13391 * linux-low.h (PTRACE_TYPE_ARG3): Move to
13392 common/linux-ptrace.h.
13393 (PTRACE_TYPE_ARG4): Likewise.
13394 Include linux-ptrace.h.
13396 2013-08-21 Pedro Alves <palves@redhat.com>
13398 * config.in: Renegerate.
13400 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
13402 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
13403 (SFILES): Remove $(srcdir)/common/target-common.c and
13404 add $(srcdir)/target/waitstatus.c.
13405 (OBS): Remove target-common.o and add waitstatus.o.
13406 (server_h): Remove $(srcdir)/../common/target-common.h and
13407 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
13408 and $(srcdir)/../target/waitstatus.h.
13409 (target-common.o): Remove.
13410 (waitstatus.o): New target object file.
13411 * target.h: Do not include target-common.h and
13412 include target/resume.h, target/wait.h and
13413 target/waitstatus.h.
13415 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
13417 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13418 to PTRACE_TYPE_ARG3.
13419 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13420 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
13422 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
13423 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
13425 2013-07-27 Jie Zhang <jie@codesourcery.com>
13426 Daniel Jacobowitz <dan@codesourcery.com>
13427 Yao Qi <yao@codesourcery.com>
13429 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
13430 (mips-linux-watch.o): New rule.
13431 (mips_linux_watch_h): New variable.
13432 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
13434 * linux-mips-low.c: Include mips-linux-watch.h.
13435 (struct arch_process_info, struct arch_lwp_info): New.
13436 (update_watch_registers_callback): New function.
13437 (mips_linux_new_process, mips_linux_new_thread) New functions.
13438 (mips_linux_prepare_to_resume, mips_insert_point): New
13440 (mips_remove_point, mips_stopped_by_watchpoint): New
13442 (rsp_bp_type_to_target_hw_bp_type): New function.
13443 (mips_stopped_data_address): New function.
13444 (the_low_target): Add watchpoint support functions.
13446 2013-07-27 Yao Qi <yao@codesourcery.com>
13448 * i386-low.c: Include break-common.h.
13449 (enum target_hw_bp_type): Remove.
13451 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
13453 * Makefile.in (SFILES): /common/target-common.c.
13454 (OBS): Add target-common.o.
13455 (server_h): Add $(srcdir)/../common/target-common.h.
13456 (target-common.o): New target.
13457 * server.c (queue_stop_reply_callback): Free
13458 status string after use.
13459 * target.c (target_waitstatus_to_string): Remove.
13460 * target.h: Include target-common.h.
13461 (resume_kind): Likewise.
13462 (target_waitkind): Likewise.
13463 (target_waitstatus): Likewise.
13464 (TARGET_WNOHANG): Likewise.
13466 2013-07-04 Yao Qi <yao@codesourcery.com>
13468 * Makefile.in (host_alias): Use @host_noncanonical@.
13469 (target_alias): Use @target_noncanonical@.
13470 * configure.ac: Use ACX_NONCANONICAL_TARGET and
13471 ACX_NONCANONICAL_HOST.
13472 * configure: Regenerated.
13475 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13477 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13478 * configure: Rebuild.
13479 * Makefile.in (version_host, version_target): Get from configure.
13480 (version.c): Use $(version_host) and $(version_target).
13482 2013-07-03 Pedro Alves <palves@redhat.com>
13484 * Makefile.in (config.status): Depend on development.sh.
13485 * acinclude.m4: Include libmcheck.m4.
13486 * configure: Regenerate.
13488 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13490 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
13491 attribute inside the parentheses.
13492 (winapi_DebugSetProcessKillOnExit): Ditto.
13493 (winapi_DebugBreakProcess): Ditto.
13494 (winapi_GenerateConsoleCtrlEvent): Ditto.
13496 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13498 * notif.h (notif_event): Add a dummy member to avoid compiler
13501 2013-07-01 Pedro Alves <palves@redhat.com>
13503 * hostio.c (HOSTIO_PATH_MAX): Define.
13504 (require_filename, handle_open, handle_unlink, handle_readlink):
13507 2013-07-01 Pedro Alves <palves@redhat.com>
13509 * server.h: Include "pathmax.h".
13510 * linux-low.c: Don't include sys/param.h.
13511 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
13513 * win32-low.c: Don't include sys/param.h.
13514 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
13516 2013-07-01 Pedro Alves <palves@redhat.com>
13518 * event-loop.c: Don't check HAVE_UNISTD_H before including
13520 * gdbreplay.c: Likewise.
13521 * remote-utils.c: Likewise.
13522 * server.c: Likewise.
13523 * configure.ac: Don't check for unistd.h.
13524 * configure: Regenerate.
13526 2013-06-28 Tom Tromey <tromey@redhat.com>
13528 * Makefile.in (version.c): Use version.in, not
13531 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13533 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13534 * configure: Rebuild.
13535 * Makefile.in (version_host, version_target): Get from configure.
13536 (version.c): Use $(version_host) and $(version_target).
13538 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13540 Fix trace-status to output user name without trailing colon.
13541 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
13543 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13545 Fix trace-status to output proper start-time and stop-time.
13546 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
13547 output start time and stop time in hex as gdb expects.
13549 2013-06-26 Pedro Alves <pedro@codesourcery.com>
13551 * tracepoint.c (build_traceframe_info_xml): Output trace state
13552 variables present in the trace buffer.
13554 2013-06-24 Tom Tromey <tromey@redhat.com>
13556 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
13558 (version.o): Remove.
13559 * gdbreplay.c: Include version.h.
13560 (version, host_name): Don't declare.
13561 * server.h: Include version.h.
13562 (version, host_name): Don't declare.
13564 2013-06-12 Pedro Alves <palves@redhat.com>
13566 * linux-x86-low.c (linux_is_elf64): Delete global.
13567 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
13568 with local linux_pid_exe_is_elf_64_file use.
13570 2013-06-11 Pedro Alves <palves@redhat.com>
13572 * linux-low.c (regset_disabled, disable_regset): New functions.
13573 (regsets_fetch_inferior_registers)
13574 (regsets_store_inferior_registers): Use them.
13575 (initialize_regsets_info); Don't allocate the disabled_regsets
13577 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
13580 2013-06-11 Pedro Alves <palves@redhat.com>
13582 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
13585 2013-06-11 Pedro Alves <palves@redhat.com>
13587 * linux-x86-low.c (initialize_low_arch): Call
13588 init_registers_x32_avx_linux.
13590 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
13592 Fix compatibility with Android Bionic.
13593 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
13596 2013-06-07 Pedro Alves <palves@redhat.com>
13599 * Makefile.in (OBS): Add tdesc.o.
13600 (IPA_OBJS): Add tdesc-ipa.o.
13601 (tdesc-ipa.o): New rule.
13602 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
13604 * linux-low.c (new_inferior): Delete.
13605 (disabled_regsets, num_regsets): Delete.
13606 (linux_add_process): Adjust to set the new per-process
13608 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
13609 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
13610 was a stop. When calling arch_setup, switch the current inferior
13611 to the thread that got an event.
13612 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
13613 (regsets_fetch_inferior_registers)
13614 (regsets_store_inferior_registers): New regsets_info parameter.
13616 (linux_register_in_regsets): New regs_info parameter. Adjust to
13618 (register_addr, fetch_register, store_register): New usrregs_info
13619 parameter. Adjust to use it.
13620 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
13621 parameter regs_info. Adjust to use it.
13622 (linux_fetch_registers): Get the current inferior's regs_info, and
13624 (linux_store_registers): Ditto.
13625 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
13626 (initialize_low): Don't initialize the target_regsets here. Call
13627 initialize_low_arch.
13628 * linux-low.h (target_regsets): Delete declaration.
13629 (struct regsets_info): New.
13630 (struct usrregs_info): New.
13631 (struct regs_info): New.
13632 (struct process_info_private) <new_inferior>: New field.
13633 (struct linux_target_ops): Delete the num_regs, regmap, and
13634 regset_bitmap fields. New field regs_info.
13635 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
13636 * i387-fp.c (num_xmm_registers): Delete.
13637 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
13638 calls to new interface.
13639 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
13640 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
13641 Infer the number of xmm registers from the regcache's target
13643 * i387-fp.h (num_xmm_registers): Delete.
13644 * inferiors.c (add_thread): Don't install the thread's regcache
13646 * proc-service.c (gregset_info): Fetch the current inferior's
13647 regs_info. Adjust to use it.
13648 * regcache.c: Include tdesc.h.
13649 (register_bytes, reg_defs, num_registers)
13650 (gdbserver_expedite_regs): Delete.
13651 (get_thread_regcache): If the thread doesn't have a regcache yet,
13652 create one, instead of aborting gdbserver.
13653 (regcache_invalidate_one): Rename to ...
13654 (regcache_invalidate_thread): ... this.
13655 (regcache_invalidate_one): New.
13656 (regcache_invalidate): Only invalidate registers of the current
13658 (init_register_cache): Add target_desc parameter, and use it.
13659 (new_register_cache): Ditto. Assert the target description has a
13660 non zero registers_size.
13661 (regcache_cpy): Add assertions. Adjust.
13662 (realloc_register_cache, set_register_cache): Delete.
13663 (registers_to_string, registers_from_string): Adjust.
13664 (find_register_by_name, find_regno, find_register_by_number)
13665 (register_cache_size): Add target_desc parameter, and use it.
13666 (free_register_cache_thread, free_register_cache_thread_one)
13667 (regcache_release, register_cache_size): New.
13668 (register_size): Add target_desc parameter, and use it.
13669 (register_data, supply_register, supply_register_zeroed)
13670 (supply_regblock, supply_register_by_name, collect_register)
13671 (collect_register_as_string, collect_register_by_name): Adjust.
13672 * regcache.h (struct target_desc): Forward declare.
13673 (struct regcache) <tdesc>: New field.
13674 (init_register_cache, new_register_cache): Add target_desc
13676 (regcache_invalidate_thread): Declare.
13677 (regcache_invalidate_one): Delete declaration.
13678 (regcache_release): Declare.
13679 (find_register_by_number, register_cache_size, register_size)
13680 (find_regno): Add target_desc parameter.
13681 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
13683 * remote-utils.c: Include tdesc.h.
13684 (outreg, prepare_resume_reply): Adjust.
13685 * server.c: Include tdesc.h.
13686 (gdbserver_xmltarget): Delete declaration.
13687 (get_features_xml, process_serial_event): Adjust.
13688 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
13690 (struct process_info) <tdesc>: New field.
13691 (ipa_tdesc): Declare.
13692 * tdesc.c: New file.
13693 * tdesc.h: New file.
13694 * tracepoint.c: Include tdesc.h.
13695 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
13696 (get_context_regcache): Adjust to pass ipa_tdesc down.
13697 (do_action_at_tracepoint): Adjust to get the register cache size
13698 from the context regcache's description.
13699 (traceframe_walk_blocks): Adjust to get the register cache size
13700 from the current trace frame's description.
13701 (traceframe_get_pc): Adjust to get current trace frame's
13702 description and pass it down.
13703 (gdb_collect): Adjust to get the register cache size from the
13705 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
13706 (gdbserver_xmltarget): Delete.
13707 (initialize_low_tracepoint): Set the ipa's target description.
13708 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
13709 (initialize_low_tracepoint): Set the ipa's target description.
13710 * linux-x86-low.c: Include tdesc.h.
13711 [__x86_64__] (is_64bit_tdesc): New.
13712 (ps_get_thread_area, x86_get_thread_area): Use it.
13713 (i386_cannot_store_register): Rename to ...
13714 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
13715 (i386_cannot_fetch_register): Rename to ...
13716 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
13717 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
13719 (target_regsets): Rename to ...
13720 (x86_regsets): ... this.
13721 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
13723 (x86_siginfo_fixup): Use is_64bit_tdesc.
13724 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
13725 (tdesc_x32_avx_linux, tdesc_x32_linux)
13726 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
13728 (x86_linux_update_xmltarget): Delete.
13729 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
13730 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
13731 (AMD64_LINUX_USER64_CS): New.
13732 (x86_linux_read_description): New, based on
13733 x86_linux_update_xmltarget.
13734 (same_process_callback): New.
13735 (x86_arch_setup_process_callback): New.
13736 (x86_linux_update_xmltarget): New.
13737 (x86_regsets_info): New.
13738 (amd64_linux_regs_info): New.
13739 (i386_linux_usrregs_info): New.
13740 (i386_linux_regs_info): New.
13741 (x86_linux_regs_info): New.
13742 (x86_arch_setup): Reimplement.
13743 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
13744 (x86_emit_ops): Ditto.
13745 (the_low_target): Adjust. Install x86_linux_regs_info,
13746 x86_cannot_fetch_register, and x86_cannot_store_register.
13747 (initialize_low_arch): New.
13748 * linux-ia64-low.c (tdesc_ia64): Declare.
13749 (ia64_fetch_register): Adjust.
13750 (ia64_usrregs_info, regs_info): New globals.
13751 (ia64_regs_info): New function.
13752 (the_low_target): Adjust.
13753 (initialize_low_arch): New function.
13754 * linux-sparc-low.c (tdesc_sparc64): Declare.
13755 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
13757 (sparc_arch_setup): New function.
13758 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
13759 (the_low_target): Adjust.
13760 (initialize_low_arch): New function.
13761 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
13762 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
13763 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
13764 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
13765 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
13766 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
13767 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
13768 (tdesc_powerpc_isa205_vsx64l): Declare.
13769 (ppc_cannot_store_register, ppc_collect_ptrace_register)
13770 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
13771 (ppc_set_pc, ppc_get_hwcap): Adjust.
13772 (ppc_usrregs_info): Forward declare.
13773 (!__powerpc64__) ppc_regmap_adjusted: New global.
13774 (ppc_arch_setup): Adjust to the current process'es target
13776 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
13777 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
13778 (ppc_store_evrregset): Adjust.
13779 (target_regsets): Rename to ...
13780 (ppc_regsets): ... this, and make static.
13781 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
13782 (ppc_regs_info): New function.
13783 (the_low_target): Adjust.
13784 (initialize_low_arch): New function.
13785 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
13786 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
13787 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
13788 (tdesc_s390x_linux64v2): Declare.
13789 (s390_collect_ptrace_register, s390_supply_ptrace_register)
13790 (s390_fill_gregset, s390_store_last_break): Adjust.
13791 (target_regsets): Rename to ...
13792 (s390_regsets): ... this, and make static.
13793 (s390_get_pc, s390_set_pc): Adjust.
13794 (s390_get_hwcap): New target_desc parameter, and use it.
13795 [__s390x__] (have_hwcap_s390_high_gprs): New global.
13796 (s390_arch_setup): Adjust to set the current process'es target
13797 description. Don't adjust the regmap.
13798 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
13799 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
13800 (regs_info_3264): New globals.
13801 (s390_regs_info): New function.
13802 (the_low_target): Adjust.
13803 (initialize_low_arch): New function.
13804 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
13805 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
13806 [__mips64] (init_registers_mips_linux)
13807 (init_registers_mips_dsp_linux): Delete defines.
13808 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
13809 (have_dsp): New global.
13810 (mips_read_description): New, based on mips_arch_setup.
13811 (mips_arch_setup): Reimplement.
13812 (get_usrregs_info): New function.
13813 (mips_cannot_fetch_register, mips_cannot_store_register)
13814 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
13815 (mips_fill_fpregset, mips_store_fpregset): Adjust.
13816 (target_regsets): Rename to ...
13817 (mips_regsets): ... this, and make static.
13818 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
13819 (dsp_regs_info, regs_info): New globals.
13820 (mips_regs_info): New function.
13821 (the_low_target): Adjust.
13822 (initialize_low_arch): New function.
13823 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
13824 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
13826 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
13827 (arm_read_description): New, with bits factored from
13829 (arm_arch_setup): Reimplement.
13830 (target_regsets): Rename to ...
13831 (arm_regsets): ... this, and make static.
13832 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
13833 (arm_regs_info): New function.
13834 (the_low_target): Adjust.
13835 (initialize_low_arch): New function.
13836 * linux-m68k-low.c (tdesc_m68k): Declare.
13837 (target_regsets): Rename to ...
13838 (m68k_regsets): ... this, and make static.
13839 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
13840 (m68k_regs_info): New function.
13841 (m68k_arch_setup): New function.
13842 (the_low_target): Adjust.
13843 (initialize_low_arch): New function.
13844 * linux-sh-low.c (tdesc_sharch): Declare.
13845 (target_regsets): Rename to ...
13846 (sh_regsets): ... this, and make static.
13847 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
13848 (sh_regs_info, sh_arch_setup): New functions.
13849 (the_low_target): Adjust.
13850 (initialize_low_arch): New function.
13851 * linux-bfin-low.c (tdesc_bfin): Declare.
13852 (bfin_arch_setup): New function.
13853 (bfin_usrregs_info, regs_info): New globals.
13854 (bfin_regs_info): New function.
13855 (the_low_target): Adjust.
13856 (initialize_low_arch): New function.
13857 * linux-cris-low.c (tdesc_cris): Declare.
13858 (cris_arch_setup): New function.
13859 (cris_usrregs_info, regs_info): New globals.
13860 (cris_regs_info): New function.
13861 (the_low_target): Adjust.
13862 (initialize_low_arch): New function.
13863 * linux-cris-low.c (tdesc_crisv32): Declare.
13864 (cris_arch_setup): New function.
13865 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
13866 (cris_regs_info): New function.
13867 (the_low_target): Adjust.
13868 (initialize_low_arch): New function.
13869 * linux-m32r-low.c (tdesc_m32r): Declare.
13870 (m32r_arch_setup): New function.
13871 (m32r_usrregs_info, regs_info): New globals.
13872 (m32r_regs_info): Adjust.
13873 (initialize_low_arch): New function.
13874 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
13875 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
13876 (tic6x_usrregs_info): Forward declare.
13877 (tic6x_read_description): New function, based on ...
13878 (tic6x_arch_setup): ... this. Reimplement.
13879 (target_regsets): Rename to ...
13880 (tic6x_regsets): ... this, and make static.
13881 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
13882 (tic6x_regs_info): New function.
13883 (the_low_target): Adjust.
13884 (initialize_low_arch): New function.
13885 * linux-xtensa-low.c (tdesc_xtensa): Declare.
13886 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
13887 (target_regsets): Rename to ...
13888 (xtensa_regsets): ... this, and make static.
13889 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
13891 (xtensa_arch_setup, xtensa_regs_info): New functions.
13892 (the_low_target): Adjust.
13893 (initialize_low_arch): New function.
13894 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
13895 (nios2_arch_setup): Set the current process'es tdesc.
13896 (target_regsets): Rename to ...
13897 (nios2_regsets): ... this.
13898 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
13899 (nios2_regs_info): New function.
13900 (the_low_target): Adjust.
13901 (initialize_low_arch): New function.
13902 * linux-aarch64-low.c (tdesc_aarch64): Declare.
13903 (aarch64_arch_setup): Set the current process'es tdesc.
13904 (target_regsets): Rename to ...
13905 (aarch64_regsets): ... this.
13906 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
13907 (aarch64_regs_info): New function.
13908 (the_low_target): Adjust.
13909 (initialize_low_arch): New function.
13910 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
13912 (target_regsets): Rename to ...
13913 (tile_regsets): ... this.
13914 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
13915 (tile_regs_info): New function.
13916 (tile_arch_setup): Set the current process'es tdesc.
13917 (the_low_target): Adjust.
13918 (initialize_low_arch): New function.
13919 * spu-low.c (tdesc_spu): Declare.
13920 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
13921 * win32-arm-low.c (tdesc_arm): Declare.
13922 (arm_arch_setup): New function.
13923 (the_low_target): Install arm_arch_setup instead of
13924 init_registers_arm.
13925 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
13926 (init_windows_x86): Rename to ...
13927 (i386_arch_setup): ... this. Set `win32_tdesc'.
13928 (the_low_target): Adjust.
13929 * win32-low.c (win32_tdesc): New global.
13930 (child_add_thread): Don't create the thread cache here.
13931 (do_initial_child_stuff): Set the new process'es tdesc.
13932 * win32-low.h (struct target_desc): Forward declare.
13933 (win32_tdesc): Declare.
13934 * lynx-i386-low.c (tdesc_i386): Declare global.
13935 (lynx_i386_arch_setup): Set `lynx_tdesc'.
13936 * lynx-low.c (lynx_tdesc): New global.
13937 (lynx_add_process): Set the new process'es tdesc.
13938 * lynx-low.h (struct target_desc): Forward declare.
13939 (lynx_tdesc): Declare global.
13940 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
13941 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
13942 * nto-low.c (nto_tdesc): New global.
13943 (do_attach): Set the new process'es tdesc.
13944 * nto-low.h (struct target_desc): Forward declare.
13945 (nto_tdesc): Declare.
13946 * nto-x86-low.c (tdesc_i386): Declare.
13947 (nto_x86_arch_setup): Set `nto_tdesc'.
13949 2013-06-04 Gary Benson <gbenson@redhat.com>
13951 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
13952 to qSupported response when appropriate.
13953 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
13954 with nonzero-length annex.
13955 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
13956 arguments supplied in annex.
13958 2013-05-31 Doug Evans <dje@google.com>
13961 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
13962 64 bits in 64-cross-32 environment.
13964 2013-05-28 Pedro Alves <palves@redhat.com>
13966 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
13967 (aarch64-without-fpu.c): Delete rule.
13968 * configure.srv (aarch64*-*-linux*): Remove references to
13969 aarch64-without-fpu.o and aarch64-without-fpu.xml.
13970 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
13973 2013-05-24 Pedro Alves <palves@redhat.com>
13975 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
13976 instead of strchr/decode_address. Error if the range isn't split
13977 with a ','. Don't assume there's be a ':' in the action.
13979 2013-05-23 Yao Qi <yao@codesourcery.com>
13980 Pedro Alves <palves@redhat.com>
13982 * linux-low.c (lwp_in_step_range): New function.
13983 (linux_wait_1): If the thread was range stepping and stopped
13984 outside the stepping range, report the stop to GDB. Otherwise,
13985 continue stepping. Add range stepping debug output.
13986 (linux_set_resume_request): Copy the step range from the resume
13987 request to the lwp.
13988 (linux_supports_range_stepping): New.
13989 (linux_target_ops) <supports_range_stepping>: Set to
13990 linux_supports_range_stepping.
13991 * linux-low.h (struct linux_target_ops)
13992 <supports_range_stepping>: New field.
13993 (struct lwp_info) <step_range_start, step_range_end>: New fields.
13994 * linux-x86-low.c (x86_supports_range_stepping): New.
13995 (the_low_target) <supports_range_stepping>: Set to
13996 x86_supports_range_stepping.
13997 * server.c (handle_v_cont): Handle 'r' action.
13998 (handle_v_requests): Append ";r" if the target supports range
14000 * target.h (struct thread_resume) <step_range_start,
14001 step_range_end>: New fields.
14002 (struct target_ops) <supports_range_stepping>:
14004 (target_supports_range_stepping): New macro.
14006 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14008 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14009 confusion in comment.
14011 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14013 * lynx-low.c (struct process_info_private): New type.
14014 (lynx_add_process): New function.
14015 (lynx_create_inferior, lynx_attach): Replace calls to
14016 add_process by calls to lynx_add_process.
14017 (lynx_resume): If PTID is null, then try using
14018 current_process()->private->last_wait_event_ptid.
14020 (lynx_clear_inferiors): Delete. The contents of that function
14021 has been inlined in lynx_mourn;
14022 (lynx_wait_1): Save the ptid in the process's private data.
14023 (lynx_mourn): Free the process' private data. Replace call
14024 to lynx_clear_inferiors by call to clear_inferiors.
14026 2013-05-17 Yao Qi <yao@codesourcery.com>
14028 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14031 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
14033 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14034 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14035 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14036 PT_TEXT_END_ADDR guards. Update comments.
14037 (linux_target_op) <read_offsets>: Conditionally define to
14038 linux_read_offsets if the target is UCLIBC and if it defines
14039 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14041 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14042 Andrew Jenner <andrew@codesourcery.com>
14044 * Makefile.in (SFILES): Add linux-nios2-low.c.
14045 (clean): Add action to delete nios2-linux.c.
14046 (nios2-linux.c): New rule.
14047 * configure.srv: Add nios2*-*-linux*.
14048 * linux-nios2-low.c: New.
14050 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14052 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14054 2013-04-25 Hui Zhu <hui@codesourcery.com>
14057 * ax.c (ax_printf): Add fflush.
14059 2013-04-22 Tom Tromey <tromey@redhat.com>
14061 * Makefile.in (SFILES): Add filestuff.c.
14062 (OBS): Add filestuff.o.
14063 (filestuff.o): New target.
14064 * config.in, configure: Rebuild.
14065 * configure.ac: Check for fdwalk, pipe2.
14067 2013-04-17 Pedro Alves <palves@redhat.com>
14069 * configure.ac (USE_THREAD_DB): Delete variable.
14070 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
14071 Don't AC_SUBST USE_THREAD_DB.
14072 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
14073 * config.in, configure: Regenerate.
14075 2013-04-16 Pedro Alves <palves@redhat.com>
14077 * linux-low.h (struct lwp_info) <thread_known>: Move under
14078 the USE_THREAD_DB #ifdef.
14080 2013-04-16 Pedro Alves <palves@redhat.com>
14082 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
14083 (linux-low.o): Delete rule.
14084 * linux-low.h: Always include "gdb_thread_db.h" instead of
14085 conditionally including thread_db.h.
14086 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
14089 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14091 * Makefile.in (install-only): Fix make install regression.
14093 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14095 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14096 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14098 * gdbserver.1: Remove.
14100 2013-03-22 Pedro Alves <palves@redhat.com>
14102 * linux-low.c (handle_extended_wait): Don't call
14103 linux_enable_event_reporting.
14105 2013-03-15 Tony Theodore <tonyt@logyst.com>
14108 * Makefile.in (SHELL): Use @SHELL@.
14110 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14112 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14115 2013-03-13 Joel Brobecker <brobecker@adacore.com>
14117 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14118 Remove extraneous NULL element.
14120 2013-03-13 Yao Qi <yao@codesourcery.com>
14122 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14123 'V' block in trace frame.
14125 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14127 * target.h (struct target_ops): Add btrace ops.
14128 (target_supports_btrace): New macro.
14129 (target_enable_btrace): New macro.
14130 (target_disable_btrace): New macro.
14131 (target_read_btrace): New macro.
14132 * gdbthread.h (struct thread_info): Add btrace field.
14133 * server.c: Include btrace-common.h.
14134 (handle_btrace_general_set): New function.
14135 (handle_btrace_enable): New function.
14136 (handle_btrace_disable): New function.
14137 (handle_general_set): Call handle_btrace_general_set.
14138 (handle_qxfer_btrace): New function.
14139 (struct qxfer qxfer_packets[]): Add btrace entry.
14140 * inferiors.c (remove_thread): Disable btrace.
14141 * linux-low: Include linux-btrace.h.
14142 (linux_low_enable_btrace): New function.
14143 (linux_low_read_btrace): New function.
14144 (linux_target_ops): Add btrace ops.
14145 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14146 Add srv_linux_btrace=yes.
14147 (x86_64-*-linux*): Add linux-btrace.o.
14148 Add srv_linux_btrace=yes.
14149 * configure.ac: Define HAVE_LINUX_BTRACE.
14150 * config.in: Regenerated.
14151 * configure: Regenerated.
14153 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14155 * server.c (handle_qxfer): Preserve error message if -3 is
14157 (qxfer): Document the -3 return value.
14159 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14161 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14162 (linux_btrace_h): New variable.
14163 (linux-btrace.o): New rule.
14165 2013-03-08 Stan Shebs <stan@codesourcery.com>
14166 Hafiz Abid Qadeer <abidh@codesourcery.com>
14168 * tracepoint.c (trace_buffer_size): New global.
14169 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14170 (init_trace_buffer): Change to one-argument function. Allocate
14171 trace buffer memory.
14172 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14173 handle QTBuffer:size packet.
14174 (cmd_bigqtbuffer_size): New function.
14175 (initialize_tracepoint): Call init_trace_buffer with
14176 DEFAULT_TRACE_BUFFER_SIZE.
14177 * server.c (handle_query): Add QTBuffer:size in the
14180 2013-03-07 Yao Qi <yao@codesourcery.com>
14182 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
14183 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
14185 (cmd_qtsp): Adjust condition. Do post increment.
14186 Set cur_action and cur_step_action back to 0.
14188 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
14191 * linux-low.c (linux_write_memory): Return early success if LEN is
14194 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
14196 * configure.srv: Add x86_64-*-cygwin* as target.
14198 2013-02-28 Tom Tromey <tromey@redhat.com>
14200 * configure.ac: Invoke AC_SYS_LARGEFILE.
14201 * configure, config.in: Rebuild.
14203 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
14205 * win32-low.c: Throughout, fix format strings and casts of
14206 printf-like functions to avoid type related warnings on all
14208 (get_child_debug_event): Print dwDebugEventCode as hex since
14209 that's how it's usually documented.
14211 2013-02-28 Yao Qi <yao@codesourcery.com>
14213 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
14216 2013-02-27 Jiong Wang <jiwang@tilera.com>
14218 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
14219 (reg-tilegx32.c): New rule.
14220 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
14221 * linux-tile-low.c (tile_arch_setup): New function. Invoke
14222 different register info initializer according to elf class.
14223 (init_registers_tilgx32): New function. The tilegx32 register info
14225 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
14226 (tile_store_gregset): Likewise.
14228 2013-02-27 Yao Qi <yao@codesourcery.com>
14230 * server.c (process_point_options): Print debug message when
14231 debug_threads is true.
14233 2013-02-26 Yao Qi <yao@codesourcery.com>
14235 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
14237 2013-02-19 Pedro Alves <palves@redhat.com>
14238 Kai Tietz <ktietz@redhat.com>
14242 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
14243 instead of strtoul to extract address from packet.
14244 (process_serial_event) <'z'>: Likewise.
14246 2013-02-18 Yao Qi <yao@codesourcery.com>
14248 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
14250 2013-02-14 Pedro Alves <palves@redhat.com>
14254 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
14255 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
14257 2013-02-14 Pedro Alves <palves@redhat.com>
14259 * tracepoint.c (cmd_qtdpsrc): Use savestring.
14261 2013-02-14 Pedro Alves <palves@redhat.com>
14263 * tracepoint.c (save_string): Delete.
14264 (add_tracepoint_action): Use savestring instead of save_string.
14266 2013-02-12 Pedro Alves <palves@redhat.com>
14268 * linux-xtensa-low.c: Ditto.
14269 * xtensa-xtregs.c: Ditto.
14271 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
14273 * thread-db.c (thread_db_get_tls_address): NULL pointer check
14276 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14278 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
14279 aarch64_num_wp_regs and aarch64_num_bp_regs to
14280 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
14282 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14284 * linux-aarch64-low.c (ps_get_thread_area): Replace
14285 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
14287 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
14288 Marcus Shawcroft <marcus.shawcroft@arm.com>
14289 Nigel Stephens <nigel.stephens@arm.com>
14290 Yufeng Zhang <yufeng.zhang@arm.com>
14292 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
14293 (aarch64.c, aarch64-without-fpu.c): New targets.
14294 * configure.srv (aarch64*-*-linux*): New.
14295 * linux-aarch64-low.c: New file.
14297 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
14299 * linux-low.c (handle_extended_wait, linux_create_inferior)
14300 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
14301 (dequeue_one_deferred_signal, linux_resume_one_thread)
14302 (fetch_register, linux_write_memory, linux_enable_event_reporting)
14303 (linux_tracefork_grandchild, linux_test_for_tracefork)
14304 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
14305 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
14306 where the argument is 0.
14308 2013-01-25 Yao Qi <yao@codesourcery.com>
14310 * event-loop.c: Include "queue.h".
14311 (gdb_event_p): New typedef.
14312 (struct gdb_event) <next_event>: Remove.
14313 (event_queue): Change to QUEUE(gdb_event_p).
14314 (async_queue_event): Remove.
14315 (gdb_event_xfree): New.
14316 (initialize_event_loop): New.
14317 (process_event): Use API from QUEUE.
14318 (wait_for_event): Likewise.
14319 * server.c (main): Call initialize_event_loop.
14320 * server.h (initialize_event_loop): Declare.
14322 2013-01-18 Yao Qi <yao@codesourcery.com>
14324 * ax.h (struct eval_agent_expr_context): New.
14325 (gdb_eval_agent_expr): Update declaration.
14326 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
14327 TFRAME. Add new argument CTX.
14328 * server.h (struct eval_agent_expr_context): Declare.
14329 (agent_mem_read, agent_tsv_read): Update declaration.
14330 (agent_mem_read_string): Likewise.
14331 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
14332 (add_traceframe_block): Add new argument TPOINT.
14333 Increase TPOINT->traceframe_usage.
14334 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
14335 eval_tracepoint_agent_expr.
14336 (condition_true_at_tracepoint): Likewise.
14337 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
14338 (agent_mem_read_string, agent_tsv_read): Likewise.
14340 2013-01-16 Yao Qi <yao@codesourcery.com>
14342 * linux-low.c (linux_resume_one_lwp): Don't check
14343 'lwp->bp_reinsert != 0'.
14345 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14346 Pedro Alves <palves@redhat.com>
14348 * lynx-low.c (ptrace_request_to_str): Define a temporary
14349 macro and use it to simplify this function's implementation.
14351 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14353 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
14356 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14358 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
14360 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14362 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
14364 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14366 * lynx-low.c (lynx_resume): Use the resume_info parameter
14367 to determine the ptid for the lynx_ptrace call, unless
14368 it is equal to minus_one_ptid, in which case we use the
14369 ptid of the current_inferior.
14370 (lynx_wait_1): After having received a thread create/exit
14371 event, resume the inferior's execution using the signaling
14372 thread's ptid, rather than the old ptid.
14374 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14376 * lynx-low.c (lynx_resume): Delete variable ret.
14378 2013-01-01 Joel Brobecker <brobecker@adacore.com>
14380 * gdbreplay.c (gdbreplay_version): Update copyright year.
14381 * server.c (gdbserver_version): Likewise.
14383 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14385 * lynx-low.c (lynx_wait_1): Add debug trace before adding
14388 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14390 * lynx-low.c (ptrace_request_to_str): Add handling for
14391 PTRACE_GETTRACESIG.
14393 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14395 * lynx-low.c (lynx_attach): Delete variable new_process.
14397 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14399 * lynx-low.c (lynx_create_inferior): Delete variable
14402 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14404 * lynx-low.c (ptrace_request_to_str): Do not handle
14405 PTRACE_GETTHREADLIST if this macro does not exist.
14407 2012-12-15 Yao Qi <yao@codesourcery.com>
14409 * Makefile.in (OBS): Add notif.o.
14410 * notif.c, notif.h: New.
14411 * server.c: Include "notif.h".
14412 (struct vstop_notif) <next>: Remove.
14414 (queue_stop_reply): Update.
14415 (push_event, send_next_stop_reply): Remove.
14416 (discard_queued_stop_replies): Update.
14417 (notif_stop): New variable.
14418 (handle_v_stopped): Remove.
14419 (handle_v_requests): Don't call handle_v_stopped. Call
14420 handle_ack_notif instead.
14421 (queue_stop_reply_callback): Call notif_event_enque instead
14422 of queue_stop_reply.
14423 (handle_status): Don't call send_next_stop_reply, call
14424 notif_write_event instead.
14425 (kill_inferior_callback): Likewise.
14426 (detach_or_kill_inferior_callback): Likewise.
14427 (main): Call initialize_notif.
14428 (process_serial_event): Call QUEUE_is_empty.
14429 (handle_target_event): Call notif_push instead of push event.
14430 * server.h (push_event): Remove declaration.
14432 2012-12-10 Tom Tromey <tromey@redhat.com>
14434 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
14435 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
14438 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
14439 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
14440 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
14441 (amd64-linux-ipa.o, ax.o): Rewrite.
14442 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
14443 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
14444 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
14445 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
14446 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
14447 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
14448 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
14449 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
14450 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
14451 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
14452 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
14453 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
14454 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
14455 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
14456 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
14457 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
14458 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
14459 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
14460 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
14461 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
14462 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
14463 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
14464 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
14465 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
14466 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
14467 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
14468 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
14469 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
14470 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
14471 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
14472 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
14473 (reg-tilegx.o): Remove.
14474 (all_object_files): New macro.
14475 Include .deps files.
14476 * aclocal.m4, configure: Rebuild.
14477 * acinclude.m4: Include depstand.m4, lead-dot.m4.
14478 * configure.ac: Invoke ZW_CREATE_DEPDIR,
14479 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
14481 2012-12-05 Tom Tromey <tromey@redhat.com>
14484 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
14486 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
14488 * configure.ac: Check for linux/perf_event.h.
14489 * config.in: Regenerated.
14490 * configure: Regenerated.
14492 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
14494 * hostio.c (handle_readlink): Decrease buffer size
14495 parameter passed to readlink by one byte.
14497 2012-11-26 Yao Qi <yao@codesourcery.com>
14499 * configure.ac (build_warnings): Append '-Wempty-body'.
14500 * configure: Regenerated.
14501 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
14504 2012-11-15 Pierre Muller <muller@sourceware.org>
14506 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
14507 * config.in: Regenerate.
14508 * configure: Regenerate.
14509 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
14510 Use "gdb_wait.h" header instead of <sys/wait.h> header.
14511 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14512 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
14514 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
14515 instead of <sys/wait.h> header.
14516 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14518 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
14520 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
14521 (various make rules): Remove -DGDBSERVER
14523 2012-11-09 Yao Qi <yao@codesourcery.com>
14525 * spu-low.c (current_ptid): Move it to ..
14526 * gdbthread.h: ... here. New.
14527 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
14528 * server.c (myresume, process_serial_event): Likewise.
14529 * thread-db.c (thread_db_find_new_threads): Likewise.
14530 * tracepoint.c (run_inferior_command): Likewise.
14532 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
14534 * server.c (handle_search_memory_1): Include access length in
14537 2012-09-05 Michael Brandt <michael.brandt@axis.com>
14539 * linux-crisv32-low.c: Fix compile errors.
14541 2012-09-04 Yao Qi <yao@codesourcery.com>
14543 * tracepoint.c (cmd_qtsv): Adjust debug message.
14544 Don't check CUR_TPOINT.
14546 2012-08-28 Yao Qi <yao@codesourcery.com>
14548 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
14549 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
14550 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
14551 Remove declarations of xmalloc, xreallloc, xstrdup and
14553 * Makefile.in (libiberty_h): New.
14554 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
14555 (linux-bfin-low.o): Append dependency 'libiberty.h'.
14557 2012-08-23 Yao Qi <yao@codesourcery.com>
14559 * server.h: Remove declaration of 'xsnprintf'.
14561 2012-08-22 Keith Seitz <keiths@redhat.com>
14563 * server.h: Include build-gnulib-gbserver/config.h.
14564 * gdbreplay.c: Likewise.
14566 2012-08-08 Doug Evans <dje@google.com>
14568 * Makefile.in (SFILES): Add gdb_vecs.c.
14569 (OBS): Add gdb_vecs.o.
14570 (gdb_vecs_h, host_defs_h): New variables.
14571 (thread-db.o): Add $(gdb_vecs_h) dependency.
14572 (gdb_vecs.o): New rule.
14573 * thread-db.c: #include "gdb_vecs.h".
14574 (thread_db_load_search): Use a vector to iterate over path elements.
14575 Handle text appearing after "$pdir".
14577 * configure.ac: Add check for strstr.
14578 * config.in: Regenerate.
14579 * configure: Regenerate.
14581 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
14583 * hostio.c (handle_pread): If pread fails, fall back to attempting
14585 (handle_pwrite): Likewise for pwrite.
14587 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
14589 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
14590 between unsupported TYPE and unimplementable ADDR/LEN combination.
14591 (arm_insert_point): Act on new return value.
14593 2012-07-31 Pedro Alves <palves@redhat.com>
14595 * server.c (process_point_options): Only skip tokens if we find
14596 one that is unrecognized. Don't treat 'X' specially while
14597 skipping unrecognized tokens.
14599 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
14601 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
14602 to 4-byte-align HW breakpoint addresses for Thumb.
14604 2012-07-27 Yao Qi <yao@codesourcery.com>
14608 * server.h: Declare gdb_agent_about_to_close.
14609 * target.c (kill_inferior): Include "agent.h".
14610 New. Send command 'kill'.
14611 * target.h (kill_inferior): Removed macro.
14612 * tracepoint.c (gdb_agent_about_to_close): New.
14613 (gdb_agent_helper_thread): Handle command 'close'.
14614 Wait endlessly until the inferior stops.
14615 Install gdb_agent_remove_socket to atexit hook.
14616 (agent_socket_name): New static variable.
14617 (gdb_agent_socket_init): Replace local variable 'name' with
14618 'agent_socket_name'.
14619 (gdb_agent_remove_socket): New.
14621 2012-07-27 Yao Qi <yao@codesourcery.com>
14623 * server.c (process_point_options): Stop at 'X' when parsing.
14625 2012-07-19 Michael Eager <eager@eagercon.com>
14627 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
14629 * linux-x86-low.c (x86_insert_point, x86_remove_point):
14630 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
14631 hardware breakpoint.
14633 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14635 * gdbserver/linux-low.c (initialize_low): Call
14636 linux_ptrace_init_warnings.
14638 2012-07-02 Doug Evans <dje@google.com>
14640 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
14643 2012-07-02 Stan Shebs <stan@codesourcery.com>
14645 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
14646 (ax.o): Add it to build rule.
14648 (OBS): Add format.o.
14649 (IPA_OBS): Add format.o.
14650 * server.c (handle_query): Claim support for breakpoint commands.
14651 (process_point_options): Add command case.
14652 (process_serial_event): Leave running if there are printfs in
14654 * mem-break.h (any_persistent_commands): Declare.
14655 (add_breakpoint_commands): Declare.
14656 (gdb_no_commands_at_breakpoint): Declare.
14657 (run_breakpoint_commands): Declare.
14658 * mem-break.c (struct point_command_list): New struct.
14659 (struct breakpoint): New field command_list.
14660 (any_persistent_commands): New function.
14661 (add_commands_to_breakpoint): New function.
14662 (add_breakpoint_commands): New function.
14663 (gdb_no_commands_at_breakpoint): New function.
14664 (run_breakpoint_commands): New function.
14665 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
14667 * ax.c: Include format.h.
14668 (ax_printf): New function.
14669 (gdb_eval_agent_expr): Add printf opcode.
14671 2012-06-13 Yao Qi <yao@codesourcery.com>
14673 * server.c (start_inferior): Remove duplicated writes to fields
14674 'last_resume_kind' and 'last_status' of 'current_inferior'.
14676 2012-06-12 Yao Qi <yao@codesourcery.com>
14677 Pedro Alves <palves@redhat.com>
14679 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
14681 * server.c (handle_v_cont): Extend comment.
14683 2012-06-11 Yao Qi <yao@codesourcery.com>
14685 * linux-low.c (linux_attach): Add 'static'.
14687 2012-06-06 Yao Qi <yao@codesourcery.com>
14689 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
14691 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
14693 Fix gcc -flto compilation warning.
14694 * server.c (main): Make variable multi_mode and attach volatile.
14696 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14698 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
14699 if the platform doesn't know about it.
14701 2012-05-30 Jeff Kenton <jkenton@tilera.com>
14703 * Makefile.in (SFILES): Add linux-tile-low.c.
14704 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
14705 * configure.srv: Handle tilegx-*-linux*.
14706 * linux-tile-low.c: New file.
14708 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14710 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
14712 2012-05-24 Pedro Alves <palves@redhat.com>
14716 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
14718 2012-05-24 Pedro Alves <palves@redhat.com>
14722 Replace target_signal with gdb_signal throughout.
14724 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
14726 * linux-low.c (linux_store_registers): Avoid the copying sequence
14727 when no data has been retrieved by ptrace.
14729 2012-05-22 Will Deacon <will.deacon@arm.com>
14731 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
14732 Include asm/ptrace.h.
14733 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
14736 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
14738 * linux-low.c (linux_store_registers): Don't re-retrieve data
14739 with ptrace that has already been obtained from /proc. Always
14740 copy any data retrieved with ptrace to the buffer supplied.
14742 2012-05-11 Yao Qi <yao@codesourcery.com>
14743 Pedro Alves <palves@redhat.com>
14745 * linux-low.c (enum stopping_threads_kind): New.
14746 (stopping_threads): Change type to `enum stopping_threads_kind'.
14747 (handle_extended_wait): If stopping and suspending threads, leave
14748 the new_lwp suspended too.
14749 (linux_wait_for_event): Adjust.
14750 (stop_all_lwps): Set `stopping_threads' to
14751 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
14752 whether we're suspending threads or just stopping them. Assert no
14755 2012-04-29 Yao Qi <yao@codesourcery.com>
14757 * server.h: Move some code to ...
14758 * gdbthread.h: ... here. New.
14759 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
14760 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
14761 (nto-low.o, win32-low.o): Likewise.
14762 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
14763 * regcache.c, remote-utils.c, server.c: Likewise.
14764 * target.c, tracepoint.c, win32-low.c: Likewise.
14766 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14768 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
14769 (PTRACE_ARG4_TYPE): Likewise.
14770 (PTRACE_XFER_TYPE): Likewise.
14771 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
14772 ptrace to PTRACE_ARG3_TYPE.
14773 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
14774 (PTRACE_ARG4_TYPE): Likewise.
14775 (PTRACE_XFER_TYPE): Likewise.
14776 (linux_detach_one_lwp): Cast fourth argument of
14777 ptrace to long then PTRACE_ARG4_TYPE.
14778 (regsets_fetch_inferior_registers): Cast third argument of
14779 ptrace to long then PTRACE_ARG3_TYPE.
14780 (regsets_store_inferior_registers): Likewise.
14782 2012-04-20 Pedro Alves <palves@redhat.com>
14784 * configure: Regenerate.
14786 2012-04-19 Pedro Alves <palves@redhat.com>
14788 * Makefile.in (GNULIB_BUILDDIR): New.
14789 (LIBGNU, INCGNU, GNULIB_H): Adjust.
14790 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
14791 (all, install-only, uninstall, clean-info, all-lib, clean): No
14792 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
14793 (maintainer-clean realclean distclean): Use subdir_do.
14795 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
14796 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
14797 * acinclude.m4: Include acx_configure_dir.m4.
14798 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
14799 calls. Call AC_PROG_RANLIB. Configure gnulib using
14802 (GNULIB_STDINT_H): Adjust.
14803 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
14804 * gdbreplay.c: Include build-gnulib/config.h.
14805 * server.h: Likewise.
14806 * aclocal.m4: Regenerate.
14807 * config.in: Regenerate.
14808 * configure: Regenerate.
14810 2012-04-19 Pedro Alves <palves@redhat.com>
14812 * Makefile.in (LIBGNU, INCGNU): Adjust.
14813 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
14814 (all, install-only, uninstall, clean-info, all-lib, clean)
14815 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
14816 * configure.ac: Adjust AC_OUTPUT output.
14817 * aclocal.m4: Regenerate.
14818 * configure: Regenerate.
14820 2012-04-19 Pedro Alves <palves@redhat.com>
14822 * Makefile.in (generated_files): New.
14823 (server_h): Remove the explicit dependency on config.h, and depend
14824 on $generated_files.
14826 2012-04-19 Pedro Alves <palves@redhat.com>
14828 * Makefile.in (INCGNU): Add -Ignulib.
14830 2012-04-19 Pedro Alves <palves@redhat.com>
14832 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
14833 (INCGNU): ... this, and spell out -I here.
14834 (GNULIB_LIB): Rename to ...
14835 (LIBGNU): ... this.
14836 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
14838 2012-04-19 Pedro Alves <palves@redhat.com>
14840 * config.in: Regenerate.
14842 2012-04-19 Pedro Alves <palves@redhat.com>
14844 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
14845 * server.h (memmem): Remove declaration.
14846 * config.in: Regenerate.
14847 * configure: Regenerate.
14849 2012-04-19 Yao Qi <yao@codesourcery.com>
14851 * Makefile.in (SFILES): Add common/vec.c.
14855 2012-04-19 Yao Qi <yao@codesourcery.com>
14857 * remote-utils.c (prepare_resume_reply): Replace with macro
14858 target_core_of_thread.
14859 * server.c (handle_qxfer_threads_proper): Likewise.
14860 * target.h (traget_core_of_thread): New macro.
14862 2012-04-18 Pedro Alves <palves@redhat.com>
14864 * aclocal.m4: Regenerate.
14865 * configure: Regenerate.
14867 2012-04-16 Yao Qi <yao@codesourcery.com>
14869 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
14870 duplicated on address.
14872 2012-04-16 Yao Qi <yao@codesourcery.com>
14874 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
14875 (struct tracepoint_action_ops) <send>: New field.
14876 (m_tracepoint_action_send, r_tracepoint_action_send): New.
14877 (agent_expr_send, x_tracepoint_action_send): New.
14878 (l_tracepoint_action_send): New.
14879 (cmd_qtdp): Download and install tracepoint
14880 according to `use_agent'.
14881 (run_inferior_command): Add one more parameter `len'.
14883 (tracepoint_send_agent): New.
14884 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
14886 2012-04-16 Yao Qi <yao@codesourcery.com>
14888 * tracepoint.c (download_tracepoints): Moved to ...
14889 (cmd_qtstart): ... here.
14891 2012-04-14 Yao Qi <yao@codesourcery.com>
14893 * tracepoint.c: Include inttypes.h.
14894 (struct collect_memory_action): Use sized types.
14895 (struct tracepoint): Likewise.
14896 (cmd_qtdp, stop_tracing): Update print specifiers.
14897 (cmd_qtp, response_tracepoint): Likewise.
14898 (collect_data_at_tracepoint): Likewise.
14899 (collect_data_at_step): Likewise.
14901 2012-04-14 Yao Qi <yao@codesourcery.com>
14903 Import gnulib module inttypes.
14904 * aclocal.m4, config.in, configure: Regenerated.
14906 2012-04-14 Yao Qi <yao@codesourcery.com>
14908 * Makefile.in (maintainer-clean, realclean, distclean): Remove
14909 Makefile and config.status at last.
14911 2012-04-13 Yao Qi <yao@codesourcery.com>
14913 * tracepoint.c: Include stdint.h unconditionally.
14915 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14917 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
14918 on BFD_HAVE_SYS_PROCFS_TYPE.
14919 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
14920 * configure: Regenerate.
14921 * config.in: Likewise.
14923 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
14925 * Makefile.in (clean): Also remove x32.c x32-linux.c
14926 x32-avx.c x32-avx-linux.c.
14927 (x32.o): New target.
14929 (x32-linux.o): Likewise.
14930 (x32-linux.c): Likewise.
14931 (x32-avx.o): Likewise.
14932 (x32-avx.c): Likewise.
14933 (x32-avx-linux.o): Likewise.
14934 (x32-avx-linux.c): Likewise.
14936 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
14937 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
14938 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
14939 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
14940 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
14941 i386/x32-avx-linux.xml.
14943 * linux-x86-low.c (init_registers_x32_linux): New prototype.
14944 (init_registers_x32_avx_linux): Likwise.
14945 (x86_linux_update_xmltarget): Call init_registers_x32_linux
14946 or init_registers_x32_avx_linux if linux_is_elf64 is false.
14948 2012-04-13 Pedro Alves <palves@redhat.com>
14950 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
14951 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
14952 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
14953 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
14956 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
14958 * linux-x86-low.c (compat_x32_clock_t): New.
14959 (compat_x32_siginfo_t): Likewise.
14960 (compat_x32_siginfo_from_siginfo): Likewise.
14961 (siginfo_from_compat_x32_siginfo): Likewise.
14962 (linux_is_elf64): Likewise.
14963 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
14964 and siginfo_from_compat_x32_siginfo for x32.
14965 (x86_arch_setup): Set linux_is_elf64.
14967 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
14970 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
14972 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
14973 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
14974 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
14975 compatible with process.
14977 2012-04-12 Yao Qi <yao@codesourcery.com>
14979 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
14980 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
14981 (install-only, install-info, clean): Handle sub dir gnulib.
14982 (all-lib, am--refresh): New targets.
14983 (memmem.o): Remove target.
14984 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
14985 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
14986 (AC_REPLACE_FUNCS): Remove memmem.
14987 Invoke gl_INIT and AM_INIT_AUTOMAKE.
14988 (AC_OUTPUT): Generate Makefile in gnulib/.
14989 * aclocal.m4, config.in, configure: Regenerated.
14991 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
14993 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
14995 2012-04-05 Pedro Alves <palves@redhat.com>
14997 -Werror=strict-aliasing
14999 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15002 2012-04-04 Pedro Alves <palves@redhat.com>
15004 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15005 (sparc_store_gregset_from_stack, sparc_store_gregset)
15006 (sparc_breakpoint_at): Fix formatting.
15008 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15010 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15012 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15013 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15014 * config.in: Regenerate.
15015 * configure: Likewise.
15017 2012-03-29 Pedro Alves <palves@redhat.com>
15019 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15020 Correct ptrace arguments.
15022 2012-03-28 Pedro Alves <palves@redhat.com>
15024 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15025 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15026 (IA64_FR1_REGNUM): New defines.
15027 (ia64_fetch_register): New.
15028 (the_low_target): Install it.
15029 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15031 * linux-low.c (linux_fetch_registers): Try the
15032 the_low_target.fetch_register hook first.
15034 * linux-arm-low.c (the_low_target): Adjust.
15035 * linux-bfin-low.c (the_low_target): Adjust.
15036 * linux-cris-low.c (the_low_target): Adjust.
15037 * linux-crisv32-low.c (the_low_target): Adjust.
15038 * linux-m32r-low.c (the_low_target): Adjust.
15039 * linux-m68k-low.c (the_low_target): Adjust.
15040 * linux-mips-low.c (the_low_target): Adjust.
15041 * linux-ppc-low.c (the_low_target): Adjust.
15042 * linux-s390-low.c (the_low_target): Adjust.
15043 * linux-sh-low.c (the_low_target): Adjust.
15044 * linux-sparc-low.c (the_low_target): Adjust.
15045 * linux-tic6x-low.c (the_low_target): Adjust.
15046 * linux-x86-low.c (the_low_target): Adjust.
15047 * linux-xtensa-low.c (the_low_target): Adjust.
15049 2012-03-26 Pedro Alves <palves@redhat.com>
15051 * server.c (handle_qxfer_libraries): Don't bail early if
15052 the_target->qxfer_libraries_svr4 is not NULL.
15054 2012-03-26 Pedro Alves <palves@redhat.com>
15056 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
15058 2012-03-23 Pedro Alves <palves@redhat.com>
15060 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
15061 "library-list-svr4" element's start tag when the the DSO list is
15064 2012-03-23 Pedro Alves <palves@redhat.com>
15066 * linux-low.c (read_one_ptr): Read the inferior's pointer through
15067 a variable whose type size is the same as the inferior's pointer
15070 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
15072 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
15074 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
15075 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
15076 * linux-low.h: Include <signal.h>.
15077 (struct siginfo): Remove forward declaration.
15078 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
15081 2012-03-21 Mike Frysinger <vapier@gentoo.org>
15083 * .gitignore: Ignore more files.
15085 2012-03-19 Pedro Alves <palves@redhat.com>
15086 Jan Kratochvil <jan.kratochvil@redhat.com>
15088 * server.c (cont_thread, general_thread): Add describing comments.
15089 (start_inferior): Clear `cont_thread'.
15090 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15093 2012-03-15 Yao Qi <yao@codesourcery.com>
15095 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15097 (cmd_qtdp): ... here.
15099 2012-03-15 Yao Qi <yao@codesourcery.com>
15101 * tracepoint.c (struct tracepoint_action_ops): New.
15102 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15103 (m_tracepoint_action_download): New.
15104 (r_tracepoint_action_download): New.
15105 (x_tracepoint_action_download): New.
15106 (l_tracepoint_action_download): New.
15107 (add_tracepoint_action): Install `action->ops' according type.
15108 (download_tracepoint_1): Move code `download' function pointer
15109 of various tracepoint_action_ops.
15111 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15113 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15114 linux_ptrace_attach_warnings.
15116 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15118 * Makefile.in (linux-ptrace.o): New.
15119 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15120 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15121 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15122 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15123 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15125 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15127 2012-03-08 Yao Qi <yao@codesourcery.com>
15128 Pedro Alves <palves@redhat.com>
15130 Fix PR server/13392.
15131 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15132 offset of JMP insn.
15133 * tracepoint.c (remove_tracepoint): New.
15134 (cmd_qtdp): Call remove_tracepoint when failed to install.
15136 2012-03-07 Pedro Alves <palves@redhat.com>
15138 * linux-low.c (get_detach_signal): New.
15139 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15140 Pass on pending signals to PTRACE_DETACH. Check the result of the
15142 * server.c (program_signals, program_signals_p): New.
15143 (handle_general_set): Handle QProgramSignals.
15144 * server.h (program_signals, program_signals_p): Declare.
15146 2012-03-05 Pedro Alves <palves@redhat.com>
15147 Jan Kratochvil <jan.kratochvil@redhat.com>
15149 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15152 2012-03-03 Yao Qi <yao@codesourcery.com>
15154 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15155 agent_look_up_symbols.
15157 2012-03-03 Yao Qi <yao@codesourcery.com>
15159 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15160 (linux-x86-low.o): Likewise.
15161 * server.h: Remove in_process_agent_loaded.
15162 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15166 2012-03-03 Yao Qi <yao@codesourcery.com>
15168 * tracepoint.c (gdb_agent_capability): New global.
15169 (in_process_agent_loaded_ust): Renamed to
15170 `in_process_agent_supports_ust'.
15172 (in_process_agent_supports_ust): Call agent_capability_check.
15173 (clear_installed_tracepoints): Assert that agent supports
15176 2012-03-03 Yao Qi <yao@codesourcery.com>
15178 * linux-low.c (linux_supports_agent): New.
15179 (linux_target_ops): Initialize field `supports_agent' with
15180 linux_supports_agent.
15181 * target.h (struct target_ops) <supports_agent>: New.
15182 (target_supports_agent): New macro.
15183 * server.c (handle_general_set): Handle packet 'QAgent'.
15184 (handle_query): Send `QAgent+'.
15185 * Makefile.in (server.o): Depends on agent.h.
15187 2012-03-03 Yao Qi <yao@codesourcery.com>
15189 * Makefile.in (OBS): Add agent.o.
15190 Add new rule for agent.o.
15191 Track dependence of tracepoint.c on agent.h.
15192 * tracepoint.c (run_inferior_command_1):
15193 (run_inferior_command): Call agent_run_command.
15194 (gdb_ust_connect_sync_socket): Deleted. Move it to
15196 (resume_thread, stop_thread): Likewise.
15197 (gdb_ust_socket_init): Renamed to ...
15198 (gdb_agent_socket_init): ... New.
15199 (gdb_ust_thread): Renamed to ...
15200 (gdb_agent_helper_thread): ... New.
15201 (gdb_ust_init): Move some code to ...
15202 (gdb_agent_init): ... here. New.
15203 [HAVE_UST]: Call gdb_ust_init.
15204 (initialize_tracepoint_ftlib): Call gdb_agent_init.
15205 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
15206 * config.in, configure: Regenerated.
15208 2012-03-02 Pedro Alves <palves@redhat.com>
15210 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
15211 * linux-low.c (struct simple_pid_list): New.
15212 (stopped_pids): New a struct simple_pid_list pointer.
15213 (add_to_pid_list, pull_pid_from_list): New.
15214 (handle_extended_wait): Don't assume the first signal new children
15215 report is SIGSTOP. Adjust call to pull_pid_from_list.
15216 (linux_wait_for_lwp): Adjust.
15218 2012-03-02 Yao Qi <yao@codesourcery.com>
15220 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
15223 2012-03-02 Yao Qi <yao@codesourcery.com>
15225 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
15226 `stop_pc' and `tpoint'. Update caller.
15228 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
15230 * linux-low.h (linux_target_ops): Add regset_bitmap member.
15231 * linux-low.c (use_linux_regsets): New macro.
15232 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
15233 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
15234 (linux_register_in_regsets): New function.
15235 (usr_fetch_inferior_registers): Skip registers covered by
15237 (usr_store_inferior_registers): Likewise.
15238 (usr_fetch_inferior_registers): New macro.
15239 (usr_store_inferior_registers): Likewise.
15240 (linux_fetch_registers): Handle mixed regset/non-regset targets.
15241 (linux_store_registers): Likewise.
15242 * linux-mips-low.c (init_registers_mips_dsp_linux): New
15244 (init_registers_mips64_dsp_linux): Likewise.
15245 (init_registers_mips_linux): New macro.
15246 (init_registers_mips_dsp_linux): Likewise.
15247 (mips_dsp_num_regs): Likewise.
15248 (DSP_BASE, DSP_CONTROL): New fallback macros.
15249 (mips_base_regs): New macro.
15250 (mips_regmap): Use it. Fix the size.
15251 (mips_dsp_regmap): New variable.
15252 (mips_dsp_regset_bitmap): Likewise.
15253 (mips_arch_setup): New function.
15254 (mips_cannot_fetch_register): Use the_low_target.regmap rather
15256 (mips_cannot_store_register): Likewise.
15257 (the_low_target): Update .arch_setup, .num_regs and .regmap
15258 initializers. Add .regset_bitmap initializer.
15259 * linux-arm-low.c (the_low_target): Add .regset_bitmap
15261 * linux-bfin-low.c (the_low_target): Likewise.
15262 * linux-cris-low.c (the_low_target): Likewise.
15263 * linux-crisv32-low.c (the_low_target): Likewise.
15264 * linux-ia64-low.c (the_low_target): Likewise.
15265 * linux-m32r-low.c (the_low_target): Likewise.
15266 * linux-m68k-low.c (the_low_target): Likewise.
15267 * linux-ppc-low.c (the_low_target): Likewise.
15268 * linux-s390-low.c (the_low_target): Likewise.
15269 * linux-sh-low.c (the_low_target): Likewise.
15270 * linux-sparc-low.c (the_low_target): Likewise.
15271 * linux-tic6x-low.c (the_low_target): Likewise.
15272 * linux-x86-low.c (the_low_target): Likewise.
15273 * linux-xtensa-low.c (the_low_target): Likewise.
15274 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
15275 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
15276 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
15278 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
15279 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
15281 2012-02-29 Yao Qi <yao@codesourcery.com>
15282 Pedro Alves <palves@redhat.com>
15284 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
15285 `step_over_finished' is true.
15287 2012-02-27 Pedro Alves <palves@redhat.com>
15289 * linux-low.c (pid_is_stopped): Delete, moved to common/.
15290 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
15292 2012-02-27 Pedro Alves <palves@redhat.com>
15295 * linux-low.c (pid_is_stopped): New.
15296 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
15298 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
15300 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
15303 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
15305 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
15307 2012-02-24 Luis Machado <lgustavo@codesourcery>
15309 * server.c (handle_query): Advertise support for target-side
15310 breakpoint condition evaluation.
15311 (process_point_options): New function.
15312 (process_serial_event): When inserting a breakpoint, check for
15313 a target-side condition that should be evaluated.
15315 * mem-break.c: Include regcache.h and ax.h.
15316 (point_cond_list_t): New data structure.
15317 (breakpoint) <cond_list>: New field.
15318 (find_gdb_breakpoint_at): Make non-static.
15319 (delete_gdb_breakpoint_at): Clear any target-side
15321 (clear_gdb_breakpoint_conditions): New function.
15322 (add_condition_to_breakpoint): Likewise.
15323 (add_breakpoint_condition): Likewise.
15324 (gdb_condition_true_at_breakpoint): Likewise.
15325 (gdb_breakpoint_here): Return result directly instead
15326 of going through a local variable.
15328 * mem-break.h (find_gdb_breakpoint_at): New prototype.
15329 (clear_gdb_breakpoint_conditions): Likewise.
15330 (add_breakpoint_condition): Likewise.
15331 (gdb_condition_true_at_breakpoint): Likewise.
15333 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
15334 (need_step_over_p): Take target-side breakpoint condition into
15337 2012-02-24 Luis Machado <lgustavo@codesourcery>
15339 * server.h: Include tracepoint.h.
15340 (agent_mem_read, agent_get_trace_state_variable_value,
15341 agent_set_trace_state_variable_value,
15342 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
15343 get_set_tsv_func_addr): New prototypes.
15345 * ax.h: New include file.
15346 * ax.c: New source file.
15348 * tracepoint.c: Include ax.h.
15349 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
15350 agent_expr, eval_result_type): Move to ax.h.
15351 (parse_agent_expr): Rename to ...
15352 (gdb_parse_agent_expr): ... this, make it non-static and move
15354 (unparse_agent_expr) Rename to ...
15355 (gdb_unparse_agent_expr): ... this, make it non-static and move
15357 (eval_agent_expr): Rename to ...
15358 (eval_tracepoint_agent_expr): ... this.
15359 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
15360 forward declarations.
15361 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
15362 (agent_get_trace_state_variable_value): New function.
15363 (agent_set_trace_state_variable_value): New function.
15364 (cmd_qtdp): Call gdb_parse_agent_expr (...).
15365 (response_tracepoint): Call gdb_unparse_agent_expr (...).
15366 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
15367 (condition_true_at_tracepoint): Likewise.
15368 (parse_agent_expr): Rename to ...
15369 (gdb_parse_agent_expr): ... this and move to ax.c.
15370 (unparse_agent_expr): Rename to ...
15371 (gdb_unparse_agent_expr): ... this and move to ax.c.
15372 (gdb_agent_op_name): Move to ax.c.
15373 (eval_agent_expr): Rename to ...
15374 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
15376 (eval_tracepoint_agent_expr): New function.
15377 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
15379 (current_insn_ptr, emit_error, struct bytecode_address): Move to
15381 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
15382 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
15383 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
15384 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
15385 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
15386 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
15387 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
15388 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
15389 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
15390 (compile_bytecodes): Remove forward declaration.
15391 (is_goto_target): Move to ax.c.
15392 (compile_bytecodes): Move to ax.c and call
15393 agent_get_trace_state_variable_value (...) and
15394 agent_set_trace_state_variable_value (...).
15396 * Makefile.in: Update ax.c and IPA dependencies.
15398 2012-02-24 Pedro Alves <palves@redhat.com>
15400 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
15401 (cmd_bigqtbuffer_circular): ... this. Only handle
15402 'QTBuffer:circular:'.
15403 (handle_tracepoint_general_set): Adjust.
15405 2012-02-16 Yao Qi <yao@codesourcery.com>
15407 * inferiors.c: Move code to ...
15408 * dll.c: .... here. New.
15409 * server.h: Declare clear_dlls.
15410 * Makefile.in (SFILES): Add dll.c.
15414 2012-02-11 Yao Qi <yao@codesourcery.com>
15416 * server.c: (handle_monitor_command): Add a new parameter
15418 (handle_query): Update caller.
15420 2012-02-09 Joel Brobecker <brobecker@adacore.com>
15422 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
15423 * configure, config.in: Regenerate.
15424 * hostio.c: Provide an alternate implementation if HAVE_READLINK
15427 2012-02-02 Pedro Alves <palves@redhat.com>
15429 Try SIGKILL first, then PTRACE_KILL.
15430 * linux-low.c (linux_kill_one_lwp): New.
15431 (linux_kill_one_lwp): Rename to ...
15432 (kill_one_lwp_callback): ... this. Use the new
15433 linux_kill_one_lwp.
15435 2012-02-02 Pedro Alves <palves@redhat.com>
15437 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
15440 2012-01-27 Pedro Alves <palves@redhat.com>
15442 * linux-low.c (linux_child_pid_to_exec_file): Delete.
15443 (elf_64_file_p): Make static.
15444 (linux_pid_exe_is_elf_64_file): New.
15445 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
15446 Delete declarations.
15447 (linux_pid_exe_is_elf_64_file): Declare.
15448 * linux-x86-low.c (x86_arch_setup): Use
15449 linux_pid_exe_is_elf_64_file.
15451 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15453 * linux-low.c (linux_wait_for_event_1): Rename to ...
15454 (linux_wait_for_event): ... here and merge it with former
15455 linux_wait_for_event - new variable wait_ptid, use it.
15456 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
15458 2012-01-23 Pedro Alves <palves@redhat.com>
15460 * server.c (main): Avoid yet another case of infinite loop while
15461 detaching/killing after a longjmp.
15463 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15466 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
15468 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
15470 * hostio.c (handle_readlink): New function.
15471 (handle_vFile): Call it to handle "vFile:readlink" packets.
15473 2012-01-20 Pedro Alves <palves@redhat.com>
15474 Ulrich Weigand <ulrich.weigand@linaro.org>
15476 * server.c (handle_v_requests): Only support vAttach and vRun to
15477 start multiple processes when in extended protocol mode.
15479 2012-01-17 Pedro Alves <palves@redhat.com>
15481 * tracepoint.c (initialize_tracepoint): Use mmap instead of
15482 memalign plus mprotect to allocate the scratch buffer.
15484 2012-01-13 Pedro Alves <palves@redhat.com>
15486 * server.c (attach_inferior): Clear `cont_thread'.
15488 2012-01-13 Pedro Alves <palves@redhat.com>
15490 * server.c (main): Avoid infinite loop while detaching/killing
15493 2012-01-09 Doug Evans <dje@google.com>
15495 * server.c (start_inferior): Set last_ptid in --wrapper case.
15497 2012-01-06 Yao Qi <yao@codesourcery.com>
15499 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
15501 [IN_PROCESS_AGENT] (debug_agent): New global variable.
15503 2012-01-04 Yao Qi <yao@codesourcery.com>
15505 * tracepoint.c (cmd_qtdp): Print debug message
15506 for static tracepoint.
15508 2012-01-04 Yao Qi <yao@codesourcery.com>
15510 * tracepoint.c (trace_vdebug): Differentiate debug message
15511 between gdbserver and IPA.
15513 2012-01-03 Yao Qi <yao@codesourcery.com>
15515 * tracepoint.c (tracepoint_was_hit): Don't collect for
15518 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15520 * terminal.h: Reformat copyright header.
15522 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15524 * server.c (gdbserver_version): Update copyright year.
15525 * gdbreplay.c (gdbreplay_version): Likewise.
15527 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
15529 * linux-low.c (linux_create_inferior): Put empty if clause for write.
15532 2011-12-18 Hui Zhu <teawater@gmail.com>
15533 * linux-low.c (linux_create_inferior): Save return value to ret.
15535 2011-12-18 Hui Zhu <teawater@gmail.com>
15537 * linux-low.c (linux_create_inferior): Save return value to ret.
15539 2011-12-16 Doug Evans <dje@google.com>
15541 * linux-low.c (linux_create_inferior): If stdio connection,
15542 redirect stdin from /dev/null, stdout to stderr.
15543 * remote-utils.c (remote_is_stdio): New static global.
15544 (remote_connection_is_stdio): New function.
15545 (remote_prepare): Handle stdio connection.
15546 (remote_open): Ditto.
15547 (remote_close): Don't close stdin for stdio connections.
15548 (read_prim,write_prim): New functions. Replace all calls to
15549 read/write to these.
15550 * server.c (main): Watch for "-" argument. Move call to
15551 remote_prepare before start_inferior.
15552 * server.h (STDIO_CONNECTION_NAME): New macro.
15553 (remote_connection_is_stdio): Declare.
15555 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
15556 in debugging output.
15558 2011-12-15 Yao Qi <yao@codesourcery.com>
15560 * tracepoint.c: Include sys/syscall.h.
15561 (gdb_ust_thread): Remove preprocessor conditional.
15563 2011-12-14 Pedro Alves <pedro@codesourcery.com>
15565 * linux-low.c (linux_detach_one_lwp): Call
15566 the_low_target.prepare_to_resume before detaching.
15568 2011-12-14 Yao Qi <yao@codesourcery.com>
15570 * tracepoint.c (gdb_ust_thread): Don't ignore return value
15573 2011-12-14 Yao Qi <yao@codesourcery.com>
15575 * i386-low.c (i386_low_stopped_data_address): Initialize local
15576 variable `control'.
15578 2011-12-13 Pedro Alves <pedro@codesourcery.com>
15582 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
15583 DR_CONTROL unless necessary. Extend comments.
15584 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
15585 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
15587 2011-12-13 Yao Qi <yao@codesourcery.com>
15589 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
15591 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
15593 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
15595 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
15596 Print new debug message for such case.
15598 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15600 Fix overlapping memcpy.
15601 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
15602 the read_inferior_memory transfer.
15603 (delete_fast_tracepoint_jump): New variable buf. Use it for the
15604 write_inferior_memory transfer.
15605 (set_fast_tracepoint_jump): New variable buf. Use it for the
15606 read_inferior_memory and write_inferior_memory transfers.
15607 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
15608 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
15609 Use it for the write_inferior_memory transfer.
15610 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
15613 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15615 * linux-low.c (fetch_register, store_register): Make code
15616 consistent, fix formatting.
15618 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15620 * linux-low.c (usr_store_inferior_registers): Factor out code
15621 to handle individual registers into...
15622 (store_register): ... this new function.
15624 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
15626 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
15627 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
15628 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
15629 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
15630 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
15631 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
15632 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
15633 (srv_xmlfiles): Add new XML files.
15635 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
15637 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
15638 (init_registers_s390_linux32v1): Add prototype.
15639 (init_registers_s390_linux32v2): Likewise.
15640 (init_registers_s390_linux64v1): Likewise.
15641 (init_registers_s390_linux64v2): Likewise.
15642 (init_registers_s390x_linux64v1): Likewise.
15643 (init_registers_s390x_linux64v2): Likewise.
15644 (s390_num_regs): Increment to 52.
15645 (s390_regmap): Add orig_r2 register.
15646 (s390_num_regs_3264): Increment to 68.
15647 (s390_regmap_3264): Add orig_r2 register.
15648 (s390_collect_ptrace_register): Handle orig_r2 register.
15649 (s390_supply_ptrace_register): Likewise.
15650 (s390_fill_last_break): New function.
15651 (s390_store_last_break): Likewise.
15652 (s390_fill_system_call): New function.
15653 (s390_store_system_call): Likewise.
15654 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
15656 (s390_check_regset): New function.
15657 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
15658 NT_S390_SYSTEM_CALL regsets and use appropriate description.
15659 Update target_regsets for available register sets.
15661 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
15662 Jan Kratochvil <jan.kratochvil@redhat.com>
15664 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
15665 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
15667 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
15668 * linux-low.h (struct process_info_private): New member r_debug.
15669 * server.c (handle_qxfer_libraries): Call
15670 the_target->qxfer_libraries_svr4.
15671 (handle_qxfer_libraries_svr4): New function.
15672 (qxfer_packets): New entry "libraries-svr4".
15673 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
15674 * target.h (struct target_ops): New member qxfer_libraries_svr4.
15675 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
15676 PACKET_qXfer_libraries_svr4.
15678 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
15680 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
15681 PSW address/mask between 8-byte and 16-byte formats.
15682 (s390_supply_ptrace_register): Likewise.
15683 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
15684 basic addressing mode bit.
15686 2011-11-24 Stan Shebs <stan@codesourcery.com>
15688 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
15690 2011-11-17 Stan Shebs <stan@codesourcery.com>
15692 * tracepoint.c (struct tracepoint): New field traceframe_usage.
15693 (tracing_start_time): New global.
15694 (tracing_stop_time): New global.
15695 (tracing_user_name): New global.
15696 (tracing_notes): New global.
15697 (tracing_stop_note): New global.
15698 (cmd_qtstart): Set traceframe_usage, start_time.
15699 (stop_tracing): Set stop_time.
15700 (cmd_qtstatus): Report additional status.
15701 (cmd_qtp): New function.
15702 (handle_tracepoint_query): Call it.
15703 (cmd_qtnotes): New function.
15704 (handle_tracepoint_general_set): Call it.
15705 (get_timestamp): Rename from tsv_get_timestamp.
15707 2011-11-14 Stan Shebs <stan@codesourcery.com>
15708 Kwok Cheung Yeung <kcy@codesourcery.com>
15710 * linux-x86-low.c (small_jump_insn): New.
15711 (i386_install_fast_tracepoint_jump_pad): Add arguments for
15712 trampoline and error message, build a trampoline and issue a small
15713 jump instruction to it.
15714 (x86_install_fast_tracepoint_jump_pad): Add arguments for
15715 trampoline and error message.
15716 (x86_get_min_fast_tracepoint_insn_len): New.
15717 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
15718 * linux-low.h (struct linux_target_ops): Add arguments to
15719 install_fast_tracepoint_jump_pad operation, add new operation.
15720 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
15722 (linux_get_min_fast_tracepoint_insn_len): New function.
15723 (linux_target_op): Add new operation.
15724 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
15725 (gdb_trampoline_buffer_end): Ditto.
15726 (gdb_trampoline_buffer_error): Ditto.
15727 (struct ipa_sym_addresses): Add fields for new IPA variables.
15728 (symbol_list): Add entries for new IPA variables.
15729 (struct tracepoint): Add fields to hold the address range of the
15730 trampoline used by the tracepoint.
15731 (trampoline_buffer_head): New static variable.
15732 (trampoline_buffer_tail): Ditto.
15733 (claim_trampoline_space): New function.
15734 (have_fast_tracepoint_trampoline_buffer): New function.
15735 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
15737 (install_fast_tracepoint): Ditto, also add error buffer argument.
15738 (cmd_qtminftpilen): New function.
15739 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
15740 (fast_tracepoint_from_trampoline_address): New function.
15741 (fast_tracepoint_collecting): Handle trampoline as part of jump
15743 (set_trampoline_buffer_space): New function.
15744 (initialize_tracepoint): Initialize new IPA variables.
15745 * target.h (struct target_ops): Add arguments to
15746 install_fast_tracepoint_jump_pad operation, add new
15747 get_min_fast_tracepoint_insn_len operation.
15748 (target_get_min_fast_tracepoint_insn_len): New.
15749 (install_fast_tracepoint_jump_pad): Add arguments.
15750 * server.h (IPA_BUFSIZ): Define.
15751 * linux-i386-ipa.c: Include extra header files.
15752 (initialize_fast_tracepoint_trampoline_buffer): New function.
15753 (initialize_low_tracepoint): Call it.
15754 * server.h (set_trampoline_buffer_space): Declare.
15755 (claim_trampoline_space): Ditto.
15756 (have_fast_tracepoint_trampoline_buffer): Ditto.
15758 2011-11-14 Yao Qi <yao@codesourcery.com>
15760 * server.c (handle_query): Handle InstallInTrace for qSupported.
15761 * tracepoint.c (add_tracepoint): Sort list.
15762 (install_tracepoint, download_tracepoint): New.
15763 (cmd_qtdp): Call them to install and download tracepoints.
15764 (sort_tracepoints): Removed.
15765 (cmd_qtstart): Update.
15767 2011-11-14 Yao Qi <yao@codesourcery.com>
15769 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
15770 * mem-break.h: Declare.
15771 * tracepoint.c (cmd_qtstart): Move some code to ...
15772 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
15774 (download_tracepoints): Move some code to ...
15775 (download_tracepoint_1): ... here. New.
15777 2011-11-08 Yao Qi <yao@codesourcery.com>
15779 * remote-utils.c (relocate_instruction): A comment fix.
15781 2011-11-07 Joel Brobecker <brobecker@adacore.com>
15783 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
15784 (i386_dr_low_get_control, i386_dr_low_get_status): Use
15785 dr_status_mirror and dr_control_mirror from debug_reg_state.
15786 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
15787 (i386_initial_stuff): Remove use of deleted globals.
15788 (i386_get_thread_context, i386_set_thread_context,
15789 i386_thread_added): Use dr_status_mirror and dr_control_mirror
15790 from debug_reg_state.
15792 2011-11-05 Yao Qi <yao@codesourcery.com>
15794 * tracepoint.c (gdb_collect): Loop over tracepoints of same
15795 address as TPOINT's.
15797 2011-11-02 Stan Shebs <stan@codesourcery.com>
15799 * tracepoint.c (agent_mem_read_string): New function.
15800 (eval_agent_expr): Call it for tracenz.
15801 * server.c (handle_query): Report support for tracenz.
15803 2011-11-02 Yao Qi <yao@codesourcery.com>
15805 * tracepoint.c (cmd_qtstart): Remove unused local variables.
15807 2011-11-02 Yao Qi <yao@codesourcery.com>
15809 * target.h: Fix a typo in comment.
15811 2011-10-31 Pedro Alves <pedro@codesourcery.com>
15813 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
15814 clobber the breakpoints' shadows with fast tracepoint jumps.
15815 * mem-break.h (check_mem_write): Add `myaddr' parameter.
15816 * target.c (write_inferior_memory): Also pass MYADDR down to
15819 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
15821 * configure.ac: Check support for personality routine.
15822 * configure: Regenerate.
15823 * config.in: Likewise.
15824 * linux-low.c: Include <sys/personality.h>.
15825 Define ADDR_NO_RANDOMIZE if necessary.
15826 (linux_create_inferior): Disable address space randomization when
15827 forking inferior, if requested.
15828 (linux_supports_disable_randomization): New function.
15829 (linux_target_ops): Install it.
15830 * server.h (disable_randomization): Declare.
15831 * server.c (disable_randomization): New global variable.
15832 (handle_general_set): Handle QDisableRandomization.
15833 (handle_query): Likewise for qSupported.
15834 (main): Support --disable-randomization and --no-disable-randomization
15835 command line arguments.
15836 * target.h (struct target_ops): Add supports_disable_randomization.
15837 (target_supports_disable_randomization): New macro.
15839 2011-09-29 Mike Frysinger <vapier@gentoo.org>
15841 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
15843 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
15844 [!PT_GETDSBT] (target_loadmap): New definition.
15845 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
15846 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
15847 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
15848 and PT_GETDSBT to LINUX_LOADMAP.
15849 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
15850 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
15852 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15854 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
15855 (arm_linux_hwbp_cap): New static variable.
15856 (arm_linux_get_hwbp_cap): Replace by ...
15857 (arm_linux_init_hwbp_cap): ... this new function.
15858 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
15859 (arm_linux_get_hw_watchpoint_count): Likewise.
15860 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15861 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
15862 (arm_prepare_to_resume): Use perror_with_name instead of error.
15864 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15866 * linux-arm-low.c: Include <signal.h>.
15867 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
15868 (struct arm_linux_hwbp_cap): New data type.
15869 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
15870 (struct arm_linux_hw_breakpoint): New data type.
15871 (MAX_BPTS, MAX_WPTS): Define.
15872 (struct arch_process_info, struct arch_lwp_info): New data types.
15873 (arm_linux_get_hwbp_cap): New function.
15874 (arm_linux_get_hw_breakpoint_count): Likewise.
15875 (arm_linux_get_hw_watchpoint_count): Likewise.
15876 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15877 (arm_hwbp_control_initialize): Likewise.
15878 (arm_hwbp_control_is_enabled): Likewise.
15879 (arm_hwbp_control_is_initialized): Likewise.
15880 (arm_hwbp_control_disable): Likewise.
15881 (arm_linux_hw_breakpoint_equal): Likewise.
15882 (arm_linux_hw_point_initialize): Likewise.
15883 (struct update_registers_data): New data structure.
15884 (update_registers_callback: New function.
15885 (arm_insert_point): Likewise.
15886 (arm_remove_point): Likewise.
15887 (arm_stopped_by_watchpoint): Likewise.
15888 (arm_stopped_data_address): Likewise.
15889 (arm_new_process): Likewise.
15890 (arm_new_thread): Likewise.
15891 (arm_prepare_to_resume): Likewise.
15892 (the_low_target): Register arm_insert_point, arm_remove_point,
15893 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
15894 arm_new_thread, and arm_prepare_to_resume.
15896 2011-09-15 Stan Shebs <stan@codesourcery.com>
15898 * server.h (struct emit_ops): Add compare-goto fields.
15899 * tracepoint.c (gdb_agent_op_sizes): New table.
15900 (emit_eq_goto): New function.
15901 (emit_ne_goto): New function.
15902 (emit_lt_goto): New function.
15903 (emit_le_goto): New function.
15904 (emit_gt_goto): New function.
15905 (emit_ge_goto): New function.
15906 (is_goto_target): New function.
15907 (compile_bytecodes): Recognize special cases of compare-goto
15908 combinations and call specialized emitters for them.
15909 * linux-x86-low.c (amd64_emit_eq_goto): New function.
15910 (amd64_emit_ne_goto): New function.
15911 (amd64_emit_lt_goto): New function.
15912 (amd64_emit_le_goto): New function.
15913 (amd64_emit_gt_goto): New function.
15914 (amd64_emit_ge_goto): New function.
15915 (amd64_emit_ops): Add the new functions.
15916 (i386_emit_eq_goto): New function.
15917 (i386_emit_ne_goto): New function.
15918 (i386_emit_lt_goto): New function.
15919 (i386_emit_le_goto): New function.
15920 (i386_emit_gt_goto): New function.
15921 (i386_emit_ge_goto): New function.
15922 (i386_emit_ops): Add the new functions.
15924 2011-09-08 Stan Shebs <stan@codesourcery.com>
15926 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
15927 (i386_emit_epilogue): Restore %ebx.
15929 2011-08-31 Jie Zhang <jzhang918@gmail.com>
15931 * server.c (step_thread): Remove definition.
15932 (process_serial_event): Don't handle Hs.
15933 * server.h (step_thread): Remove declaration.
15934 * target.c (set_desired_inferior): Remove use of step_thread.
15936 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
15938 * linux-low.c: Include linux-procfs.h.
15939 (linux_attach_lwp_1): Update comments.
15940 (linux_attach): Scan for existing threads when attaching to a
15941 process that is the tgid.
15942 * Makefile.in: Update dependencies.
15944 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
15946 * configure.srv: Add linux-procfs.o dependencies.
15948 2011-08-14 Yao Qi <yao@codesourcery.com>
15950 * target.h (struct target_ops): Fix indent.
15951 * win32-low.c (win32_target_ops): Fix comment.
15953 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
15954 Yao Qi <yao@codesourcery.com>
15956 * Makefile.in (clean): Remove tic6x-*.c files.
15957 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
15958 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
15959 (tic6x-c64xp-linux.c): Likewise.
15960 * configure.srv: Add support for tic6x-*-uclinux.
15961 * linux-tic6x-low.c: New.
15962 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
15964 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
15965 Yao Qi <yao@codesourcery.com>
15967 * target.h (struct target_ops): Add read_loadmap.
15968 * linux-low.c (struct target_loadseg): New type.
15969 (struct target_loadmap): New type.
15970 (linux_read_loadmap): New function.
15971 (linux_target_ops): Add linux_read_loadmap.
15972 * server.c (handle_query): Support qXfer:fdpic:read packet.
15973 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
15976 2011-08-05 Eli Zaretskii <eliz@gnu.org>
15978 * win32-low.c: Include <stdint.h>.
15980 2011-07-22 Pedro Alves <pedro@codesourcery.com>
15982 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
15983 to the inferior here.
15984 (i386_remove_aligned_watchpoint): Ditto.
15985 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
15986 fit part of the watchpoint in the debug registers.
15987 (i386_update_inferior_debug_regs): New.
15988 (i386_low_insert_watchpoint): Work on a local mirror of the debug
15989 registers, and only update the inferior on success.
15990 (i386_low_remove_watchpoint): Ditto.
15992 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
15994 * linux-low.c (compare_ints, unique, list_threads, show_process,
15995 linux_core_of_thread): Delete.
15996 (linux_target_ops): Change linux_core_of_thread to
15997 linux_common_core_of_thread.
15998 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
15999 * utils.c (malloc_failure): Change type of argument.
16000 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16001 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16002 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16003 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16004 (IPA_OBJS): Add common-utils-ipa.o.
16005 (ptid_h, linux_osdata_h): New macros.
16006 (server_h): Add common/common-utils.h, common/xml-utils.h,
16007 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16009 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16010 ptid.o, buffer.o): New rules.
16011 (linux-low.o): Add common/linux-osdata.h as a dependency.
16012 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16013 * configure.ac: Add AC_HEADER_DIRENT check.
16014 * config.in: Regenerate.
16015 * configure: Regenerate.
16016 * remote-utils.c (xml_escape_text): Delete.
16017 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16018 buffer_xml_printf): Move to common/buffer.c.
16019 * server.c (main): Remove call to initialize_inferiors.
16020 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16021 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16022 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16023 internal_error, gdb_assert, gdb_assert_fail): Delete.
16024 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16025 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16027 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16028 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16029 initialize_inferiors): Delete.
16031 2011-07-20 Pedro Alves <pedro@codesourcery.com>
16033 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16036 2011-05-31 Pedro Alves <pedro@codesourcery.com>
16038 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16040 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16042 2011-05-26 Yao Qi <yao@codesourcery.com>
16044 * Makefile.in (thread-db.o): Track dependence to
16045 common/gdb_thread_db.h.
16046 * thread-db.c: include gdb_thread_db.h from right place.
16048 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16050 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16051 __FILE__ and __LINE__ to internal_error.
16053 2011-05-13 Doug Evans <dje@google.com>
16055 * thread-db.c (try_thread_db_load_from_sdir): New function.
16056 (try_thread_db_load_from_dir): New function.
16057 (thread_db_load_search): Handle $sdir, ignore $pdir.
16058 Remove trying of system directories if search of
16059 libthread-db-search-path fails, that is now done via $sdir.
16061 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
16063 * server.c (handle_query): Add EnableDisableTracepoints to the list
16064 of supported features.
16065 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
16067 (cmd_qtenable_disable): New.
16068 (cmd_qtstart): Install tracepoints even if disabled.
16069 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
16070 receiving a QTEnable or QTDisable packet.
16071 (gdb_collect): Skip data collection if fast tracepoint is disabled.
16072 (ust_marker_to_static_tracepoint): Do not ignore disabled static
16074 (gdb_probe): Skip data collection if static tracepoint is disabled.
16076 2011-05-10 Doug Evans <dje@google.com>
16078 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
16080 2011-05-04 Doug Evans <dje@google.com>
16082 * linux-low.c (linux_join): Skip process lookup.
16083 * spu-low.c (spu_join): Ditto.
16084 * server.c (join_inferiors_callback): Delete.
16085 (process_serial_event): For 'D' packet (detach) call join_inferior
16088 2011-05-04 Joseph Myers <joseph@codesourcery.com>
16090 * README: Don't mention xscale*-*-linux*.
16091 * configure.srv (xscale*-*-linux*): Don't handle target.
16093 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16095 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16097 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16098 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16099 (i386_emit_void_call_2): Likewise.
16101 2011-04-26 Yao Qi <yao@codesourcery.com>
16103 * linux-low.c: Move common macros to linux-ptrace.h.
16104 Include linux-ptrace.h.
16105 * Makefile.in (linux_ptrace_h): New.
16106 (linux-low.o): Depends on linux-ptrace.h.
16108 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16110 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16111 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16112 (remote_prepare): New function with most of the TCP code from ...
16113 (remote_open): ... here. Detect PORT here unconditionally. Move also
16114 setting transport_is_reliable.
16115 * server.c (run_once): New variable.
16116 (gdbserver_usage): Document it.
16117 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16118 the first run if RUN_ONCE.
16119 * server.h (run_once, remote_prepare): New declarations.
16121 2011-04-19 Tom Tromey <tromey@redhat.com>
16123 * win32-low.c (handle_load_dll): Remove duplicate "the".
16125 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16127 Remove support for old Cygwin 1.5 versions.
16128 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16129 function to avoid warning.
16130 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16133 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16135 * gdbserver/server.h (Macro _): Define it if not available.
16137 2011-03-14 Michael Snyder <msnyder@vmware.com>
16139 * hostio.c (handle_close): Remove unnecessary null test.
16141 2011-03-10 Joel Brobecker <brobecker@adacore.com>
16143 * Makefile.in (maintainer-clean realclean distclean): Remove
16144 "make ... subdir_do" command.
16146 2011-03-10 Michael Snyder <msnyder@vmware.com>
16148 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16150 * server.c (handle_v_run): Free alloced buffer on early return.
16152 2011-03-09 Yao Qi <yao@codesourcery.com>
16155 2011-03-04 Yao Qi <yao@codesourcery.com>
16157 * Makefile.in: Remove GNU make feature --directory.
16159 2011-03-05 Yao Qi <yao@codesourcery.com>
16161 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16162 (subdir_do): New make target. Copied from gdb/Makefile.
16163 (maintainer-clean, realclean, distclean, clean): Call corresponding
16164 make targets in common/Makefile.
16166 2011-02-11 Yao Qi <yao@codesourcery.com>
16168 * configure.ac: Call AC_PROG_RANLIB.
16169 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16170 * configure: Regenerate.
16172 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16174 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16176 2011-03-06 Yao Qi <yao@codesourcery.com>
16178 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
16180 2011-03-05 Yao Qi <yao@codesourcery.com>
16182 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16183 (subdir_do): New make target. Copied from gdb/Makefile.
16184 (maintainer-clean, realclean, distclean, clean): Call corresponding
16185 make targets in common/Makefile.
16187 2011-03-04 Yao Qi <yao@codesourcery.com>
16189 * Makefile.in: Remove GNU make feature --directory.
16191 2011-03-04 Michael Snyder <msnyder@vmware.com>
16193 * server.c (queue_stop_reply): Call xmalloc not malloc.
16195 2011-03-02 Michael Snyder <msnyder@vmware.com>
16197 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
16199 2011-02-28 Michael Snyder <msnyder@vmware.com>
16201 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
16202 (cmd_qtframe): Ditto.
16203 (cmd_qtbuffer): Ditto.
16204 (cmd_bigqtbuffer): Ditto.
16206 * utils.c (decimal2str): Initialize 'width' to nine, then
16207 don't mess with it.
16209 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16211 * hostio.c (require_data): Free *data, not data.
16213 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16215 * hostio.c (require_data): Use free, not xfree.
16217 2011-02-27 Michael Snyder <msnyder@vmware.com>
16219 * server.c (handle_query): Discard unused value.
16221 * hostio.c (require_data): Free malloc memory before returning
16224 2011-02-26 Michael Snyder <msnyder@vmware.com>
16226 * linux-low.c (list_threads): Call closedir for dirent.
16228 2011-02-27 Michael Snyder <msnyder@vmware.com>
16230 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
16231 a case statement falls through.
16233 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
16235 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
16238 2011-02-26 Michael Snyder <msnyder@vmware.com>
16240 * utils.c (decimal2str): Eliminate dead code and dead param.
16241 (pulongest): Drop dead param from call to decimal2str.
16244 2011-02-24 Joel Brobecker <brobecker@adacore.com>
16246 Revert the following patch (not approved yet):
16247 2011-02-21 Hui Zhu <teawater@gmail.com>
16248 * tracepoint.c (tp_printf): New function.
16249 (eval_agent_expr): Handle gdb_agent_op_printf.
16251 2011-02-21 Hui Zhu <teawater@gmail.com>
16253 * tracepoint.c (tp_printf): New function.
16254 (eval_agent_expr): Handle gdb_agent_op_printf.
16256 2011-02-18 Tom Tromey <tromey@redhat.com>
16258 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
16259 (tracepoint.o): Likewise.
16260 * tracepoint.c (enum gdb_agent_op): Use ax.def.
16261 (gdb_agent_op_names): Likewise.
16263 2011-02-18 Tom Tromey <tromey@redhat.com>
16265 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
16266 gdb_agent_op_rot>: New constants.
16267 (gdb_agent_op_names): Add pick and roll.
16268 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
16271 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
16273 * aclocal.m4: Regenerated with aclocal-1.11.1.
16275 2011-02-14 Pedro Alves <pedro@codesourcery.com>
16277 * server.c (handle_qxfer_traceframe_info): New.
16278 (qxfer_packets): Register "traceframe-info".
16279 (handle_query): Report support for qXfer:traceframe-info:read+.
16280 * tracepoint.c (match_blocktype): New.
16281 (traceframe_find_block_type): Rename to ...
16282 (traceframe_walk_blocks): ... this. Add callback filter argument,
16284 (traceframe_find_block_type): New, reimplemented on top of
16285 traceframe_walk_blocks.
16286 (build_traceframe_info_xml): New.
16287 (traceframe_read_info): New.
16288 * server.h (traceframe_read_info): Declare.
16290 2011-02-11 Yao Qi <yao@codesourcery.com>
16292 * configure.ac: Call AC_PROG_RANLIB.
16293 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16294 * configure: Regenerate.
16296 2011-02-07 Pedro Alves <pedro@codesourcery.com>
16298 * server.c (gdb_read_memory): Change return semantics to allow
16300 (handle_search_memory_1): Adjust.
16301 (process_serial_event) <'m' packet>: Handle partial transfers.
16302 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
16304 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16306 * regcache.c (init_register_cache): Initialize
16307 regcache->register_status.
16308 (free_register_cache): Release regcache->register_status.
16309 (regcache_cpy): Copy register_status.
16310 (registers_to_string): Print 'x's for unavailable registers.
16311 (supply_register): Mark the register's status valid or
16312 unavailable, depending on whether a buffer was passed in or not.
16313 (supply_register_zeroed): New.
16314 (supply_regblock): Mark the registers' status valid or
16315 unavailable, depending on whether a buffer was passed in or not.
16316 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
16317 (struct regcache): New `register_status' field.
16318 (supply_register_zeroed): Declare.
16319 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
16320 supply_register_zeroed, rather than passing a NULL buffer to
16322 * tracepoint.c (fetch_traceframe_registers): Update comment.
16324 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16326 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
16329 2011-01-25 Pedro Alves <pedro@codesourcery.com>
16331 * server.h (decode_xfer_write): Change prototype.
16332 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
16333 and don't extract the annex here.
16334 * server.c (decode_xfer_read): Remove `annex' parameter,
16335 and don't extract the annex here.
16336 (decode_xfer): New.
16337 (struct qxfer): New.
16338 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
16339 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
16340 (handle_qxfer_statictrace): New functions, abstracted out from
16341 handle_query, and made to use the struct qxfer interface.
16342 (handle_threads_qxfer_proper): Rename to ...
16343 (handle_qxfer_threads_proper): ... this.
16344 (handle_threads_qxfer): Rename to ...
16345 (handle_qxfer_threads): ... this. Adjust.
16346 (qxfer_packets): New array.
16347 (handle_qxfer): New function.
16348 (handle_query): Use handle_qxfer.
16350 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
16352 * gdbreplay.c: Shorten lines of >= 80 columns.
16353 * linux-low.c: Ditto.
16354 * linux-ppc-low.c: Ditto.
16355 * linux-s390-low.c: Ditto.
16356 * linux-sparc-low.c: Ditto.
16357 * linux-x86-low.c: Ditto.
16358 * linux-xtensa-low.c: Ditto.
16359 * mem-break.c: Ditto.
16360 * nto-low.c: Ditto.
16361 * regcache.h: Ditto.
16362 * remote-utils.c: Ditto.
16365 * thread-db.c: Ditto.
16366 * tracepoint.c: Ditto.
16368 * win32-low.h: Ditto.
16370 2011-01-05 Joel Brobecker <brobecker@adacore.com>
16372 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
16375 2011-01-01 Joel Brobecker <brobecker@adacore.com>
16377 * server.c (gdbserver_version): Update copyright year in version
16379 * gdbreplay.c (gdbreplay_version): Ditto.
16381 2010-12-29 Jie Zhang <jie.zhang@analog.com>
16383 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
16384 * linux-bfin-low.c: New file.
16385 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
16386 PT_DATA_ADDR for BFIN targets.
16387 * Makefile.in (SFILES): Add linux-bfin-low.c.
16388 (clean): Remove reg-bfin.c.
16389 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
16390 * README: Mention supported Blackfin targets.
16392 2010-12-23 Mike Frysinger <vapier@gentoo.org>
16394 * .gitignore: New file.
16396 2010-11-16 Mike Frysinger <vapier@gentoo.org>
16398 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
16400 2010-10-22 Jie Zhang <jie@codesourcery.com>
16402 * Makefile.in: Add FLAGS_TO_PASS variable.
16403 (install): Remove dependency of install-only and recursively
16404 invoke make for install-only.
16406 2010-10-04 Doug Evans <dje@google.com>
16408 * Makefile.in (uninstall): Use $(DESTDIR).
16410 2010-09-24 Pedro Alves <pedro@codesourcery.com>
16414 * linux-x86-low.c (compat_siginfo_from_siginfo)
16415 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
16416 si_code is < 0. Check for si_code == SI_TIMER before checking for
16419 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16421 * lynx-i386-low.c: New file.
16422 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
16424 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16426 * lynx-low.c (ptrace_request_to_str): Remove handling for
16427 request values that have been removed in LynxOS 5.x.
16429 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16431 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
16434 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
16436 * configure.ac: Add --enable-inprocess-agent option.
16437 * configure: Rebuilt.
16439 2010-09-06 Yao Qi <yao@codesourcery.com>
16441 * linux-low.c (linux_kill): Remove unused variable.
16442 (linux_stabilize_threads): Likewise.
16443 * server.c (start_inferior): Likewise.
16444 (queue_stop_reply_callback): Likewise.
16445 * tracepoint.c (do_action_at_tracepoint): Likewise.
16447 2010-09-06 Yao Qi <yao@codesourcery.com>
16449 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
16452 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16454 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
16456 2010-09-06 Pedro Alves <pedro@codesourcery.com>
16458 * Makefile.in (install-only): Replace $IPA_DEPFILES with
16461 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16463 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
16464 gdbserver/lynx-ppc-low.c: New files.
16465 * Makefile.in (lynx_low_h): New variable.
16466 (lynx-low.o, lynx-ppc-low.o): New rules.
16467 * configure.ac: On LynxOS, link with -lnetinet.
16468 * configure.srv: Add handling of powerpc-*-lynxos* targets.
16469 * configure: regenerate.
16471 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16473 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
16474 * configure.ac: Add check for vasprintf and vsnprintf.
16475 * configure, config.in: Regenerate.
16476 * server.h (vasprintf, vsnprintf): Add conditional declarations.
16478 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16480 * gdbreplay.c: Move include of alloca.h up, next to include of
16482 * server.h: Add include of malloc.h.
16483 * mem-break.c: Remove include of malloc.h.
16484 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
16486 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16488 * Makefile.in (memmem.o): Build with -Wno-error.
16490 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16492 * utils.c (xsnprintf): Make non-static.
16493 * server.h: Add xsnprintf declaration.
16494 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
16495 replace calls to snprintf by calls to xsnprintf throughout.
16497 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16499 * configure.ac: Add configure check for alloca.
16500 * configure, config.in: Regenerate.
16501 * server.h: Include alloca.h if it exists.
16502 * gdbreplay.c: Include alloca.h if it exists.
16504 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16506 * linux-low.c (__SIGRTMIN): Define if not already defined.
16507 (linux_create_inferior): Check for __ANDROID__ rather than
16509 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
16510 are already deferred.
16511 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
16512 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
16513 stopped and already has a pending signal to report.
16514 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
16515 a pending signal to report or is moving out of a jump pad.
16516 (linux_init_signals): Check for __ANDROID__ rather than
16519 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16521 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
16522 debug_threads check. Avoid a linear search when not doing debug
16525 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16527 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
16528 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
16529 (struct file_handler) <fd>: Change type to gdb_fildes_t.
16530 (process_event): Change local fd's type to gdb_fildes_t.
16531 (create_file_handler): Adjust prototype.
16532 (delete_file_handler): Adjust prototype.
16533 (handle_file_event): Adjust prototype. Use pfildes.
16534 (create_file_event): Adjsut prototype.
16535 * remote-utils.c (remote_desc, listen_desc): Change type to
16537 * server.h: New gdb_fildes_t typedef.
16538 [USE_WIN32API]: Include winsock2.h.
16539 (delete_file_handler, add_file_handler): Adjust prototypes.
16540 (pfildes): Declare.
16541 * utils.c (pfildes): New.
16543 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16545 * configure.ac (build_warnings): Add -Wno-char-subscripts.
16546 * configure: Regenerate.
16548 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16550 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
16551 (linux_done_accessing_memory): ... this.
16552 (linux_target_ops): Adjust.
16553 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
16554 * nto-low.c (nto_target_ops): Adjust comment.
16555 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
16556 * spu-low.c (spu_target_ops): Adjust comment.
16557 * target.h (target_ops): Rename unprepare_to_access_memory field
16558 to done_accessing_memory.
16559 (unprepare_to_access_memory): Rename to ...
16560 (done_accessing_memory): ... this.
16562 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16564 * linux-low.c (linux_prepare_to_access_memory): New.
16565 (linux_unprepare_to_access_memory): New.
16566 (linux_target_ops): Install them.
16567 * server.c (read_memory): Rename to ...
16568 (gdb_read_memory): ... this. Use
16569 prepare_to_access_memory/prepare_to_access_memory.
16570 (write_memory): Rename to ...
16571 (gdb_write_memory): ... this. Use
16572 prepare_to_access_memory/prepare_to_access_memory.
16573 (handle_search_memory_1): Adjust.
16574 (process_serial_event): Adjust.
16575 * target.h (struct target_ops): New fields
16576 prepare_to_access_memory and unprepare_to_access_memory.
16577 (prepare_to_access_memory, unprepare_to_access_memory): New.
16578 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
16579 prepare_to_access_memory/prepare_to_access_memory.
16580 * nto-low.c (nto_target_ops): Adjust.
16581 * spu-low.c (spu_target_ops): Adjust.
16582 * win32-low.c (win32_target_ops): Adjust.
16584 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16586 * Makefile.in (WARN_CFLAGS): Get it from configure.
16587 (WERROR_CFLAGS): New.
16588 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
16589 * configure.ac: Introduce --enable-werror, which adds -Werror to
16590 the compiler command line. Enabled by default. Disable with
16591 --disable-werror. Add -Wdeclaration-after-statement
16592 Wpointer-arith and -Wformat-nonliteral to warning flags.
16593 * configure: Regenerate.
16595 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16597 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
16599 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16601 * gdbreplay.c (remote_error): New.
16603 (expect): Use gdbchar. Check for error reading from GDB.
16604 Clarify sync error output.
16605 (play): Check for errors writing to GDB.
16606 * linux-low.c (sigchld_handler): Really ignore `write' errors.
16607 * remote-utils.c (getpkt): Check for errors writing to the remote
16610 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16612 * linux-low.c (linux_wait_1): Move non-debugging code out of
16613 `debug_threads' control.
16615 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16617 * linux-low.c (linux_wait_1): Don't set last_status here.
16618 * server.c (push_event, queue_stop_reply_callback): Assert we're
16619 not pushing a TARGET_WAITKIND_IGNORE event.
16620 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
16621 (myresume, handle_target_event): Set the thread's last_resume_kind
16622 and last_status from the target returned status.
16624 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16628 * linux-x86-low.c (update_debug_registers_callback): New.
16629 (i386_dr_low_set_addr): Use it.
16630 (i386_dr_low_get_addr): New.
16631 (i386_dr_low_set_control): Use update_debug_registers_callback.
16632 (i386_dr_low_get_control): New.
16633 (i386_dr_low_get_status): Adjust.
16634 * linux-low.c (linux_stop_lwp): New.
16635 * linux-low.h (linux_stop_lwp): Declare.
16637 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
16638 argument instead of a i386_debug_reg_state.
16639 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
16640 a i386_debug_reg_state.
16641 (i386_insert_aligned_watchpoint): Adjust.
16642 (i386_remove_aligned_watchpoint): Adjust.
16643 (i386_low_stopped_data_address): Read the debug registers from the
16644 inferior instead of from the mirrors.
16645 * i386-low.h (struct i386_debug_reg_state): Extend comment.
16646 (i386_dr_low_get_addr): Declare.
16647 (i386_dr_low_get_control): Declare.
16648 (i386_dr_low_get_status): Change prototype.
16650 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
16651 (i386_dr_low_get_addr): New.
16652 (i386_dr_low_get_control): New.
16653 (i386_dr_low_get_status): Adjust prototype. Return
16655 (i386_initial_stuff): Clear dr_status_mirror and
16657 (i386_get_thread_context): Adjust.
16658 (i386_set_thread_context): Adjust.
16659 (i386_thread_added): Adjust.
16661 2010-08-24 Pedro Alves <pedro@codesourcery.com>
16663 * linux-low.h (linux_thread_area): Delete declaration.
16665 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
16667 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
16668 after its termination.
16670 2010-08-09 Pedro Alves <pedro@codesourcery.com>
16672 * linux-low.c (gdb_wants_lwp_stopped): Delete.
16673 (gdb_wants_all_stopped): Delete.
16674 (linux_wait_1): Don't call them.
16675 * server.c (handle_v_cont): Tag all threads as want-stopped.
16676 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
16677 stopped as "client-wants-stopped".
16679 2010-07-31 Pedro Alves <pedro@codesourcery.com>
16681 * Makefile.in (signals_h): New.
16682 (server_h): Depend on it.
16683 (server.o): Don't depend on $(signals_def).
16684 (signals.o): Depend on $(signals_def).
16686 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
16688 * Makefile.in (signals_def): New.
16689 (server_h): Append include/gdb/signals.h and signals_def.
16690 (server.o): Append signals_def.
16692 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16694 * server.c (handle_target_event): Use target_signal_to_host for
16695 resume_info.sig initialization.
16696 * target.h (struct thread_resume) <sig>: New comment.
16698 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
16700 * server.c (handle_query): strcpy() the returned string from paddress()
16701 instead of sprintf().
16702 * utils.c (paddress): Return phex_nz().
16704 2010-07-07 Joel Brobecker <brobecker@adacore.com>
16706 * server.c (handle_v_cont): Call mourn_inferior if process
16708 (myresume): Likewise.
16710 2010-07-01 Pedro Alves <pedro@codesourcery.com>
16712 Static tracepoints, and integration with UST.
16714 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
16715 * mem-break.c (uninsert_all_breakpoints)
16716 (reinsert_all_breakpoints): New.
16717 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
16718 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
16719 (gdb_agent_ust_loaded, helper_thread_id)
16720 (gdb_agent_helper_thread_id): New macros.
16721 (struct ipa_sym_addresses): Add addr_ust_loaded,
16722 addr_helper_thread_id, addr_cmd_buf.
16723 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
16724 (in_process_agent_loaded_ust): New.
16725 (write_e_ust_not_loaded): New.
16726 (maybe_write_ipa_ust_not_loaded): New.
16727 (struct collect_static_trace_data_action): New.
16728 (enum tracepoint_type) <static_tracepoint>: New.
16729 (struct tracepoint) <handle>: Mention static tracepoints.
16730 (struct static_tracepoint_ctx): New.
16731 (CMD_BUF_SIZE): New.
16732 (add_tracepoint_action): Handle static tracepoint actions.
16733 (unprobe_marker_at): New.
16734 (clear_installed_tracepoints): Handle static tracepoints.
16735 (cmd_qtdp): Handle static tracepoints.
16736 (probe_marker_at): New.
16737 (cmd_qtstart): Handle static tracepoints.
16738 (response_tracepoint): Handle static tracepoints.
16739 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
16740 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
16741 (get_context_regcache): Handle static tracepoints.
16742 (do_action_at_tracepoint): Handle static tracepoint actions.
16743 (traceframe_find_block_type): Handle static trace data blocks.
16744 (traceframe_read_sdata): New.
16745 (download_tracepoints): Download static tracepoint actions.
16746 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
16747 (GDB_PROBE_NAME): New.
16749 (GET_UST_SYM): New.
16752 (ust_marker_to_static_tracepoint): New.
16754 (collect_ust_data_at_tracepoint): New.
16755 (gdb_ust_probe): New.
16756 (UNIX_PATH_MAX, SOCK_DIR): New.
16757 (gdb_ust_connect_sync_socket): New.
16758 (resume_thread, stop_thread): New.
16759 (run_inferior_command): New.
16760 (init_named_socket): New.
16761 (gdb_ust_socket_init): New.
16762 (cstr_to_hexstr): New.
16764 (first_marker, next_marker): New.
16765 (response_ust_marker): New.
16766 (cmd_qtfstm, cmd_qtsstm): New.
16767 (unprobe_marker_at, probe_marker_at): New.
16768 (cmd_qtstmat, gdb_ust_thread): New.
16769 (gdb_ust_init): New.
16770 (initialize_tracepoint_ftlib): Call gdb_ust_init.
16771 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
16772 (ST_REGENTRY): New.
16773 (x86_64_st_collect_regmap): New.
16774 (X86_64_NUM_ST_COLLECT_GREGS): New.
16775 (AMD64_RIP_REGNUM): New.
16776 (supply_static_tracepoint_registers): New.
16777 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
16778 (ST_REGENTRY): New.
16779 (i386_st_collect_regmap): New.
16780 (i386_NUM_ST_COLLECT_GREGS): New.
16781 (supply_static_tracepoint_registers): New.
16782 * server.c (handle_query): Handle qXfer:statictrace:read.
16783 <qSupported>: Report support for StaticTracepoints, and
16784 qXfer:statictrace:read features.
16785 * server.h (traceframe_read_sdata)
16786 (supply_static_tracepoint_registers): Declare.
16787 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
16788 (unpack_varlen_hex): Include in IPA build.
16789 * Makefile.in (ustlibs, ustinc): New.
16790 (IPA_OBJS): Add remote-utils-ipa.o.
16791 ($(IPA_LIB)): Link -ldl and -lpthread.
16793 (IPAGENT_CFLAGS): Add UST_CFLAGS.
16794 * config.in, configure: Regenerate.
16796 2010-06-20 Ian Lance Taylor <iant@google.com>
16797 Pedro Alves <pedro@codesourcery.com>
16799 * linux-x86-low.c (always_true): Delete.
16800 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
16801 trying to fool the compiler with always_true.
16803 2010-06-20 Pedro Alves <pedro@codesourcery.com>
16805 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
16806 conditions in gdbserver.
16808 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
16810 * spu-low.c (spu_read_memory): Wrap around local store limit.
16811 (spu_write_memory): Likewise.
16813 2010-06-15 Pedro Alves <pedro@codesourcery.com>
16815 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
16816 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
16818 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
16820 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
16821 uses with LONGEST uses.
16823 2010-06-14 Stan Shebs <stan@codesourcery.com>
16824 Pedro Alves <pedro@codesourcery.com>
16828 * linux-x86-low.c: Include limits.h.
16830 (always_true): New.
16833 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
16834 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
16835 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
16836 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
16837 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
16838 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
16839 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
16840 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
16841 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
16842 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
16843 (amd64_emit_void_call_2): New.
16844 (amd64_emit_ops): New.
16845 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
16846 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
16847 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
16848 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
16849 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
16850 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
16851 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
16852 (i386_emit_call, i386_emit_reg, i386_emit_pop)
16853 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
16854 (i386_emit_stack_adjust, i386_emit_int_call_1)
16855 (i386_emit_void_call_2): New.
16856 (i386_emit_ops): New.
16857 (x86_emit_ops): New.
16858 (the_low_target): Install x86_emit_ops.
16859 * server.h (struct emit_ops): New.
16860 (get_raw_reg_func_addr): Declare.
16861 (current_insn_ptr, emit_error): Declare.
16862 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
16863 (set_trace_state_variable_value): New defines.
16864 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
16865 addr_get_trace_state_variable_value and
16866 addr_set_trace_state_variable_value.
16867 (symbol_list): New fields for get_raw_reg,
16868 get_trace_state_variable_value and set_trace_state_variable_value.
16869 (condfn): New typedef.
16870 (struct tracepoint): New field `compiled_cond'.
16871 (do_action_at_tracepoint): Clear compiled_cond.
16872 (get_trace_state_variable_value, set_trace_state_variable_value):
16874 (condition_true_at_tracepoint): If there's a compiled condition,
16876 (current_insn_ptr, emit_error): New globals.
16877 (struct bytecode_address): New.
16878 (get_raw_reg_func_addr): New.
16879 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
16880 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
16881 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
16882 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
16883 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
16884 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
16885 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
16886 (compile_tracepoint_condition, compile_bytecodes): New.
16887 * target.h (emit_ops): Forward declare.
16888 (struct target_ops): New field emit_ops.
16889 (target_emit_ops): New.
16890 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
16891 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
16892 * linux-low.c (linux_emit_ops): New.
16893 (linux_target_ops): Install it.
16894 * linux-low.h (struct linux_target_ops): New field emit_ops.
16896 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
16898 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
16899 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
16901 2010-06-01 Pedro Alves <pedro@codesourcery.com>
16902 Stan Shebs <stan@codesourcery.com>
16904 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
16905 (all): Depend on $(extra_libraries).
16906 (install-only): Install the IPA.
16907 (IPA_OBJS, IPA_LIB): New.
16908 (clean): Remove the IPA lib.
16909 (IPAGENT_CFLAGS): New.
16910 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
16911 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
16912 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
16913 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
16914 * configure.ac: Check for atomic builtins support in the compiler.
16915 (IPA_DEPFILES, extra_libraries): Define.
16916 * configure.srv (ipa_obj): Add description.
16917 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
16918 (i[34567]86-*-linux*): Set ipa_obj.
16919 (x86_64-*-linux*): Set ipa_obj.
16920 * linux-low.c (stabilizing_threads): New.
16921 (supports_fast_tracepoints): New.
16922 (linux_detach): Stabilize threads before detaching.
16923 (handle_tracepoints): Handle internal tracing breakpoints. Assert
16924 the lwp is either not stabilizing, or is moving out of a jump pad.
16925 (linux_fast_tracepoint_collecting): New.
16926 (maybe_move_out_of_jump_pad): New.
16927 (enqueue_one_deferred_signal): New.
16928 (dequeue_one_deferred_signal): New.
16929 (linux_wait_for_event_1): If moving out of a jump pad, defer
16930 pending signals to later.
16931 (linux_stabilize_threads): New.
16932 (linux_wait_1): Check if threads need moving out of jump pads, and
16934 (stuck_in_jump_pad_callback): New.
16935 (move_out_of_jump_pad_callback): New.
16936 (lwp_running): New.
16937 (linux_resume_one_lwp): Handle moving out of jump pads.
16938 (linux_set_resume_request): Dequeue deferred signals.
16939 (need_step_over_p): Also step over fast tracepoint jumps.
16940 (start_step_over): Also uninsert fast tracepoint jumps.
16941 (finish_step_over): Also reinsert fast tracepoint jumps.
16942 (linux_install_fast_tracepoint_jump): New.
16943 (linux_target_ops): Install linux_stabilize_threads and
16944 linux_install_fast_tracepoint_jump_pad.
16945 * linux-low.h (linux_target_ops) <get_thread_area,
16946 install_fast_tracepoint_jump_pad>: New fields.
16947 (struct lwp_info) <collecting_fast_tracepoint,
16948 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
16949 (linux_get_thread_area): Declare.
16950 * linux-x86-low.c (jump_insn): New.
16951 (x86_get_thread_area): New.
16952 (append_insns): New.
16953 (push_opcode): New.
16954 (amd64_install_fast_tracepoint_jump_pad): New.
16955 (i386_install_fast_tracepoint_jump_pad): New.
16956 (x86_install_fast_tracepoint_jump_pad): New.
16957 (the_low_target): Install x86_get_thread_area and
16958 x86_install_fast_tracepoint_jump_pad.
16959 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
16960 (struct fast_tracepoint_jump): New.
16961 (fast_tracepoint_jump_insn): New.
16962 (fast_tracepoint_jump_shadow): New.
16963 (find_fast_tracepoint_jump_at): New.
16964 (fast_tracepoint_jump_here): New.
16965 (delete_fast_tracepoint_jump): New.
16966 (set_fast_tracepoint_jump): New.
16967 (uninsert_fast_tracepoint_jumps_at): New.
16968 (reinsert_fast_tracepoint_jumps_at): New.
16969 (set_breakpoint_at): Use write_inferior_memory.
16970 (uninsert_raw_breakpoint): Use write_inferior_memory.
16971 (check_mem_read): Mask out fast tracepoint jumps.
16972 (check_mem_write): Mask out fast tracepoint jumps.
16973 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
16974 (set_fast_tracepoint_jump): Declare.
16975 (delete_fast_tracepoint_jump)
16976 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
16977 (reinsert_fast_tracepoint_jumps_at): Declare.
16978 * regcache.c: Don't compile many functions when building the
16979 in-process agent library.
16980 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
16981 the register buffer in the heap.
16982 (free_register_cache): If the register buffer isn't owned by the
16983 regcache, don't free it.
16984 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
16985 pre-existing register caches.
16986 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
16988 (convert_ascii_to_int): : Constify `from' parameter type.
16989 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
16990 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
16991 the needed buffer in-place.
16992 (relocate_instruction): New.
16993 * server.c (handle_query) <qSymbols>: If the target supports
16994 tracepoints, give it a chance of looking up symbols. Report
16995 support for fast tracepoints.
16996 (handle_status): Stabilize threads.
16997 (process_serial_event): Adjust.
16998 * server.h (struct fast_tracepoint_jump): Forward declare.
16999 (struct process_info) <fast_tracepoint_jumps>: New field.
17000 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17001 (decode_X_packet, decode_M_packet): Adjust.
17002 (relocate_instruction): Declare.
17003 (in_process_agent_loaded): Declare.
17004 (tracepoint_look_up_symbols): Declare.
17005 (struct fast_tpoint_collect_status): Declare.
17006 (fast_tracepoint_collecting): Declare.
17007 (force_unlock_trace_buffer): Declare.
17008 (handle_tracepoint_bkpts): Declare.
17009 (initialize_low_tracepoint)
17010 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17011 * target.h (struct target_ops) <stabilize_threads,
17012 install_fast_tracepoint_jump_pad>: New fields.
17013 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17014 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17015 [HAVE_STDINT_H]: Include stdint.h.
17016 (trace_debug_1): Rename to ...
17017 (trace_vdebug): ... this.
17018 (trace_debug): Rename to ...
17019 (trace_debug_1): ... this. Add `level' parameter.
17020 (trace_debug): New.
17021 (ATTR_USED, ATTR_NOINLINE): New.
17022 (IP_AGENT_EXPORT): New.
17023 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17024 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17025 (about_to_request_buffer_space, trace_buffer_is_full)
17026 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17027 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17028 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17029 (traceframe_write_count, traceframes_created)
17030 (trace_state_variables)
17031 New renaming defines.
17032 (struct ipa_sym_addresses): New.
17033 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17034 (symbol_list): New.
17035 (ipa_sym_addrs): New.
17036 (all_tracepoint_symbols_looked_up): New.
17037 (in_process_agent_loaded): New.
17038 (write_e_ipa_not_loaded): New.
17039 (maybe_write_ipa_not_loaded): New.
17040 (tracepoint_look_up_symbols): New.
17041 (debug_threads) [IN_PROCESS_AGENT]: New.
17042 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17043 (UNKNOWN_SIDE_EFFECTS): New.
17044 (stop_tracing): New.
17045 (flush_trace_buffer): New.
17046 (stop_tracing_bkpt): New.
17047 (flush_trace_buffer_bkpt): New.
17048 (read_inferior_integer): New.
17049 (read_inferior_uinteger): New.
17050 (read_inferior_data_pointer): New.
17051 (write_inferior_data_pointer): New.
17052 (write_inferior_integer): New.
17053 (write_inferior_uinteger): New.
17054 (struct collect_static_trace_data_action): Delete.
17055 (enum tracepoint_type): New.
17056 (struct tracepoint) <type>: New field `type'.
17057 <actions_str, step_actions, step_actions_str>: Only include in
17059 <orig_size, obj_addr_on_target, adjusted_insn_addr>
17060 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
17061 (tracepoints): Use IP_AGENT_EXPORT.
17062 (last_tracepoint): Don't include in the IPA.
17063 (stopping_tracepoint): Use IP_AGENT_EXPORT.
17064 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
17065 (alloced_trace_state_variables): New.
17066 (trace_state_variables): Use IP_AGENT_EXPORT.
17067 (traceframe_t): Delete unused variable.
17068 (circular_trace_buffer): Don't include in the IPA.
17069 (trace_buffer_start): Delete.
17070 (struct trace_buffer_control): New.
17071 (trace_buffer_free): Delete.
17072 (struct ipa_trace_buffer_control): New.
17073 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
17074 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
17076 (trace_buffer_ctrl): New.
17077 (TRACE_BUFFER_CTRL_CURR): New.
17078 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
17079 Reimplement as macros.
17080 (trace_buffer_wrap): Delete.
17081 (traceframe_write_count, traceframe_read_count)
17082 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
17083 (struct tracepoint_hit_ctx) <type>: New field.
17084 (struct fast_tracepoint_ctx): New.
17085 (memory_barrier): New.
17087 (record_tracepoint_error): Update atomically in the IPA.
17088 (clear_inferior_trace_buffer): New.
17089 (about_to_request_buffer_space): New.
17090 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17091 updating the same buffer.
17092 (add_tracepoint): Default the tracepoint's type to trap
17093 tracepoint, and orig_size to -1.
17094 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17095 internal variables.
17096 (create_trace_state_variable): New parameter `gdb'. Handle it.
17097 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17098 (cmd_qtdp): Handle fast tracepoints.
17099 (cmd_qtdv): Adjust.
17100 (max_jump_pad_size): New.
17101 (gdb_jump_pad_head): New.
17102 (get_jump_space_head): New.
17103 (claim_jump_space): New.
17104 (sort_tracepoints): New.
17105 (MAX_JUMP_SIZE): New.
17106 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17108 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17109 support. Upload fast traceframes, and delete internal IPA
17111 (stop_tracing_handler): New.
17112 (flush_trace_buffer_handler): New.
17113 (cmd_qtstop): Upload fast tracepoints.
17114 (response_tracepoint): Handle fast tracepoints.
17115 (tracepoint_finished_step): Upload fast traceframes. Set the
17116 tracepoint hit context's tracepoint type.
17117 (handle_tracepoint_bkpts): New.
17118 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17119 type. Add comment about fast tracepoints.
17120 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17121 non-existing action_str field.
17122 (get_context_regcache): Handle fast tracepoints.
17123 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17125 (fast_tracepoint_from_jump_pad_address): New.
17126 (fast_tracepoint_from_ipa_tpoint_address): New.
17127 (collecting_t): New.
17128 (force_unlock_trace_buffer): New.
17129 (fast_tracepoint_collecting): New.
17131 (gdb_collect): New.
17132 (write_inferior_data_ptr): New.
17133 (target_tp_heap): New.
17134 (target_malloc): New.
17135 (download_agent_expr): New.
17137 (download_tracepoints): New.
17138 (download_trace_state_variables): New.
17139 (upload_fast_traceframes): New.
17140 (IPA_FIRST_TRACEFRAME): New.
17141 (IPA_NEXT_TRACEFRAME_1): New.
17142 (IPA_NEXT_TRACEFRAME): New.
17143 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17144 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17145 (gdb_jump_pad_buffer_end): New.
17146 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17147 (initialize_tracepoint): Adjust.
17148 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17149 buffer. Initialize the low module.
17150 * utils.c (PREFIX, TOOLNAME): New.
17151 (malloc_failure): Use PREFIX.
17152 (error): In the IPA, an error causes an exit.
17153 (fatal, warning): Use PREFIX.
17154 (internal_error): Use TOOLNAME.
17155 (NUMCELLS): Increase to 10.
17156 * configure, config.in: Regenerate.
17158 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17160 * server.c (handle_query) <qSupported>: Do two passes over the
17161 qSupported string to avoid nesting strtok.
17163 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17165 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17167 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17168 -Wl,--dynamic-list.
17169 * configure: Regenerate.
17170 * proc-service.list: New.
17172 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17174 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17177 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
17179 * gdbreplay.c (remote_open): Check error return from socket() call by
17180 its equality to -1 not by it being negative.
17181 * remote-utils.c (remote_open): Likewise.
17183 2010-05-23 Pedro Alves <pedro@codesourcery.com>
17185 * config.h: Regenerate.
17187 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17189 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
17190 doesn't provide PTRACE_GET_THREAD_AREA.
17192 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17194 * linux-m68k-low.c: Include <asm/ptrace.h>
17195 (ps_get_thread_area): Implement.
17197 2010-05-03 Doug Evans <dje@google.com>
17199 * event-loop.c (struct callback_event): New struct.
17200 (callback_list): New global.
17201 (append_callback_event, delete_callback_event): New functions.
17202 (process_callback): New function.
17203 (start_event_loop): Call it.
17204 * remote-utils.c (NOT_SCHEDULED): Define.
17205 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
17206 moved out of readchar.
17207 (readchar): Rewrite. Call reschedule before returning.
17208 (reset_readchar): New function.
17209 (remote_close): Call it.
17210 (process_remaining, reschedule): New functions.
17211 * server.h (callback_handler_func): New typedef.
17212 (append_callback_event, delete_callback_event): Declare.
17214 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17216 * proc-service.c (ps_pglobal_lookup): Use
17217 thread_db_look_up_one_symbol.
17218 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
17219 parameter. Use it instead of all_symbols_looked_up.
17220 * server.h (struct process_info) <all_symbols_looked_up>: Delete
17222 (all_symbols_looked_up): Don't declare.
17223 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
17224 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
17226 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
17227 Set all_symbols_looked_up here.
17228 (thread_db_look_up_one_symbol): New.
17229 (thread_db_get_tls_address): Adjust.
17230 (thread_db_load_search, try_thread_db_load_1): Always allocate the
17231 thread_db object on the heap, and tentatively set it in the
17233 (thread_db_init): Don't set all_symbols_looked_up here.
17234 * linux-low.h (thread_db_look_up_one_symbol): Declare.
17236 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17238 * linux-low.c (linux_kill, linux_detach): Adjust.
17239 (status_pending_p_callback): Remove redundant statement. Check
17240 for !TARGET_WAITIKIND_IGNORE, instead of
17241 TARGET_WAITKIND_STOPPED.
17242 (handle_tracepoints): Make sure LWP is locked. Adjust.
17243 (linux_wait_for_event_1): Adjust.
17244 (linux_cancel_breakpoints): New.
17245 (unsuspend_one_lwp): New.
17246 (unsuspend_all_lwps): New.
17247 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
17248 (send_sigstop_callback): Change return type to int, add new
17249 `except' parameter and handle it.
17250 (suspend_and_send_sigstop_callback): New.
17251 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
17252 pass them down. If SUSPEND, also increment the lwp's suspend
17254 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
17255 (need_step_over_p): Don't consider suspended LWPs.
17256 (start_step_over): Adjust.
17257 (proceed_one_lwp): Change return type to int, add new `except'
17258 parameter and handle it.
17259 (unsuspend_and_proceed_one_lwp): New.
17260 (proceed_all_lwps): Use find_inferior instead of
17262 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
17263 also decrement the suspend count of LWPs. Pass `except' down,
17264 instead of hacking its suspend count.
17265 (linux_pause_all): Add `freeze' parameter. Adjust.
17266 (linux_unpause_all): New.
17267 (linux_target_ops): Install linux_unpause_all.
17268 * server.c (handle_status): Adjust.
17269 * target.h (struct target_ops): New fields `unpause_all' and
17270 `cancel_breakpoints'. Add new parameter to `pause_all'.
17271 (pause_all): Add new `freeze' parameter.
17272 (unpause_all): New.
17273 (cancel_breakpoints): New.
17274 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
17275 cancel breakpoints.
17276 (cmd_qtstart): Pause threads.
17277 (stop_tracing): Pause threads, and cancel breakpoints.
17278 * win32-low.c (win32_target_ops): Adjust.
17280 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17282 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
17283 the inferior right away from here...
17284 (linux_wait_1): ... to here, and adjust to check the thread's
17285 last_resume_kind instead of the lwp's step or stop_expected flags.
17287 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17289 * README: Use consistent `GDB' and `GDBserver' spellings.
17291 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17293 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
17294 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
17295 (linux_detach_one_lwp): Assume the lwp is stopped.
17296 (any_thread_of): Delete.
17297 (linux_detach): Stop all lwps here. Don't blindly delete all
17299 (delete_lwp_callback): New.
17300 (linux_mourn): Delete all lwps of the process that is gone.
17301 (linux_wait_1): Don't delete the last lwp of the process here.
17302 * mem-break.h (mark_breakpoints_out): Declare.
17303 * mem-break.c (mark_breakpoints_out): New.
17304 (free_all_breakpoints): Use it.
17305 * server.c (handle_target_event): If the process is gone, mark
17307 * thread-db.c (struct thread_db) <create_bp>: New field.
17308 (thread_db_enable_reporting): Fix prototype. Store a thread event
17309 breakpoint reference in the thread_db struct.
17310 (thread_db_load_search): Clear the thread_db object.
17311 (try_thread_db_load_1): Ditto.
17312 (switch_to_process): New.
17313 (disable_thread_event_reporting): Use it.
17314 (remove_thread_event_breakpoints): New.
17315 (thread_db_detach, thread_db_mourn): Use it.
17317 2010-05-01 Pedro Alves <pedro@codesourcery.com>
17319 * linux-low.c (linux_enable_event_reporting): New.
17320 (linux_wait_for_event_1, handle_extended_wait): Use it.
17322 2010-04-30 Pedro Alves <pedro@codesourcery.com>
17324 * linux-low.c (linux_kill_one_lwp, linux_kill)
17325 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
17326 (send_sigstop): Take an lwp_info as parameter instead. Queue a
17327 SIGSTOP even if the LWP is stopped.
17328 (send_sigstop_callback): New.
17329 (stop_all_lwps): Use send_sigstop_callback instead.
17330 (linux_resume_one_thread): Adjust.
17331 (proceed_one_lwp): Still proceed an LWP that the client has
17332 requested to stop, if we haven't reported it as stopped yet. Make
17333 sure that LWPs the client want stopped, have a pending SIGSTOP.
17335 2010-04-26 Doug Evans <dje@google.com>
17337 * server.c (handle_general_set): Make static.
17339 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
17340 Print received char after testing for error/eof instead of before.
17341 (input_interrupt): Tweak comment.
17343 2010-04-23 Doug Evans <dje@google.com>
17345 * server.c (start_inferior): Print inferior argv if --debug.
17347 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
17349 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
17350 * nto-x86-low.c: Include server.h
17352 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
17354 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
17355 be consistent with other sources of this directory.
17356 (init_registers_amd64): Correct name of source file of this function
17359 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17361 * configure.srv (x86_64-*-mingw*): New configuration for Windows
17362 64-bit executables.
17364 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17366 * win32-i386-low.c: Add 64-bit support.
17367 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
17368 (init_registers_amd64): Declare.
17369 (mappings): Add 64-bit version of array.
17370 (init_windows_x86): New function.
17371 (the_low_target): Change init_arch field to init_windows_x86.
17373 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17375 * win32-low.c: Adapt to support also 64-bit architecture.
17376 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
17377 (get_image_name): Use SIZE_T type for local variable `done'.
17378 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
17379 (toolhelp_get_dll_name): Idem.
17380 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
17381 Use uintptr_t typecast to avoid warning.
17382 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
17383 (handle_exception): Use phex_nz to avoid warning.
17384 (win32_wait): Remove unused local variable `process'.
17386 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17388 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
17391 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
17393 * configure.ac: Use `ws2_32' library for srv_mingw.
17394 * configure: Regenerate.
17395 * gdbreplay.c: Include winsock2.h instead of winsock.h.
17396 * remote-utils.c: Likewise.
17398 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
17400 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
17401 if __x86_64__ is defined.
17403 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17405 * configure: Regenerate.
17407 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17409 * server.c (handle_query): Handle 'qGetTIBAddr' query.
17410 * target.h (target_ops): New get_tib_address field.
17411 * win32-low.h (win32_thread_info): Add thread_local_base field.
17412 * win32-low.c (child_add_thread): Add tlb argument.
17413 Set thread_local_base field to TLB.
17414 (get_child_debug_event): Adapt to child_add_thread change.
17415 (win32_get_tib_address): New function.
17416 (win32_target_ops): Set get_tib_address field to
17417 win32_get_tib_address.
17418 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
17420 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17422 * linux-low.c (linux_mourn): Also remove the process.
17423 * server.c (handle_target_event): Don't remove the process here.
17424 * nto-low.c (nto_mourn): New.
17425 (nto_target_ops): Install it.
17426 * spu-low.c (spu_mourn): New.
17427 (spu_target_ops): Install it.
17428 * win32-low.c (win32_mourn): New.
17429 (win32_target_ops): Install it.
17431 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17433 * server.h (buffer_xml_printf): Remove redundant `;'.
17435 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17437 * regcache.c (set_register_cache): Invalidate regcaches before
17438 changing the register cache layout.
17439 (regcache_invalidate_one): Allow a NULL regcache.
17440 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
17441 regcaches before changing the register cache layout or the target
17444 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
17446 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
17447 variable warning on Linux/x86-64.
17449 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17451 GDBserver disconnected tracing support.
17453 * linux-low.c (linux_remove_process): Delete.
17454 (add_lwp): Don't set last_resume_kind here.
17455 (linux_kill): Use `mourn'.
17456 (linux_detach): Use `thread_db_detach', and `mourn'.
17457 (linux_mourn): New.
17458 (linux_attach_lwp_1): Adjust comment.
17459 (linux_attach): last_resume_kind moved the thread_info; adjust.
17460 (status_pending_p_callback): Adjust.
17461 (linux_wait_for_event_1): Adjust.
17462 (count_events_callback, select_singlestep_lwp_callback)
17463 (select_event_lwp_callback, cancel_breakpoints_callback)
17464 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
17465 (proceed_one_lwp): Adjust.
17466 (linux_async): Add debug output.
17467 (linux_thread_stopped): New.
17468 (linux_pause_all): New.
17469 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
17471 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
17472 (thread_db_free): Delete declaration.
17473 (thread_db_detach, thread_db_mourn): Declare.
17474 * thread-db.c (thread_db_init): Use thread_db_mourn.
17475 (thread_db_free): Delete, split in two.
17476 (disable_thread_event_reporting): New.
17477 (thread_db_detach): New.
17478 (thread_db_mourn): New.
17480 * server.h (struct thread_info) <last_resume_kind>: New field.
17481 <attached>: Add comment.
17482 <gdb_detached>: New field.
17483 (handler_func): Change return type to int.
17484 (handle_serial_event, handle_target_event): Ditto.
17485 (gdb_connected): Declare.
17487 (disconnected_tracing): Declare.
17488 (stop_tracing): Declare.
17490 * server.c (handle_query) <qSupported>: Report support for
17491 disconnected tracing.
17492 (queue_stop_reply_callback): Account for running threads.
17493 (gdb_wants_thread_stopped): New.
17494 (gdb_wants_all_threads_stopped): New.
17495 (gdb_reattached_process): New.
17496 (handle_status): Clear the `gdb_detached' flag of all processes.
17497 In all-stop, stop all threads.
17498 (main): Be sure to leave tfind mode. Handle disconnected tracing.
17499 (process_serial_event): If the remote connection breaks, or if an
17500 exit was forced with "monitor exit", force an event loop exit.
17501 Handle disconnected tracing on detach.
17502 (handle_serial_event): Adjust.
17503 (handle_target_event): If GDB isn't connected, forward events back
17504 to the inferior, unless the last process exited, in which case,
17505 exit gdbserver. Adjust interface.
17507 * remote-utils.c (remote_open): Don't block in accept. Instead
17508 register an event loop source on the listen socket file
17509 descriptor. Refactor bits into ...
17510 (listen_desc): ... this new global.
17511 (gdb_connected): ... this new function.
17512 (enable_async_notification): ... this new function.
17513 (handle_accept_event): ... this new function.
17514 (remote_close): Clear remote_desc.
17516 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
17518 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
17520 (mourn_inferior): Define.
17521 (target_process_qsupported): Avoid the dangling else problem.
17522 (thread_stopped): Define.
17523 (pause_all): Define.
17524 (target_waitstatus_to_string): Declare.
17525 * target.c (target_waitstatus_to_string): New.
17527 * tracepoint.c (tracing): Make extern.
17528 (disconnected_tracing): New.
17529 (stop_tracing): Make extern. Handle tracing stops due to GDB
17531 (cmd_qtdisconnected): New.
17532 (cmd_qtstatus): Report disconnected tracing status in trace reply.
17533 (handle_tracepoint_general_set): Handle QTDisconnected.
17535 * event-loop.c (event_handler_func): Change return type to int.
17536 (process_event): Bail out if the event handler wants the event
17538 (handle_file_event): Ditto.
17539 (start_event_loop): Bail out if the event handler wants the event
17542 * nto-low.c (nto_target_ops): Adjust.
17543 * spu-low.c (spu_wait): Don't remove the process here.
17544 (spu_target_ops): Adjust.
17545 * win32-low.c (win32_wait): Don't remove the process here.
17546 (win32_target_ops): Adjust.
17548 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17550 * regcache.c (realloc_register_cache): Invalidate inferior's
17551 regcache before recreating it.
17553 2010-04-09 Pedro Alves <pedro@codesourcery.com>
17555 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
17557 2010-04-09 Stan Shebs <stan@codesourcery.com>
17558 Pedro Alves <pedro@codesourcery.com>
17560 * server.h (LONGEST): New.
17561 (struct thread_info) <while_stepping>: New field.
17562 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
17564 (initialize_tracepoint, handle_tracepoint_general_set)
17565 (handle_tracepoint_query, tracepoint_finished_step)
17566 (tracepoint_was_hit, release_while_stepping_state_list):
17567 (current_traceframe): Declare.
17568 * server.c (handle_general_set): Handle tracepoint packets.
17569 (read_memory): New.
17570 (write_memory): New.
17571 (handle_search_memory_1): Use read_memory.
17572 (handle_query): Report support for conditional tracepoints, trace
17573 state variables, and tracepoint sources. Handle tracepoint
17575 (main): Initialize the tracepoints module.
17576 (process_serial_event): Handle traceframe reads/writes.
17578 * linux-low.c (handle_tracepoints): New.
17579 (linux_wait_1): Call it.
17580 (linux_resume_one_lwp): Handle while-stepping.
17581 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
17582 (linux_target_ops): Install them.
17583 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
17585 * linux-x86-low.c (x86_supports_tracepoints): New.
17586 (the_low_target). Install it.
17588 * mem-break.h (delete_breakpoint): Declare.
17589 * mem-break.c (delete_breakpoint): Make external.
17591 * target.h (struct target_ops): Add `supports_tracepoints',
17592 `read_pc', and `write_pc' fields.
17593 (target_supports_tracepoints): Define.
17594 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
17597 * regcache.h (struct regcache) <registers_owned>: New field.
17598 (init_register_cache, regcache_cpy): Declare.
17599 (regcache_read_pc, regcache_write_pc): Declare.
17600 (register_cache_size): Declare.
17601 (supply_regblock): Declare.
17602 * regcache.c (init_register_cache): New.
17603 (new_register_cache): Use it.
17604 (regcache_cpy): New.
17605 (register_cache_size): New.
17606 (supply_regblock): New.
17607 (regcache_read_pc, regcache_write_pc): New.
17609 * tracepoint.c: New.
17611 * Makefile.in (OBS): Add tracepoint.o.
17612 (tracepoint.o): New rule.
17614 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
17616 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
17618 (i386-mmx.c): Likewise.
17619 (i386-mmx-linux.o): Likewise.
17620 (i386-mmx-linux.c): Likewise.
17622 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
17623 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
17624 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
17625 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
17627 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
17628 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
17629 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
17631 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
17633 * Makefile.in (clean): Updated.
17635 (i386-avx.c): Likewise.
17636 (i386-avx-linux.o): Likewise.
17637 (i386-avx-linux.c): Likewise.
17638 (amd64-avx.o): Likewise.
17639 (amd64-avx.c): Likewise.
17640 (amd64-avx-linux.o): Likewise.
17641 (amd64-avx-linux.c): Likewise.
17643 * configure.srv (srv_i386_regobj): Add i386-avx.o.
17644 (srv_i386_linux_regobj): Add i386-avx-linux.o.
17645 (srv_amd64_regobj): Add amd64-avx.o.
17646 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
17647 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
17648 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
17649 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
17650 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
17651 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
17652 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
17654 * i387-fp.c: Include "i386-xstate.h".
17656 (i387_cache_to_xsave): Likewise.
17657 (i387_xsave_to_cache): Likewise.
17658 (x86_xcr0): Likewise.
17660 * i387-fp.h (i387_cache_to_xsave): Likewise.
17661 (i387_xsave_to_cache): Likewise.
17662 (x86_xcr0): Likewise.
17664 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
17665 * linux-crisv32-low.c (target_regsets): Likewise.
17666 * linux-m68k-low.c (target_regsets): Likewise.
17667 * linux-mips-low.c (target_regsets): Likewise.
17668 * linux-ppc-low.c (target_regsets): Likewise.
17669 * linux-s390-low.c (target_regsets): Likewise.
17670 * linux-sh-low.c (target_regsets): Likewise.
17671 * linux-sparc-low.c (target_regsets): Likewise.
17672 * linux-xtensa-low.c (target_regsets): Likewise.
17674 * linux-low.c: Include <sys/uio.h>.
17675 (regsets_fetch_inferior_registers): Support nt_type.
17676 (regsets_store_inferior_registers): Likewise.
17677 (linux_process_qsupported): New.
17678 (linux_target_ops): Add linux_process_qsupported.
17680 * linux-low.h (regset_info): Add nt_type.
17681 (linux_target_ops): Add process_qsupported.
17683 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
17685 (init_registers_i386_avx_linux): New.
17686 (init_registers_amd64_avx_linux): Likewise.
17687 (xmltarget_i386_linux_no_xml): Likewise.
17688 (xmltarget_amd64_linux_no_xml): Likewise.
17689 (PTRACE_GETREGSET): Likewise.
17690 (PTRACE_SETREGSET): Likewise.
17691 (x86_fill_xstateregset): Likewise.
17692 (x86_store_xstateregset): Likewise.
17693 (use_xml): Likewise.
17694 (x86_linux_update_xmltarget): Likewise.
17695 (x86_linux_process_qsupported): Likewise.
17696 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
17697 (x86_arch_setup): Don't call init_registers_amd64_linux nor
17698 init_registers_i386_linux here. Call
17699 x86_linux_update_xmltarget.
17700 (the_low_target): Add x86_linux_process_qsupported.
17702 * server.c (handle_query): Call target_process_qsupported.
17704 * target.h (target_ops): Add process_qsupported.
17705 (target_process_qsupported): New.
17707 2010-04-03 Pedro Alves <pedro@codesourcery.com>
17709 * inferiors.c (add_thread): Set last_status kind to
17710 TARGET_WAITKIND_IGNORE.
17711 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
17712 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
17713 (linux_wait_1): Move `thread' local definition to block that uses
17714 it. Don't NULL initialize `event_child'.
17715 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
17716 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
17717 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
17719 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17721 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
17722 an extended waitstatus, or by a watchpoint.
17723 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
17724 thread was stepping or has been stopped by a watchpoint.
17726 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17728 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
17729 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
17730 of another, then delete the previous, and validate all
17732 (validate_inserted_breakpoint): New.
17733 (delete_disabled_breakpoints): New.
17734 (validate_breakpoints): New.
17735 (check_mem_read): Validate breakpoints before trusting their
17736 shadow. Delete disabled breakpoints.
17737 (check_mem_write): Validate breakpoints before trusting they
17738 should be inserted. Delete disabled breakpoints.
17739 * mem-break.h (validate_breakpoints):
17740 * server.c (handle_query): Validate breakpoints when we see a
17743 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17745 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
17746 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
17747 if we could tell there's a GDB breakpoint at stop_pc.
17748 (need_step_over_p): Don't do a step over if we find a GDB
17749 breakpoint at the resume PC.
17751 * mem-break.c (struct raw_breakpoint): New.
17752 (enum bkpt_type): New type `gdb_breakpoint'.
17753 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
17754 fields. New field `raw'.
17755 (find_raw_breakpoint_at): New.
17756 (set_raw_breakpoint_at): Handle refcounting. Create a raw
17757 breakpoint instead.
17758 (set_breakpoint_at): Adjust.
17759 (delete_raw_breakpoint): New.
17760 (release_breakpoint): New.
17761 (delete_breakpoint): Rename to...
17762 (delete_breakpoint_1): ... this. Add proc parameter. Use
17763 release_breakpoint. Return ENOENT.
17764 (delete_breakpoint): Reimplement.
17765 (find_breakpoint_at): Delete.
17766 (find_gdb_breakpoint_at): New.
17767 (delete_breakpoint_at): Delete.
17768 (set_gdb_breakpoint_at): New.
17769 (delete_gdb_breakpoint_at): New.
17770 (gdb_breakpoint_here): New.
17771 (set_reinsert_breakpoint): Use release_breakpoint.
17772 (uninsert_breakpoint): Rename to ...
17773 (uninsert_raw_breakpoint): ... this.
17774 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
17775 (reinsert_raw_breakpoint): Change parameter type to
17777 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
17779 (check_breakpoints): Adjust. Use release_breakpoint.
17780 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
17781 (breakpoint_inserted_here): Ditto.
17782 (check_mem_read): Adjust to iterate over raw breakpoints instead.
17783 Don't trust the breakpoint's shadow if it is not inserted.
17784 (check_mem_write): Adjust to iterate over raw breakpoints instead.
17785 (delete_all_breakpoints): Adjust.
17786 (free_all_breakpoints): Mark all breakpoints as uninserted, and
17787 use delete_breakpoint_1.
17789 * mem-break.h (breakpoints_supported): Delete declaration.
17790 (set_gdb_breakpoint_at): Declare.
17791 (gdb_breakpoint_here): Declare.
17792 (delete_breakpoint_at): Delete.
17793 (delete_gdb_breakpoint_at): Declare.
17795 * server.h (struct raw_breakpoint): Forward declare.
17796 (struct process_info): New field `raw_breakpoints'.
17798 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
17801 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17803 * linux-low.c (status_pending_p_callback): Fix comment.
17804 (linux_wait_for_event_1): Move most of the internal breakpoint
17805 handling from here...
17806 (linux_wait_1): ... to here.
17807 (count_events_callback): New.
17808 (select_singlestep_lwp_callback): New.
17809 (select_event_lwp_callback): New.
17810 (cancel_breakpoints_callback): New.
17811 (select_event_lwp): New.
17812 (linux_wait_1): Simplify internal breakpoint handling. Give equal
17813 priority to all LWPs that have had events that should be reported
17814 to the client. Cancel breakpoints when about to reporting the
17815 event to the client, not while stopping lwps. No longer cancel
17816 finished single-steps here.
17817 (cancel_finished_single_step): Delete.
17818 (cancel_finished_single_steps): Delete.
17820 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17822 * mem-break.c (enum bkpt_type): New.
17823 (struct breakpoint): New field `type'.
17824 (set_breakpoint_at): Change return type to struct breakpoint
17825 pointer. Set type to `other_breakpoint' by default.
17826 (delete_breakpoint): Rewrite, supporting more than one breakpoint
17827 in the breakpoint list.
17828 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
17829 (reinsert_breakpoint): Rename to ...
17830 (reinsert_raw_breakpoint): ... this.
17831 (reinsert_breakpoints_at): Adjust.
17832 * mem-break.h (struct breakpoint): Declare.
17833 (set_breakpoint_at): Change return type to struct breakpoint
17836 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17838 * server.c (handle_query): Assign, not compare.
17840 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17842 Teach linux gdbserver to step-over-breakpoints.
17844 * linux-low.c (can_hardware_single_step): New.
17845 (supports_breakpoints): New.
17846 (handle_extended_wait): If stopping threads, read the stop pc of
17847 the new cloned LWP.
17849 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
17850 low target doesn't support retrieving the PC.
17851 (add_lwp): Set last_resume_kind to resume_continue.
17852 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
17853 (linux_attach): Don't clear stop_expected. Set the lwp's
17854 last_resume_kind to resume_stop.
17855 (linux_detach_one_lwp): Don't check for removed breakpoints.
17856 (check_removed_breakpoint): Delete.
17857 (status_pending_p): Rename to ...
17858 (status_pending_p_callback): ... this. Don't check for removed
17859 breakpoints. Don't consider threads that are stopped from GDB's
17861 (linux_wait_for_lwp): Always read the stop_pc here.
17862 (cancel_breakpoint): New.
17863 (step_over_bkpt): New global.
17864 (linux_wait_for_event_1): Implement stepping over breakpoints.
17865 (gdb_wants_lwp_stopped): New.
17866 (gdb_wants_all_stopped): New.
17867 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
17868 single-step traps here. Store the thread's last reported target
17870 (send_sigstop): Don't clear stop_expected. Always set it,
17872 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
17873 (cancel_finished_single_step): New.
17874 (cancel_finished_single_steps): New.
17875 (wait_for_sigstop): Don't cancel finished single-step traps here.
17876 (linux_resume_one_lwp): Don't check for removed breakpoints.
17877 Don't set `step' on non-hardware step archs.
17878 (linux_set_resume_request): Ignore resume_stop requests if already
17879 stopping or stopped. Set the lwp's last_resume_kind.
17880 (resume_status_pending_p): Don't check for removed breakpoints.
17881 (need_step_over_p): New.
17882 (start_step_over): New.
17883 (finish_step_over): New.
17884 (linux_resume_one_thread): Always queue a sigstop for resume_stop
17885 requests. Clear the thread's last reported target waitstatus.
17886 Don't use the `suspended' flag. Don't consider pending breakpoints.
17887 (linux_resume): Start a step-over if necessary.
17888 (proceed_one_lwp): New.
17889 (proceed_all_lwps): New.
17890 (unstop_all_lwps): New.
17891 * linux-low.h (struct lwp_info): Rewrite comment for the
17892 `suspended' flag. Add the `stop_pc' field. Delete the
17893 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
17894 Add `'last_resume_kind' and `need_step_over' fields.
17895 * inferiors.c (struct thread_info): Delete, moved elsewhere.
17896 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
17897 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
17898 (set_raw_breakpoint_at): New.
17899 (set_breakpoint_at): Rewrite to use it.
17900 (reinsert_breakpoint_handler): Delete.
17901 (set_reinsert_breakpoint): New.
17902 (reinsert_breakpoint_by_bp): Delete.
17903 (delete_reinsert_breakpoints): New.
17904 (uninsert_breakpoint): Rewrite.
17905 (uninsert_breakpoints_at): New.
17906 (reinsert_breakpoint): Rewrite.
17907 (reinsert_breakpoints_at): New.
17908 (check_breakpoints): Rewrite.
17909 (breakpoint_here): New.
17910 (breakpoint_inserted_here): New.
17911 (check_mem_read): Adjust.
17912 * mem-break.h (breakpoints_supported, breakpoint_here)
17913 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
17914 (reinsert_breakpoint_by_bp): Delete declaration.
17915 (delete_reinsert_breakpoints): Declare.
17916 (reinsert_breakpoint): Delete declaration.
17917 (reinsert_breakpoints_at): Declare.
17918 (uninsert_breakpoint): Delete declaration.
17919 (uninsert_breakpoints_at): Declare.
17920 (check_breakpoints): Adjust prototype.
17921 * server.h: Adjust include order.
17922 (struct thread_info): Declare here. Add a `last_status' field.
17924 2010-03-23 Michael Snyder <msnyder@vmware.com>
17926 * server.c (crc32): New function.
17927 (handle_query): Add handling for 'qCRC:' request.
17929 2010-03-23 Pedro Alves <pedro@codesourcery.com>
17931 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
17932 lwp had been stopped by a watchpoint.
17934 2010-03-16 Pedro Alves <pedro@codesourcery.com>
17936 * server.h (internal_error): Declare.
17937 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
17938 * utils.c (internal_error): New function.
17940 2010-03-15 Andreas Schwab <schwab@redhat.com>
17942 * configure.srv: Fix typo setting srv_regobj.
17944 2010-03-15 Pedro Alves <pedro@codesourcery.com>
17946 * linux-low.c (fetch_register): Avoid passing a non string literal
17948 (usr_store_inferior_registers): Ditto.
17950 2010-03-14 Pedro Alves <pedro@codesourcery.com>
17952 * linux-low.c (linux_write_memory): Bail out early if peeking
17955 2010-03-14 Pedro Alves <pedro@codesourcery.com>
17957 * linux-low.h (struct lwp_info): New fields
17958 `stopped_by_watchpoint' and `stopped_data_address'.
17959 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
17960 here, and cache them in the lwp object.
17961 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
17963 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
17965 (linux_stopped_by_watchpoint): Rewrite.
17966 (linux_stopped_data_address): Rewrite.
17968 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
17970 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
17971 switching the current inferior, not before.
17973 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
17975 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
17976 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
17977 i386-linux.c and amd64-linux.c.
17978 (reg-i386.o): Removed.
17979 (reg-i386.c): Likewise.
17980 (reg-i386-linux.o): Likewise.
17981 (reg-i386-linux.c): Likewise.
17982 (reg-x86-64.o): Likewise.
17983 (reg-x86-64.c): Likewise.
17984 (reg-x86-64-linux.o): Likewise.
17985 (reg-x86-64-linux.c): Likewise.
17987 (i386.c): Likewise.
17988 (i386-linux.o): Likewise.
17989 (i386-linux.c): Likewise.
17990 (amd64.o): Likewise.
17991 (amd64.c): Likewise.
17992 (amd64-linux.o): Likewise.
17993 (amd64-linux.c): Likewise.
17995 * configure.srv (srv_i386_regobj): New.
17996 (srv_i386_linux_regobj): Likewise.
17997 (srv_amd64_regobj): Likewise.
17998 (srv_amd64_linux_regobj): Likewise.
17999 (srv_i386_32bit_xmlfiles): Likewise.
18000 (srv_i386_64bit_xmlfiles): Likewise.
18001 (srv_i386_xmlfiles): Likewise.
18002 (srv_amd64_xmlfiles): Likewise.
18003 (srv_i386_linux_xmlfiles): Likewise.
18004 (srv_amd64_linux_xmlfiles): Likewise.
18005 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18006 srv_xmlfiles to $srv_i386_xmlfiles.
18007 (i[34567]86-*-mingw32ce*): Likewise.
18008 (i[34567]86-*-mingw*): Likewise.
18009 (i[34567]86-*-nto*): Likewise.
18010 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18011 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18012 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18013 (x86_64-*-linux*): Likewise.
18015 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18016 (init_registers_amd64_linux): New.
18017 (x86_arch_setup): Replace init_registers_x86_64_linux with
18018 init_registers_amd64_linux.
18020 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18022 * configure.ac: Check for libdl. If it is not available link against
18023 static libthread_db.
18024 * configure: Regenerate.
18026 2010-02-22 Pedro Alves <pedro@codesourcery.com>
18030 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18031 handing a read watchpoint.
18032 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18034 2010-02-12 Doug Evans <dje@google.com>
18036 * linux-low.c (linux_supports_tracefork_flag): Document.
18037 (linux_look_up_symbols): Add comment.
18039 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18041 * regcache.c (supply_register): Clear regcache if buf is NULL.
18043 2010-02-02 Nicolas Roche <roche@sourceware.org>
18044 Joel Brobecker <brobecker@adacore.com>
18046 * inferiors.c (find_inferior): Add function documentation.
18047 (unloaded_dll): Handle the case where the unloaded dll has not
18048 been previously registered in the dll list.
18050 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18052 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18053 (thumb2_breakpoint): New.
18054 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
18056 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18058 * linux-low.c (get_stop_pc): Check for SIGTRAP.
18059 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
18062 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18064 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
18066 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
18068 * linux-s390-low.c (s390_collect_ptrace_register)
18069 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
18071 2010-01-21 Doug Evans <dje@google.com>
18073 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
18074 (PTRACE_ARG4_TYPE): New macro.
18075 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
18076 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
18077 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
18078 (usr_store_inferior_registers): Ditto.
18079 (linux_read_memory, linux_write_memory): Ditto.
18080 (linux_test_for_tracefork): Ditto.
18082 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
18083 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
18085 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18087 * proc-service.c (ps_lgetregs): Don't refetch registers from the
18090 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18092 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18093 prototype to take a regcache. Adjust.
18095 2010-01-20 Pedro Alves <pedro@codesourcery.com>
18097 * regcache.h (struct thread_info): Forward declare.
18098 (struct regcache): New.
18099 (new_register_cache): Adjust prototype.
18100 (get_thread_regcache): Declare.
18101 (free_register_cache): Adjust prototype.
18102 (registers_to_string, registers_from_string): Ditto.
18103 (supply_register, supply_register_by_name, collect_register)
18104 (collect_register_as_string, collect_register_by_name): Ditto.
18105 * regcache.c (struct inferior_regcache_data): Delete.
18106 (get_regcache): Rename to ...
18107 (get_thread_regcache): ... this. Adjust. Switch inferior before
18108 fetching registers.
18109 (regcache_invalidate_one): Adjust.
18110 (regcache_invalidate): Fix prototype.
18111 (new_register_cache): Return the new register cache.
18112 (free_register_cache): Change prototype.
18113 (realloc_register_cache): Adjust.
18114 (registers_to_string): Change prototype to take a regcache. Adjust.
18115 (registers_from_string): Ditto.
18116 (register_data): Ditto.
18117 (supply_register): Ditto.
18118 (supply_register_by_name): Ditto.
18119 (collect_register): Ditto.
18120 (collect_register_as_string): Ditto.
18121 (collect_register_by_name): Ditto.
18122 * server.c (process_serial_event): Adjust.
18123 * linux-low.h (regset_fill_func, regset_store_func): Change
18125 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18127 * linux-low.c (get_stop_pc): Adjust.
18128 (check_removed_breakpoint): Adjust.
18129 (linux_wait_for_event): Adjust.
18130 (linux_resume_one_lwp): Adjust.
18131 (fetch_register): Add regcache parameter. Adjust.
18132 (usr_store_inferior_registers): Ditto.
18133 (regsets_fetch_inferior_registers): Ditto.
18134 (regsets_store_inferior_registers): Ditto.
18135 (linux_fetch_registers, linux_store_registers): Ditto.
18136 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18138 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18140 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18141 prototype to take a regcache.
18142 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18143 * remote-utils.c (convert_ascii_to_int, outreg)
18144 (prepare_resume_reply): Change prototype to take a regcache.
18146 * target.h (struct target_ops) <fetch_registers, store_registers>:
18147 Change prototype to take a regcache.
18148 (fetch_inferior_registers, store_inferior_registers): Change
18149 prototype to take a regcache. Adjust.
18150 * proc-service.c (ps_lgetregs): Adjust.
18151 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18152 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18153 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18154 take a regcache. Adjust.
18155 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18156 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18157 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18158 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18159 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18160 (cris_cannot_fetch_register):
18161 (cris_breakpoint_at): Change prototype to take a regcache.
18163 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18164 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18165 to take a regcache. Adjust.
18166 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18168 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18169 take a regcache. Adjust.
18170 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18171 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18172 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18173 * linux-mips-low.c (mips_get_pc):
18174 (mips_set_pc): Change prototype to take a regcache. Adjust.
18175 (mips_reinsert_addr): Adjust.
18176 (mips_collect_register): Change prototype to take a regcache.
18178 (mips_supply_register):
18179 (mips_collect_register_32bit, mips_supply_register_32bit)
18180 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18181 (mips_store_fpregset): Ditto.
18182 * linux-ppc-low.c (ppc_supply_ptrace_register)
18183 (ppc_supply_ptrace_register): Ditto.
18184 (parse_spufs_run): Adjust.
18185 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
18186 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
18187 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
18188 take a regcache. Adjust.
18189 * linux-s390-low.c (s390_collect_ptrace_register)
18190 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
18191 (s390_set_pc): Change prototype to take a regcache. Adjust.
18192 (s390_arch_setup): Adjust.
18193 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
18194 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
18195 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
18196 (sparc_fill_gregset, sparc_store_gregset_from_stack)
18197 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
18199 (sparc_breakpoint_at): Adjust.
18200 * linux-xtensa-low.c (xtensa_fill_gregset):
18201 (xtensa_store_gregset):
18202 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
18203 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
18204 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
18205 prototype to take a regcache. Adjust.
18206 * win32-arm-low.c (arm_fetch_inferior_register)
18207 (arm_store_inferior_register): Change prototype to take a
18209 * win32-i386-low.c (i386_fetch_inferior_register)
18210 (i386_store_inferior_register): Change prototype to take a
18212 * win32-low.c (child_fetch_inferior_registers)
18213 (child_store_inferior_registers): Change prototype to take a
18215 (win32_wait): Adjust.
18216 (win32_fetch_inferior_registers): Change prototype to take a
18218 (win32_store_inferior_registers): Adjust.
18219 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
18220 store_inferior_register>: Change prototype to take a regcache.
18222 2010-01-20 Doug Evans <dje@google.com>
18224 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
18226 (linux_wait_for_event1, linux_init_signals): Ditto.
18227 (W_STOPCODE): Provide definition if missing.
18229 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
18231 * linux-low.c (linux_core_of_thread): New.
18232 (compare_ints, show_process, list_threads): New.
18233 (linux_qxfer_osdata): Report threads and cores.
18234 (linux_target_op): Register linux_core_of_thread.
18235 * remote-utils.c (prepare_resume_reply): Report the core.
18236 (buffer_xml_printf): Support %d specifier.
18237 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
18239 (handle_query): Handle qXfer:threads. Announce availability
18241 * target.h (struct target_ops): New field core_of_thread.
18243 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
18245 * Makefile.in (clean): Remove new generated files.
18246 (reg-s390.o, reg-s390.c): Remove rules.
18247 (reg-s390x.o, reg-s390x.c): Likewise.
18248 (s390-linux32.o, s390-linux32.c): Add rules.
18249 (s390-linux64.o, s390-linux64.c): Likewise.
18250 (s390x-linux64.o, s390x-linux64.c): Likewise.
18251 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
18252 * linux-s390-low.c: Include <elf.h>.
18253 (HWCAP_S390_HIGH_GPRS): Define if undefined.
18254 (init_registers_s390): Remove prototype.
18255 (init_registers_s390x): Likewise.
18256 (init_registers_s390_linux32): Add prototype.
18257 (init_registers_s390_linux64): Likewise.
18258 (init_registers_s390x_linux64): Likewise.
18259 (s390_num_regs_3264): New define.
18260 (s390_regmap_3264): New global variable.
18261 (s390_cannot_fetch_register): Remove obsolete check.
18262 (s390_cannot_store_register): Likewise.
18263 (s390_collect_ptrace_register): Handle upper/lower register halves.
18264 (s390_supply_ptrace_register): Likewise.
18265 (s390_fill_gregset): Update to register number changes.
18266 (s390_get_hwcap): New routine.
18267 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
18268 Install appropriate regmap and register set.
18270 2010-01-01 Joel Brobecker <brobecker@adacore.com>
18272 * server.c (gdbserver_version): Update copyright year to 2010.
18273 * gdbreplay.c (gdbreplay_version): Likewise.
18275 2009-12-28 Doug Evans <dje@google.com>
18277 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
18278 elf/external.h. Include <elf.h> instead but only if necessary.
18280 2009-12-28 Pedro Alves <pedro@codesourcery.com>
18282 * linux-low.c (linux_remove_process): Remove `detaching'
18283 parameter. Don't release/detach from thread_db here.
18284 (linux_kill): Release/detach from thread_db here, ...
18285 (linux_detach): ... and here, before actually detaching.
18286 (linux_wait_1): ... and here, when a process exits.
18287 * thread-db.c (any_thread_of): New.
18288 (thread_db_free): Switch the current inferior to a thread of the
18291 2009-12-21 Doug Evans <dje@google.com>
18293 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
18295 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
18296 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
18297 warning ifndef __NR_tkill. Move setting of errno there too.
18298 Delete unnecessary resetting of errno after syscall.
18299 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
18301 * configure.ac: Check for dladdr.
18302 * config.in: Regenerate.
18303 * configure: Regenerate.
18304 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
18305 (try_thread_db_load): Update.
18307 * linux-low.c (my_waitpid): Delete unnecessary prototype.
18309 2009-12-18 Doug Evans <dje@google.com>
18311 * event-loop.c: Include unistd.h if it exists.
18313 * linux-low.c (my_waitpid): Move definition away from being in
18314 between linux_tracefork_child/linux_test_for_tracefork.
18316 * gdb_proc_service.h (psaddr_t): Fix type.
18317 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
18318 signature to match glibc.
18320 2009-12-16 Doug Evans <dje@google.com>
18322 * linux-low.c (linux_read_memory): Fix argument to read.
18324 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18326 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
18327 events, don't leave current_inferior pointing at null.
18329 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18331 * win32-low.c (LOG): Delete.
18332 (OUTMSG): Output to stderr.
18333 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
18334 on compile time LOG macro.
18335 (win32_wait): Fix debug output.
18337 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18339 * win32-low.c (win32_add_one_solib): If the dll name is
18340 "ntdll.dll", prepend the system directory to the dll path.
18342 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
18344 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
18346 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
18347 Vladimir Prus <vladimir@codesourcery.com>
18349 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
18350 * configure.ac: Check for __mcoldfire__ and set
18351 gdb_cv_m68k_is_coldfire.
18352 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
18353 reg-cf.o and reg-m68k.o.
18354 * configure: Regenerated.
18356 2009-11-16 Pedro Alves <pedro@codesourcery.com>
18358 * linux-low.c (linux_remove_process): Add `detaching' parameter.
18359 Pass it to thread_db_free.
18360 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
18361 proper `detaching' argument to linux_remove_process.
18362 * linux-low.h (thread_db_free): Add `detaching' parameter.
18363 * thread-db.c (thread_db_init): Pass false as `detaching' argument
18365 (thread_db_free): Add `detaching' parameter. Only
18366 call td_ta_clear_event if detaching from process.
18368 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
18370 * thread-db.c (thread_db_free): Fix typo.
18372 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
18375 * thread-db.c (thread_db_free): Call td_ta_clear_event.
18377 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
18379 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
18380 with an i686 compiler.
18381 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
18383 * configure: Rebuilt.
18385 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
18389 * server.c (handle_search_memory_1): Correct read_addr initialization
18390 in loop for searching subsequent chunks.
18392 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
18394 * configure.ac: New --with-libthread-db option.
18395 * thread-db.c: Allow direct dependence on libthread_db.
18396 (thread_db_free): Adjust.
18397 * config.in: Regenerate.
18398 * configure: Likewise.
18400 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
18403 * thread-db.c (attach_thread): New function.
18404 (maybe_attach_thread): Return success/failure.
18405 (find_new_threads_callback): Adjust.
18406 (thread_db_find_new_threads): Loop until no new threads.
18408 2009-10-13 Pedro Alves <pedro@codesourcery.com>
18410 * proc-service.c (ps_lgetregs): Formatting.
18412 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
18414 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
18415 * configure.ac: Adjust.
18416 * linux-low.h (struct process_info_private): Move members to struct
18418 (thread_db_free, thread_db_handle_monitor_command): New prototype.
18419 * linux-low.c (linux_remove_process): Adjust.
18420 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
18421 * server.c (handle_query): Move code ...
18422 (handle_monitor_command): ... here. New function.
18423 * target.h (struct target_ops): New member.
18424 * thread-db.c (struct thread_db): New.
18425 (libthread_db_search_path): New variable.
18426 (thread_db_create_event, thread_db_enable_reporting)
18427 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
18428 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
18429 (try_thread_db_load_1, dladdr_to_soname): New functions.
18430 (try_thread_db_load, thread_db_load_search): New functions.
18431 (thread_db_init): Search for libthread_db.
18432 (thread_db_free): New function.
18433 (thread_db_handle_monitor_command): Likewise.
18434 * config.in: Regenerate.
18435 * configure: Regenerate.
18437 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
18439 * spu-low.c (spu_kill): Wait for inferior to terminate.
18440 Call clear_inferiors.
18441 (spu_detach): Call clear_inferiors.
18443 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18445 * aclocal.m4: Regenerate.
18446 * config.in: Likewise.
18447 * configure: Likewise.
18449 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18451 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
18452 (parse_spufs_run): New function.
18453 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
18454 (ppc_breakpoint_at): Handle SPU breakpoints.
18456 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18458 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
18459 (SPUFS_MAGIC): Define.
18460 (spu_enumerate_spu_ids): New function.
18461 (linux_qxfer_spu): New function.
18462 (linux_target_ops): Install linux_qxfer_spu.
18464 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18466 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
18467 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
18468 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
18469 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
18470 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
18471 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
18472 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
18473 (init_registers_powerpc_cell32l): Add prototype.
18474 (init_registers_powerpc_cell64l): Likewise.
18475 (ppc_arch_setup): Detect Cell/B.E. architecture.
18477 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18479 * Makefile.in (datarootdir): New variable.
18481 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18483 * linux-low.c (linux_write_memory): Update debugging output.
18484 * Makefile.in (clean): Add new descriptions.
18485 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
18486 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
18487 * configure.srv: Add new files for arm*-*-linux*.
18488 * linux-arm-low.c: Add new declarations.
18489 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
18490 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
18491 (HWCAP_VFPv3D16): New.
18492 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
18493 instead of __IWMMXT__.
18494 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
18495 (arm_arch_setup): New.
18496 (target_regsets): Remove #ifdef. Add VFP regset.
18497 (the_low_target): Use arm_arch_setup.
18499 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18501 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
18502 the main thread again.
18504 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
18506 Adding Neutrino gdbserver.
18507 * configure: Regenerated.
18508 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
18509 * configure.srv (i[34567]86-*-nto*): New target.
18510 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
18511 * remote-utils.c [__QNX__]: Include sys/iomgr.h
18512 (nto_comctrl) [__QNX__]: New function.
18513 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
18515 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
18517 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
18520 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
18521 Pedro Alves <pedro@codesourcery.com>
18523 * win32-i386-low.c (i386_get_thread_context): Handle systems that
18524 don't support CONTEXT_EXTENDED_REGISTERS.
18525 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
18526 (the_low_target): Install them.
18527 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
18528 failing with ERROR_PIPE_NOT_CONNECTED.
18530 2009-06-30 Doug Evans <dje@google.com>
18531 Pierre Muller <muller@ics.u-strasbg.fr>
18533 Add h/w watchpoint support to x86-linux, win32-i386.
18534 * Makefile.in (SFILES): Add i386-low.c
18535 (i386_low_h): Define.
18536 (i386-low.o): Add dependencies.
18537 (linux-x86-low.o): Add i386-low.h dependency.
18538 (win32-i386-low.o): Ditto.
18539 * i386-low.c: New file.
18540 * i386-low.h: New file.
18541 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
18542 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
18543 * linux-low.c (linux_add_process): Initialize arch_private.
18544 (linux_remove_process): Free arch_private.
18545 (add_lwp): Initialize arch_private.
18546 (delete_lwp): Free arch_private.
18547 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
18549 * linux-low.h (process_info_private): New member arch_private.
18550 (lwp_info): New member arch_private.
18551 (linux_target_ops): New members new_process, new_thread,
18553 (ptid_of): New macro.
18554 * linux-x86-low.c: Include stddef.h, i386-low.h.
18555 (arch_process_info): New struct.
18556 (arch_lwp_info): New struct.
18557 (x86_linux_dr_get, x86_linux_dr_set): New functions.
18558 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18559 (i386_dr_low_get_status): New function.
18560 (x86_insert_point, x86_remove_point): New functions.
18561 (x86_stopped_by_watchpoint): New function.
18562 (x86_stopped_data_address): New function.
18563 (x86_linux_new_process, x86_linux_new_thread): New functions.
18564 (x86_linux_prepare_to_resume): New function.
18565 (the_low_target): Add entries for insert_point, remove_point,
18566 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
18568 * server.c (debug_hw_points): New global.
18569 (monitor_show_help): Document set debug-hw-points.
18570 (handle_query): Process "set debug-hw-points".
18571 * server.h (debug_hw_points): Declare.
18572 (paddress): Declare.
18573 * utils.c (NUMCELLS, CELLSIZE): New macros.
18574 (get_sell, xsnprintf, paddress): New functions.
18575 * win32-arm-low.c (the_low_target): Add entries for insert_point,
18576 remove_point, stopped_by_watchpoint, stopped_data_address.
18577 * win32-i386-low.c: Include i386-low.h.
18578 (debug_reg_state): Replaces dr.
18579 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18580 (i386_dr_low_get_status): New function.
18581 (i386_insert_point, i386_remove_point): New functions.
18582 (i386_stopped_by_watchpoint): New function.
18583 (i386_stopped_data_address): New function.
18584 (i386_initial_stuff): Update.
18585 (get_thread_context,set_thread_context,i386_thread_added): Update.
18586 (the_low_target): Add entries for insert_point,
18587 remove_point, stopped_by_watchpoint, stopped_data_address.
18588 * win32-low.c (win32_insert_watchpoint): New function.
18589 (win32_remove_watchpoint): New function.
18590 (win32_stopped_by_watchpoint): New function.
18591 (win32_stopped_data_address): New function.
18592 (win32_target_ops): Add entries for insert_watchpoint,
18593 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
18594 * win32-low.h (win32_target_ops): New members insert_point,
18595 remove_point, stopped_by_watchpoint, stopped_data_address.
18597 2009-06-25 Pedro Alves <pedro@codesourcery.com>
18599 * server.c (process_serial_event): Re-return unsupported, not
18600 error, if the type isn't recognized. Re-allow supporting only
18601 insert or remove packets. Also call require_running for
18602 breakpoints. Add missing break statement to default case. Tidy.
18603 * target.h (struct target_ops): Rename insert_watchpoint to
18604 insert_point, and remove_watchpoint to remove_point.
18606 * linux-low.h (struct linux_target_ops): Likewise.
18607 * linux-low.c (linux_insert_watchpoint): Rename to ...
18608 (linux_insert_point): ... this. Adjust.
18609 (linux_remove_watchpoint): Rename to ...
18610 (linux_remove_point): ... this. Adjust.
18611 (linux_target_ops): Adjust.
18612 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
18613 (cris_insert_point): ... this.
18614 (cris_remove_watchpoint): Rename to ...
18615 (cris_remove_point): ... this.
18616 (the_low_target): Adjust.
18618 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
18620 * server.c (handle_v_kill): Pass signal_pid to
18621 kill_inferior if multi_process is zero.
18623 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
18625 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
18626 * target.h (target_ops): Comment for *_watchpoint to make it clear
18627 the functions can get types '0' and '1'.
18629 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
18631 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
18632 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
18633 * regcache.c (get_regcache): Likewise.
18634 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
18635 * win32-low.c (child_fetch_inferior_registers): Remove check for
18638 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
18639 Pedro Alves <pedro@codesourcery.com>
18641 * target.h (struct target_ops) <supports_multi_process>: New
18643 (target_supports_multi_process): New.
18644 * server.c (handle_query): Even if GDB reports support, only
18645 enable multi-process if the target also supports it. Report
18646 multi-process support only if the target backend supports it.
18647 * linux-low.c (linux_supports_multi_process): New function.
18648 (linux_target_ops): Install it as target_supports_multi_process
18651 2009-05-24 Doug Evans <dje@google.com>
18653 Global renaming of find_thread_pid to find_thread_ptid.
18654 * server.h (find_thread_ptid): Renamed from find_thread_pid.
18655 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
18656 All callers updated.
18658 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
18659 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
18662 * linux-low.c (get_stop_pc): Print pc if debug_threads.
18663 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
18664 (linux_resume_one_lwp): Ditto.
18666 2009-05-23 Doug Evans <dje@google.com>
18668 * linux-low.c (linux_resume_one_lwp): Change type of first arg
18669 from struct inferior_list_entry * to struct lwp_info *.
18670 All callers updated.
18672 2009-05-13 Doug Evans <dje@google.com>
18674 * linux-x86-low.c: Don't include assert.h.
18675 (x86_siginfo_fixup): Use fatal, not assert.
18676 (x86_arch_setup): Fix comment.
18678 2009-05-12 Doug Evans <dje@google.com>
18680 Biarch support for i386/amd64 gdbserver.
18681 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
18682 Add linux-x86-low.c.
18683 (linux-i386-low.o, linux-x86-64-low.o): Delete.
18684 (linux-x86-low.o): Add.
18685 * linux-x86-64-low.c: Delete.
18686 * linux-i386-low.c: Delete.
18687 * linux-x86-low.c: New file.
18688 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
18690 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
18692 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
18693 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
18694 (linux_child_pid_to_exec_file): New function.
18695 (elf_64_header_p, elf_64_file_p): New functions.
18696 (siginfo_fixup): New function.
18697 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
18698 give target a chance to convert layout.
18699 * linux-low.h (linux_target_ops): New member siginfo_fixup.
18700 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
18702 2009-05-07 Doug Evans <dje@google.com>
18704 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
18705 (regsets_store_inferior_registers): Ditto.
18707 2009-05-06 Pedro Alves <pedro@codesourcery.com>
18711 * linux-low.c (must_set_ptrace_flags): Delete.
18712 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
18714 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
18715 `lwp->must_set_ptrace_flags' instead.
18716 (linux_wait_for_event_1): Set ptrace options here.
18717 (linux_wait_1): ... not here.
18719 2009-04-30 Doug Evans <dje@google.com>
18721 * inferiors.c (started_inferior_callback): New function.
18722 (attached_inferior_callback): New function.
18723 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
18724 * server.c (print_started_pid, print_attached_pid): New functions.
18725 (detach_or_kill_for_exit): New function.
18726 (main): Call it instead of for_each_inferior (kill_inferior_callback).
18727 * server.h (have_started_inferiors_p): Declare.
18728 (have_attached_inferiors_p): Declare.
18730 * inferiors.c (remove_process): Fix memory leak, free process.
18731 * linux-low.c (linux_remove_process): New function.
18732 (linux_kill): Call it instead of remove_process.
18733 (linux_detach, linux_wait_1): Ditto.
18735 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
18737 * configure.srv: Add x86 Windows CE target.
18739 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18741 * inferiors.c (get_thread_process): Make global.
18742 * server.h (get_thread_process): Add prototype.
18743 * thread-db.c (find_one_thread): Use get_thread_process
18744 instead of current_process.
18745 (thread_db_get_tls_address): Do not crash if called when
18746 thread layer is not yet initialized.
18748 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18750 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
18751 * spu-low.c (current_tid): Rename to ...
18752 (current_ptid): ... this.
18753 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
18754 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
18755 ptid_get_lwp (current_ptid) instead of current_tid.
18756 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
18757 instead of current_tid. Use find_process_pid to verify pid
18758 argument is valid. Pass proper argument to remove_process.
18759 (spu_thread_alive): Compare current_ptid instead of current_tid.
18760 (spu_resume): Likewise.
18762 2009-04-02 Pedro Alves <pedro@codesourcery.com>
18764 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
18767 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18769 Implement the multiprocess extensions, and add linux multiprocess
18772 * server.h (ULONGEST): Declare.
18773 (struct ptid, ptid_t): New.
18774 (minus_one_ptid, null_ptid): Declare.
18775 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18776 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
18777 (struct inferior_list_entry): Change `id' type from unsigned from
18779 (struct sym_cache, struct breakpoint, struct
18780 process_info_private): Forward declare.
18781 (struct process_info): Declare.
18782 (current_process): Declare.
18783 (all_processes): Declare.
18784 (initialize_inferiors): Declare.
18785 (add_thread): Adjust to use ptid_t.
18786 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
18787 (add_process, remove_process, find_thread_pid): Declare.
18788 (find_inferior_id): Adjust to use ptid_t.
18789 (cont_thread, general_thread, step_thread): Change type to ptid_t.
18790 (multi_process): Declare.
18791 (push_event): Adjust to use ptid_t.
18792 (read_ptid, write_ptid): Declare.
18793 (prepare_resume_reply): Adjust to use ptid_t.
18794 (clear_symbol_cache): Declare.
18795 * inferiors.c (all_processes): New.
18796 (null_ptid, minus_one_ptid): New.
18797 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18798 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
18799 (add_thread): Change unsigned long to ptid. Remove gdb_id
18801 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
18802 (gdb_id_to_thread): Rename to ...
18803 (find_thread_pid): ... this. Change unsigned long to ptid.
18804 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
18805 (loaded_dll, pull_pid_from_list): Adjust.
18806 (add_process, remove_process, find_process_pid)
18807 (get_thread_process, current_process, initialize_inferiors): New.
18808 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
18809 (struct target_waitstatus) <related_pid>: Ditto.
18810 (struct target_ops) <kill, detach>: Add `pid' argument. Change
18811 return type to int.
18812 (struct target_ops) <join>: Add `pid' argument.
18813 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
18814 (struct target_ops) <wait>: Add `ptid' field. Change return type
18816 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
18817 (mywait): Add `ptid' argument. Change return type to ptid_t.
18818 (target_pid_to_str): Declare.
18819 * target.c (set_desired_inferior): Adjust to use ptids.
18820 (mywait): Add new `ptid' argument. Adjust.
18821 (target_pid_to_str): New.
18822 * mem-break.h (free_all_breakpoints): Declare.
18823 * mem-break.c (breakpoints): Delelete.
18824 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
18825 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
18826 to use per-process breakpoint list.
18827 (free_all_breakpoints): New.
18828 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
18829 (symbol_cache, all_symbols_looked_up): Delete.
18831 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
18833 (prepare_resume_reply): Change ptid argument's type from unsigned
18834 long to ptid_t. Adjust. Implement W;process and X;process.
18835 (free_sym_cache, clear_symbol_cache): New.
18836 (look_up_one_symbol): Adjust to per-process symbol cache. *
18837 * server.c (cont_thread, general_thread, step_thread): Change type
18839 (attached): Delete.
18840 (multi_process): New.
18841 (last_ptid): Change type to ptid_t.
18842 (struct vstop_notif) <ptid>: Change type to ptid_t.
18843 (queue_stop_reply, push_event): Change `ptid' argument's type to
18845 (discard_queued_stop_replies): Add `pid' argument.
18846 (start_inferior): Adjust to use ptids. Adjust to mywait interface
18847 changes. Don't reference the `attached' global.
18848 (attach_inferior): Adjust to mywait interface changes.
18849 (handle_query): Adjust to use ptids. Parse GDB's qSupported
18850 features. Handle and report "multiprocess+". Handle
18852 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
18854 (handle_v_kill): New.
18855 (handle_v_stopped): Adjust to use target_pid_to_str.
18856 (handle_v_requests): Allow multiple attaches and runs when
18857 multiprocess extensions are in effect. Handle "vKill".
18858 (myresume): Adjust to use ptids.
18859 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
18860 (handle_status): Adjust to discard_queued_stop_replies interface
18862 (first_thread_of, kill_inferior_callback)
18863 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
18864 (main): Call initialize_inferiors. Adjust to use ptids, killing
18865 and detaching from all inferiors. Handle multiprocess packet
18867 * linux-low.h: Include gdb_proc_service.h.
18868 (struct process_info_private): New.
18869 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
18870 <lwpid_of>: Use ptid_get_lwp.
18871 (get_lwp_thread): Adjust.
18872 (struct lwp_info): Add `dead' member.
18873 (find_lwp_pid): Declare.
18874 * linux-low.c (thread_db_active): Delete.
18875 (new_inferior): Adjust comment.
18876 (inferior_pid): Delete.
18877 (linux_add_process): New.
18878 (handle_extended_wait): Adjust.
18879 (add_lwp): Change unsigned long to ptid.
18880 (linux_create_inferior): Add process to processes table. Adjust
18881 to use ptids. Don't set new_inferior here.
18882 (linux_attach_lwp): Rename to ...
18883 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
18884 it. Adjust to use ptids.
18885 (linux_attach_lwp): New.
18886 (linux_attach): Add process to processes table. Don't set
18888 (struct counter): New.
18889 (second_thread_of_pid_p, last_thread_of_process_p): New.
18890 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
18891 multiple processes.
18892 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
18893 processes. Remove process from process table.
18894 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
18895 to multiple processes.
18896 (any_thread_of): New.
18897 (linux_detach): Add `pid' argument, and handle it. Remove process
18898 from processes table.
18899 (linux_join): Add `pid' argument. Handle it.
18900 (linux_thread_alive): Change unsighed long argument to ptid_t.
18901 Consider dead lwps as not being alive.
18902 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
18903 threads we're not interested in.
18904 (same_lwp, find_lwp_pid): New.
18905 (linux_wait_for_lwp): Change `pid' argument's type from int to
18907 (linux_wait_for_event): Rename to ...
18908 (linux_wait_for_event_1): ... this. Change `pid' argument's type
18909 from int to ptid_t. Adjust.
18910 (linux_wait_for_event): New.
18911 (linux_wait_1): Add `ptid' argument. Change return type to
18912 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
18913 that exit from the process table.
18914 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
18916 (mark_lwp_dead): New.
18917 (wait_for_sigstop): Adjust to use ptids. If a process exits while
18918 stopping all threads, mark its main lwp as dead.
18919 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
18921 (fetch_register, usr_store_inferior_registers)
18922 (regsets_fetch_inferior_registers)
18923 (regsets_store_inferior_registers, linux_read_memory)
18924 (linux_write_memory): Inline `inferior_pid'.
18925 (linux_look_up_symbols): Adjust to use per-process
18926 `thread_db_active'.
18927 (linux_request_interrupt): Adjust to use ptids.
18928 (linux_read_auxv): Inline `inferior_pid'.
18929 (initialize_low): Don't reference thread_db_active.
18930 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
18931 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
18932 (ps_getpid): Return the pid of the current inferior.
18933 * thread-db.c (proc_handle, thread_agent): Delete.
18934 (thread_db_create_event, thread_db_enable_reporting): Adjust to
18936 (find_one_thread): Change argument type to ptid_t. Adjust to
18938 (maybe_attach_thread): Adjust to per-process data and ptids.
18939 (thread_db_find_new_threads): Ditto.
18940 (thread_db_init): Ditto.
18941 * spu-low.c (spu_create_inferior, spu_attach): Add process to
18942 processes table. Adjust to use ptids.
18943 (spu_kill, spu_detach): Adjust interface. Remove process from
18945 (spu_join, spu_thread_alive): Adjust interface.
18946 (spu_wait): Adjust interface. Remove process from processes
18947 table. Adjust to use ptids.
18948 * win32-low.c (current_inferior_tid): Delete.
18949 (current_inferior_ptid): New.
18950 (debug_event_ptid): New.
18951 (thread_rec): Take a ptid. Adjust.
18952 (child_add_thread): Add `pid' argument. Adjust to use ptids.
18953 (child_delete_thread): Ditto.
18954 (do_initial_child_stuff): Add `attached' argument. Add process to
18956 (child_fetch_inferior_registers, child_store_inferior_registers):
18958 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
18959 (win32_attach): Pass 1 to do_initial_child_stuff.
18960 (win32_kill): Adjust interface. Remove process from processes
18962 (win32_detach): Ditto.
18963 (win32_join): Adjust interface.
18964 (win32_thread_alive): Take a ptid.
18965 (win32_resume): Adjust to use ptids.
18966 (get_child_debug_event): Ditto.
18967 (win32_wait): Adjust interface. Remove exiting process from
18970 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18972 Non-stop mode support.
18974 * server.h (non_stop): Declare.
18975 (gdb_client_data, handler_func): Declare.
18976 (delete_file_handler, add_file_handler, start_event_loop):
18978 (handle_serial_event, handle_target_event, push_event)
18979 (putpkt_notif): Declare.
18980 * target.h (enum resume_kind): New.
18981 (struct thread_resume): Replace `step' field by `kind' field.
18982 (TARGET_WNOHANG): Define.
18983 (struct target_ops) <wait>: Add `options' argument.
18984 <supports_non_stop, async, start_non_stop>: New fields.
18985 (target_supports_non_stop, target_async): New.
18986 (start_non_stop): Declare.
18987 (mywait): Add `options' argument.
18988 * target.c (mywait): Add `options' argument. Print child exit
18989 notifications here.
18990 (start_non_stop): New.
18991 * server.c (non_stop, own_buf, mem_buf): New globals.
18992 (struct vstop_notif): New.
18993 (notif_queue): New global.
18994 (queue_stop_reply, push_event, discard_queued_stop_replies)
18995 (send_next_stop_reply): New.
18996 (start_inferior): Adjust to use resume_kind. Adjust to mywait
18998 (attach_inferior): In non-stop mode, don't wait for the target
19000 (handle_general_set): Handle QNonStop.
19001 (handle_query): When handling qC, return the current general
19002 thread, instead of the first thread of the list.
19003 (handle_query): If the backend supports non-stop mode, include
19004 QNonStop+ in the qSupported query response.
19005 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19007 (handle_v_attach, handle_v_run): Handle non-stop mode.
19008 (handle_v_stopped): New.
19009 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19010 (myresume): Adjust to use resume_kind. Handle non-stop.
19011 (queue_stop_reply_callback): New.
19012 (handle_status): Handle non-stop mode.
19013 (main): Clear non_stop flag on reconnection. Use the event-loop.
19014 Refactor serial protocol handling from here ...
19015 (process_serial_event): ... to this new function. When GDB
19016 selects any thread, select one here. In non-stop mode, wait until
19017 GDB acks all pending events before exiting.
19018 (handle_serial_event, handle_target_event): New.
19019 * remote-utils.c (remote_open): Install remote_desc in the event
19021 (remote_close): Remove remote_desc from the event loop.
19022 (putpkt_binary): Rename to...
19023 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19024 (putpkt_binary): New as wrapper around putpkt_binary_1.
19025 (putpkt_notif): New.
19026 (prepare_resume_reply): In non-stop mode, don't change the
19028 * event-loop.c: New.
19029 * Makefile.in (OBJ): Add event-loop.o.
19030 (event-loop.o): New rule.
19032 * linux-low.h (pid_of): Moved here.
19034 (get_lwp_thread): Use lwpid_of.
19035 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19036 * linux-low.c (pid_of): Delete.
19037 (inferior_pid): Use lwpid_of.
19038 (linux_event_pipe): New.
19039 (target_is_async_p): New.
19041 (handle_extended_wait): Use lwpid_of.
19042 (add_lwp): Don't set lwpid field.
19043 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19044 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19045 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19046 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19047 first. Adjust to linux_wait_for_event interface changes. Use
19049 (linux_detach): Don't delete the main lwp here.
19050 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19051 (status_pending_p): Don't consider explicitly suspended lwps.
19052 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19053 pointer. Add OPTIONS argument. Change return type to int. Use
19054 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
19055 (linux_wait_for_event): Take an integer pid instead of a lwp_info
19056 pointer. Add status pointer argument. Return a pid instead of a
19057 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
19058 changes. In non-stop mode, don't switch to a random thread.
19059 (linux_wait): Rename to...
19060 (linux_wait_1): ... this. Add target_options argument, and handle
19061 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
19062 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
19063 clean exit and signal exit code. Don't stop all threads in
19064 non-stop mode. In all-stop mode, only stop all threads when
19065 reporting a stop to GDB. Handle explicit thread stop requests.
19066 (async_file_flush, async_file_mark): New.
19068 (send_sigstop): Use lwpid_of.
19069 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
19070 interface changes. In non-stop mode, don't switch to a random
19072 (linux_resume_one_lwp): Use lwpid_of.
19073 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
19074 (linux_resume_one_thread): ... this. Handle resume_stop. In
19075 non-stop mode, don't look for pending flag in all threads.
19076 (resume_status_pending_p): Don't consider explicitly suspended
19078 (my_waitpid): Reimplement. Emulate __WALL.
19079 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19081 (sigchld_handler, linux_supports_non_stop, linux_async)
19082 (linux_start_non_stop): New.
19083 (linux_target_ops): Register linux_supports_non_stop, linux_async
19084 and linux_start_non_stop.
19085 (initialize_low): Install SIGCHLD handler.
19086 * thread-db.c (thread_db_create_event, find_one_thread)
19087 (thread_db_get_tls_address): Use lwpid_of.
19088 * win32-low.c (win32_detach): Adjust to use resume_kind.
19089 (win32_wait): Add `options' argument.
19090 * spu-low.c (spu_resume): Adjust to use resume_kind.
19091 (spu_wait): Add `options' argument.
19093 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19095 Decouple target code from remote protocol.
19097 * target.h (enum target_waitkind): New.
19098 (struct target_waitstatus): New.
19099 (struct target_ops) <wait>: Return an unsigned long. Take a
19100 target_waitstatus pointer instead of a char pointer.
19101 (mywait): Likewise.
19102 * target.c (mywait): Change prototype to return an unsigned long.
19103 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19104 * server.h (thread_from_wait, old_thread_from_wait): Delete
19106 (prepare_resume_reply): Change prototype to take a
19108 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19109 (last_status, last_ptid): New.
19110 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19111 pid instead of a signal.
19112 (attach_inferior): Remove "status" and "signal" parameters.
19114 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19116 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19117 (handle_v_requests, myresume): Remove "status" and "signal"
19118 parameters. Adjust.
19119 (handle_status): New.
19120 (main): Delete local `status'. Adjust.
19121 * remote-utils.c: Include target.h.
19122 (prepare_resume_reply): Change prototype to take a
19123 target_waitstatus. Adjust.
19125 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19127 * spu-low.c (spu_wait): Adjust.
19128 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19130 (win32_wait): Adjust.
19132 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19134 * target.h (struct thread_resume): Delete leave_stopped member.
19135 (struct target_ops): Add a `n' argument to the `resume' callback.
19136 * server.c (start_inferior): Adjust.
19137 (handle_v_cont, myresume): Adjust.
19138 * linux-low.c (check_removed_breakpoint): Adjust to resume
19139 interface change, and to removed leave_stopped field.
19140 (resume_ptr): Delete.
19141 (struct thread_resume_array): New.
19142 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19143 resume interface change.
19144 (linux_continue_one_thread, linux_queue_one_thread)
19145 (resume_status_pending_p): Check if the resume field is NULL
19146 instead of checking the leave_stopped member.
19147 (linux_resume): Adjust to the target resume interface change.
19148 * spu-low.c (spu_resume): Adjust to the target resume interface
19150 * win32-low.c (win32_detach, win32_resume): Ditto.
19152 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19154 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19156 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19158 (linux_continue_one_thread): Only preserve the stepping flag if
19159 there's a pending breakpoint.
19161 2009-03-31 Pedro Alves <pedro@codesourcery.com>
19163 * server.c (main): After the inferior having exited, call
19164 remote_close before exiting gdbserver.
19166 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19168 Fix size of FPSCR in Power 7 processors.
19169 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19170 (PPC_FEATURE_HAS_DFP): New #define.
19171 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19174 2009-03-23 Pedro Alves <pedro@codesourcery.com>
19176 * server.c (handle_query) Whitespace and formatting.
19178 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19180 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
19181 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
19182 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
19183 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
19184 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
19185 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
19186 Makefile.in, configure.ac: Fix whitespace throughout.
19187 * configure: Regenerate.
19189 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19191 * inferiors.c (find_inferior): Make it safe for the callback
19192 function to delete the currently iterated inferior.
19194 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19196 * Makefile.in (linuw_low_h): Move higher.
19197 (thread-db.o): Depend on $(linux_low_h).
19199 2009-03-17 Pedro Alves <pedro@codesourcery.com>
19201 Rename "process" to "lwp" throughout.
19203 * linux-low.c (all_processes): Rename to...
19204 (all_lwps): ... this.
19205 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
19206 (add_process): Rename to ...
19207 (add_lwp): ... this. Adjust.
19208 (linux_create_inferior): Adjust.
19209 (linux_attach_lwp): Adjust.
19210 (linux_attach): Adjust.
19211 (linux_kill_one_process): Rename to ...
19212 (linux_kill_one_lwp): ... this. Adjust.
19213 (linux_kill): Adjust.
19214 (linux_detach_one_process): Rename to ...
19215 (linux_detach_one_lwp): ... this. Adjust.
19216 (linux_detach): Adjust.
19217 (check_removed_breakpoint): Adjust.
19218 (status_pending_p): Adjust.
19219 (linux_wait_for_process): Rename to ...
19220 (linux_wait_for_lwp): ... this. Adjust.
19221 (linux_wait_for_event): Adjust.
19222 (send_sigstop): Adjust.
19223 (wait_for_sigstop): Adjust.
19224 (stop_all_processes): Rename to ...
19225 (stop_all_lwps): ... this.
19226 (linux_resume_one_process): Rename to ...
19227 (linux_resume_one_lwp): ... this. Adjust.
19228 (linux_set_resume_request, linux_continue_one_thread)
19229 (linux_queue_one_thread, resume_status_pending_p)
19230 (usr_store_inferior_registers, regsets_store_inferior_registers)
19231 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19233 * linux-low.h (get_process): Rename to ...
19234 (get_lwp): ... this. Adjust.
19235 (get_thread_process): Rename to ...
19236 (get_thread_lwp): ... this. Adjust.
19237 (get_process_thread): Rename to ...
19238 (get_lwp_thread): ... this. Adjust.
19239 (struct process_info): Rename to ...
19240 (struct lwp_info): ... this.
19241 (all_processes): Rename to ...
19242 (all_lwps): ... this.
19243 * proc-service.c (ps_lgetregs): Adjust.
19244 * thread-db.c (thread_db_create_event, find_one_thread)
19245 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
19247 2009-03-14 Pedro Alves <pedro@codesourcery.com>
19249 * server.c (handle_query): Handle "qAttached".
19251 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
19253 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
19254 GPLv3, update license URL.
19256 2009-03-01 Doug Evans <dje@google.com>
19258 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
19259 (server_h): Add gdb_signals.h.
19260 (signals.o): Update.
19261 * server.h (target_signal_from_host,target_signal_to_host_p)
19262 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
19264 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
19266 * remote-utils.c (getpkt): Also generate remote-debug
19267 information if noack_mode is set.
19269 2009-02-06 Pedro Alves <pedro@codesourcery.com>
19271 * server.c (handle_query): Report qXfer:siginfo:read and
19272 qXfer:siginfo:write as supported and handle them.
19273 * target.h (struct target_ops) <qxfer_siginfo>: New field.
19274 * linux-low.c (linux_xfer_siginfo): New.
19275 (linux_target_ops): Set it.
19277 2009-01-26 Pedro Alves <pedro@codesourcery.com>
19279 * server.c (gdbserver_usage): Mention --remote-debug.
19280 (main): Accept '--remote-debug' switch.
19282 2009-01-18 Doug Evans <dje@google.com>
19284 * regcache.c (new_register_cache): No need to check result of xcalloc.
19285 * server.c (handle_search_memory): Back out calls to xmalloc,
19286 result is checked and error is returned to user upon failure.
19287 (handle_query): Ditto. Add more checks for result of malloc.
19288 (handle_v_cont): Check result of malloc, report error back to
19290 (handle_v_run): Ditto. Call freeargv.
19291 * server.h (freeargv): Declare.
19292 * utils.c (freeargv): New fn.
19294 2009-01-15 Doug Evans <dje@google.com>
19296 * gdbreplay.c (perror_with_name): Make arg const char *.
19297 * server.h (target_signal_to_name): Make return type const char *.
19298 * thread-db.c (thread_db_err_str): Make return type const char *.
19299 * utils.c (perror_with_name): Make arg const char *.
19301 2009-01-14 Pedro Alves <pedro@codesourcery.com>
19303 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
19304 when handling a EXIT_PROCESS_DEBUG_EVENT.
19306 2009-01-06 Joel Brobecker <brobecker@adacore.com>
19308 * gdbreplay.c (gdbreplay_version): Update copyright year.
19309 * server.c (gdbserver_version): Likewise.
19311 2009-01-05 Doug Evans <dje@google.com>
19313 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
19314 (handle_extended_wait): Improve comment.
19316 2008-12-13 Doug Evans <dje@google.com>
19318 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
19319 * server.h (ATTR_MALLOC): New macro.
19320 (xmalloc,xcalloc,xstrdup): Declare.
19321 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
19322 * inferiors.c: Ditto.
19323 * linux-low.c: Ditto.
19324 * mem-break.c: Ditto.
19325 * regcache.c: Ditto.
19326 * remote-utils.c: Ditto.
19329 * win32-low.c: Ditto.
19331 2008-12-12 Doug Evans <dje@google.com>
19333 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
19334 in debugging printf.
19336 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
19338 2008-12-09 Doug Evans <dje@google.com>
19340 * linux-low.h (struct process_info): Delete member tid, unused.
19341 * thread-db.c (find_one_thread): Update.
19342 (maybe_attach_thread): Update.
19344 2008-12-02 Pedro Alves <pedro@codesourcery.com>
19346 * target.h (struct target_ops): Add qxfer_osdata member.
19347 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
19349 (linux_qxfer_osdata): New functions.
19350 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
19352 * server.c (handle_query): Handle "qXfer:osdata:read:".
19353 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
19354 (buffer_xml_printf): New functions.
19355 * server.h (struct buffer): New.
19356 (buffer_grow_str, buffer_grow_str0): New macros.
19357 (buffer_grow, buffer_free, buffer_init, buffer_finish)
19358 (buffer_xml_printf): Declare.
19360 2008-11-24 Doug Evans <dje@google.com>
19362 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
19364 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
19366 * server.c (handle_v_run): Always use the supplied argument list.
19368 2008-11-19 Bob Wilson <bob.wilson@acm.org>
19370 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
19371 (xtensa_regmap_table): Add entry for scompare1.
19373 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
19375 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
19376 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
19377 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
19378 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
19379 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
19380 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
19381 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
19382 XML target descriptions.
19383 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
19384 when inferior is running on an ISA 2.05 or later processor. Add
19385 special case to return offset for full 64-bit slot of FPSCR when
19388 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
19390 * Makefile.in (SFILES, clean): Added sparc64 files.
19391 (reg-sparc64.o, reg-sparc64.c): New.
19392 * configure.srv (sparc*-*-linux*): New configuration.
19393 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
19394 syscall arguments for SPARC.
19395 (regsets_store_inferior_registers): Likewise.
19396 * linux-sparc-low.c: New file.
19398 2008-10-21 Doug Evans <dje@google.com>
19400 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
19401 (READLINE_DIR,READLINE_DEP): Delete.
19402 (INTERNAL_CFLAGS): Update.
19403 (LINTFLAGS): Update.
19405 2008-10-10 Pedro Alves <pedro@codesourcery.com>
19407 * server.c (handle_v_run): If GDB didn't specify an argv, use the
19408 whole argv from the last run, not just argv[0].
19410 2008-09-08 Pedro Alves <pedro@codesourcery.com>
19412 * regcache.c (new_register_cache): Return NULL if the register
19413 cache size isn't known yet.
19414 (free_register_cache): Avoid dereferencing a NULL regcache.
19416 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19418 * configure.srv: Merge MIPS and MIPS64.
19420 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
19422 * Makefile.in (uninstall): Apply $(EXEEXT) too.
19424 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
19426 * Makefile.in: Add required vsx dependencies.
19428 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
19429 Declare init_registers_powerpc_vsx32l.
19430 Declare init_registers_powerpc_vsx64l.
19431 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
19432 (ppc_arch_setup): Check for VSX in hwcap.
19433 (ppc_fill_vsxregset): New function.
19434 (ppc_store_vsxregset): New function.
19435 Add new VSX entry in regset_info target_regsets.
19437 * configure.srv: Add new VSX dependencies.
19439 2008-08-12 Pedro Alves <pedro@codesourcery.com>
19441 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
19442 (remote_open): Set or clear transport_is_reliable.
19443 (putpkt_binary): Don't expect acks in noack mode.
19444 (getpkt): Don't send ack/nac in noack mode.
19445 * server.c (handle_general_set): Handle QStartNoAckMode.
19446 (handle_query): If connected by tcp pass QStartNoAckMode+ in
19448 (main): Reset noack_mode on every connection.
19449 * server.h (noack_mode): Declare.
19451 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19453 * Makefile.in (GDBREPLAY_OBS): New variable.
19454 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
19456 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
19457 Daniel Jacobowitz <dan@codesourcery.com>
19459 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
19460 (usr_store_inferior_registers): Likewise.
19461 (regsets_store_inferior_registers): Likewise.
19463 2008-07-31 Rolf Jansen <rj@surtec.com>
19464 Pedro Alves <pedro@codesourcery.com>
19466 * configure.ac: Check for memmem declaration.
19467 * server.c [HAVE_MALLOC_H]: Include malloc.h.
19468 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
19469 (disable_packet_qfThreadInfo): Unconditionally compile.
19470 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
19471 * configure, config.in: Regenerate.
19473 2008-07-28 Doug Kwan <dougkwan@google.com>
19475 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
19476 (linux_write_memory): Remove declaration of errno.
19478 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
19480 * linux-low.c (handle_extended_wait): Do not use "status"
19481 variable uninitialized.
19483 2008-07-07 Pedro Alves <pedro@codesourcery.com>
19485 * server.c (handle_v_attach): Inhibit reporting dll changes.
19487 2008-06-27 Pedro Alves <pedro@codesourcery.com>
19489 * remote-utils.c (prepare_resume_reply): If requested, don't
19490 output "thread:TID" in the T stop reply.
19492 * server.c (disable_packet_vCont, disable_packet_Tthread)
19493 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
19494 (handle_query): If requested, disable support for qC, qfThreadInfo
19496 (handle_v_requests): If requested, disable support for vCont.
19497 (gdbserver_show_disableable): New.
19498 (main): Handle --disable-packet and --disable-packet=LIST.
19500 * server.h (disable_packet_vCont, disable_packet_Tthread)
19501 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
19503 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
19505 * server.c (gdbserver_usage): Mention --version.
19507 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
19509 * Makefile.in (gdbreplay.o): New rule.
19511 2008-06-06 Joseph Myers <joseph@codesourcery.com>
19513 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
19514 message, not gdbserver.
19516 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
19517 Nathan Sidwell <nathan@codesourcery.com>
19518 Joseph Myers <joseph@codesourcery.com>
19520 * acinclude.m4: Include ../../config/acx.m4.
19521 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
19522 * configure, config.in: Regenerate.
19523 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
19524 * server.c (gdbserver_version): Print PKGVERSION.
19525 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
19526 (main): Adjust gdbserver_usage calls.
19527 * gdbreplay.c (version, host_name): Add declarations.
19528 (gdbreplay_version, gdbreplay_usage): New.
19529 (main): Accept --version and --help options.
19531 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
19533 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
19534 (arm_breakpoint_at): Handle Thumb.
19535 (the_low_target): Add comment.
19537 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
19539 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
19541 2008-05-09 Doug Evans <dje@google.com>
19543 * server.h (decode_search_memory_packet): Declare.
19544 * remote-utils.c (decode_search_memory_packet): New fn.
19545 * server.c (handle_search_memory_1): New fn.
19546 (handle_search_memory): New fn.
19547 (handle_query): Process qSearch:memory packets.
19549 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
19551 * regcache.c (registers_length): Remove.
19552 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
19553 full register packet.
19554 * regcache.h (registers_length): Remove prototype.
19555 * server.h (PBUFSIZ): Define to 16384.
19557 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
19559 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
19560 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
19561 powerpc-64l.o, and powerpc-altivec64l.o.
19562 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
19563 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
19564 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
19565 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
19566 rs6000/power-linux.xml, and rs6000/power64-linux.xml
19569 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
19570 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
19571 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
19572 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
19573 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
19574 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
19575 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
19576 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
19577 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
19578 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
19581 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
19582 (init_registers_powerpc_32l): ... this new prototype.
19583 (init_registers_powerpc_32): Remove, replace by ...
19584 (init_registers_powerpc_altivec32l): ... this new prototype.
19585 (init_registers_powerpc_e500): Remove, replace by ...
19586 (init_registers_powerpc_e500l): ... this new prototype.
19587 (init_registers_ppc64): Remove, replace by ...
19588 (init_registers_powerpc_64l): ... this new prototype.
19589 (init_registers_powerpc_64): Remove, replace by ...
19590 (init_registers_powerpc_altivec64l): ... this new prototype.
19591 (ppc_num_regs): Set to 73.
19592 (PT_ORIG_R3, PT_TRAP): Define if necessary.
19593 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
19594 (ppc_cannot_store_register): Handle orig_r3 and trap.
19595 (ppc_arch_setup): Update init_registers_... calls.
19596 (ppc_fill_gregset): Handle orig_r3 and trap.
19598 * inferiors.c (clear_inferiors): Reset current_inferior.
19600 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
19602 * acinclude.m4: Add override.m4.
19603 * configure: Regenerate.
19605 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19607 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
19608 initial call to init_register_ppc64.
19610 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19612 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
19613 single powerpc*-*-linux* case.
19614 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
19616 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
19618 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
19619 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
19621 * linux-ppc-low.c: Include <elf.h>.
19622 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
19623 (ppc_hwcap): New global variable.
19624 (ppc_regmap): Remove __SPE__ #ifdef sections.
19625 (ppc_regmap_e500): New global variable.
19626 (ppc_cannot_store_register): Update __SPE__ special case.
19627 (ppc_get_hwcap): New function.
19628 (ppc_arch_setup): Use it to determine whether inferior supports
19629 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
19630 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
19631 Do not access registers if target does not support AltiVec.
19632 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
19633 Do not access registers if target does not support SPE.
19634 (target_regsets): Unconditionally include AltiVec and SPE regsets.
19636 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
19638 * linux-low.c (disabled_regsets, num_regsets): New.
19639 (use_regsets_p): Delete.
19640 (linux_wait_for_process): Clear disabled_regsets.
19641 (regsets_fetch_inferior_registers): Check and set it.
19642 (regsets_store_inferior_registers): Likewise.
19643 (linux_fetch_registers, linux_store_registers): Do not use
19645 (initialize_low): Allocate disabled_regsets.
19647 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
19649 * Makefile.in (LIBOBJS): New.
19650 (OBS): Use LIBOBJS.
19651 (memmem.o): New rule.
19652 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
19653 * configure: Regenerated.
19655 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
19657 * server.c (handle_query): Never return "unsupported" for
19658 qXfer:features:read queries.
19660 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
19662 * server.c (get_features_xml): Fix inverted condition.
19663 (handle_query): Always support qXfer:feature:read.
19665 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
19667 * server.c (wrapper_argv): New.
19668 (start_inferior): Handle wrapper_argv. If set, expect an extra
19670 (gdbserver_usage): Document --wrapper.
19671 (main): Parse --wrapper.
19673 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19675 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
19676 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
19677 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
19678 (ppc_set_pc): Likewise.
19679 (ppc_arch_setup): New function.
19680 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
19681 of collect_register.
19682 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
19684 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19686 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
19687 instead of linux-ppc64-low.o.
19688 * linux-ppc64-low.c: Remove file.
19689 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
19690 (linux-ppc64-low.o): Remove rule.
19692 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
19693 (init_registers_powerpc_64): Likewise.
19694 (ppc_regmap): Conditionally define depending on __powerpc64__.
19695 (ppc_cannot_store_register): Do not special-case "fpscr" when
19696 compiled on __powerpc64__.
19697 (ppc_collect_ptrace_register): New function.
19698 (ppc_supply_ptrace_register): New function.
19699 (ppc_breakpoint): Change type to "unsigned int".
19700 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
19701 (the_low_target): Conditionally provide initializers for the
19702 arch_setup member depending on __powerpc64__. Install
19703 collect_ptrace_register and supply_ptrace_register members.
19705 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19707 * regcache.h (gdbserver_xmltarget): Add extern declaration.
19708 * server.c (gdbserver_xmltarget): Define.
19709 (get_features_xml): Use it to replace "target.xml" and arch_string.
19711 * configure.srv: Remove srv_xmltarget. Add XML files that were
19712 mentioned there to srv_xmlfiles instead. Remove conditional tests
19713 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
19714 srv_xmlfiles and srv_regobj to include all possible choices.
19715 * configure.ac (srv_xmltarget): Remove.
19716 (srv_xmlfiles): Do not add "target.xml".
19717 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
19718 checks for supplementary target information.
19719 * configure: Regenerate.
19720 * Makefile.in (XML_TARGET): Remove.
19721 (target.xml): Remove rule.
19722 (clean): Do not clean up target.xml.
19723 (.PRECIOUS): Do not mention target.xml.
19725 * target.h (struct target_ops): Remove arch_string member.
19726 * linux-low.c (linux_arch_string): Remove.
19727 (linux_target_ops): Remove arch_string initializer.
19728 * linux-low.h (struct linux_target_ops): Remove arch_string member.
19729 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
19730 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
19731 * spu-low.c (spu_arch_string): Remove.
19732 (spu_target_ops): Remove arch_string initializer.
19733 * win32-low.c (win32_arch_string): Remove.
19734 (win32_target_ops): Remove arch_string initializer.
19735 * win32-low.h (struct win32_target_ops): Remove arch_string member.
19736 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
19737 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
19739 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19741 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
19742 by collect_ptrace_register and supply_ptrace_register hooks.
19743 * linux-low.c (fetch_register): Use supply_ptrace_register callback
19744 instead of checking for the_low_target.left_pad_xfer.
19745 (usr_store_inferior_registers): Use collect_ptrace_register callback
19746 instead of checking for the_low_target.left_pad_xfer.
19748 * linux-s390-low.c (s390_collect_ptrace_register): New function.
19749 (s390_supply_ptrace_register): Likewise.
19750 (s390_fill_gregset): Call s390_collect_ptrace_register.
19751 (the_low_target): Update.
19753 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
19754 (ppc_supply_ptrace_register): Likewise.
19755 (the_low_target): Update.
19757 * linux-i386-low.c (the_low_target): Update.
19758 * linux-x86-64-low.c (the_low_target): Update.
19760 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19762 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
19763 reg-s390.o and reg-s390x.o.
19765 * linux-low.c (new_inferior): New global variable.
19766 (linux_create_inferior, linux_attach): Set it.
19767 (linux_wait_for_process): Call the_low_target.arch_setup after the
19768 target has stopped for the first time.
19769 (initialize_low): Do not call the_low_target.arch_setup.
19771 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
19772 (s390_set_pc): Likewise.
19773 (s390_arch_setup): New function.
19774 (the_low_target): Use s390_arch_setup as arch_setup routine.
19776 * regcache.c (realloc_register_cache): New function.
19777 (set_register_cache): Call it for each existing regcache.
19779 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19781 * server.h (init_registers): Remove prototype.
19783 * linux-low.h (struct linux_target_ops): Add arch_setup field.
19784 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
19785 instead of init_registers ().
19786 * linux-arm-low.c (init_registers_arm): Add prototype.
19787 (init_registers_arm_with_iwmmxt): Likewise.
19788 (the_low_target): Add initializer for arch_setup field.
19789 * linux-cris-low.c (init_registers_cris): Add prototype.
19790 (the_low_target): Add initializer for arch_setup field.
19791 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
19792 (the_low_target): Add initializer for arch_setup field.
19793 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
19794 (the_low_target): Add initializer for arch_setup field.
19795 * linux-ia64-low.c (init_registers_ia64): Add prototype.
19796 (the_low_target): Add initializer for arch_setup field.
19797 * linux-m32r-low.c (init_registers_m32r): Add prototype.
19798 (the_low_target): Add initializer for arch_setup field.
19799 * linux-m68k-low.c (init_registers_m68k): Add prototype.
19800 (the_low_target): Add initializer for arch_setup field.
19801 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
19802 (init_registers_mips64_linux): Likewise.
19803 (the_low_target): Add initializer for arch_setup field.
19804 * linux-ppc-low.c (init_registers_ppc): Add prototype.
19805 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
19806 (the_low_target): Add initializer for arch_setup field.
19807 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
19808 (init_registers_powerpc_64): Likewise.
19809 (the_low_target): Add initializer for arch_setup field.
19810 * linux-s390-low.c (init_registers_s390): Add prototype.
19811 (init_registers_s390x): Likewise.
19812 (the_low_target): Add initializer for arch_setup field.
19813 * linux-sh-low.c (init_registers_sh): Add prototype.
19814 (the_low_target): Add initializer for arch_setup field.
19815 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
19816 (the_low_target): Add initializer for arch_setup field.
19817 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
19818 (the_low_target): Add initializer for arch_setup field.
19820 * win32-low.h (struct win32_target_ops): Add arch_setup field.
19821 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
19822 instead of init_registers ().
19823 * win32-arm-low.c (init_registers_arm): Add prototype.
19824 (the_low_target): Add initializer for arch_setup field.
19825 * win32-i386-low.c (init_registers_i386): Add prototype.
19826 (the_low_target): Add initializer for arch_setup field.
19828 * spu-low.c (init_registers_spu): Add prototype.
19829 (initialize_low): Call initialie_registers_spu () instead of
19830 initialize_registers ().
19832 2008-02-19 Pedro Alves <pedro@codesourcery.com>
19834 * server.c (handle_v_requests): When handling the vRun and vAttach
19835 packets, if already debugging a process, don't kill it. Return an
19838 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
19840 * server.c (handle_query): Correct length check.
19842 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
19844 * win32-low.c (do_initial_child_stuff): Add process handle
19845 parameter. Set current_process_handle and current_process_id from the
19846 parameters. Clear globals.
19847 (win32_create_inferior): Don't set current_process_handle and
19848 current_process_id here. Instead pass them on the call to
19849 do_initial_child_stuff.
19850 (win32_attach): Likewise.
19851 (win32_clear_inferiors): New.
19852 (win32_kill): Don't close the current process handle or the
19853 current thread handle here. Instead call win32_clear_inferiors.
19854 (win32_detach): Don't open a new handle to the process. Call
19855 win32_clear_inferiors.
19856 (win32_join): Don't rely on current_process_handle; open a new
19857 handle using the process id.
19858 (win32_wait): Call win32_clear_inferiors when the inferior process
19861 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
19863 * server.c (monitor_show_help): Add "exit".
19865 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
19867 * Makefile.in (SFILES): Add linux-xtensa-low.c.
19868 (clean): Add reg-xtensa.c.
19869 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
19870 * configure.srv (xtensa*-*-linux*) New target.
19871 * linux-xtensa-low.c: New.
19872 * xtensa-xtregs.c: New.
19874 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
19876 * hostio.c: Don't include errno.h.
19877 (errno_to_fileio_errno): Move to hostio-errno.
19878 * hostio.c: (hostio_error): Remove the error parameter. Defer the
19879 error number outputting to the target->hostio_last_error callback.
19880 (hostio_packet_error): Use FILEIO_EINVAL directly.
19881 (handle_open, handle_pread, hostio_error, handle_unlink): Update
19882 calls to hostio_error.
19883 * hostio-errno.c: New.
19884 * server.h (hostio_last_error_from_errno): Declare.
19885 * target.h (target_ops): Add hostio_last_error member.
19886 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
19887 as hostio_last_error handler.
19888 * spu-low.c (spu_target_ops): Likewise.
19889 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
19890 (wince_hostio_last_error): New functions.
19891 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
19892 as hostio_last_error handler.
19893 (win32_target_ops) [!_WIN32_WCE]: Register
19894 hostio_last_error_from_errno as hostio_last_error handler.
19895 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
19896 (hostio-errno.o): New rule.
19897 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
19898 * configure.srv (srv_hostio_err_objs): New variable. Default to
19900 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
19901 * configure: Regenerate.
19903 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
19905 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
19906 (linux_kill, linux_detach): Clean up the process list.
19907 * remote-utils.c (remote_open): Improve port number parsing.
19908 (putpkt_binary, input_interrupt): Only send interrupts if the target
19910 * server.c (extended_protocol): Make static.
19911 (attached): Define earlier.
19912 (exit_requested, response_needed, program_argv): New variables.
19913 (target_running): New.
19914 (start_inferior): Clear attached here.
19915 (attach_inferior): Set attached here.
19916 (require_running): Define.
19917 (handle_query): Use require_running and target_running. Implement
19919 (handle_v_attach, handle_v_run): New.
19920 (handle_v_requests): Use require_running. Handle vAttach and vRun.
19921 (gdbserver_usage): Update.
19922 (main): Redo argument parsing. Handle --debug and --multi. Handle
19923 --attach along with other options or after the port. Save
19924 program_argv. Support no initial program. Resynchronize
19925 communication with GDB after an error. Handle "monitor exit".
19926 Use require_running and target_running. Always allow the extended
19927 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
19928 restart in extended mode.
19929 * README: Refer to the GDB manual. Update --attach usage.
19931 2007-12-20 Andreas Schwab <schwab@suse.de>
19933 * linux-low.c (STACK_SIZE): Define.
19934 (linux_tracefork_child): Use it. Use __clone2 on ia64.
19935 (linux_test_for_tracefork): Likewise.
19937 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
19939 * linux-low.c (linux_wait_for_event): Update messages. Do not
19940 reinsert auto-delete breakpoints.
19941 * mem-break.c (struct breakpoint): Change return type of handler to
19943 (set_breakpoint_at): Update handler type.
19944 (reinsert_breakpoint_handler): Return 1 instead of calling
19946 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
19948 (check_breakpoints): Delete auto-delete breakpoints and return 2.
19949 * mem-break.h (set_breakpoint_at): Update handler type.
19950 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
19951 * win32-low.c (auto_delete_breakpoint): New.
19952 (get_child_debug_event): Use it.
19954 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
19956 * configure.ac: Check for pread and pwrite.
19957 * hostio.c (handle_pread): Fall back to lseek and read.
19958 (handle_pwrite): Fall back to lseek and write.
19959 * config.in, configure: Regenerated.
19961 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
19963 * server.c (myresume): Add own_buf argument.
19964 (main): Update calls.
19966 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
19968 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
19969 * remote-utils.c (remote_open): Do not call disable_async_io.
19970 (block_async_io): Delete.
19971 (unblock_async_io): Make static.
19972 (initialize_async_io): New.
19973 * server.c (handle_v_cont): Handle async I/O here.
19974 (myresume): Likewise. Move other common resume tasks here...
19975 (main): ... from here. Call initialize_async_io. Disable async
19976 I/O before the main loop.
19977 * server.h (initialize_async_io): Declare.
19978 (block_async_io, unblock_async_io): Delete prototypes.
19979 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
19981 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
19983 * remote-utils.c (readchar): Allow binary data in received messages.
19985 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19987 * win32-low.c (attaching): New global.
19988 (win32_create_inferior): Clear the `attaching' global.
19989 (win32_attach): Set the `attaching' global.
19990 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
19991 attaching. Only set a breakpoint at the entry point if not
19994 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19996 * server.c (main): Don't report dll events on the initial
19997 connection on attaches.
19999 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20001 * server.c (main): Relax numerical bases supported for the pid of
20002 the --attach command line argument.
20004 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20006 * win32-low.c (win32_attach): Call OpenProcess before
20007 DebugActiveProcess, not after. Add last error output to error
20010 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20012 * win32-low.c (win32_get_thread_context)
20013 (win32_set_thread_context): New functions.
20014 (thread_rec): Use win32_get_thread_context.
20015 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20016 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20019 2007-12-03 Leo Zayas
20020 Pedro Alves <pedro_alves@portugalmail.pt>
20022 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20024 (child_add_thread): Minor cleanup.
20025 (child_continue): Resume artificially suspended threads before
20026 calling ContinueDebugEvent.
20027 (suspend_one_thread): New.
20028 (fake_breakpoint_event): New.
20029 (get_child_debug_event): Change return type to int. Check here if
20030 gdb sent an interrupt request. If a soft interrupt was requested,
20031 fake a breakpoint event. Return 0 if there is no event to handle,
20033 (win32_wait): Don't check here if gdb sent an interrupt request.
20034 Ensure there is a valid event to handle.
20035 (win32_request_interrupt): Add soft interruption method as last
20038 2007-12-03 Leo Zayas
20039 Pedro Alves <pedro_alves@portugalmail.pt>
20041 * win32-low.h (win32_thread_info): Add descriptions to the
20042 structure members. Replace `suspend_count' counter by a
20044 * win32-low.c (thread_rec): Update condition of when to get the
20045 context from the inferior. Rely on ContextFlags being set if it
20046 has already been retrieved. Only suspend the inferior thread if
20047 we haven't already. Warn if that fails.
20048 (continue_one_thread): s/suspend_count/suspended/. Only call
20049 ResumeThread once. Warn if that fails.
20051 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20053 * win32-low.c (win32_wait): Don't read from the inferior when it
20054 has already exited.
20056 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20058 * Makefile.in (win32_low_h): New variable.
20059 (win32-low.o): Add dependency on $(win32_low_h).
20060 (win32-arm-low.o, win32-i386-low.o): New rules.
20062 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20064 * hostio.c: Correct copyright year.
20066 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20068 * Makefile.in (OBS): Add hostio.o.
20069 (hostio.o): New rule.
20070 * server.h (handle_vFile): Declare.
20071 * hostio.c: New file.
20072 * server.c (handle_v_requests): Take packet_len and new_packet_len
20073 for binary packets. Call handle_vFile.
20074 (main): Update call to handle_v_requests.
20076 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
20078 * linux-low.c: Include <sched.h>.
20080 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
20082 * linux-low.c (linux_tracefork_grandchild): New.
20083 (linux_tracefork_child): Use clone.
20084 (linux_test_for_tracefork): Use clone; allocate and free a stack.
20086 2007-10-31 Joel Brobecker <brobecker@adacore.com>
20088 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
20090 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20092 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20094 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20096 * inferiors.c (change_inferior_id): Delete.
20097 (add_pid_to_list, pull_pid_from_list): New.
20098 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20099 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20100 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20101 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20102 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20103 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20104 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20105 (using_threads): Always set to 1.
20106 (handle_extended_wait): New.
20107 (add_process): Do not set TID.
20108 (linux_create_inferior): Set must_set_ptrace_flags.
20109 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20110 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20111 (linux_thread_alive): Rename TID argument to LWPID.
20112 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20113 (linux_wait_for_event): Do not use TID or check using_threads. Update
20114 call to dead_thread_notify. Call handle_extended_wait.
20115 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20116 (send_sigstop): Delete sigstop_sent.
20117 (wait_for_sigstop): Avoid TID.
20118 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20119 (linux_test_for_tracefork): New.
20120 (linux_lookup_signals): Use thread_db_active and
20121 linux_supports_tracefork_flag.
20122 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20123 * linux-low.h (get_process_thread): Avoid TID.
20124 (struct process_ifo): Move thread_known and tid to the end. Remove
20126 (linux_attach_lwp, thread_db_init): Update prototypes.
20127 * server.h (change_inferior_id): Delete prototype.
20128 (add_pid_to_list, pull_pid_from_list): New prototypes.
20129 * thread-db.c (thread_db_use_events): New.
20130 (find_first_thread): Rename to...
20131 (find_one_thread): ...this. Update callers and messages. Do not
20132 call fatal. Check thread_db_use_events. Do not call
20133 change_inferior_id or new_thread_notify.
20134 (maybe_attach_thread): Update. Do not call new_thread_notify.
20135 (thread_db_init): Set thread_db_use_events. Check use_events.
20136 * utils.c (fatal, warning): Correct message prefix.
20138 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20140 * Makefile.in (clean): Remove new files.
20141 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20142 (powerpc-64.o, powerpc-64.c): New rules.
20143 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20144 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20146 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20148 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20149 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20150 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20151 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20152 (target_regsets): Add AltiVec and SPE register sets.
20153 * configure.ac: Check for AltiVec and SPE.
20154 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20155 (ppc_fill_vrregset, ppc_store_vrregset): New.
20156 (target_regsets): Add AltiVec register set.
20157 * configure: Regenerated.
20159 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20161 * linux-low.c (O_LARGEFILE): Define.
20162 (linux_read_memory): Use /proc/PID/mem.
20163 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20164 * configure, config.in: Regenerated.
20166 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20168 * linux-low.c (linux_wait_for_event): Do not pass signals while
20171 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20173 * win32-low.c (create_process): New.
20174 (win32_create_inferior): Use create_process instead of
20175 CreateProcess. If create_process failed retry appending an ".exe"
20176 suffix. Store the GetLastError result immediatelly after
20177 create_process calls and use it on the call to error.
20179 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20181 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
20183 2007-08-23 Joel Brobecker <brobecker@adacore.com>
20185 * configure.ac: Switch license to GPLv3.
20187 2007-08-01 Michael Snyder <msnyder@access-company.com>
20189 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
20191 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
20193 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
20195 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
20196 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
20197 CloseToolhelp32Snapshot.
20198 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
20199 CloseToolhelp32Snapshot.
20201 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
20203 * server.c (main): Check for inferior exit before main loop.
20205 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
20207 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
20208 instead of on tmp_desc.
20210 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
20211 Daniel Jacobowitz <dan@codesourcery.com>
20213 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
20214 (add_thread): Minor cleanups.
20215 (clear_inferiors): Move lower in the file. Clear the DLL
20217 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
20218 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
20219 (xml_escape_text): New.
20220 * server.c (handle_query): Handle qXfer:libraries:read. Report it
20222 (handle_v_cont): Report errors.
20223 (gdbserver_version): Update.
20224 (main): Correct size of own_buf. Do not report initial DLL events.
20225 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
20226 (unloaded_dll, xml_escape_text): New.
20227 * win32-low.c (enum target_waitkind): Update comments.
20228 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
20229 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
20230 (win32_EnumProcessModules, win32_GetModuleInformation)
20231 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
20232 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
20233 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
20234 (win32_Module32First, win32_Module32Next, load_toolhelp)
20235 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
20236 (get_child_debug_event): Handle DLL events.
20237 (win32_wait): Likewise.
20239 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20241 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
20242 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
20244 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20246 * win32-low.c (handle_output_debug_string): Ignore event if not
20249 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20251 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
20253 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
20255 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
20257 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
20259 * inferiors.c (change_inferior_id): Add comment.
20260 * linux-low.c (check_removed_breakpoint): Add an early
20261 prototype. Improve debug output.
20262 (linux_attach): Doc update.
20263 (linux_detach_one_process, linux_detach): Clean up before releasing
20265 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
20266 * linux-low.h (struct process_info): Doc improvement.
20267 * mem-break.c (delete_all_breakpoints): New.
20268 * mem-break.h (delete_all_breakpoints): New prototype.
20269 * thread-db.c (find_first_thread): New.
20270 (thread_db_create_event): Call it instead of
20271 thread_db_find_new_threads. Clean up unused variables.
20272 (maybe_attach_thread): Remove first thread handling.
20273 (thread_db_find_new_threads): Use find_first_thread.
20274 (thread_db_get_tls_address): Likewise.
20276 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
20278 * thread-db.c (thread_db_find_new_threads): Add prototype.
20279 (thread_db_create_event): Check for the main thread before adding
20281 (maybe_attach_thread): Only enable event reporting if TID == 0.
20282 (thread_db_get_tls_address): Check for new threads.
20284 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
20286 * linux-low.c (linux_create_inferior): Try execv before execvp.
20287 * spu-low.c (spu_create_inferior): Likewise.
20289 2007-06-13 Mike Frysinger <vapier@gentoo.org>
20291 * linux-low.c (linux_create_inferior): Change execv to execvp.
20292 * spu-low.c (spu_create_inferior): Likewies.
20294 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
20296 * Makefile.in (clean): Clean new files instead of deleted ones.
20297 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
20298 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
20300 * configure.srv: Specify XML files and new regformats for MIPS and
20302 * linux-mips-low.c (mips_num_regs): Set to only used registers.
20303 (mips_regmap): Do not fetch $0. Remove unused registers. Add
20304 an entry for the restart register.
20305 (mips_cannot_fetch_register, mips_cannot_store_register)
20306 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
20307 register names to match the XML descriptions.
20308 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
20309 restart register instead of $0.
20311 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20312 Markus Deuling <deuling@de.ibm.com>
20314 * remote-utils.c (decode_xfer_write): New function.
20315 * server.h (decode_xfer_write): Add prototype.
20316 * server.c (handle_query): Add PACKET_LEN argument. Support
20317 qXfer:spu:read and qXfer:spu:write packets.
20318 (main): Pass packet_len to handle_query.
20319 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
20320 * target.h (target_ops): Add qxfer_spu.
20322 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20324 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
20325 accessing non-seekable spufs files.
20327 2007-05-16 Markus Deuling <deuling@de.ibm.com>
20329 * server.c (handle_query): Add reply for qC packet.
20331 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20332 Leo Zayas <lerele@champenstudios@com>
20334 * server.h (check_remote_input_interrupt_request): New function.
20335 * remote_utils.c (INVALID_DESCRIPTOR): New define.
20336 (remote_desc): Initialize with INVALID_DESCRIPTOR.
20337 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
20338 (check_remote_input_interrupt_request): New function.
20339 * server.h (check_remote_input_interrupt_request): Declare.
20340 * win32-low.c (winapi_DebugBreakProcess,
20341 winapi_GenerateConsoleCtrlEvent): New typedefs.
20342 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
20344 (win32_wait): Check for remote interrupt request
20345 with check_remote_input_interrupt_request.
20346 (win32_request_interrupt): New function.
20347 (win32_target_op): Set request_interrupt to win32_request_interrupt.
20349 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20351 * win32-low.c (debug_registers_changed,
20352 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
20353 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
20354 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
20355 (thread_rec): Get context using the low target.
20356 (child_add_thread): Call thread_added on the low target,
20357 which does the same thing.
20359 (do_initial_child_stuff): Remove debug registers references.
20360 Set context using the low target. Resume threads after
20361 setting the contexts.
20362 (child_continue): Remove dead variable. Remove debug
20363 registers references.
20364 (child_fetch_inferior_registers): Go through the low target.
20365 (do_child_store_inferior_registers): Remove.
20366 (child_store_inferior_registers): Go through the low target.
20367 (win32_resume): Remove debug registers references.
20368 Set context using the low target.
20369 (handle_exception): Change return type to void. Don't record
20370 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
20371 first chance exception.
20372 (get_child_debug_event): Change return type to void. Remove
20373 goto loop. Always return after waiting for debug event.
20374 (win32_wait): Convert to switch statement. Handle spurious
20377 * win32-i386-low.c (debug_registers_changed,
20378 debug_registers_used): New.
20379 (initial_stuff): Rename to ...
20380 (i386_initial_stuff): ... this. Clear debug registers
20382 (store_debug_registers): Delete.
20383 (i386_get_thread_context): New.
20384 (load_debug_registers): Delete.
20385 (i386_set_thread_context): New.
20386 (i386_thread_added): New.
20387 (single_step): Rename to ...
20388 (i386_single_step): ... this.
20389 (do_fetch_inferior_registers): Rename to ...
20390 (i386_fetch_inferior_register): ... this.
20391 (i386_store_inferior_register): New.
20392 (the_low_target): Adapt to new interface.
20394 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
20395 (arm_get_thread_context): New.
20396 (arm_set_thread_context): New.
20398 (do_fetch_inferior_registers): Rename to ...
20399 (arm_fetch_inferior_register): ... this.
20400 (arm_store_inferior_register): New.
20401 (arm_wince_breakpoint): Reimplement as unsigned long.
20402 (arm_wince_breakpoint_len): Define.
20403 (the_low_target): Adapt to new interface.
20405 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
20406 load_debug_registers. Add get_thread_context, set_thread_context,
20407 thread_added and store_inferior_register. Rename
20408 fetch_inferior_registers to fetch_inferior_register.
20409 (regptr): Remove declaration.
20411 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20413 * linux-low.c (linux_detach): Change return type to int. Return 0.
20414 * spu-low.c (spu_detach): Likewise.
20416 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20418 * target.h (target_ops): Change return type of detach to int.
20420 (join_inferior): New.
20421 * server.c (main): Don't skip detach support on mingw32.
20422 If the inferior doesn't support detaching return error.
20423 Call join_inferior instead of using waitpid.
20424 * linux-low.c (linux_join): New.
20425 (linux_target_op): Add linux_join.
20426 * spu-low.c (spu_join): New.
20427 (spu_target_ops): Add spu_join.
20428 * win32-low.c (win32_detach): Adapt to new interface.
20429 Reopen current_process_handle before detaching. Issue a child
20430 resume before detaching.
20432 (win32_target_op): Add win32_join.
20434 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20436 * win32-low.c (win32-attach): Fix return value.
20437 * target.h (target_ops): Describe ATTACH return values.
20439 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20441 * win32-low.c (GETPROCADDRESS): Define.
20442 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
20443 (winapi_DebugSetProcessKillOnExit): Likewise.
20444 (win32_create_inferior): Force usage of ansi CreateProcessA.
20445 (win32_attach): Use GETPROCADDRESS.
20446 (win32_detach): Likewise.
20448 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20450 * win32-low.c (win32_wait): Don't use WSTOPSIG.
20452 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
20454 * win32-low.c: Commit leftover changes from 2007-03-29.
20456 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20458 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
20459 fields short instead of int. Add explicit padding.
20460 (i387_cache_to_fsave): Remove unnecessary casts.
20461 (i387_fsave_to_cache): Doc fix.
20462 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
20464 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20466 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
20467 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
20469 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20471 * configure.srv (arm*-*-mingw32ce*): Move near the other
20474 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20476 * configure.ac: Add errno checking.
20477 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
20478 sys/file.h and malloc.h.
20479 (AC_CHECK_DECLS): Add perror.
20480 (srv_mingwce): Handle.
20481 * configure.srv (i[34567]86-*-cygwin*): Add
20482 win32-i386-low.o to srv_tgtobj.
20483 (i[34567]86-*-mingw*): Likewise.
20484 (arm*-*-mingw32ce*): Add case.
20485 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20486 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
20487 [__MINGW32CE__] (strerror): New function.
20488 [__MINGW32CE__] (errno): Define to GetLastError.
20489 [__MINGW32CE__] (COUNTOF): New macro.
20490 (remote_open): Remove extra close call.
20491 * mem-break.c (delete_breakpoint_at): New function.
20492 * mem-break.h (delete_breakpoint_at): Declare.
20493 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20494 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
20495 [USE_WIN32API] (read, write): Add char* casts.
20496 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
20497 * server.h: Include wincecompat.h on Windows CE.
20498 [HAVE_ERRNO_H]: Check.
20499 (perror): Declare if not declared.
20500 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
20501 (perror_with_name): Remove errno declaration.
20502 * wincecompat.h: New.
20503 * wincecompat.c: New.
20504 * win32-low.h: New.
20505 * win32-arm-low.c: New.
20506 * win32-i386-low.c: New.
20507 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
20508 (OUTMSG2): Make it safe.
20510 (COUNTOF): New macro.
20511 (NUM_REGS): Get it from the low target.
20512 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
20513 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
20514 (thread_rec): Let low target handle debug registers.
20515 (child_add_thread): Likewise.
20516 (child_init_thread_list): Likewise.
20517 (continue_one_thread): Likewise.
20519 (do_child_fetch_inferior_registers): Move to ...
20520 * win32-i386-low.c: ... here, and rename to ...
20521 (do_fetch_inferior_registers): ... this.
20522 * win32-low.c (child_fetch_inferior_registers):
20523 Go through the low target.
20524 (do_child_store_inferior_registers): Use regptr.
20525 (strwinerror): New function.
20526 (win32_create_inferior): Handle Windows CE.
20527 Use strwinerror instead of strerror on Windows error
20528 codes. Add program to the error output.
20529 Don't close the main thread handle on Windows CE.
20530 (win32_attach): Use coredll.dll on Windows CE.
20531 (win32_kill): Close current process and current
20533 (win32_detach): Use coredll.dll on Windows CE.
20534 (win32_resume): Let low target handle debug registers, and
20536 (handle_exception): Add/Remove initial breakpoint. Avoid
20537 non-existant WSTOPSIG on Windows CE.
20538 (win32_read_inferior_memory): Cast to remove warning.
20539 (win32_arch_string): Go through the low target.
20540 (initialize_low): Call set_breakpoint_data with the low
20541 target's breakpoint.
20542 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
20543 FOP_REGNUM, mappings): Move to ...
20544 * win32-i386-low.c: ... here.
20545 * win32-low.c (win32_thread_info): Move to ...
20546 * win32-low.h: ... here.
20547 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
20548 win32-arm-low.c and wincecompat.c.
20549 (all:): Add $EXEEXT.
20550 (install-only:): Likewise.
20551 (gdbserver:): Likewise.
20552 (gdbreplay:): Likewise.
20553 * config.in: Regenerate.
20554 * configure: Regenerate.
20556 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20558 * win32-low.c: Rename typedef thread_info to
20559 win32_thread_info throughout.
20561 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20563 * win32-i386-low.c: Rename to ...
20564 * win32-low.c: ... this.
20565 * configure.srv: Replace win32-i386-low.o with win32-low.o.
20566 * Makefile.in: Likewise.
20568 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
20570 * remote-utils.c (monitor_output): Constify msg parameter.
20571 * server.h (monitor_output): Likewise.
20572 * win32-i386-low.c (handle_output_debug_string): New.
20573 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
20574 handle_output_debug_string.
20575 (get_child_debug_event): Likewise.
20577 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
20579 * server.c (main): Correct strtoul check.
20581 2007-03-27 Jon Ringle <jon@ringle.org>
20583 * linux-low.c: Check __ARCH_HAS_MMU__ also.
20585 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
20587 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
20589 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
20591 * terminal.h: Check HAVE_SGTTY_H.
20593 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
20595 * remote-utils.c (remote_open): Print out the assigned port number.
20597 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
20599 * remote-utils.c (monitor_output): New function.
20600 * server.c (debug_threads): Define here.
20601 (monitor_show_help): New function.
20602 (handle_query): Handle qRcmd.
20603 (main): Do not handle 'd' packet.
20604 * server.h (debug_threads, remote_debug, monitor_output): Declare.
20605 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
20608 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20610 * Makefile.in (EXEEXT): New.
20611 (clean): Use $(EXEEXT).
20613 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20615 * target.h (target_ops): Rename send_signal to request_interrupt,
20616 and remove enum target_signal parameter.
20617 * linux-low.c (linux_request_interrupt): Rename from
20618 linux_send_signal, and always send SIGINT.
20619 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
20620 and always send SIGINT.
20621 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
20623 (input_interrupt): Likewise.
20625 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20627 * server.c (get_features_xml): Check if target implemented
20629 * win32-i386-low.c (win32_arch_string): New.
20630 (win32_target_ops): Add win32_arch_string as arch_string member.
20632 2007-02-22 Markus Deuling <deuling@de.ibm.com>
20634 * spu-low.c (spu_arch_string): New.
20635 (spu_target_ops): Add spu_arch_string.
20637 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
20639 * remote-utils.c: Remove HAVE_TERMINAL_H check.
20640 * configure.ac: Do not check for terminal.h.
20641 * configure, config.in: Regenerated.
20643 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20645 * Makefile.in (OBS): Add $(XML_BUILTIN).
20646 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
20648 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
20649 (arm-with-iwmmxt.c): New.
20650 * config.in, configure: Regenerate.
20651 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
20652 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
20653 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
20654 (arm*-*-linux*): Add iWMMXt and regset support.
20655 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
20656 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
20657 (arm_store_wmmxregset, target_regsets): New.
20658 * server.c (get_features_xml): Take annex argument. Check builtin
20660 (handle_query): Handle multiple annexes.
20662 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20664 * remote-utils.c [USE_WIN32API] (read, write): Define.
20665 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
20668 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
20670 * linux-i386-low.c (the_low_target): Set arch_string.
20671 * linux-x86-64-low.c (the_low_target): Likewise.
20672 * linux-low.c (linux_arch_string): New.
20673 (linux_target_ops): Add it.
20674 * linux-low.h (struct linux_target_ops): Add arch_string.
20675 * server.c (write_qxfer_response): Use const void * for DATA.
20676 (get_features_xml): New.
20677 (handle_query): Handle qXfer:features:read. Report it for qSupported.
20678 * target.h (struct target_ops): Add arch_string method.
20680 2007-01-03 Denis Pilat <denis.pilat@st.com>
20681 Daniel Jacobowitz <dan@codesourcery.com>
20683 * linux-low.c (linux_kill): Handle being called with no threads.
20684 * win32-i386-low.c (win32_kill): Likewise.
20685 (get_child_debug_event): Clear current_process_handle.
20687 2006-12-30 Denis PILAT <denis.pilat@st.com>
20688 Daniel Jacobowitz <dan@codesourcery.com>
20690 * remote-utils.c (remote_open): Check the type of specified
20691 serial port devices before opening them.
20692 * server.c (main): Kill the inferior if an error occurs during
20693 the first remote_open.
20695 2006-12-05 Markus Deuling <deuling@de.ibm.com>
20697 * README: Update supported targets.
20699 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
20701 * Makefile.in (clean): Remove reg-mips64.c.
20702 (reg-mips64.c, reg-mips64.o): New rules.
20703 * configure.srv: Handle mips64. Include regset support for mips.
20704 * linux-mips-low.c (union mips_register): New.
20705 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
20706 (mips_breakpoint, mips_breakpoint_at): Use int.
20707 (mips_collect_register, mips_supply_register)
20708 (mips_collect_register_32bit, mips_supply_register_32bit)
20709 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
20710 (mips_store_fpregset, target_regsets): New.
20711 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
20713 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
20715 * configure.srv: Add target "spu*-*-*".
20716 * Makefile.in (clean): Remove reg-spu.c.
20717 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
20718 * spu-low.c: New file.
20720 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20722 * configure.ac: Correct td_thr_tls_get_addr test.
20723 * configure: Regenerated.
20725 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20727 * linux-low.c (linux_wait_for_event): Reformat. Use the
20728 pass_signals array.
20729 * remote-utils.c (decode_address_to_semicolon): New.
20730 * server.c (pass_signals, handle_general_set): New.
20731 (handle_query): Mention QPassSignals for qSupported.
20732 (main): Call handle_general_set.
20733 * server.h (pass_signals, decode_address_to_semicolon): New.
20735 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
20737 * server.c (handle_query): Correct error handling for read_auxv.
20739 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
20741 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
20742 and srv_linux_thread_db to yes.
20743 * linux-s390-low.c (s390_fill_gregset): New function.
20744 (target_regsets): Define data structure.
20746 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
20748 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
20749 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
20750 * config.in, configure: Regenerated.
20751 * inferiors.c (gdb_id_to_thread): New function.
20752 (gdb_id_to_thread_id): Use it.
20753 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
20754 * linux-low.h (struct process_info): Add th member.
20755 (thread_db_get_tls_address): New prototype.
20756 * remote-utils.c (decode_address): Make non-static.
20757 * server.c (handle_query): Handle qGetTLSAddr.
20758 * server.h (gdb_id_to_thread, decode_address): New prototypes.
20759 * target.h (struct target_ops): Add get_tls_address.
20760 * thread-db.c (maybe_attach_thread): Save the thread handle.
20761 (thread_db_get_tls_address): New.
20763 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
20765 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
20766 (linux_resume_one_process): Take a siginfo_t *. Update all
20767 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
20768 (struct pending_signals): Add a siginfo_t.
20769 (linux_wait_for_process): Always set last_status.
20770 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
20771 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
20772 * linux-low.h (struct process_info): Add last_status.
20774 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
20776 * remote-utils.c (try_rle): New function.
20777 (putpkt_binary): Use it.
20779 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
20781 * Makefile.in (clean): Clean reg-x86-64-linux.c.
20782 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
20783 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
20784 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
20785 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
20788 2006-08-08 Richard Sandiford <richard@codesourcery.com>
20790 * server.c (terminal_fd): New variable.
20791 (old_foreground_pgrp): Likewise.
20792 (restore_old_foreground_pgrp): New function.
20793 (start_inferior): Record the terminal file descriptor in terminal_fd
20794 and its original foreground group in old_foreground_pgrp. Register
20795 restore_old_foreground_pgrp with atexit().
20797 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
20799 * server.c (handle_query): Correct qPart to qXfer.
20801 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
20803 * configure.ac: Check for more headers which are missing on
20804 Windows. Automatically supply -lwsock32 and USE_WIN32API.
20805 * configure.srv: Add Cygwin and mingw32.
20806 * remote-utils.c: Don't include headers unconditionally which
20807 are missing on mingw32. Include <winsock.h> for mingw32.
20808 (remote_open): Adjust for mingw32 support. Flush
20809 standard error after writing to it.
20810 (remote_close, putpkt_binary, input_interrupt, block_async_io)
20811 (unblock_async_io, enable_async_io, disable_async_io)
20812 (readchar, getpkt): Update for Winsock support.
20813 (prepare_resume_reply): Expect a protocol signal number.
20814 * server.c: Disable <sys/wait.h> on mingw32.
20815 (start_inferior): Adjust for mingw32 support. Flush
20816 standard error after writing to it.
20817 (attach_inferior): Likewise. Use protocol signal
20819 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
20821 * win32-i386-low.c: New file.
20822 * Makefile.in (XM_CLIBS): Set.
20823 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
20824 (win32-i386-low.o): New dependency rule.
20825 * linux-low.c (linux_wait): Use target signal numbers.
20826 * target.h (struct target_ops): Doc fix.
20827 * server.h (target_signal_to_name): New prototype.
20828 * gdbreplay.c: Don't include headers unconditionally which
20829 are missing on mingw32. Include <winsock.h> for mingw32.
20830 (remote_close, remote_open): Adjust for Winsock support.
20831 * configure, config.in: Regenerated.
20833 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20835 * server.c (decode_xfer_read, write_qxfer_response): New.
20836 (handle_query): Take a packet length argument. Handle
20837 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
20838 the qSupported response.
20839 (main): Update call to handle_query.
20841 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
20843 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
20844 (putpkt_binary): Renamed from putpkt and adjusted for binary
20846 (putpkt): New wrapper for putpkt_binary.
20847 (readchar): Don't mask off the high bit.
20848 (decode_X_packet): New function.
20849 * server.c (main): Call putpkt_binary if a handler sets the packet
20850 length. Save the length of the incoming packet. Handle 'X'.
20851 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
20853 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
20855 * server.c (handle_query): Handle qSupported.
20857 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20859 * remote-utils.c (all_symbols_looked_up): New variable.
20860 (look_up_one_symbol): Check it.
20861 * server.h (look_up_one_symbol): New declaration.
20862 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
20864 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20866 * Makefile.in (linux-arm-low.o): Update dependencies.
20867 * linux-arm-low.c: Include "gdb_proc_service.h".
20868 (PTRACE_GET_THREAD_AREA): Define.
20869 (ps_get_thread_area): New function.
20871 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
20873 * configure.srv (m68k*-*-uclinux*): New target.
20874 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
20875 (linux_resume_one_process): Remove extraneous cast.
20876 (linux_read_offsets): New.
20877 (linux_target_op): Add linux_read_offsets on mmuless systems.
20878 * server.c (handle_query): Add qOffsets logic.
20879 * target.h (struct target_ops): Add read_offsets.
20881 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20883 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
20884 (PTRACE_GET_THREAD_AREA): Define.
20885 (ps_get_thread_area): New function.
20886 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
20887 (linux-x86-64-low.o): Update.
20889 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20891 * configure.ac: Remove checks for prfpregset_t.
20892 * gdb_proc_service.h: New file.
20893 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
20894 new "gdb_proc_service.h".
20895 * proc-service.c: Likewise.
20896 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
20897 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
20898 * Makefile.in (gdb_proc_service_h): Updated.
20899 * configure, config.in: Regenerated.
20901 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
20903 * remote-utils.c (prepare_resume_reply): Move declaration
20904 of gdb_id_from_wait to the top of the block.
20906 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
20908 * linux-low.c (regsets_store_inferior_registers): Read the regset
20909 from the target before filling it.
20911 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20913 * server.c (attach_inferior): Return SIGTRAP for a successful
20916 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
20918 * Makefile.in (OBS): Add version.o.
20919 (STAGESTUFF): Delete.
20920 (version.o): Add dependencies.
20921 (version.c): Replace rule.
20922 (clean): Remove version.c.
20923 * server.c (gdbserver_version): New.
20924 (gdbserver_usage): Use printf.
20925 (main): Handle --version and --help.
20926 * server.h (version, host_name): Add declarations.
20928 2005-12-23 Eli Zaretskii <eliz@gnu.org>
20940 * linux-x86-64-low.c:
20942 * linux-s390-low.c:
20943 * linux-ppc64-low.c:
20945 * linux-mips-low.c:
20946 * linux-m68k-low.c:
20947 * linux-m32r-low.c:
20950 * linux-ia64-low.c:
20951 * linux-i386-low.c:
20952 * linux-crisv32-low.c:
20964 * gdbserver.1: Add (C) after Copyright. Update the FSF
20967 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
20969 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
20970 (arm_breakpoint_at): Recognize both breakpoints.
20971 (the_low_target): Use the correct breakpoint instruction.
20973 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
20975 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
20976 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
20977 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
20978 (the_low_target): Update.
20980 2005-10-25 Andreas Schwab <schwab@suse.de>
20982 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
20984 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
20985 (ia64_num_regs): Reduce to 462.
20987 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
20989 * acinclude.m4: Correct quoting.
20990 * aclocal.m4: Regenerated.
20992 Suggested by SZOKOVACS Robert <szo@ies.hu>:
20993 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
20994 (thread_db_init): Call thread_db_err_str.
20995 * configure.ac: Check for TD_VERSION.
20996 * config.in, configure: Regenerated.
20998 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21000 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21002 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21004 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21005 is not available. Define HAVE_PTRACE_GETREGS if it is.
21006 * config.in, configure: Regenerated.
21007 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21008 * linux-i386-low.c, linux-m68k-low.c: Update to use
21009 HAVE_PTRACE_GETREGS.
21010 * linux-low.c (regsets_fetch_inferior_registers)
21011 (regsets_store_inferior_registers): Only return 0 if we processed
21013 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21014 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21016 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21018 * inferiors.c (struct thread_info): Add gdb_id.
21019 (add_thread): Add gdb_id argument.
21020 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21021 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21022 calls to add_thread.
21023 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21024 * server.c (handle_query): Use thread_to_gdb_id.
21025 (handle_v_cont, main): Use gdb_id_to_thread_id.
21026 * server.h (add_thread): Update prototype.
21027 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21030 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21032 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21033 left-padded registers.
21034 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21035 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21037 2005-07-01 Steve Ellcey <sje@cup.hp.com>
21039 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21040 * configure: Regenerate.
21041 * config.in: Regenerate.
21042 * server.h (NEED_DECLARATION_STRERROR):
21043 Replace with !HAVE_DECL_STRERROR.
21045 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21047 * linux-low.c (linux_wait, linux_send_signal): Don't test
21048 an unsigned long variable for > 0 if it could be MAX_ULONG.
21049 * server.c (myresume): Likewise.
21050 * target.c (set_desired_inferior): Likewise.
21052 2005-06-13 Mark Kettenis <kettenis@gnu.org>
21054 * configure.ac: Simplify and improve check for socklen_t.
21055 * configure, config.in: Regenerate.
21057 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
21059 * acconfig.h: Remove.
21060 * configure.ac: Add a test for socklen_t. Use three-argument
21061 AC_DEFINE throughout.
21062 * config.in: Regenerated using autoheader 2.59.
21063 * configure: Regenerated.
21065 * gdbreplay.c (socklen_t): Provide a default.
21066 (remote_open): Use socklen_t.
21067 * remote-utils.c (socklen_t): Provide a default.
21068 (remote_open): Use socklen_t.
21069 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
21072 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
21074 * linux-low.c (linux_read_memory, linux_write_memory)
21075 (linux_read_auxv): Likewise.
21076 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21077 (check_mem_write): Likewise.
21078 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
21080 * regcache.c (struct inferior_rgcache_data, registers_to_string)
21081 (registers_from_string, register_data): Likewise.
21082 * server.c (handle_query, main): Likewise.
21083 * server.h (convert_ascii_to_int, convert_int_to_ascii)
21084 (decode_M_packet): Likewise.
21085 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
21086 * target.h (struct target_ops): Update read_memory, write_memory,
21088 (read_inferior_memory, write_inferior_memory): Update.
21089 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21090 to unsigned char *.
21091 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21092 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21093 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21094 linux-s390-low.c, linux-sh-low.c: Update for changes in
21095 read_inferior_memory and the_low_target->breakpoint.
21097 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21099 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21100 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21101 * configure.srv: Add powerpc64-*-linux*.
21102 * linux-ppc64-low.c: New file.
21104 2005-05-23 Orjan Friberg <orjanf@axis.com>
21106 * linux-cris-low.c: New file with support for CRIS.
21107 * linux-crisv32-low.c: Ditto for CRISv32.
21108 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21109 (clean): Add reg-cris.c and reg-crisv32.c.
21110 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
21111 reg-crisv32.o, and reg-crisv32.c to make rules.
21112 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21113 recognized targets.
21115 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21117 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21118 of sizeof (PTRACE_XFER_TYPE).
21119 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21121 2005-05-12 Orjan Friberg <orjanf@axis.com>
21123 * target.h (struct target_ops): Add insert_watchpoint,
21124 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21125 pointers for hardware watchpoint support.
21126 * linux-low.h (struct linux_target_ops): Ditto.
21127 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21128 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21129 to linux_target_ops.
21130 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21132 * server.c (main): Recognize 'Z' and 'z' packets.
21134 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21136 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21137 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21138 (the_low_target): Add new members.
21140 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21142 * proc-service.c (ps_lgetregs): Search all_processes instead of
21145 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21147 * server.c (start_inferior): Change return type to int.
21148 (attach_inferior): Change sigptr to int *.
21149 (handle_v_cont, handle_v_requests): Change signal to int *.
21150 (main): Change signal to int.
21152 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
21154 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21155 * configure.srv: Add m32r*-*-linux*.
21156 * linux-m32r-low.c: New file.
21158 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21160 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21162 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21164 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21165 Take unsigned long arguments for PIDs.
21166 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21167 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21168 (wait_for_sigstop, linux_resume_one_process)
21169 (regsets_fetch_inferior_registers, linux_send_signal)
21170 (linux_read_auxv): Likewise. Update the types of variables holding
21171 PIDs. Update format string specifiers.
21172 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21173 * remote-utils.c (prepare_resume_reply): Likewise.
21174 * server.c (cont_thread, general_thread, step_thread)
21175 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
21177 (handle_query): Update format specifiers.
21178 (handle_v_cont, main): Use strtoul for thread IDs.
21179 * server.h (struct inferior_list_entry): Use unsigned long for ID.
21180 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
21181 (general_thread, step_thread, thread_from_wait)
21182 (old_thread_from_wait): Update.
21183 * target.h (struct thread_resume): Use unsigned long for THREAD.
21184 (struct target_ops): Use unsigned long for arguments to attach and
21187 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
21189 * acinclude.m4: Include bfd/bfd.m4 directly.
21190 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
21191 <agriffis@toolchain.org>.
21192 * aclocal.m4, configure: Regenerated.
21194 2005-01-07 Andrew Cagney <cagney@gnu.org>
21196 * configure.ac: Rename configure.in, require autoconf 2.59.
21197 * configure: Re-generate.
21199 2004-12-08 Daniel Jacobowitz <dan@debian.org>
21201 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
21202 LIBS when finished.
21203 * aclocal.m4: Regenerated.
21204 * configure: Regenerated.
21206 2004-11-21 Andreas Schwab <schwab@suse.de>
21208 * linux-m68k-low.c (m68k_num_gregs): Define.
21209 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
21210 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
21211 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
21212 (m68k_breakpoint_at): New. Add to the_low_target.
21214 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
21215 srv_linux_thread_db to yes.
21217 2004-10-20 Joel Brobecker <brobecker@gnat.com>
21219 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
21220 (ARCH_SET_FS): Likewise.
21221 (ARCH_GET_FS): Likewise.
21222 (ARCH_GET_GS): Likewise.
21224 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21226 * linux-i386-low.c (ps_get_thread_area): New.
21227 * linux-x86-64-low.c (ps_get_thread_area): New.
21228 * linux-low.c: Include <sys/syscall.h>.
21229 (linux_kill_one_process): Don't kill the first thread here.
21230 (linux_kill): Kill the first thread here.
21231 (kill_lwp): New function.
21232 (send_sigstop, linux_send_signal): Use it.
21233 * proc-service.c: Clean up #ifdefs.
21234 (fpregset_info): Delete.
21235 (ps_lgetregs): Update and enable implementation.
21236 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
21238 * remote-utils.c (struct sym_cache, symbol_cache): New.
21239 (input_interrupt): Print a clearer message.
21240 (async_io_enabled): New variable.
21241 (enable_async_io, disable_async_io): Use it. Update comments.
21242 (look_up_one_symbol): Use the symbol cache.
21243 * thread-db.c (thread_db_look_up_symbols): New function.
21244 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
21246 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21248 * configure.in: Test for -rdynamic.
21249 * configure: Regenerated.
21250 * Makefile (INTERNAL_LDFLAGS): New.
21251 (gdbserver, gdbreplay): Use it.
21253 2004-09-02 Andrew Cagney <cagney@gnu.org>
21255 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
21257 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
21259 * linux-low.c (linux_wait): Clear all_processes list also.
21261 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21263 * linux-low.c: Include <errno.h>. Remove extern declaration of
21266 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21268 * gdbreplay.c, server.h, utils.c: Update copyright years.
21270 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21272 * server.c (main): Print child status or termination signal from
21273 variable 'signal', not 'sig'.
21275 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21277 * linux-low.c (linux_read_memory): Change return type to
21278 int. Check for and return error from ptrace().
21279 * target.c (read_inferior_memory): Change return type to int. Pass
21280 back return status from the_target->read_memory().
21281 * target.h (struct target_ops): Adapt *read_memory() prototype.
21283 (read_inferior_memory): Adapt prototype.
21284 * server.c (main): Return an error packet if
21285 read_inferior_memory() returns an error.
21287 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
21289 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
21290 Unify with other clean targets.
21292 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21294 * server.c (handle_v_cont): Call set_desired_inferior.
21296 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21298 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
21300 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21302 * linux-low.c (linux_wait): Unblock async I/O.
21303 (linux_resume): Block and enable async I/O.
21304 * remote-utils.c (block_async_io, unblock_async_io): New functions.
21305 * server.h (block_async_io, unblock_async_io): Add prototypes.
21307 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21309 * remote-utils.c (remote_open): Print a status notice after
21310 opening a TCP port.
21311 * server.c (attach_inferior): Print a status notice after
21314 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21316 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
21318 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
21320 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
21322 * server.c, target.h: Update copyright years.
21324 2004-02-25 Roland McGrath <roland@redhat.com>
21326 * target.h (struct target_ops): New member `read_auxv'.
21327 * server.c (handle_query): Handle qPart:auxv:read: query using that.
21328 * linux-low.c (linux_read_auxv): New function.
21329 (linux_target_ops): Initialize `read_auxv' member to that.
21331 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
21333 Committed by Jim Blandy <jimb@redhat.com>.
21335 * linux-s390-low.c (s390_num_regs): Update.
21336 (s390_regmap): Remove control registers. Use __s390x__ predefine
21337 instead of GPR_SIZE to distiguish s390 and s390x targets.
21339 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
21341 * linux-low.c: Update copyright year.
21342 (check_removed_breakpoint): Clear pending_is_breakpoint.
21343 (linux_set_resume_request, linux_queue_one_thread)
21344 (resume_status_pending_p): New functions.
21345 (linux_continue_one_thread): Use process->resume.
21346 (linux_resume): Only resume threads if there are no pending events.
21347 * linux-low.h (struct process_info): Add resume request
21350 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
21352 * regcache.c (new_register_cache): Clear the allocated register
21353 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
21355 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
21357 * linux-low.c (linux_resume): Take a struct thread_resume *
21359 (linux_wait): Update call.
21360 (resume_ptr): New static variable.
21361 (linux_continue_one_thread): Renamed from
21362 linux_continue_one_process. Use resume_ptr.
21363 (linux_resume): Use linux_continue_one_thread.
21364 * server.c (handle_v_cont, handle_v_requests): New functions.
21365 (myresume): New function.
21366 (main): Handle 'v' case.
21367 * target.h (struct thread_resume): New type.
21368 (struct target_ops): Change argument of "resume" to struct
21370 (myresume): Delete macro.
21372 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
21374 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
21375 (uninstall): Support DESTDIR.
21377 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
21379 * configure.srv: Add xscale*linux copy of arm*linux entry.
21381 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
21383 * linux-arm-low.c (arm_reinsert_addr): New function.
21384 (the_low_target): Add arm_reinsert_addr.
21386 2003-07-08 Mark Kettenis <kettenis@gnu.org>
21388 * mem-break.c: Remove whitespace at end of file.
21390 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21392 * configure.in: Check whether we need to prototype strerror.
21393 * server.h: Optionally prototype strerror.
21394 * gdbreplay.c (perror_with_name): Use strerror.
21395 * linux-low.c (linux_attach_lwp): Use strerror.
21396 * utils.c (perror_with_name): Use strerror.
21397 * config.in, configure: Regenerated.
21399 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21401 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
21402 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
21404 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
21406 * Makefile.in (SFILES): Update.
21407 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
21408 low-sun3.c: Remove files.
21410 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
21412 * linux-low.c: Move comment to linux_thread_alive where it belonged.
21413 (linux_detach_one_process, linux_detach): New functions.
21414 (linux_target_ops): Add linux_detach.
21415 * server.c (main): Handle 'D' packet.
21416 * target.h (struct target_ops): Add "detach" member.
21417 (detach_inferior): Define.
21419 2003-06-13 Mark Kettenis <kettenis@gnu.org>
21421 From Kelley Cook <kelleycook@wideopenwest.com>:
21422 * configure.srv: Accept i[34567]86 variants.
21424 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
21426 * linux-low.c (linux_wait_for_event): Correct comment typos.
21427 (linux_resume_one_process): Call check_removed_breakpoint.
21428 (linux_send_signal): New function.
21429 (linux_target_ops): Add linux_send_signal.
21430 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
21432 * target.h (struct target_ops): Add send_signal.
21434 2003-05-29 Jim Blandy <jimb@redhat.com>
21436 * linux-low.c (usr_store_inferior_registers): Transfer buf in
21437 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
21438 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
21439 away part of the register's value.
21441 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
21443 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
21444 (linux_wait_for_event, linux_init_signals): Likewise.
21446 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
21448 * configure.in: Check for stdlib.h.
21449 * configure: Regenerated.
21450 * config.in: Regenerated.
21452 2003-01-04 Andreas Schwab <schwab@suse.de>
21454 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
21456 2003-01-02 Andrew Cagney <ac131313@redhat.com>
21458 * Makefile.in: Remove obsolete code.
21460 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
21462 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
21463 defined(PT_FPR0_HI).
21465 2002-11-17 Stuart Hughes <seh@zee2.com>
21467 * linux-arm-low.c (arm_num_regs): Increase.
21468 (arm_regmap): Include status register.
21470 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
21472 * linux-low.c (register_addr): Remove incorrect -1 check.
21474 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
21476 * linux-low.c (linux_create_inferior): Call setpgid. Return
21478 (unstopped_p, linux_signal_pid): Remove.
21479 (linux_target_ops): Remove linux_signal_pid.
21480 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
21481 global instead of target method.
21482 * target.h (struct target_ops): Remove signal_pid. Update comment
21483 for create_inferior.
21484 * server.c (signal_pid): New variable.
21485 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
21486 gdbserver. Set the child to be the foreground process group.
21487 (attach_inferior): Set signal_pid.
21489 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
21491 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
21493 2002-08-20 Jim Blandy <jimb@redhat.com>
21495 * Makefile.in (LDFLAGS): Allow the configure script to establish a
21498 2002-08-01 Andrew Cagney <cagney@redhat.com>
21500 * Makefile.in: Make chill references obsolete.
21502 2002-07-24 Kevin Buettner <kevinb@redhat.com>
21504 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
21505 * configure: Regenerate.
21506 * config.in: Regenerate.
21508 2002-07-09 David O'Brien <obrien@FreeBSD.org>
21510 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
21511 (perror_with_name, remote_close, remote_open, expect, play): Static.
21513 2002-07-04 Michal Ludvig <mludvig@suse.cz>
21515 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
21516 byte offsets instead of an array of indexes.
21517 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
21519 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
21521 * regcache.c: Add comment.
21523 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
21525 * thread-db.c: New file.
21526 * proc-service.c: New file.
21527 * acinclude.m4: New file.
21528 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
21529 proc-service.o, and thread-db.o.
21530 (linux-low.o): Add USE_THREAD_DB.
21531 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
21532 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
21533 * aclocal.m4: Regenerated.
21534 * config.in: Regenerated.
21535 * configure: Regenerated.
21536 * configure.in: Check for proc_service.h, sys/procfs.h,
21537 thread_db.h, and linux/elf.h headrs.
21538 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
21539 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
21540 Check for -lthread_db and thread support.
21541 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
21542 PowerPC, and SuperH.
21543 * i387-fp.c: Constify arguments.
21544 * i387-fp.h: Likewise.
21545 * inferiors.c: (struct thread_info): Renamed from
21546 `struct inferior_info'. Remove PID member. Use generic inferior
21547 list header. All uses updated.
21548 (inferiors, signal_pid): Removed.
21549 (all_threads): New variable.
21550 (get_thread): Define.
21551 (add_inferior_to_list): New function.
21552 (for_each_inferior): New function.
21553 (change_inferior_id): New function.
21554 (add_inferior): Removed.
21555 (remove_inferior): New function.
21556 (add_thread): New function.
21557 (free_one_thread): New function.
21558 (remove_thread): New function.
21559 (clear_inferiors): Use for_each_inferior and free_one_thread.
21560 (find_inferior): New function.
21561 (find_inferior_id): New function.
21562 (inferior_target_data): Update argument type.
21563 (set_inferior_target_data): Likewise.
21564 (inferior_regcache_data): Likewise.
21565 (set_inferior_regcache_data): Likewise.
21566 * linux-low.c (linux_bp_reinsert): Remove.
21567 (all_processes, stopping_threads, using_thrads)
21568 (struct pending_signals, debug_threads, pid_of): New.
21569 (inferior_pid): Replace with macro.
21570 (struct inferior_linux_data): Remove.
21571 (get_stop_pc, add_process): New functions.
21572 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
21573 Use add_process and add_thread.
21574 (linux_attach_lwp): New function, based on old linux_attach. Use
21575 add_process and add_thread. Set stop_expected for new threads.
21576 (linux_attach): New function.
21577 (linux_kill_one_process): New function.
21578 (linux_kill): Kill all LWPs.
21579 (linux_thread_alive): Use find_inferior_id.
21580 (check_removed_breakpoints, status_pending_p): New functions.
21581 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
21582 Update. Use WNOHANG. Wait for cloned processes also. Update process
21583 struct for the found process.
21584 (linux_wait_for_event): New function.
21585 (linux_wait): Use it. Support LWPs.
21586 (send_sigstop, wait_for_sigstop, stop_all_processes)
21587 (linux_resume_one_process, linux_continue_one_process): New functions.
21588 (linux_resume): Support LWPs.
21589 (REGISTER_RAW_SIZE): Remove.
21590 (fetch_register): Use register_size instead. Call supply_register.
21591 (usr_store_inferior_registers): Likewise. Call collect_register.
21592 Fix recursive case.
21593 (regsets_fetch_inferior_registers): Improve error message.
21594 (regsets_store_inferior_registers): Add debugging.
21595 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
21596 (unstopped_p, linux_signal_pid): New functions.
21597 (linux_target_ops): Add linux_signal_pid.
21598 (linux_init_signals): New function.
21599 (initialize_low): Call it. Initialize using_threads.
21600 * regcache.c (inferior_regcache_data): Add valid
21602 (get_regcache): Fetch registers lazily. Add fetch argument
21603 and update all callers.
21604 (regcache_invalidate_one, regcache_invalidate): New
21606 (new_register_cache): Renamed from create_register_cache.
21607 Return the new regcache.
21608 (free_register_cache): Change argument to a void *.
21609 (registers_to_string, registers_from_string): Call get_regcache
21610 with fetch flag set.
21611 (register_data): Make static. Pass fetch flag to get_regcache.
21612 (supply_register): Call get_regcache with fetch flag clear.
21613 (collect_register): Call get_regcache with fetch flag set.
21614 (collect_register_as_string): New function.
21615 * regcache.h: Update.
21616 * remote-utils.c (putpkt): Flush after debug output and use
21618 Handle input interrupts while waiting for an ACK.
21619 (input_interrupt): Use signal_pid method.
21620 (getpkt): Flush after debug output and use stderr.
21621 (outreg): Use collect_register_as_string.
21622 (new_thread_notify, dead_thread_notify): New functions.
21623 (prepare_resume_reply): Check using_threads. Set thread_from_wait
21624 and general_thread.
21625 (look_up_one_symbol): Flush after debug output.
21626 * server.c (step_thread, server_waiting): New variables.
21627 (start_inferior): Don't use signal_pid. Update call to mywait.
21628 (attach_inferior): Update call to mywait.
21629 (handle_query): Handle qfThreadInfo and qsThreadInfo.
21630 (main): Don't fetch/store registers explicitly. Use
21631 set_desired_inferior. Support proposed ``Hs'' packet. Update
21633 * server.h: Update.
21634 (struct inferior_list, struct_inferior_list_entry): New.
21635 * target.c (set_desired_inferior): New.
21636 (write_inferior_memory): Constify.
21637 (mywait): New function.
21638 * target.h: Update.
21639 (struct target_ops): New signal_pid method.
21640 (mywait): Removed macro, added prototype.
21642 * linux-low.h (regset_func): Removed.
21643 (regset_fill_func, regset_store_func): New.
21644 (enum regset_type): New.
21645 (struct regset_info): Add type field. Use new operation types.
21646 (struct linux_target_ops): stop_pc renamed to get_pc.
21647 Add decr_pc_after_break and breakpoint_at.
21648 (get_process, get_thread_proess, get_process_thread)
21649 (strut process_info, all_processes, linux_attach_lwp)
21650 (thread_db_init): New.
21652 * linux-arm-low.c (arm_get_pc, arm_set_pc,
21653 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
21654 (the_low_target): Add new members.
21655 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
21656 (i386_store_fpxregset): Constify.
21657 (target_regsets): Add new kind identifier.
21658 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
21659 (i386_set_pc): Add debugging.
21660 (i386_breakpoint_at): New function.
21661 (the_low_target): Add new members.
21662 * linux-mips-low.c (mips_get_pc, mips_set_pc)
21663 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
21664 (mips_breakpoint_at): New.
21665 (the_low_target): Add new members.
21666 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
21667 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
21668 (the_low_target): Add new members.
21669 * linux-sh-low.c (sh_get_pc, sh_set_pc)
21670 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
21671 (the_low_target): Add new members.
21672 * linux-x86-64-low.c (target_regsets): Add new kind
21675 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
21677 From Martin Pool <mbp@samba.org>:
21678 * server.c (gdbserver_usage): New function.
21681 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
21683 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
21684 stop_at -> stop_pc.
21686 2002-05-04 Andrew Cagney <ac131313@redhat.com>
21688 * Makefile.in: Remove obsolete code.
21690 2002-04-24 Michal Ludvig <mludvig@suse.cz>
21692 * linux-low.c (regsets_fetch_inferior_registers),
21693 (regsets_store_inferior_registers): Removed cast to int from
21695 * regcache.h: Added declaration of struct inferior_info.
21697 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21699 * inferiors.c (struct inferior_info): Add regcache_data.
21700 (add_inferior): Call create_register_cache.
21701 (clear_inferiors): Call free_register_cache.
21702 (inferior_regcache_data, set_inferior_regcache_data): New functions.
21703 * regcache.c (struct inferior_regcache_data): New.
21704 (registers): Remove.
21705 (get_regcache): New function.
21706 (create_register_cache, free_register_cache): New functions.
21707 (set_register_cache): Don't initialize the register cache here.
21708 (registers_to_string, registers_from_string, register_data): Call
21710 * regcache.h: Add prototypes.
21711 * server.h: Likewise.
21713 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21715 * mem-break.c: New file.
21716 * mem-break.h: New file.
21717 * Makefile.in: Add mem-break.o rule; update server.h
21719 * inferiors.c (struct inferior_info): Add target_data
21721 (clear_inferiors): Free target_data member if set.
21722 (inferior_target_data, set_inferior_target_data): New functions.
21723 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
21724 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
21725 * linux-low.c (linux_bp_reinsert): New variable.
21726 (struct inferior_linux_data): New.
21727 (linux_create_inferior): Use set_inferior_target_data.
21728 (linux_attach): Likewise. Call add_inferior.
21729 (linux_wait_for_one_inferior): New function.
21730 (linux_wait): Call it.
21731 (linux_write_memory): Add const.
21732 (initialize_low): Call set_breakpoint_data.
21733 * linux-low.h (struct linux_target_ops): Add breakpoint
21735 * server.c (attach_inferior): Remove extra add_inferior
21737 * server.h: Include mem-break.h. Update inferior.c
21739 * target.c (read_inferior_memory)
21740 (write_inferior_memory): New functions.
21741 * target.h (read_inferior_memory)
21742 (write_inferior_memory): Change macros to prototypes.
21743 (struct target_ops): Update comments. Add const to write_memory
21746 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
21748 * linux-low.c (usr_store_inferior_registers): Support
21749 registers which are allowed to fail to store.
21750 * linux-low.h (linux_target_ops): Likewise.
21751 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
21752 (ppc_cannot_store_register): FPSCR may not be storable.
21754 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21756 * server.h: Include <string.h> if HAVE_STRING_H.
21757 * ChangeLog: Correct paths in last ChangeLog entry.
21759 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21761 * linux-low.h: Remove obsolete prototypes.
21762 (struct linux_target_ops): New.
21763 (extern the_low_target): New.
21764 * linux-low.c (num_regs, regmap): Remove declarations.
21765 (register_addr): Use the_low_target explicitly.
21766 (fetch_register): Likewise.
21767 (usr_fetch_inferior_registers): Likewise.
21768 (usr_store_inferior_registers): Likewise.
21769 * linux-arm-low.c (num_regs): Remove.
21770 (arm_num_regs): Define.
21771 (arm_regmap): Renamed from regmap, made static.
21772 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
21774 (arm_cannot_store_register): Renamed from cannot_store_register,
21776 (the_low_target): New.
21777 * linux-i386-low.c (num_regs): Remove.
21778 (i386_num_regs): Define.
21779 (i386_regmap): Renamed from regmap, made static.
21780 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
21782 (i386_cannot_store_register): Renamed from cannot_store_register,
21784 (the_low_target): New.
21785 * linux-ia64-low.c (num_regs): Remove.
21786 (ia64_num_regs): Define.
21787 (ia64_regmap): Renamed from regmap, made static.
21788 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
21790 (ia64_cannot_store_register): Renamed from cannot_store_register,
21792 (the_low_target): New.
21793 * linux-m68k-low.c (num_regs): Remove.
21794 (m68k_num_regs): Define.
21795 (m68k_regmap): Renamed from regmap, made static.
21796 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
21798 (m68k_cannot_store_register): Renamed from cannot_store_register,
21800 (the_low_target): New.
21801 * linux-mips-low.c (num_regs): Remove.
21802 (mips_num_regs): Define.
21803 (mips_regmap): Renamed from regmap, made static.
21804 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
21806 (mips_cannot_store_register): Renamed from cannot_store_register,
21808 (the_low_target): New.
21809 * linux-ppc-low.c (num_regs): Remove.
21810 (ppc_num_regs): Define.
21811 (ppc_regmap): Renamed from regmap, made static.
21812 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
21814 (ppc_cannot_store_register): Renamed from cannot_store_register,
21816 (the_low_target): New.
21817 * linux-s390-low.c (num_regs): Remove.
21818 (s390_num_regs): Define.
21819 (s390_regmap): Renamed from regmap, made static.
21820 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
21822 (s390_cannot_store_register): Renamed from cannot_store_register,
21824 (the_low_target): New.
21825 * linux-sh-low.c (num_regs): Remove.
21826 (sh_num_regs): Define.
21827 (sh_regmap): Renamed from regmap, made static.
21828 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
21830 (sh_cannot_store_register): Renamed from cannot_store_register,
21832 (the_low_target): New.
21833 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
21834 (the_low_target): New.
21836 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21838 * Makefile.in: Add stamp-h target.
21839 * configure.in: Create stamp-h.
21840 * configure: Regenerated.
21842 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21844 * inferiors.c: New file.
21845 * target.c: New file.
21846 * target.h: New file.
21847 * Makefile.in: Add target.o and inferiors.o. Update
21849 * linux-low.c (inferior_pid): New static variable,
21850 moved from server.c.
21851 (linux_create_inferior): Renamed from create_inferior.
21852 Call add_inferior. Return 0 on success instead of a PID.
21853 (linux_attach): Renamed from myattach.
21854 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
21855 (linux_thread_alive): Renamed from mythread_alive.
21856 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
21858 (linux_resume): Renamed from myresume. Add missing ``return 0''.
21859 (regsets_store_inferior_registers): Correct error message.
21860 Add missing ``return 0''.
21861 (linux_fetch_registers): Renamed from fetch_inferior_registers.
21862 (linux_store_registers): Renamed from store_inferior_registers.
21863 (linux_read_memory): Renamed from read_inferior_memory.
21864 (linux_write_memory): Renamed from write_inferior_memory.
21865 (linux_target_ops): New structure.
21866 (initialize_low): Call set_target_ops ().
21867 * remote-utils.c (unhexify): New function.
21868 (hexify): New function.
21869 (input_interrupt): Send signals to ``signal_pid''.
21870 * server.c (inferior_pid): Remove.
21871 (start_inferior): Update create_inferior call.
21872 (attach_inferior): Call add_inferior.
21873 (handle_query): New function.
21874 (main): Call handle_query for `q' packets.
21875 * server.h: Include "target.h". Remove obsolete prototypes.
21876 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
21878 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21880 * Makefile.in: Add WARN_CFLAGS. Update configury
21882 * configure.in: Check for <string.h>
21883 * configure: Regenerate.
21884 * config.in: Regenerate.
21885 * gdbreplay.c: Include needed system headers.
21886 (remote_open): Remove strchr prototype.
21887 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
21888 * regcache.c (supply_register): Change buf argument to const void *.
21889 (supply_register_by_name): Likewise.
21890 (collect_register): Change buf argument to void *.
21891 (collect_register_by_name): Likewise.
21892 * regcache.h: Add missing prototypes.
21893 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
21894 * server.c (handle_query): New function.
21895 (attached): New static variable, moved out of main.
21896 (main): Quiet longjmp clobber warnings.
21897 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
21898 * utils.c (error): Remove NORETURN.