Use reinsert_breakpoint for vCont;s
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2016-07-21 Yao Qi <yao.qi@linaro.org>
2
3 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4 is resume_step, call maybe_hw_step.
5 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
6 and unstop them.
7 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
8 breakpoints or not.
9 (proceed_one_lwp): If resume request is resume_step, install
10 reinsert breakpoints and call maybe_hw_step.
11
12 2016-07-21 Yao Qi <yao.qi@linaro.org>
13
14 * linux-low.c (proceed_one_lwp): Declare.
15 (linux_resume_one_thread): Remove local variable 'step'.
16 Lift code enqueue signal. Call proceed_one_lwp instead of
17 linux_resume_one_lwp.
18
19 2016-07-21 Yao Qi <yao.qi@linaro.org>
20
21 * linux-low.c (linux_resume_one_thread): Call
22 enqueue_pending_signal.
23
24 2016-07-21 Yao Qi <yao.qi@linaro.org>
25
26 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
27 * inferiors.c (do_restore_current_thread_cleanup): New function.
28 (make_cleanup_restore_current_thread): Likewise.
29 * linux-low.c (install_software_single_step_breakpoints): Call
30 make_cleanup_restore_current_thread. Switch current_thread to
31 thread.
32
33 2016-07-21 Yao Qi <yao.qi@linaro.org>
34
35 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
36 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
37 (clone_one_breakpoint): Likewise.
38 (delete_reinsert_breakpoints): Change parameter to thread.
39 Callers updated.
40 (has_reinsert_breakpoints): Likewise.
41 (uninsert_reinsert_breakpoints): Likewise.
42 (reinsert_reinsert_breakpoints): Likewise.
43 * mem-break.h (set_reinsert_breakpoint): Update declaration.
44 (delete_reinsert_breakpoints): Likewise.
45 (reinsert_reinsert_breakpoints): Likewise.
46 (uninsert_reinsert_breakpoints): Likewise.
47 (has_reinsert_breakpoints): Likewise.
48
49 2016-07-21 Yao Qi <yao.qi@linaro.org>
50
51 * inferiors.c (get_thread_process): Make parameter const.
52 * inferiors.h (get_thread_process): Update declaration.
53 * mem-break.c (clone_all_breakpoints): Remove all parameters.
54 Add new parameters child_thread and parent_thread. Callers
55 updated.
56 * mem-break.h (clone_all_breakpoints): Update declaration.
57
58 2016-07-21 Yao Qi <yao.qi@linaro.org>
59
60 * mem-break.c (struct breakpoint) <cond_list>: Remove.
61 <command_list, handler>: Remove.
62 (struct gdb_breakpoint): New.
63 (struct other_breakpoint): New.
64 (struct reinsert_breakpoint): New.
65 (is_gdb_breakpoint): New function.
66 (any_persistent_commands): Update command_list if
67 is_gdb_breakpoint returns true.
68 (set_breakpoint): Create breakpoints according to their types.
69 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
70 (set_gdb_breakpoint_1): Likewise.
71 (set_gdb_breakpoint): Likewise.
72 (clear_breakpoint_conditions): Change parameter type to
73 'struct gdb_breakpoint *'.
74 (clear_breakpoint_commands): Likewise.
75 (clear_breakpoint_conditions_and_commands): Likewise.
76 (add_condition_to_breakpoint): Likewise.
77 (add_breakpoint_condition): Likewise.
78 (add_commands_to_breakpoint): Likewise.
79 (check_breakpoints): Check other_breakpoint.
80 (clone_one_breakpoint): Clone breakpopint according to its type.
81 * mem-break.h (struct gdb_breakpoint): Declare.
82 (set_gdb_breakpoint): Update declaration.
83 (clear_breakpoint_conditions_and_commands): Likewise.
84 (add_breakpoint_condition): Likewise.
85 (add_breakpoint_commands): Likewise.
86 * server.c (process_point_options): Change parameter type to
87 'struct gdb_breakpoint *'.
88
89 2016-07-21 Yao Qi <yao.qi@linaro.org>
90
91 * mem-break.c (set_breakpoint_at): Rename it to ...
92 (set_breakpoint_type_at): ... it.
93 (set_breakpoint_at): Call set_breakpoint_type_at.
94 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
95 * mem-break.h (set_breakpoint_at): Update comments.
96
97 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
98
99 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
100 to buf parameter.
101 (nios2_store_gregset): Likewise.
102
103 2016-07-01 Pedro Alves <palves@redhat.com>
104 Antoine Tremblay <antoine.tremblay@ericsson.com>
105
106 * linux-low.c: Change interface to take the target lwp_info
107 pointer directly and return void. Handle detaching from a zombie
108 thread.
109 (linux_detach_lwp_callback): New function.
110 (linux_detach): Detach from the leader thread after detaching from
111 the clone threads.
112
113 2016-06-28 Yao Qi <yao.qi@linaro.org>
114
115 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
116 for variable new_offset.
117 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
118 (aarch64_ftrace_insn_reloc_cb): Likewise.
119 (aarch64_ftrace_insn_reloc_tb): Likewise.
120 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
121 PRIx64 instead of PRIx32.
122
123 2016-06-28 Yao Qi <yao.qi@linaro.org>
124
125 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
126 (the_low_target): Install arm_get_syscall_trapinfo.
127
128 2016-06-28 Yao Qi <yao.qi@linaro.org>
129
130 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
131 function.
132 (the_low_target): Install aarch64_get_syscall_trapinfo.
133
134 2016-06-28 Yao Qi <yao.qi@linaro.org>
135
136 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
137 Callers updated.
138 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
139 Remove parameter sysno.
140 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
141 sysret.
142
143 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
144
145 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
146 (s390_emit_ne_goto): Likewise.
147 (s390_emit_lt_goto): Likewise.
148 (s390_emit_le_goto): Likewise.
149 (s390_emit_gt_goto): Likewise.
150 (s390_emit_ge_goto): Likewise.
151 (s390x_emit_eq_goto): Likewise.
152 (s390x_emit_ne_goto): Likewise.
153 (s390x_emit_lt_goto): Likewise.
154 (s390x_emit_le_goto): Likewise.
155 (s390x_emit_gt_goto): Likewise.
156 (s390x_emit_ge_goto): Likewise.
157 (s390_emit_ops_impl): Mark variable static.
158 (s390x_emit_ops): Likewise.
159
160 2016-06-17 Yao Qi <yao.qi@linaro.org>
161
162 * linux-low.c (handle_extended_wait): Call
163 uninsert_reinsert_breakpoints for the parent process. Remove
164 reinsert breakpoints from the child process. Reinsert them to
165 the parent process when vfork is done.
166 * mem-break.c (uninsert_reinsert_breakpoints): New function.
167 (reinsert_reinsert_breakpoints): New function.
168 * mem-break.h (uninsert_reinsert_breakpoints): Declare
169 (reinsert_reinsert_breakpoints): Declare.
170
171 2016-06-17 Yao Qi <yao.qi@linaro.org>
172
173 * linux-low.c (handle_extended_wait): If the parent is doing
174 step-over, remove the reinsert breakpoints from the forked child.
175
176 2016-06-17 Yao Qi <yao.qi@linaro.org>
177
178 * linux-low.c (unsuspend_all_lwps): Declare.
179 (linux_low_filter_event): If thread exited, call finish_step_over.
180 If step-over is finished, unsuspend other threads.
181
182 2016-06-17 Yao Qi <yao.qi@linaro.org>
183
184 * linux-low.c (linux_resume_one_lwp_throw): Assert
185 has_reinsert_breakpoints returns false.
186 * mem-break.c (delete_disabled_breakpoints): Assert
187 bp type isn't reinsert_breakpoint.
188
189 2016-06-17 Yao Qi <yao.qi@linaro.org>
190
191 * linux-low.c (maybe_hw_step): New function.
192 (linux_resume_one_lwp_throw): Call maybe_hw_step.
193 (finish_step_over): Switch current_thread to lwp temporarily,
194 and assert has_reinsert_breakpoints returns true.
195 (proceed_one_lwp): Call maybe_hw_step.
196 * mem-break.c (has_reinsert_breakpoints): New function.
197 * mem-break.h (has_reinsert_breakpoints): Declare.
198
199 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
200
201 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
202
203 2016-05-17 Yao Qi <yao.qi@linaro.org>
204
205 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
206 instead of find_inferior.
207
208 2016-05-05 Yao Qi <yao.qi@linaro.org>
209
210 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
211 Initialize res to zero.
212
213 2016-05-05 Yao Qi <yao.qi@linaro.org>
214
215 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
216 to uint32_t.
217
218 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
219
220 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
221 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
222 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
223
224 2016-04-28 Par Olsson <par.olsson@windriver.com>
225 Simon Marchi <simon.marchi@ericsson.com>
226
227 * tracepoint.c (write_inferior_int8): New function.
228 (cmd_qtenable_disable): Write enable flag using
229 write_inferior_int8.
230
231 2016-04-25 Yao Qi <yao.qi@linaro.org>
232
233 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
234 (need_step_over_p): Return zero if the LWP has pending signals
235 can be delivered on software single step target.
236
237 2016-04-25 Yao Qi <yao.qi@linaro.org>
238
239 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
240 return instead of error.
241
242 2016-04-22 Yao Qi <yao.qi@linaro.org>
243
244 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
245 to 23.
246
247 2016-04-22 Yao Qi <yao.qi@linaro.org>
248
249 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
250 signal when stepping over breakpoint with software single
251 step.
252
253 2016-04-21 Pedro Alves <palves@redhat.com>
254
255 * linux-s390-low.c (s390_collect_ptrace_register)
256 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
257 add casts.
258 (s390_check_regset): Use void * instead of gdb_byte *.
259
260 2016-04-20 Pedro Alves <palves@redhat.com>
261
262 * configure: Renegerate.
263
264 2016-04-20 Yao Qi <yao.qi@linaro.org>
265
266 * linux-aarch32-low.c: Include "arch/arm-linux.h".
267 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
268 number 16.
269 (arm_store_gregset): Likewise.
270
271 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
272
273 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
274 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
275 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
276 (amd64-avx-mpx-linux.c): New rules.
277 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
278 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
279 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
280 (srv_amd64_regobj): Add amd64-avx-mpx.o.
281 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
282 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
283 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
284 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
285 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
286 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
287 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
288 * linux-x86-low.c (x86_linux_read_description): Add case for
289 X86_XSTATE_AVX_MPX_MASK.
290 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
291 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
292 init_registers_i386_avx_mpx_linux.
293 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
294 (initialize_low_tracepoint): Call
295 init_registers_i386_avx_mpx_linux.
296 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
297 (initialize_low_tracepoint): Call
298 init_registers_amd64_avx_mpx_linux.
299 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
300 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
301 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
302 declarations.
303
304 2016-04-18 Pedro Alves <palves@redhat.com>
305
306 * configure: Regenerate.
307
308 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
309
310 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
311 (aarch64_emit_sub): Likewise.
312
313 2016-04-12 Pedro Alves <palves@redhat.com>
314
315 * utils.c (prepare_to_throw_exception): Delete.
316
317 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
318
319 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
320
321 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
322
323 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
324
325 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
326
327 * linux-aarch64-ipa.c: Add <elf.h> include.
328 * linux-ppc-ipa.c: Add <elf.h> include.
329 * linux-s390-ipa.c: Add <elf.h> include.
330
331 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
332
333 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
334 (get_raw_reg_ptr): Likewise.
335 (get_trace_state_variable_value_ptr): Likewise.
336 (set_trace_state_variable_value_ptr): Likewise.
337 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
338 char *.
339
340 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
341 Marcin Kościelnicki <koriakin@0x04.net>
342
343 PR/17221
344 * linux-ppc-low.c (emit_insns): New function.
345 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
346 (ppc_emit_prologue): New function.
347 (ppc_emit_epilogue): New function.
348 (ppc_emit_add): New function.
349 (ppc_emit_sub): New function.
350 (ppc_emit_mul): New function.
351 (ppc_emit_lsh): New function.
352 (ppc_emit_rsh_signed): New function.
353 (ppc_emit_rsh_unsigned): New function.
354 (ppc_emit_ext): New function.
355 (ppc_emit_zero_ext): New function.
356 (ppc_emit_log_not): New function.
357 (ppc_emit_bit_and): New function.
358 (ppc_emit_bit_or): New function.
359 (ppc_emit_bit_xor): New function.
360 (ppc_emit_bit_not): New function.
361 (ppc_emit_equal): New function.
362 (ppc_emit_less_signed): New function.
363 (ppc_emit_less_unsigned): New function.
364 (ppc_emit_ref): New function.
365 (ppc_emit_const): New function.
366 (ppc_emit_reg): New function.
367 (ppc_emit_pop): New function.
368 (ppc_emit_stack_flush): New function.
369 (ppc_emit_swap): New function.
370 (ppc_emit_stack_adjust): New function.
371 (ppc_emit_call): New function.
372 (ppc_emit_int_call_1): New function.
373 (ppc_emit_void_call_2): New function.
374 (ppc_emit_if_goto): New function.
375 (ppc_emit_goto): New function.
376 (ppc_emit_eq_goto): New function.
377 (ppc_emit_ne_goto): New function.
378 (ppc_emit_lt_goto): New function.
379 (ppc_emit_le_goto): New function.
380 (ppc_emit_gt_goto): New function.
381 (ppc_emit_ge_goto): New function.
382 (ppc_write_goto_address): New function.
383 (ppc_emit_ops_impl): New static variable.
384 (ppc64v1_emit_prologue): New function.
385 (ppc64v2_emit_prologue): New function.
386 (ppc64_emit_epilogue): New function.
387 (ppc64_emit_add): New function.
388 (ppc64_emit_sub): New function.
389 (ppc64_emit_mul): New function.
390 (ppc64_emit_lsh): New function.
391 (ppc64_emit_rsh_signed): New function.
392 (ppc64_emit_rsh_unsigned): New function.
393 (ppc64_emit_ext): New function.
394 (ppc64_emit_zero_ext): New function.
395 (ppc64_emit_log_not): New function.
396 (ppc64_emit_bit_and): New function.
397 (ppc64_emit_bit_or): New function.
398 (ppc64_emit_bit_xor): New function.
399 (ppc64_emit_bit_not): New function.
400 (ppc64_emit_equal): New function.
401 (ppc64_emit_less_signed): New function.
402 (ppc64_emit_less_unsigned): New function.
403 (ppc64_emit_ref): New function.
404 (ppc64_emit_const): New function.
405 (ppc64v1_emit_reg): New function.
406 (ppc64v2_emit_reg): New function.
407 (ppc64_emit_pop): New function.
408 (ppc64_emit_stack_flush): New function.
409 (ppc64_emit_swap): New function.
410 (ppc64v1_emit_call): New function.
411 (ppc64v2_emit_call): New function.
412 (ppc64v1_emit_int_call_1): New function.
413 (ppc64v2_emit_int_call_1): New function.
414 (ppc64v1_emit_void_call_2): New function.
415 (ppc64v2_emit_void_call_2): New function.
416 (ppc64_emit_if_goto): New function.
417 (ppc64_emit_eq_goto): New function.
418 (ppc64_emit_ne_goto): New function.
419 (ppc64_emit_lt_goto): New function.
420 (ppc64_emit_le_goto): New function.
421 (ppc64_emit_gt_goto): New function.
422 (ppc64_emit_ge_goto): New function.
423 (ppc64v1_emit_ops_impl): New static variable.
424 (ppc64v2_emit_ops_impl): New static variable.
425 (ppc_emit_ops): New function.
426 (linux_low_target): Wire in ppc_emit_ops.
427
428 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
429 Marcin Kościelnicki <koriakin@0x04.net>
430
431 PR/17221
432 * Makefile.in: Add powerpc-*-ipa.o
433 * configure.srv: Add ipa_obj for powerpc*-linux.
434 * linux-ppc-ipa.c: New file.
435 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
436 includes.
437 (PPC_FIELD): New macro.
438 (PPC_SEXT): New macro.
439 (PPC_OP6): New macro.
440 (PPC_BO): New macro.
441 (PPC_LI): New macro.
442 (PPC_BD): New macro.
443 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
444 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
445 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
446 (ppc_get_thread_area): New function.
447 (is_elfv2_inferior): New function.
448 (gen_ds_form): New function.
449 (GEN_STD): New macro.
450 (GEN_STDU): New macro.
451 (GEN_LD): New macro.
452 (GEN_LDU): New macro.
453 (gen_d_form): New function.
454 (GEN_ADDI): New macro.
455 (GEN_ADDIS): New macro.
456 (GEN_LI): New macro.
457 (GEN_LIS): New macro.
458 (GEN_ORI): New macro.
459 (GEN_ORIS): New macro.
460 (GEN_LWZ): New macro.
461 (GEN_STW): New macro.
462 (GEN_STWU): New macro.
463 (gen_xfx_form): New function.
464 (GEN_MFSPR): New macro.
465 (GEN_MTSPR): New macro.
466 (GEN_MFCR): New macro.
467 (GEN_MTCR): New macro.
468 (GEN_SYNC): New macro.
469 (GEN_LWSYNC): New macro.
470 (gen_x_form): New function.
471 (GEN_OR): New macro.
472 (GEN_MR): New macro.
473 (GEN_LWARX): New macro.
474 (GEN_STWCX): New macro.
475 (GEN_CMPW): New macro.
476 (gen_md_form): New function.
477 (GEN_RLDICL): New macro.
478 (GEN_RLDICR): New macro.
479 (gen_i_form): New function.
480 (GEN_B): New macro.
481 (GEN_BL): New macro.
482 (gen_b_form): New function.
483 (GEN_BNE): New macro.
484 (GEN_LOAD): New macro.
485 (GEN_STORE): New macro.
486 (gen_limm): New function.
487 (gen_atomic_xchg): New function.
488 (gen_call): New function.
489 (ppc_relocate_instruction): New function.
490 (ppc_install_fast_tracepoint_jump_pad): New function.
491 (ppc_get_min_fast_tracepoint_insn_len): New function.
492 (ppc_get_ipa_tdesc_idx): New function.
493 (the_low_target): Wire in the new functions.
494 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
495 tdescs.
496 * linux-ppc-tdesc.h: New file.
497
498 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
499
500 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
501 (alloc_jump_pad_buffer): New function.
502 * linux-amd64-ipa.c: Add <sys/mman.h> include.
503 (alloc_jump_pad_buffer): New function.
504 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
505 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
506 (alloc_jump_pad_buffer): New function.
507 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
508 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
509 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
510 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
511
512 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
513
514 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
515 * linux-amd64-ipa.c: Likewise.
516 * linux-i386-ipa.c: Likewise.
517 * linux-s390-ipa.c: Likewise.
518 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
519 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
520 set_trace_state_variable_value_ptr.
521 (struct ipa_sym_addresses): Likewise.
522 (symbol_list): Likewise.
523 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
524 accessing gdb_collect directly.
525 (gdb_collect_ptr_type): New typedef.
526 (get_raw_reg_ptr_type): New typedef.
527 (get_trace_state_variable_value_ptr_type): New typedef.
528 (set_trace_state_variable_value_ptr_type): New typedef.
529 (gdb_collect_ptr): New global.
530 (get_raw_reg_ptr): New global.
531 (get_trace_state_variable_value_ptr): New global.
532 (set_trace_state_variable_value_ptr): New global.
533 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
534 accessing get_raw_reg directly.
535 (get_get_tsv_func_addr): Likewise for
536 get_trace_state_variable_value_ptr.
537 (get_set_tsv_func_addr): Likewise for
538 set_trace_state_variable_value_ptr.
539 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
540
541 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
542
543 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
544
545 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
546
547 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
548 packets.
549 (relocate_instruction): Remove own_buf.
550 * server.c (own_buf): Make global.
551 (handle_v_requests): Make global.
552 * server.h (own_buf): New declaration.
553 (handle_v_requests): New prototype.
554
555 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
556
557 PR 18377
558 * linux-s390-low.c (add_insns): New function.
559 (s390_emit_prologue): New function.
560 (s390_emit_epilogue): New function.
561 (s390_emit_add): New function.
562 (s390_emit_sub): New function.
563 (s390_emit_mul): New function.
564 (s390_emit_lsh): New function.
565 (s390_emit_rsh_signed): New function.
566 (s390_emit_rsh_unsigned): New function.
567 (s390_emit_ext): New function.
568 (s390_emit_log_not): New function.
569 (s390_emit_bit_and): New function.
570 (s390_emit_bit_or): New function.
571 (s390_emit_bit_xor): New function.
572 (s390_emit_bit_not): New function.
573 (s390_emit_equal): New function.
574 (s390_emit_less_signed): New function.
575 (s390_emit_less_unsigned): New function.
576 (s390_emit_ref): New function.
577 (s390_emit_if_goto): New function.
578 (s390_emit_goto): New function.
579 (s390_write_goto_address): New function.
580 (s390_emit_litpool): New function.
581 (s390_emit_const): New function.
582 (s390_emit_call): New function.
583 (s390_emit_reg): New function.
584 (s390_emit_pop): New function.
585 (s390_emit_stack_flush): New function.
586 (s390_emit_zero_ext): New function.
587 (s390_emit_swap): New function.
588 (s390_emit_stack_adjust): New function.
589 (s390_emit_set_r2): New function.
590 (s390_emit_int_call_1): New function.
591 (s390_emit_void_call_2): New function.
592 (s390_emit_eq_goto): New function.
593 (s390_emit_ne_goto): New function.
594 (s390_emit_lt_goto): New function.
595 (s390_emit_le_goto): New function.
596 (s390_emit_gt_goto): New function.
597 (s390_emit_ge_goto): New function.
598 (s390x_emit_prologue): New function.
599 (s390x_emit_epilogue): New function.
600 (s390x_emit_add): New function.
601 (s390x_emit_sub): New function.
602 (s390x_emit_mul): New function.
603 (s390x_emit_lsh): New function.
604 (s390x_emit_rsh_signed): New function.
605 (s390x_emit_rsh_unsigned): New function.
606 (s390x_emit_ext): New function.
607 (s390x_emit_log_not): New function.
608 (s390x_emit_bit_and): New function.
609 (s390x_emit_bit_or): New function.
610 (s390x_emit_bit_xor): New function.
611 (s390x_emit_bit_not): New function.
612 (s390x_emit_equal): New function.
613 (s390x_emit_less_signed): New function.
614 (s390x_emit_less_unsigned): New function.
615 (s390x_emit_ref): New function.
616 (s390x_emit_if_goto): New function.
617 (s390x_emit_const): New function.
618 (s390x_emit_call): New function.
619 (s390x_emit_reg): New function.
620 (s390x_emit_pop): New function.
621 (s390x_emit_stack_flush): New function.
622 (s390x_emit_zero_ext): New function.
623 (s390x_emit_swap): New function.
624 (s390x_emit_stack_adjust): New function.
625 (s390x_emit_int_call_1): New function.
626 (s390x_emit_void_call_2): New function.
627 (s390x_emit_eq_goto): New function.
628 (s390x_emit_ne_goto): New function.
629 (s390x_emit_lt_goto): New function.
630 (s390x_emit_le_goto): New function.
631 (s390x_emit_gt_goto): New function.
632 (s390x_emit_ge_goto): New function.
633 (s390_emit_ops): New function.
634 (struct linux_target_ops): Fill in emit_ops hook.
635
636 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
637
638 PR 18377
639 * Makefile.in: Add s390 IPA files.
640 * configure.srv: Build IPA for s390.
641 * linux-s390-ipa.c: New file.
642 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
643 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
644 (tdesc_s390_linux32): Likewise.
645 (init_registers_s390_linux32v1): Likewise.
646 (tdesc_s390_linux32v1): Likewise.
647 (init_registers_s390_linux32v2): Likewise.
648 (tdesc_s390_linux32v2): Likewise.
649 (init_registers_s390_linux64): Likewise.
650 (tdesc_s390_linux64): Likewise.
651 (init_registers_s390_linux64v1): Likewise.
652 (tdesc_s390_linux64v1): Likewise.
653 (init_registers_s390_linux64v2): Likewise.
654 (tdesc_s390_linux64v2): Likewise.
655 (init_registers_s390_te_linux64): Likewise.
656 (tdesc_s390_te_linux64): Likewise.
657 (init_registers_s390_vx_linux64): Likewise.
658 (tdesc_s390_vx_linux64): Likewise.
659 (init_registers_s390_tevx_linux64): Likewise.
660 (tdesc_s390_tevx_linux64): Likewise.
661 (init_registers_s390x_linux64): Likewise.
662 (tdesc_s390x_linux64): Likewise.
663 (init_registers_s390x_linux64v1): Likewise.
664 (tdesc_s390x_linux64v1): Likewise.
665 (init_registers_s390x_linux64v2): Likewise.
666 (tdesc_s390x_linux64v2): Likewise.
667 (init_registers_s390x_te_linux64): Likewise.
668 (tdesc_s390x_te_linux64): Likewise.
669 (init_registers_s390x_vx_linux64): Likewise.
670 (tdesc_s390x_vx_linux64): Likewise.
671 (init_registers_s390x_tevx_linux64): Likewise.
672 (tdesc_s390x_tevx_linux64): Likewise.
673 (have_hwcap_s390_vx): New static variable.
674 (s390_arch_setup): Fill have_hwcap_s390_vx.
675 (s390_get_thread_area): New function.
676 (s390_ft_entry_gpr_esa): New const.
677 (s390_ft_entry_gpr_zarch): New const.
678 (s390_ft_entry_misc): New const.
679 (s390_ft_entry_fr): New const.
680 (s390_ft_entry_vr): New const.
681 (s390_ft_main_31): New const.
682 (s390_ft_main_64): New const.
683 (s390_ft_exit_fr): New const.
684 (s390_ft_exit_vr): New const.
685 (s390_ft_exit_misc): New const.
686 (s390_ft_exit_gpr_esa): New const.
687 (s390_ft_exit_gpr_zarch): New const.
688 (append_insns): New function.
689 (s390_relocate_instruction): New function.
690 (s390_install_fast_tracepoint_jump_pad): New function.
691 (s390_get_min_fast_tracepoint_insn_len): New function.
692 (s390_get_ipa_tdesc_idx): New function.
693 (struct linux_target_ops): Wire in the above functions.
694 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
695 * linux-s390-tdesc.h: New file.
696
697 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
698
699 * linux-s390-low.c (s390_supports_tracepoints): New function.
700 (struct linux_target_ops): Fill supports_tracepoints hook.
701
702 2016-03-18 Yao Qi <yao.qi@linaro.org>
703
704 * linux-low.c (lwp_signal_can_be_delivered): New function.
705 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
706
707 2016-03-18 Yao Qi <yao.qi@linaro.org>
708
709 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
710 0 if signal is enqueued. Remove 'signal' from one debugging
711 message. Move one debugging message to some lines below.
712 Remove code setting 'signal' to 0.
713
714 2016-03-18 Yao Qi <yao.qi@linaro.org>
715
716 * linux-low.c (linux_low_filter_event): Remove redundant
717 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
718
719 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
720
721 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
722 (struct linux_target_ops): Wire in the above.
723
724 2016-03-03 Yao Qi <yao.qi@linaro.org>
725
726 * linux-low.c: Update comments to start_step_over.
727
728 2016-03-03 Yao Qi <yao.qi@linaro.org>
729
730 PR server/19736
731 * linux-low.c (handle_extended_wait): Set child suspended
732 if event_lwp->bp_reinsert isn't zero.
733
734 2016-03-02 Yao Qi <yao.qi@linaro.org>
735
736 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
737 enqueue_pending_signal.
738
739 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
740
741 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
742 is actually loaded.
743
744 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
745
746 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
747 (s390_regmap_3264) [!__s390x__]: New global.
748 (s390_collect_ptrace_register): Skip map entries containing -1.
749 (s390_supply_ptrace_register): Ditto.
750 (s390_fill_gprs_high): New function.
751 (s390_store_gprs_high): New function.
752 (s390_regsets): Add NT_S390_HIGH_GPRS.
753 (s390_get_hwcap): Enable on 31-bit.
754 (have_hwcap_s390_high_gprs): Enable on 31-bit.
755 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
756 Detect NT_S390_HIGH_GPRS.
757 (s390_usrregs_info_3264): Enable on 31-bit.
758 (s390_regs_info): Enable regs_info_3264 on 31-bit.
759 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
760
761 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
762
763 PR gdb/13808
764 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
765 * configure.srv: Ditto.
766 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
767 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
768 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
769 (init_registers_amd64_linux): Remove prototype.
770 (tdesc_amd64_linux): Remove declaration.
771 (get_ipa_tdesc): New function.
772 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
773 initialize remaining tdescs.
774 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
775 (init_registers_i386_linux): Remove prototype.
776 (tdesc_i386_linux): Remove declaration.
777 (get_ipa_tdesc): New function.
778 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
779 initialize remaining tdescs.
780 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
781 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
782 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
783 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
784 (x86_get_ipa_tdesc_idx): New function.
785 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
786 * linux-x86-tdesc.h: New file.
787 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
788 (target_get_ipa_tdesc_idx): New macro.
789 * tracepoint.c (ipa_tdesc_idx): New macro.
790 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
791 (symbol_list): Add ipa_tdesc_idx.
792 (cmd_qtstart): Write ipa_tdesc_idx in the target.
793 (ipa_tdesc): Remove.
794 (ipa_tdesc_idx): New variable.
795 (get_context_regcache): Use get_ipa_tdesc.
796 (gdb_collect): Ditto.
797 (gdb_probe): Ditto.
798 * tracepoint.h (get_ipa_tdesc): New prototype.
799 (ipa_tdesc): Remove.
800
801 2016-02-24 Pedro Alves <palves@redhat.com>
802
803 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
804 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
805 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
806 Factor out common code between the USE_SIGTRAP_SIGINFO and
807 !USE_SIGTRAP_SIGINFO blocks.
808 (linux_low_filter_event): Call save_stop_reason instead of
809 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
810 Update comments.
811 (linux_wait_1): Update comments.
812
813 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
814
815 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
816 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
817 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
818 ppc_insert_point, ppc_remove_point.
819
820 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
821
822 * linux-s390-low.c (s390_supports_z_point_type): New function.
823 (struct linux_target_ops): Wire s390_supports_z_point_type in.
824
825 2016-02-16 Yao Qi <yao.qi@linaro.org>
826
827 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
828 PC. Get pc from regcache_read_pc.
829
830 2016-02-12 Yao Qi <yao.qi@linaro.org>
831
832 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
833 or linux_get_pc_32bit.
834 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
835
836 2016-02-12 Yao Qi <yao.qi@linaro.org>
837
838 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
839 arm_linux_get_next_pcs_fixup.
840
841 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
842
843 * tracepoint.c (x_tracepoint_action_download): Change
844 write_inferior_data_ptr to write_inferior_data_pointer.
845 (cmd_qtstart): Likewise.
846 (write_inferior_data_ptr): Remove.
847 (download_agent_expr): Change write_inferior_data_ptr to
848 write_inferior_data_pointer.
849 (download_tracepoint_1): Likewise.
850 (download_tracepoint): Likewise.
851 (download_trace_state_variables): Likewise.
852
853 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
854 Marcin Kościelnicki <koriakin@0x04.net>
855
856 * tracepoint.c (struct tracepoint_action_ops): Remove.
857 (struct tracepoint_action): Remove ops.
858 (m_tracepoint_action_download, r_tracepoint_action_download)
859 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
860 size and offset accordingly.
861 (m_tracepoint_action_ops, r_tracepoint_action_ops)
862 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
863 (tracepoint_action_send, tracepoint_action_download): New functions.
864 Helpers for trace action handlers.
865 (add_tracepoint_action): Remove setup actions ops.
866 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
867
868 2016-02-10 Yao Qi <yao.qi@linaro.org>
869
870 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
871
872 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
873
874 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
875 to AC_OUTPUT.
876 * configure: Regenerate.
877
878 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
879
880 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
881 void * to gdb_byte *.
882 * linux-low.c (siginfo_fixup): Likewise.
883 (linux_xfer_siginfo): Likewise.
884 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
885 Likewise.
886 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
887
888 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
889
890 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
891 to srv_tgtobj.
892 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
893 to srv_tgtobj.
894 * linux-x86-low.c [__x86_64__]: Include
895 "nat/amd64-linux-siginfo.h".
896 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
897 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
898 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
899 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
900 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
901 (cpt_si_fd, si_timerid, si_overrun): Move from
902 nat/amd64-linux-siginfo.c.
903 * Makefile.in (amd64-linux-siginfo.o:): New rule.
904
905 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
906
907 * server.c (skip_to_semicolon): Remove.
908 (process_point_options): Use strchrnul instead of
909 skip_to_semicolon.
910
911 2016-01-26 Yao Qi <yao.qi@linaro.org>
912
913 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
914 * linux-low.c (install_software_single_step_breakpoints): Don't
915 call regcache_read_pc.
916 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
917 argument pc.
918
919 2016-01-26 Yao Qi <yao.qi@linaro.org>
920
921 * linux-low.c (install_software_single_step_breakpoints): Call
922 regcache_read_pc instead of get_pc.
923
924 2016-01-26 Yao Qi <yao.qi@linaro.org>
925
926 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
927 (unblock_async_io): Rename to ...
928 (block_unblock_async_io): ... it. New function.
929 (enable_async_io): Don't install SIGIO handler. Unblock it
930 instead.
931 (disable_async_io): Don't ignore SIGIO. Block it instead.
932 (initialize_async_io): Install SIGIO handler. Don't call
933 unblock_async_io.
934
935 2016-01-26 Yao Qi <yao.qi@linaro.org>
936
937 * remote-utils.c (getpkt): If the buffer isn't empty, and the
938 first character is '\003', call *the_target->request_interrupt.
939
940 2016-01-25 Yao Qi <yao.qi@linaro.org>
941
942 * remote-utils.c (new_thread_notify): Remove.
943 (dead_thread_notify): Likewise.
944 * remote-utils.h (new_thread_notify): Remove declaration.
945 (dead_thread_notify): Likewise.
946
947 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
948
949 * gdb.trace/pending.exp: Fix expected message on continue.
950
951 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
952
953 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
954 it works properly on big-endian machines where sizeof (CORE_ADDR)
955 != sizeof (void *).
956
957 2016-01-21 Pedro Alves <palves@redhat.com>
958
959 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
960 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
961 * configure: Regenerate.
962
963 2016-01-21 Yao Qi <yao.qi@linaro.org>
964
965 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
966 is_thumb and set it according to CPSR saved on the stack.
967 (get_next_pcs_syscall_next_pc): Pass is_thumb to
968 arm_sigreturn_next_pc.
969
970 2016-01-18 Yao Qi <yao.qi@linaro.org>
971
972 * linux-low.c (linux_set_pc_64bit): New function.
973 (linux_get_pc_64bit): New function.
974 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
975 Declare.
976 * linux-sparc-low.c (debug_threads): Remove declaration.
977 (sparc_get_pc): Remove.
978 (the_low_target): Use linux_get_pc_64bit instead of
979 sparc_get_pc.
980 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
981 (the_low_target): Use linux_get_pc_64bit and
982 linux_set_pc_64bit.
983
984 2016-01-18 Yao Qi <yao.qi@linaro.org>
985
986 * linux-arm-low.c (debug_threads): Remove declaration.
987 (arm_get_pc, arm_set_pc): Remove.
988 (the_low_target): Use linux_get_pc_32bit and
989 linux_set_pc_32bit.
990 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
991 (the_low_target): Use linux_get_pc_32bit and
992 linux_set_pc_32bit.
993 * linux-cris-low.c (debug_threads): Remove declaration.
994 (cris_get_pc, cris_set_pc,): Remove.
995 (the_low_target): Use linux_get_pc_32bit and
996 linux_set_pc_32bit.
997 * linux-crisv32-low.c (debug_threads): Remove declaration.
998 (cris_get_pc, cris_set_pc): Remove.
999 (the_low_target): Use linux_get_pc_32bit and
1000 linux_set_pc_32bit.
1001 * linux-low.c: Include inttypes.h.
1002 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1003 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1004 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1005 (the_low_target): Use linux_get_pc_32bit and
1006 linux_set_pc_32bit.
1007 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1008 (the_low_target): Use linux_get_pc_32bit and
1009 linux_set_pc_32bit.
1010 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1011 (the_low_target): Use linux_get_pc_32bit and
1012 linux_set_pc_32bit.
1013 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1014 (the_low_target): Use linux_get_pc_32bit and
1015 linux_set_pc_32bit.
1016 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1017 (the_low_target): Use linux_get_pc_32bit and
1018 linux_set_pc_32bit.
1019
1020 2016-01-18 Gary Benson <gbenson@redhat.com>
1021
1022 * configure.ac (AC_FUNC_FORK): New check.
1023 * config.in: Regenerate.
1024 * configure: Likewise.
1025
1026 2016-01-14 Yao Qi <yao.qi@linaro.org>
1027
1028 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1029 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1030 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1031 arm_get_next_pcs_ctor.
1032
1033 2016-01-12 Josh Stone <jistone@redhat.com>
1034 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1035
1036 * inferiors.h: Include "gdb_vecs.h".
1037 (struct process_info): Add syscalls_to_catch.
1038 * inferiors.c (remove_process): Free syscalls_to_catch.
1039 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1040 syscall_return stops.
1041 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1042 * server.c (handle_general_set): Handle QCatchSyscalls.
1043 (handle_query): Report support for QCatchSyscalls.
1044 * target.h (struct target_ops): Add supports_catch_syscall.
1045 (target_supports_catch_syscall): New macro.
1046 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1047 (struct lwp_info): Add syscall_state.
1048 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1049 Maintain syscall_state and syscalls_to_catch across exec.
1050 (get_syscall_trapinfo): New function, proxy to the_low_target.
1051 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1052 (linux_low_filter_event): Toggle syscall_state entry/return for
1053 syscall traps, and set it ignored for all others.
1054 (gdb_catching_syscalls_p): New function.
1055 (gdb_catch_this_syscall_p): New function.
1056 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1057 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1058 (linux_supports_catch_syscall): New function.
1059 (linux_target_ops): Install it.
1060 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1061 (the_low_target): Install it.
1062
1063 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1064
1065 * acinclude.m4: Include new ../warning.m4 file.
1066 * configure: Regenerated.
1067 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1068
1069 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1070
1071 * ax.c (is_goto_target): Mark static.
1072 * linux-low.c (register_addr): Likewise.
1073 (linux_fetch_registers, linux_store_registers): Likewise.
1074 * mem-break.c (any_persistent_commands): Fix old prototype.
1075 (add_commands_to_breakpoint): Mark static.
1076 * regcache.c (find_register_by_name): Delete unused func.
1077 * remote-utils.c (hex_or_minus_one): Mark static.
1078 * server.c (monitor_show_help): Mark static.
1079 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1080 handle_v_requests): Likewise.
1081
1082 2016-01-12 Pedro Alves <palves@redhat.com>
1083
1084 Remove use of the registered trademark symbol throughout.
1085
1086 2016-01-08 Yao Qi <yao.qi@linaro.org>
1087
1088 * remote-utils.c (getpkt): If c is '\003', call target hook
1089 request_interrupt.
1090
1091 2016-01-06 Yao Qi <yao.qi@linaro.org>
1092
1093 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1094 linux-aarch32-low.c.
1095 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1096 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1097 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1098 (thumb2_breakpoint): Declare.
1099 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1100 linux-aarch32-low.h.
1101 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1102 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1103 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1104
1105 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1106
1107 * gdbreplay.c (gdbreplay_version): Change copyright year in
1108 version message.
1109 * server.c (gdbserver_version): Likewise.
1110
1111 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1112
1113 * server.c (crc32_table): Delete.
1114 (crc32): Use libiberty's xcrc32 function.
1115
1116 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1117
1118 * lynx-low.c (lynx_delete_thread_callback): New function.
1119 (lynx_mourn): Properly delete our process and all of its
1120 threads. Remove call to clear_inferiors.
1121
1122 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1123
1124 * target.c (thread_search_callback): Add check that
1125 the thread_stopped target callback is not NULL before
1126 calling it.
1127
1128 2015-12-21 Yao Qi <yao.qi@linaro.org>
1129
1130 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1131 arm breakpoint.
1132
1133 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1134
1135 * server.c (handle_query): Call target_supports_software_single_step.
1136
1137 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1138
1139 * linux-low.c (single_step): New function.
1140 (linux_resume_one_lwp_throw): Call single_step.
1141 (start_step_over): Likewise.
1142
1143 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1144
1145 * Makefile.in (SFILES): Append arch/arm-linux.c,
1146 arch/arm-get-next-pcs.c.
1147 (arm-linux.o): New rule.
1148 (arm-get-next-pcs.o): New rule.
1149 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1150 arm-linux.o.
1151 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1152 to linux-aarch32-low.c.
1153 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1154 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1155 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1156 (thumb2_breakpoint_len): Likewise.
1157 (arm_is_thumb_mode): Make non-static.
1158 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1159 from linux-aarch32-low.c.
1160 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1161 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1162 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1163 (thumb2_breakpoint_len): Likewise.
1164 (arm_is_thumb_mode): New declaration.
1165 * linux-arm-low.c: Include arch/arm-linux.h
1166 aarch/arm-get-next-pcs.h, sys/syscall.h.
1167 (get_next_pcs_ops): New struct.
1168 (get_next_pcs_addr_bits_remove): New function.
1169 (get_next_pcs_is_thumb): New function.
1170 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1171 (arm_sigreturn_next_pc): Likewise.
1172 (get_next_pcs_syscall_next_pc): Likewise.
1173 (arm_gdbserver_get_next_pcs): Likewise.
1174 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1175 Initialize.
1176 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1177 * server.h: Include gdb_vecs.h.
1178
1179 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1180
1181 * Makefile.in (SFILES): Append common/common-regcache.c.
1182 (OBS): Append common-regcache.o.
1183 (common-regcache.o): New rule.
1184 * regcache.c (init_register_cache): Initialize cache to
1185 REG_UNAVAILABLE.
1186 (regcache_raw_read_unsigned): New function.
1187 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1188 register_status enum.
1189
1190 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1191
1192 * linux-aarch64-low.c (the_low_targets): Rename
1193 breakpoint_reinsert_addr to get_next_pcs.
1194 * linux-arm-low.c (the_low_targets): Likewise.
1195 * linux-bfin-low.c (the_low_targets): Likewise.
1196 * linux-cris-low.c (the_low_targets): Likewise.
1197 * linux-crisv32-low.c (the_low_targets): Likewise.
1198 * linux-low.c (can_software_single_step): Likewise.
1199 (install_software_single_step_breakpoints): New function.
1200 (start_step_over): Use install_software_single_step_breakpoints.
1201 * linux-low.h: New CORE_ADDR vector.
1202 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1203 get_next_pcs.
1204 * linux-mips-low.c (the_low_targets): Likewise.
1205 * linux-nios2-low.c (the_low_targets): Likewise.
1206 * linux-sparc-low.c (the_low_targets): Likewise.
1207
1208 2015-12-17 Pedro Alves <palves@redhat.com>
1209
1210 * linux-low.c (linux_kill_one_lwp): Remove references to
1211 LinuxThreads.
1212 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1213 to 'kill'.
1214 (linux_init_signals): Delete.
1215 (initialize_low): Adjust.
1216 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1217
1218 2015-12-16 Pedro Alves <palves@redhat.com>
1219
1220 * configure.ac (compiler warning flags): When testing a
1221 -Wno-foo option, check whether -Wfoo works instead.
1222 * configure: Regenerate.
1223
1224 2015-12-11 Don Breazeal <donb@codesourcery.com>
1225
1226 * server.c (process_serial_event): Don't exit from gdbserver
1227 in remote mode if there are still active inferiors.
1228
1229 2015-12-11 Yao Qi <yao.qi@linaro.org>
1230
1231 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1232 arm_breakpoint_at if the process is 32-bit.
1233
1234 2015-12-11 Yao Qi <yao.qi@linaro.org>
1235
1236 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1237 arm breakpoint.
1238
1239 2015-12-07 Yao Qi <yao.qi@linaro.org>
1240
1241 * configure.srv: Append arm.o to srv_tgtobj for
1242 aarch64*-*-linux* target.
1243 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1244 from linux-arm-low.c.
1245 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1246 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1247 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1248 (thumb2_breakpoint_len): Likewise.
1249 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1250 (arm_breakpoint_kinds): Likewise.
1251 (arm_breakpoint_kind_from_pc): Likewise.
1252 (arm_sw_breakpoint_from_kind): Likewise.
1253 (arm_breakpoint_kind_from_current_state): Likewise.
1254 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1255 (arm_sw_breakpoint_from_kind): Declare.
1256 (arm_breakpoint_kind_from_current_state): Declare.
1257 (arm_breakpoint_at): Declare.
1258 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1259 arm_sw_breakpoint_from_kind if process is 32-bit.
1260 (aarch64_breakpoint_kind_from_pc): New function.
1261 (aarch64_breakpoint_kind_from_current_state): New function.
1262 (the_low_target): Initialize fields breakpoint_kind_from_pc
1263 and breakpoint_kind_from_current_state.
1264 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1265 linux-aarch32-low.c.
1266 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1267 (arm_breakpoint, arm_breakpoint_len): Likewise.
1268 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1269 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1270 (arm_is_thumb_mode): Likewise.
1271 (arm_breakpoint_at): Likewise.
1272 (arm_breakpoint_kind_from_pc): Likewise.
1273 (arm_sw_breakpoint_from_kind): Likewise.
1274 (arm_breakpoint_kind_from_current_state): Likewise.
1275
1276 Revert:
1277 2015-08-04 Yao Qi <yao.qi@linaro.org>
1278
1279 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1280 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1281 * server.c (extended_protocol): Remove "static".
1282 * server.h (extended_protocol): Declare it.
1283
1284 2015-12-04 Josh Stone <jistone@redhat.com>
1285
1286 * target.h (struct target_ops) <arch_setup>: Rename to ...
1287 (struct target_ops) <post_create_inferior>: ... this.
1288 (target_arch_setup): Rename to ...
1289 (target_post_create_inferior): ... this, calling post_create_inferior.
1290 * server.c (start_inferior): Update target_arch_setup calls to
1291 target_post_create_inferior.
1292 * linux-low.c (linux_low_ptrace_options): Forward declare.
1293 (linux_arch_setup): Update its comment for general use.
1294 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1295 (struct linux_target_ops): Use linux_post_create_inferior.
1296 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1297 to post_create_inferior.
1298 * nto-low.c (struct nto_target_ops): Likewise.
1299 * spu-low.c (struct spu_target_ops): Likewise.
1300 * win32-low.c (struct win32_target_ops): Likewise.
1301
1302 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1303
1304 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1305
1306 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1307
1308 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1309 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1310 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1311 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1312 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1313 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1314 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1315 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1316 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1317 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1318 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1319 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1320
1321 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1322
1323 * linux-low.c (linux_look_up_symbols): Don't call
1324 linux_supports_traceclone.
1325 * linux-low.h (thread_db_init): Remove use_events argument.
1326 * thread-db.c (thread_db_use_event): Remove global variable.
1327 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1328 (struct thread_db) <td_create_bp>: Remove field.
1329 (thread_db_create_event): Remove function.
1330 (thread_db_enable_reporting): Likewise.
1331 (find_one_thread): Don't check for thread_db_use_events.
1332 (attach_thread): Likewise.
1333 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1334 (try_thread_db_load_1): Don't check for thread_db_use_events.
1335 (thread_db_init): Remove use_events argument and thread events
1336 handling.
1337 (remove_thread_event_breakpoints): Remove function.
1338 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1339
1340 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1341
1342 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1343 New function.
1344 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1345 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1346 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1347 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1348 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1349 Initialize.
1350 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1351 New function.
1352 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1353 * linux-low.c (can_hardware_single_step): Use
1354 supports_hardware_single_step.
1355 (can_software_single_step): New function.
1356 (start_step_over): Call can_software_single_step.
1357 (linux_supports_hardware_single_step): New function.
1358 (struct target_ops) <supports_software_single_step>: Initialize.
1359 * linux-low.h (struct linux_target_ops)
1360 <supports_hardware_single_step>: Initialize.
1361 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1362 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1363 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1364 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1365 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1366 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1367 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1368 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1369 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1370 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1371 Initialize.
1372 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1373 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1374 Initialize.
1375 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1376 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1377 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1378 New function.
1379 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1380 * target.h (struct target_ops): <supports_software_single_step>:
1381 New field.
1382 (target_supports_software_single_step): New macro.
1383
1384 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1385
1386 * linux-low.c (linux_wait_1): Fix pc advance condition.
1387 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1388 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1389
1390 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1391
1392 * linux-arm-low.c (arm_is_thumb_mode): New function.
1393 (arm_breakpoint_at): Use arm_is_thumb_mode.
1394 (arm_breakpoint_kind_from_current_state): New function.
1395 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1396 Initialize.
1397 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1398 (linux_breakpoint_kind_from_current_state): New function.
1399 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1400 * linux-low.h (struct linux_target_ops)
1401 <breakpoint_kind_from_current_state>: New field.
1402 * target.h (struct target_ops): Likewise.
1403 (target_breakpoint_kind_from_current_state): New macro.
1404
1405 2015-11-30 Pedro Alves <palves@redhat.com>
1406
1407 * linux-low.c (linux_resume): Wake up the event loop before
1408 returning.
1409
1410 2015-11-30 Pedro Alves <palves@redhat.com>
1411
1412 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1413 check.
1414 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1415 to -1.
1416 * target.c (struct thread_search): New structure.
1417 (thread_search_callback): New function.
1418 (prev_general_thread): New global.
1419 (prepare_to_access_memory, done_accessing_memory): New functions.
1420 * target.h (prepare_to_access_memory, done_accessing_memory):
1421 Replace macros with function declarations.
1422
1423 2015-11-30 Pedro Alves <palves@redhat.com>
1424
1425 PR 14618
1426 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1427 report TARGET_WAITKIND_NO_RESUMED.
1428 * remote-utils.c (prepare_resume_reply): Handle
1429 TARGET_WAITKIND_NO_RESUMED.
1430 * server.c (report_no_resumed): New global.
1431 (handle_query) <qSupported>: Handle "no-resumed+". Report
1432 "no-resumed+" support.
1433 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1434 return error if the client doesn't support no-resumed events.
1435 (push_stop_notification): New function.
1436 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1437 events if the client supports them.
1438
1439 2015-11-30 Pedro Alves <palves@redhat.com>
1440
1441 * linux-low.c (thread_still_has_status_pending_p): Don't check
1442 vCont;t here.
1443 (lwp_resumed): New function.
1444 (status_pending_p_callback): Return early if the LWP is not
1445 supposed to be resumed.
1446
1447 2015-11-30 Pedro Alves <palves@redhat.com>
1448
1449 * linux-low.c (handle_extended_wait): Assert that the LWP's
1450 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1451 thread create events, leave the new child's status pending.
1452 (linux_low_filter_event): If GDB wants to hear about thread exit
1453 events, leave the LWP marked dead and don't delete it.
1454 (linux_wait_for_event_filtered): Don't check for thread exit.
1455 (filter_exit_event): New function.
1456 (linux_wait_1): Use it, when returning an exit event.
1457 (linux_resume_one_lwp_throw): Assert that the LWP's
1458 waitstatus is TARGET_WAITKIND_IGNORE.
1459 * remote-utils.c (prepare_resume_reply): Handle
1460 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1461 * server.c (report_thread_events): New global.
1462 (handle_general_set): Handle QThreadEvents.
1463 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1464 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1465 TARGET_WAITKIND_THREAD_EXITED.
1466 * server.h (report_thread_events): Declare.
1467
1468 2015-11-30 Pedro Alves <palves@redhat.com>
1469
1470 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1471 the thread's last_resume_kind was resume_stop.
1472
1473 2015-11-30 Pedro Alves <palves@redhat.com>
1474
1475 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1476 before returning.
1477
1478 2015-11-30 Pedro Alves <palves@redhat.com>
1479
1480 * server.c (handle_v_requests): Handle vCtrlC.
1481
1482 2015-11-30 Pedro Alves <palves@redhat.com>
1483
1484 * gdbthread.h (find_any_thread_of_pid): Declare.
1485 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1486 functions.
1487 * server.c (handle_query): If current_thread is NULL, look for
1488 another thread of the selected process.
1489
1490 2015-11-26 Daniel Colascione <dancol@dancol.org>
1491 Simon Marchi <simon.marchi@ericsson.com>
1492
1493 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1494 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1495 name in reply.
1496 * target.h (struct target_ops) <thread_name>: New field.
1497 (target_thread_name): New macro.
1498
1499 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1500
1501 * regcache.h (regcache_invalidate_pid): Add declaration.
1502 * regcache.c (regcache_invalidate_pid): New function, extracted
1503 from regcache_invalidate.
1504 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1505 Add trivial documentation comment.
1506 * lynx-low.c: Use regcache_invalidate_pid instead of
1507 regcache_invalidate.
1508
1509 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1510
1511 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1512 and Elf64_auxv_t if the target is Android.
1513
1514 2015-11-22 Doug Evans <xdje42@gmail.com>
1515
1516 * target.h: #include <sys/types.h>.
1517
1518 2015-11-19 Pedro Alves <palves@redhat.com>
1519
1520 * linux-low.c (linux_process_qsupported): Change prototype.
1521 Adjust.
1522 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1523 Change prototype.
1524 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1525 and adjust to loop over all features.
1526 * server.c (handle_query) <qSupported>: Adjust to call
1527 target_process_qsupported once, passing it a vector of unprocessed
1528 features.
1529 * target.h (struct target_ops) <process_qsupported>: Change
1530 prototype.
1531 (target_process_qsupported): Adjust.
1532
1533 2015-11-19 Pedro Alves <palves@redhat.com>
1534
1535 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1536 mode.
1537 * configure: Regenerate.
1538
1539 2015-11-19 Pedro Alves <palves@redhat.com>
1540
1541 * configure: Regenerate.
1542
1543 2015-11-19 Yao Qi <yao.qi@linaro.org>
1544
1545 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1546 type to uint32_t.
1547
1548 2015-11-19 Yao Qi <yao.qi@linaro.org>
1549
1550 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1551 (struct aarch64_operand): Move enum out.
1552
1553 2015-11-19 Yao Qi <yao.qi@linaro.org>
1554
1555 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1556 struct user_fpsimd_state *.
1557 (aarch64_store_fpregset): Likewise.
1558
1559 2015-11-19 Yao Qi <yao.qi@linaro.org>
1560
1561 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1562 struct user_pt_regs *.
1563 (aarch64_store_gregset): Likewise.
1564
1565 2015-11-18 Pedro Alves <palves@redhat.com>
1566
1567 * Makefile.in (all_object_files): Add $IPA_OBJS.
1568
1569 2015-11-17 Pedro Alves <palves@redhat.com>
1570
1571 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1572 GDB_SIGNAL_0 and gdb_signal_to_string.
1573
1574 2015-11-17 Pedro Alves <palves@redhat.com>
1575
1576 * win32-low.c (handle_output_debug_string): Remove parameter.
1577 (win32_kill): Remove our_status local and adjust call to
1578 handle_output_debug_string.
1579 (get_child_debug_event): Adjust call to
1580 handle_output_debug_string.
1581
1582 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1583
1584 * linux-mips-low.c (mips_fill_gregset): Add cast.
1585 (mips_store_gregset): Likewise.
1586 (mips_fill_fpregset): Likewise.
1587 (mips_store_fpregset): Likewise.
1588
1589 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1590
1591 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1592 priv.
1593
1594 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1595
1596 * linux-mips-low.c (mips_linux_new_thread): Change type of
1597 watch_type to enum target_hw_bp_type.
1598
1599 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1600
1601 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1602 Change return type to arm_hwbp_type.
1603
1604 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1605
1606 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1607 (arm_store_gregset): Likewise.
1608 * linux-arm-low.c (arm_get_hwcap): Likewise.
1609 (arm_read_description): Likewise.
1610
1611 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1612
1613 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1614
1615 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1616
1617 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1618 (ppc_fill_vsxregset): Likewise.
1619 (ppc_store_vsxregset): Likewise.
1620 (ppc_fill_vrregset): Likewise.
1621 (ppc_store_vrregset): Likewise.
1622 (ppc_fill_evrregset): Likewise.
1623 (ppc_store_evrregset): Likewise.
1624
1625 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1626
1627 * linux-ppc-low.c (ppc_usrregs_info): Remove
1628 forward-declaration.
1629 (ppc_arch_setup): Move lower in file.
1630
1631 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1632
1633 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1634 (ps_pdwrite): Likewise.
1635
1636 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1637
1638 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1639 to after assert checks.
1640
1641 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1642
1643 * proc-service.c (ps_pdread): Add/adjust casts.
1644 (ps_pdwrite): Add/adjust casts.
1645
1646 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1647
1648 * server.c (handle_search_memory_1): Cast return value of
1649 memmem.
1650
1651 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1652
1653 * server.c (write_qxfer_response): Change type of data to
1654 gdb_byte *.
1655
1656 2015-10-29 Pedro Alves <palves@redhat.com>
1657
1658 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1659
1660 2015-10-29 Pedro Alves <palves@redhat.com>
1661
1662 * tracepoint.c (clear_installed_tracepoints): Add casts.
1663
1664 2015-10-29 Pedro Alves <palves@redhat.com>
1665
1666 * server.c (handle_v_cont, process_serial_event): Add enum
1667 gdb_signal casts to signal parsing code.
1668
1669 2015-10-29 Pedro Alves <palves@redhat.com>
1670
1671 * linux-low.h (NULL_REGSET): Define.
1672 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1673 * linux-arm-low.c (arm_regsets): Likewise.
1674 * linux-crisv32-low.c (cris_regsets): Likewise.
1675 * linux-m68k-low.c (m68k_regsets): Likewise.
1676 * linux-mips-low.c (mips_regsets): Likewise.
1677 * linux-nios2-low.c (nios2_regsets): Likewise.
1678 * linux-ppc-low.c (ppc_regsets): Likewise.
1679 * linux-s390-low.c (s390_regsets): Likewise.
1680 * linux-sh-low.c (sh_regsets): Likewise.
1681 * linux-sparc-low.c (sparc_regsets): Likewise.
1682 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1683 * linux-tile-low.c (tile_regsets): Likewise.
1684 * linux-x86-low.c (x86_regsets): Likewise.
1685 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1686
1687 2015-10-29 Pedro Alves <palves@redhat.com>
1688
1689 * linux-low.h (NULL_REGSET): Define.
1690 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1691 * linux-arm-low.c (arm_regsets): Likewise.
1692 * linux-crisv32-low.c (cris_regsets): Likewise.
1693 * linux-m68k-low.c (m68k_regsets): Likewise.
1694 * linux-mips-low.c (mips_regsets): Likewise.
1695 * linux-nios2-low.c (nios2_regsets): Likewise.
1696 * linux-ppc-low.c (ppc_regsets): Likewise.
1697 * linux-s390-low.c (s390_regsets): Likewise.
1698 * linux-sh-low.c (sh_regsets): Likewise.
1699 * linux-sparc-low.c (sparc_regsets): Likewise.
1700 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1701 * linux-tile-low.c (tile_regsets): Likewise.
1702 * linux-x86-low.c (x86_regsets): Likewise.
1703 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1704
1705 2015-10-26 Doug Evans <dje@google.com>
1706
1707 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1708
1709 2015-10-26 Doug Evans <dje@google.com>
1710
1711 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1712
1713 2015-10-26 Doug Evans <dje@google.com>
1714
1715 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1716 for debug_printf.
1717 (attach_thread, find_new_threads_callback): Ditto.
1718
1719 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1720
1721 * mem-break.h (set_breakpoint_data): Remove.
1722
1723 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1724
1725 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1726 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1727 (initialize_low): Remove set_breakpoint_data call.
1728 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1729 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1730 (initialize_low): Remove set_breakpoint_data call.
1731 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1732 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1733 (initialize_low): Remove set_breakpoint_data call.
1734
1735 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1736
1737 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1738 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1739 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1740 * target.h (target_breakpoint_kind_from_pc): New macro.
1741
1742 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1743
1744 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1745 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1746 the default breakpoint kind.
1747
1748 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1749
1750 * linux-arm-low.c (arm_supports_z_point_type): Add software
1751 breakpoint support.
1752
1753 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1754
1755 * linux-arm-low.c: Refactor breakpoint definitions.
1756 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1757 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1758
1759 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1760
1761 * Makefile.in: Add arm.c/o.
1762 * configure.srv: Likewise.
1763 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1764 (arm_breakpoint_kind_from_pc): New function.
1765 (arm_sw_breakpoint_from_kind): Return proper kind.
1766 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1767
1768 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1769
1770 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1771 removal.
1772 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1773 (struct raw_breakpoint) <size>: Remove.
1774 (struct raw_breakpoint) <kind>: Add.
1775 (bp_size): New function.
1776 (bp_opcode): Likewise.
1777 (find_raw_breakpoint_at): Adjust for kind.
1778 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1779 (remove_memory_breakpoint): Adjust for kind call bp_size.
1780 (set_raw_breakpoint_at): Adjust for kind.
1781 (set_breakpoint): Likewise.
1782 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1783 (delete_raw_breakpoint): Adjust for kind.
1784 (delete_breakpoint): Likewise.
1785 (find_gdb_breakpoint): Likewise.
1786 (set_gdb_breakpoint_1): Likewise.
1787 (set_gdb_breakpoint): Likewise.
1788 (delete_gdb_breakpoint_1): Likewise.
1789 (delete_gdb_breakpoint): Likewise.
1790 (uninsert_raw_breakpoint): Likewise.
1791 (reinsert_raw_breakpoint): Likewise.
1792 (set_breakpoint_data): Remove.
1793 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1794 (check_mem_read): Adjust for kind call bp_size.
1795 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1796 (clone_one_breakpoint): Adjust for kind.
1797 * mem-break.h (set_gdb_breakpoint): Likewise.
1798 (delete_gdb_breakpoint): Likewise.
1799 * server.c (process_serial_event): Likewise.
1800
1801 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1802
1803 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1804 (struct linux_target_ops) <breakpoint>: Remove.
1805 (struct linux_target_ops) <breakpoint_len>: Remove.
1806 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1807 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1808 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1809 (arm_sw_breakpoint_from_kind): New function.
1810 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1811 (struct linux_target_ops) <breakpoint>: Remove.
1812 (struct linux_target_ops) <breakpoint_len>: Remove.
1813 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1814 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1815 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1816 (struct linux_target_ops) <breakpoint>: Remove.
1817 (struct linux_target_ops) <breakpoint_len>: Remove.
1818 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1819 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1820 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1821 (struct linux_target_ops) <breakpoint>: Remove.
1822 (struct linux_target_ops) <breakpoint_len>: Remove.
1823 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1824 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1825 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1826 and sw_breakpoint_from_kind to increment the pc.
1827 (linux_breakpoint_kind_from_pc): New function.
1828 (linux_sw_breakpoint_from_kind): New function.
1829 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1830 (initialize_low): Call breakpoint_kind_from_pc and
1831 sw_breakpoint_from_kind to replace breakpoint_data/len.
1832 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1833 New field.
1834 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1835 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1836 (struct linux_target_ops) <breakpoint>: Remove.
1837 (struct linux_target_ops) <breakpoint_len>: Remove.
1838 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1839 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1840 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1841 (struct linux_target_ops) <breakpoint>: Remove.
1842 (struct linux_target_ops) <breakpoint_len>: Remove.
1843 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1844 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1845 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1846 (struct linux_target_ops) <breakpoint>: Remove.
1847 (struct linux_target_ops) <breakpoint_len>: Remove.
1848 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1849 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1850 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1851 (struct linux_target_ops) <breakpoint>: Remove.
1852 (struct linux_target_ops) <breakpoint_len>: Remove.
1853 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1854 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1855 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1856 (struct linux_target_ops) <breakpoint>: Remove.
1857 (struct linux_target_ops) <breakpoint_len>: Remove.
1858 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1859 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1860 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1861 (struct linux_target_ops) <breakpoint>: Remove.
1862 (struct linux_target_ops) <breakpoint_len>: Remove.
1863 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1864 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1865 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1866 (struct linux_target_ops) <breakpoint>: Remove.
1867 (struct linux_target_ops) <breakpoint_len>: Remove.
1868 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1869 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1870 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1871 (struct linux_target_ops) <breakpoint>: Remove.
1872 (struct linux_target_ops) <breakpoint_len>: Remove.
1873 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1874 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1875 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1876 (struct linux_target_ops) <breakpoint>: Remove.
1877 (struct linux_target_ops) <breakpoint_len>: Remove.
1878 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1879 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1880 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1881 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1882 (struct linux_target_ops) <breakpoint>: Remove.
1883 (struct linux_target_ops) <breakpoint_len>: Remove.
1884 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1885 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1886 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1887 (struct linux_target_ops) <breakpoint>: Remove.
1888 (struct linux_target_ops) <breakpoint_len>: Remove.
1889 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1890 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1891
1892 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1893
1894 * linux-cris-low.c (cris_get_pc): Remove void arg.
1895
1896 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1897
1898 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1899 variable name.
1900
1901 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1902
1903 * inferiors.c (thread_pid_matches_callback): New function.
1904 (find_thread_process): New function.
1905 (remove_thread): Reset current_thread.
1906 (remove_process): Assert threads have been removed first.
1907
1908 2015-10-15 Yao Qi <yao.qi@linaro.org>
1909
1910 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1911 if it is 3.
1912 (aarch64_remove_point): Likewise.
1913 * regcache.c (regcache_register_size): New function.
1914
1915 2015-10-12 Yao Qi <yao.qi@linaro.org>
1916
1917 * linux-aarch64-low.c: Update all callers as emit_load_store
1918 is renamed to aarch64_emit_load_store.
1919
1920 2015-10-12 Yao Qi <yao.qi@linaro.org>
1921
1922 * linux-aarch64-low.c: Update all callers of function renaming
1923 from emit_insn to aarch64_emit_insn.
1924
1925 2015-10-12 Yao Qi <yao.qi@linaro.org>
1926
1927 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1928 arch/aarch64-insn.h.
1929 (struct aarch64_memory_operand): Likewise.
1930 (ENCODE): Likewise.
1931 (emit_insn): Move to arch/aarch64-insn.c.
1932 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1933 (emit_load_store): Move to arch/aarch64-insn.c.
1934 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1935 (can_encode_int32): Remove.
1936
1937 2015-10-12 Yao Qi <yao.qi@linaro.org>
1938
1939 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1940 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1941 (aarch64_relocate_instruction): Likewise.
1942 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1943 (struct aarch64_insn_visitor): Likewise.
1944
1945 2015-10-12 Yao Qi <yao.qi@linaro.org>
1946
1947 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1948 (struct aarch64_insn_visitor): New.
1949 (struct aarch64_insn_relocation_data): New.
1950 (aarch64_ftrace_insn_reloc_b): New function.
1951 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1952 (aarch64_ftrace_insn_reloc_cb): Likewise.
1953 (aarch64_ftrace_insn_reloc_tb): Likewise.
1954 (aarch64_ftrace_insn_reloc_adr): Likewise.
1955 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1956 (aarch64_ftrace_insn_reloc_others): Likewise.
1957 (visitor): New.
1958 (aarch64_relocate_instruction): Use visitor.
1959
1960 2015-10-12 Yao Qi <yao.qi@linaro.org>
1961
1962 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1963 int. Add argument buf.
1964 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1965 aarch64_relocate_instruction.
1966
1967 2015-10-12 Yao Qi <yao.qi@linaro.org>
1968
1969 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1970 argument insn. Remove local variable insn. Don't call
1971 target_read_uint32.
1972 (aarch64_install_fast_tracepoint_jump_pad): Call
1973 target_read_uint32.
1974
1975 2015-09-30 Yao Qi <yao.qi@linaro.org>
1976
1977 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1978 (emit_load_store_pair): Likewise.
1979
1980 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1981
1982 * dll.c (match_dll): Add cast(s).
1983 (unloaded_dll): Likewise.
1984 * linux-low.c (second_thread_of_pid_p): Likewise.
1985 (delete_lwp_callback): Likewise.
1986 (count_events_callback): Likewise.
1987 (select_event_lwp_callback): Likewise.
1988 (linux_set_resume_request): Likewise.
1989 * server.c (accumulate_file_name_length): Likewise.
1990 (emit_dll_description): Likewise.
1991 (handle_qxfer_threads_worker): Likewise.
1992 (visit_actioned_threads): Likewise.
1993 * thread-db.c (any_thread_of): Likewise.
1994 * tracepoint.c (same_process_p): Likewise.
1995 (match_blocktype): Likewise.
1996 (build_traceframe_info_xml): Likewise.
1997
1998 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1999
2000 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2001 assignment.
2002 (gdb_unparse_agent_expr): Likewise.
2003 * hostio.c (require_data): Likewise.
2004 (handle_pread): Likewise.
2005 * linux-low.c (disable_regset): Likewise.
2006 (fetch_register): Likewise.
2007 (store_register): Likewise.
2008 (get_dynamic): Likewise.
2009 (linux_qxfer_libraries_svr4): Likewise.
2010 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2011 (set_fast_tracepoint_jump): Likewise.
2012 (uninsert_fast_tracepoint_jumps_at): Likewise.
2013 (reinsert_fast_tracepoint_jumps_at): Likewise.
2014 (validate_inserted_breakpoint): Likewise.
2015 (clone_agent_expr): Likewise.
2016 * regcache.c (init_register_cache): Likewise.
2017 * remote-utils.c (putpkt_binary_1): Likewise.
2018 (decode_M_packet): Likewise.
2019 (decode_X_packet): Likewise.
2020 (look_up_one_symbol): Likewise.
2021 (relocate_instruction): Likewise.
2022 (monitor_output): Likewise.
2023 * server.c (handle_search_memory): Likewise.
2024 (handle_qxfer_exec_file): Likewise.
2025 (handle_qxfer_libraries): Likewise.
2026 (handle_qxfer): Likewise.
2027 (handle_query): Likewise.
2028 (handle_v_cont): Likewise.
2029 (handle_v_run): Likewise.
2030 (captured_main): Likewise.
2031 * target.c (write_inferior_memory): Likewise.
2032 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2033 * tracepoint.c (init_trace_buffer): Likewise.
2034 (add_tracepoint_action): Likewise.
2035 (add_traceframe): Likewise.
2036 (add_traceframe_block): Likewise.
2037 (cmd_qtdpsrc): Likewise.
2038 (cmd_qtdv): Likewise.
2039 (cmd_qtstatus): Likewise.
2040 (response_source): Likewise.
2041 (response_tsv): Likewise.
2042 (cmd_qtnotes): Likewise.
2043 (gdb_collect): Likewise.
2044 (initialize_tracepoint): Likewise.
2045
2046 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2047
2048 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2049 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2050 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2051 <NOP>: New.
2052 (enum aarch64_condition_codes): New enum.
2053 (w0): New static global.
2054 (fp): Likewise.
2055 (lr): Likewise.
2056 (struct aarch64_memory_operand) <type>: New
2057 MEMORY_OPERAND_POSTINDEX type.
2058 (postindex_memory_operand): New helper function.
2059 (emit_ret): New function.
2060 (emit_load_store_pair): New function, factored out of emit_stp
2061 with support for MEMORY_OPERAND_POSTINDEX.
2062 (emit_stp): Rewrite using emit_load_store_pair.
2063 (emit_ldp): New function.
2064 (emit_load_store): Likewise.
2065 (emit_ldr): Mention post-index instruction in comment.
2066 (emit_ldrh): New function.
2067 (emit_ldrb): New function.
2068 (emit_ldrsw): Mention post-index instruction in comment.
2069 (emit_str): Likewise.
2070 (emit_subs): New function.
2071 (emit_cmp): Likewise.
2072 (emit_and): Likewise.
2073 (emit_orr): Likewise.
2074 (emit_orn): Likewise.
2075 (emit_eor): Likewise.
2076 (emit_mvn): Likewise.
2077 (emit_lslv): Likewise.
2078 (emit_lsrv): Likewise.
2079 (emit_asrv): Likewise.
2080 (emit_mul): Likewise.
2081 (emit_sbfm): Likewise.
2082 (emit_sbfx): Likewise.
2083 (emit_ubfm): Likewise.
2084 (emit_ubfx): Likewise.
2085 (emit_csinc): Likewise.
2086 (emit_cset): Likewise.
2087 (emit_nop): Likewise.
2088 (emit_ops_insns): New helper function.
2089 (emit_pop): Likewise.
2090 (emit_push): Likewise.
2091 (aarch64_emit_prologue): New function.
2092 (aarch64_emit_epilogue): Likewise.
2093 (aarch64_emit_add): Likewise.
2094 (aarch64_emit_sub): Likewise.
2095 (aarch64_emit_mul): Likewise.
2096 (aarch64_emit_lsh): Likewise.
2097 (aarch64_emit_rsh_signed): Likewise.
2098 (aarch64_emit_rsh_unsigned): Likewise.
2099 (aarch64_emit_ext): Likewise.
2100 (aarch64_emit_log_not): Likewise.
2101 (aarch64_emit_bit_and): Likewise.
2102 (aarch64_emit_bit_or): Likewise.
2103 (aarch64_emit_bit_xor): Likewise.
2104 (aarch64_emit_bit_not): Likewise.
2105 (aarch64_emit_equal): Likewise.
2106 (aarch64_emit_less_signed): Likewise.
2107 (aarch64_emit_less_unsigned): Likewise.
2108 (aarch64_emit_ref): Likewise.
2109 (aarch64_emit_if_goto): Likewise.
2110 (aarch64_emit_goto): Likewise.
2111 (aarch64_write_goto_address): Likewise.
2112 (aarch64_emit_const): Likewise.
2113 (aarch64_emit_call): Likewise.
2114 (aarch64_emit_reg): Likewise.
2115 (aarch64_emit_pop): Likewise.
2116 (aarch64_emit_stack_flush): Likewise.
2117 (aarch64_emit_zero_ext): Likewise.
2118 (aarch64_emit_swap): Likewise.
2119 (aarch64_emit_stack_adjust): Likewise.
2120 (aarch64_emit_int_call_1): Likewise.
2121 (aarch64_emit_void_call_2): Likewise.
2122 (aarch64_emit_eq_goto): Likewise.
2123 (aarch64_emit_ne_goto): Likewise.
2124 (aarch64_emit_lt_goto): Likewise.
2125 (aarch64_emit_le_goto): Likewise.
2126 (aarch64_emit_gt_goto): Likewise.
2127 (aarch64_emit_ge_got): Likewise.
2128 (aarch64_emit_ops_impl): New static global variable.
2129 (aarch64_emit_ops): New target function, return
2130 &aarch64_emit_ops_impl.
2131 (struct linux_target_ops): Install it.
2132
2133 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2134
2135 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2136 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2137 aarch64-ipa.o.
2138 * linux-aarch64-ipa.c: New file.
2139 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2140 and endian.h.
2141 (aarch64_get_thread_area): New target method.
2142 (extract_signed_bitfield): New helper function.
2143 (aarch64_decode_ldr_literal): New function.
2144 (enum aarch64_opcodes): New enum.
2145 (struct aarch64_register): New struct.
2146 (struct aarch64_operand): New struct.
2147 (x0): New static global.
2148 (x1): Likewise.
2149 (x2): Likewise.
2150 (x3): Likewise.
2151 (x4): Likewise.
2152 (w2): Likewise.
2153 (ip0): Likewise.
2154 (sp): Likewise.
2155 (xzr): Likewise.
2156 (aarch64_register): New helper function.
2157 (register_operand): Likewise.
2158 (immediate_operand): Likewise.
2159 (struct aarch64_memory_operand): New struct.
2160 (offset_memory_operand): New helper function.
2161 (preindex_memory_operand): Likewise.
2162 (enum aarch64_system_control_registers): New enum.
2163 (ENCODE): New macro.
2164 (emit_insn): New helper function.
2165 (emit_b): New function.
2166 (emit_bcond): Likewise.
2167 (emit_cb): Likewise.
2168 (emit_tb): Likewise.
2169 (emit_blr): Likewise.
2170 (emit_stp): Likewise.
2171 (emit_ldp_q_offset): Likewise.
2172 (emit_stp_q_offset): Likewise.
2173 (emit_load_store): Likewise.
2174 (emit_ldr): Likewise.
2175 (emit_ldrsw): Likewise.
2176 (emit_str): Likewise.
2177 (emit_ldaxr): Likewise.
2178 (emit_stxr): Likewise.
2179 (emit_stlr): Likewise.
2180 (emit_data_processing_reg): Likewise.
2181 (emit_data_processing): Likewise.
2182 (emit_add): Likewise.
2183 (emit_sub): Likewise.
2184 (emit_mov): Likewise.
2185 (emit_movk): Likewise.
2186 (emit_mov_addr): Likewise.
2187 (emit_mrs): Likewise.
2188 (emit_msr): Likewise.
2189 (emit_sevl): Likewise.
2190 (emit_wfe): Likewise.
2191 (append_insns): Likewise.
2192 (can_encode_int32_in): New helper function.
2193 (aarch64_relocate_instruction): New function.
2194 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2195 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2196 (struct linux_target_ops): Install aarch64_get_thread_area,
2197 aarch64_install_fast_tracepoint_jump_pad and
2198 aarch64_get_min_fast_tracepoint_insn_len.
2199
2200 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2201
2202 * Makefile.in (aarch64-insn.o): New rule.
2203 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2204
2205 2015-09-21 Yao Qi <yao.qi@linaro.org>
2206
2207 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2208
2209 2015-09-21 Yao Qi <yao.qi@linaro.org>
2210
2211 * tracepoint.c (max_jump_pad_size): Remove.
2212
2213 2015-09-18 Yao Qi <yao.qi@linaro.org>
2214
2215 * linux-aarch64-low.c: Don't include sys/uio.h.
2216 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2217
2218 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
2219
2220 * tracepoint.c (eval_result_type): Change prototype.
2221 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2222
2223 2015-09-15 Pedro Alves <palves@redhat.com>
2224
2225 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2226 Check whether to report exec events instead of checking whether
2227 multiprocess is enabled.
2228
2229 2015-09-15 Pedro Alves <palves@redhat.com>
2230
2231 PR remote/18965
2232 * remote-utils.c (prepare_resume_reply): Merge
2233 TARGET_WAITKIND_VFORK_DONE switch case with the
2234 TARGET_WAITKIND_FORKED case.
2235
2236 2015-09-15 Yao Qi <yao.qi@linaro.org>
2237
2238 * server.c (handle_query): Check string comparison using
2239 "else if" instead of "if".
2240
2241 2015-09-15 Yao Qi <yao.qi@linaro.org>
2242
2243 * server.c (vCont_supported): New global variable.
2244 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2245 matches. Append ";vContSupported+" to own_buf.
2246 (handle_v_requests): Append ";s;S" to own_buf if target supports
2247 hardware single step or vCont_supported is false.
2248 (capture_main): Set vCont_supported to zero.
2249
2250 2015-09-15 Yao Qi <yao.qi@linaro.org>
2251
2252 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2253 it to ...
2254 (linux_supports_hardware_single_step): ... New function.
2255 (linux_target_ops): Update.
2256 * lynx-low.c (lynx_target_ops): Set field
2257 supports_hardware_single_step to target_can_do_hardware_single_step.
2258 * nto-low.c (nto_target_ops): Likewise.
2259 * spu-low.c (spu_target_ops): Likewise.
2260 * win32-low.c (win32_target_ops): Likewise.
2261 * target.c (target_can_do_hardware_single_step): New function.
2262 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2263 Remove. <supports_hardware_single_step>: New field.
2264 (target_supports_conditional_breakpoints): Remove.
2265 (target_supports_hardware_single_step): New macro.
2266 (target_can_do_hardware_single_step): Declare.
2267 * server.c (handle_query): Use target_supports_hardware_single_step
2268 instead of target_supports_conditional_breakpoints.
2269
2270 2015-09-15 Yao Qi <yao.qi@linaro.org>
2271
2272 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2273 function.
2274 (struct linux_target_ops the_low_target): Install
2275 aarch64_linux_siginfo_fixup.
2276
2277 2015-09-11 Don Breazeal <donb@codesourcery.com>
2278 Luis Machado <lgustavo@codesourcery.com>
2279
2280 * linux-low.c (linux_mourn): Static declaration.
2281 (linux_arch_setup): Move in front of
2282 handle_extended_wait.
2283 (linux_arch_setup_thread): New function.
2284 (handle_extended_wait): Handle exec events. Call
2285 linux_arch_setup_thread. Make event_lwp argument a
2286 pointer-to-a-pointer.
2287 (check_zombie_leaders): Do not check stopped threads.
2288 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2289 (linux_low_filter_event): Add lwp and thread for exec'ing
2290 non-leader thread if leader thread has been deleted.
2291 Refactor code into linux_arch_setup_thread and call it.
2292 Pass child lwp pointer by reference to handle_extended_wait.
2293 (linux_wait_for_event_filtered): Update comment.
2294 (linux_wait_1): Prevent clobbering exec event status.
2295 (linux_supports_exec_events): New function.
2296 (linux_target_ops) <supports_exec_events>: Initialize new member.
2297 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2298 new member.
2299 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2300 * server.c (report_exec_events): New global variable.
2301 (handle_query): Handle qSupported query for exec-events feature.
2302 (captured_main): Initialize report_exec_events.
2303 * server.h (report_exec_events): Declare new global variable.
2304 * target.h (struct target_ops) <supports_exec_events>: New
2305 member.
2306 (target_supports_exec_events): New macro.
2307 * win32-low.c (win32_target_ops) <supports_exec_events>:
2308 Initialize new member.
2309
2310 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2311
2312 * linux-low.c (linux_low_enable_btrace): Remove.
2313 (linux_target_ops): Replace linux_low_enable_btrace with
2314 linux_enable_btrace.
2315
2316 2015-09-03 Yao Qi <yao.qi@linaro.org>
2317
2318 * linux-aarch64-low.c (aarch64_insert_point): Call
2319 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2320 returns true.
2321
2322 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2323
2324 * linux-low.c (check_stopped_by_breakpoint): Use
2325 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2326
2327 2015-08-27 Pedro Alves <palves@redhat.com>
2328
2329 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2330
2331 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2332
2333 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2334 the XNEW-family equivalent.
2335 (compile_bytecodes): Likewise.
2336 * dll.c (loaded_dll): Likewise.
2337 * event-loop.c (append_callback_event): Likewise.
2338 (create_file_handler): Likewise.
2339 (create_file_event): Likewise.
2340 * hostio.c (handle_open): Likewise.
2341 * inferiors.c (add_thread): Likewise.
2342 (add_process): Likewise.
2343 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2344 * linux-arm-low.c (arm_new_process): Likewise.
2345 (arm_new_thread): Likewise.
2346 * linux-low.c (add_to_pid_list): Likewise.
2347 (linux_add_process): Likewise.
2348 (handle_extended_wait): Likewise.
2349 (add_lwp): Likewise.
2350 (enqueue_one_deferred_signal): Likewise.
2351 (enqueue_pending_signal): Likewise.
2352 (linux_resume_one_lwp_throw): Likewise.
2353 (linux_resume_one_thread): Likewise.
2354 (linux_read_memory): Likewise.
2355 (linux_write_memory): Likewise.
2356 * linux-mips-low.c (mips_linux_new_process): Likewise.
2357 (mips_linux_new_thread): Likewise.
2358 (mips_add_watchpoint): Likewise.
2359 * linux-x86-low.c (initialize_low_arch): Likewise.
2360 * lynx-low.c (lynx_add_process): Likewise.
2361 * mem-break.c (set_raw_breakpoint_at): Likewise.
2362 (set_breakpoint): Likewise.
2363 (add_condition_to_breakpoint): Likewise.
2364 (add_commands_to_breakpoint): Likewise.
2365 (clone_agent_expr): Likewise.
2366 (clone_one_breakpoint): Likewise.
2367 * regcache.c (new_register_cache): Likewise.
2368 * remote-utils.c (look_up_one_symbol): Likewise.
2369 * server.c (queue_stop_reply): Likewise.
2370 (start_inferior): Likewise.
2371 (queue_stop_reply_callback): Likewise.
2372 (handle_target_event): Likewise.
2373 * spu-low.c (fetch_ppc_memory): Likewise.
2374 (store_ppc_memory): Likewise.
2375 * target.c (set_target_ops): Likewise.
2376 * thread-db.c (thread_db_load_search): Likewise.
2377 (try_thread_db_load_1): Likewise.
2378 * tracepoint.c (add_tracepoint): Likewise.
2379 (add_tracepoint_action): Likewise.
2380 (create_trace_state_variable): Likewise.
2381 (cmd_qtdpsrc): Likewise.
2382 (cmd_qtro): Likewise.
2383 (add_while_stepping_state): Likewise.
2384 * win32-low.c (child_add_thread): Likewise.
2385 (get_image_name): Likewise.
2386
2387 2015-08-25 Yao Qi <yao.qi@linaro.org>
2388
2389 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2390
2391 2015-08-25 Yao Qi <yao.qi@linaro.org>
2392
2393 * Makefile.in (aarch64-linux.o): New rule.
2394 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2395 srv_tgtobj.
2396 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2397 (aarch64_init_debug_reg_state): Make it extern.
2398 (aarch64_linux_prepare_to_resume): Remove.
2399
2400 2015-08-25 Yao Qi <yao.qi@linaro.org>
2401
2402 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2403 lwp_arch_private_info and ptid_of_lwp.
2404
2405 2015-08-25 Yao Qi <yao.qi@linaro.org>
2406
2407 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2408 Find proc_info by find_process_pid. All callers updated.
2409
2410 2015-08-25 Yao Qi <yao.qi@linaro.org>
2411
2412 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2413 Remove.
2414 (debug_reg_change_callback): Remove.
2415 (aarch64_notify_debug_reg_change): Remove.
2416
2417 2015-08-25 Yao Qi <yao.qi@linaro.org>
2418
2419 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2420 Call current_lwp_ptid.
2421
2422 2015-08-25 Yao Qi <yao.qi@linaro.org>
2423
2424 * linux-aarch64-low.c (debug_reg_change_callback): Use
2425 debug_printf.
2426
2427 2015-08-25 Yao Qi <yao.qi@linaro.org>
2428
2429 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2430
2431 2015-08-25 Yao Qi <yao.qi@linaro.org>
2432
2433 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2434
2435 2015-08-25 Yao Qi <yao.qi@linaro.org>
2436
2437 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2438 the code.
2439
2440 2015-08-25 Yao Qi <yao.qi@linaro.org>
2441
2442 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2443 Remove.
2444 (debug_reg_change_callback): Remove argument entry and add argument
2445 lwp. Remove local variable thread. Don't print thread id in the
2446 debugging output. Don't check whether pid of thread equals to pid.
2447 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2448 iterate_over_lwps instead find_inferior.
2449
2450 2015-08-24 Pedro Alves <palves@redhat.com>
2451
2452 * inferiors.c (get_first_process): New function.
2453 * inferiors.h (get_first_process): New declaration.
2454 * remote-utils.c (read_ptid): Default to the first process in the
2455 list, instead of to the current thread's process.
2456
2457 2015-08-24 Pedro Alves <palves@redhat.com>
2458
2459 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2460 * event-loop.c: Likewise.
2461 * remote-utils.c: Likewise.
2462 * tracepoint.c: Likewise.
2463
2464 2015-08-24 Pedro Alves <palves@redhat.com>
2465
2466 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2467 ptid_get_lwp.
2468
2469 2015-08-21 Pedro Alves <palves@redhat.com>
2470
2471 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2472 instead of literal 1.
2473
2474 2015-08-21 Pedro Alves <palves@redhat.com>
2475
2476 * tdesc.c (default_description): Explicitly zero-initialize.
2477
2478 2015-08-21 Pedro Alves <palves@redhat.com>
2479
2480 PR gdb/18749
2481 * inferiors.c (remove_thread): Discard any pending stop reply for
2482 this thread.
2483 * server.c (remove_all_on_match_pid): Rename to ...
2484 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2485 instead of a pid.
2486 (discard_queued_stop_replies): Change parameter to a ptid. Now
2487 extern.
2488 (handle_v_kill, kill_inferior_callback, captured_main)
2489 (process_serial_event): Adjust.
2490 * server.h (discard_queued_stop_replies): Declare.
2491
2492 2015-08-21 Pedro Alves <palves@redhat.com>
2493
2494 * linux-low.c (wait_for_sigstop): Always switch to no thread
2495 selected if the previously current thread dies.
2496 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2497 process instead of the current thread's.
2498 * remote-utils.c (input_interrupt): Don't check if there's no
2499 current thread.
2500 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2501 current thread to the general thread fails, error out.
2502 (handle_qxfer_auxv, handle_qxfer_libraries)
2503 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2504 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2505 (handle_query): Check if there's a thread selected instead of
2506 checking whether there's any thread in the thread list.
2507 (handle_qxfer_threads, handle_qxfer_btrace)
2508 (handle_qxfer_btrace_conf): Don't error out early if there's no
2509 thread in the thread list.
2510 (handle_v_cont, myresume): Don't set the current thread to the
2511 continue thread.
2512 (process_serial_event) <Hg handling>: Also set thread_id if the
2513 previous general thread is still alive.
2514 (process_serial_event) <g/G handling>: If setting the current
2515 thread to the general thread fails, error out.
2516 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2517 thread's lwp instead of the current thread's.
2518 * target.c (set_desired_thread): If the desired thread was not
2519 found, leave the current thread pointing to NULL. Return an int
2520 (boolean) indicating success.
2521 * target.h (set_desired_thread): Change return type to int.
2522
2523 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2524
2525 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2526 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2527 #includes.
2528 (ps_get_thread_area): New function.
2529
2530 2015-08-19 Gary Benson <gbenson@redhat.com>
2531
2532 * hostio.c (handle_pread): Do not attempt to read more data
2533 than hostio_reply_with_data can fit in a packet.
2534
2535 2015-08-18 Joel Brobecker <brobecker@adacore.com>
2536
2537 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2538
2539 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2540
2541 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2542
2543 2015-08-06 Pedro Alves <palves@redhat.com>
2544
2545 * tracepoint.c (expr_eval_result): Now an int.
2546
2547 2015-08-06 Pedro Alves <palves@redhat.com>
2548
2549 * gdbthread.h (struct regcache): Forward declare.
2550 (struct thread_info) <regcache_data>: Now a struct regcache
2551 pointer.
2552 * inferiors.c (inferior_regcache_data)
2553 (set_inferior_regcache_data): Now work with struct regcache
2554 pointers.
2555 * inferiors.h (struct regcache): Forward declare.
2556 (inferior_regcache_data, set_inferior_regcache_data): Now work
2557 with struct regcache pointers.
2558 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2559 (free_register_cache_thread): Remove struct regcache pointer
2560 casts.
2561
2562 2015-08-06 Pedro Alves <palves@redhat.com>
2563
2564 * server.c (captured_main): On error, print the exception message
2565 to stderr, and if run_once is set, throw a quit.
2566
2567 2015-08-06 Pedro Alves <palves@redhat.com>
2568
2569 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2570 the current thread.
2571
2572 2015-08-06 Pedro Alves <palves@redhat.com>
2573
2574 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2575 reading beyond the passed in buffer length.
2576
2577 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2578
2579 * tracepoint.c (symbol_list) <required>: Remove.
2580
2581 2015-08-06 Pedro Alves <palves@redhat.com>
2582
2583 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2584 count if stopping and suspending threads.
2585 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2586 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2587 (linux_detach): Complete an ongoing step-over.
2588 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2589 throughout.
2590 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2591 (linux_wait_1): If passing a signal to the inferior after
2592 finishing a step-over, unsuspend and re-resume all lwps. If we
2593 see a single-step event but the thread should be continuing, don't
2594 pass the trap to gdb.
2595 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2596 internal_error instead of gdb_assert.
2597 (enqueue_pending_signal): New function.
2598 (check_ptrace_stopped_lwp_gone): Add debug output.
2599 (start_step_over): Use internal_error instead of gdb_assert.
2600 (complete_ongoing_step_over): New function.
2601 (linux_resume_one_thread): Don't resume a suspended thread.
2602 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2603 it stepping.
2604
2605 2015-08-06 Pedro Alves <palves@redhat.com>
2606
2607 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2608 (linux_thread_alive): Use lwp_is_marked_dead.
2609 (extended_event_reported): Delete.
2610 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2611 instead of extended_event_reported.
2612 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2613 as well.
2614 (lwp_is_marked_dead): New function.
2615 (lwp_running): Use lwp_is_marked_dead.
2616 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2617 comment.
2618
2619 2015-08-06 Pedro Alves <palves@redhat.com>
2620
2621 * linux-low.c (linux_wait_1): Move fork event output out of the
2622 !report_to_gdb check. Pass event_child->waitstatus to
2623 target_waitstatus_to_string instead of ourstatus.
2624
2625 2015-08-04 Yao Qi <yao.qi@linaro.org>
2626
2627 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2628 if current_thread is 32 bit.
2629
2630 2015-08-04 Yao Qi <yao.qi@linaro.org>
2631
2632 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2633 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2634 * server.c (extended_protocol): Remove "static".
2635 * server.h (extended_protocol): Declare it.
2636
2637 2015-08-04 Yao Qi <yao.qi@linaro.org>
2638
2639 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2640 both aarch64 and aarch32.
2641 (aarch64_set_pc): Likewise.
2642
2643 2015-08-04 Yao Qi <yao.qi@linaro.org>
2644
2645 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2646 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2647 arm-with-neon.xml to srv_xmlfiles.
2648 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2649 (is_64bit_tdesc): New function.
2650 (aarch64_linux_read_description): New function.
2651 (aarch64_arch_setup): Call aarch64_linux_read_description.
2652 (regs_info): Rename to regs_info_aarch64.
2653 (aarch64_regs_info): Return right regs_info.
2654 (initialize_low_arch): Call initialize_low_arch_aarch32.
2655
2656 2015-08-04 Yao Qi <yao.qi@linaro.org>
2657
2658 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2659 * linux-aarch32-low.c: New file.
2660 * linux-aarch32-low.h: New file.
2661 * linux-arm-low.c (arm_fill_gregset): Move it to
2662 linux-aarch32-low.c.
2663 (arm_store_gregset): Likewise.
2664 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2665 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2666 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2667 (regs_info): Rename to regs_info_arm.
2668 (arm_regs_info): Return regs_info_aarch32 if
2669 have_ptrace_getregset is 1 and target description is
2670 arm_with_neon or arm_with_vfpv3.
2671 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2672 Call initialize_low_arch_aarch32 instead.
2673
2674 2015-08-04 Yao Qi <yao.qi@linaro.org>
2675
2676 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2677 * linux-low.c: ... here.
2678 * linux-low.h (have_ptrace_getregset): Declare it.
2679
2680 2015-08-04 Pedro Alves <palves@redhat.com>
2681
2682 * thread-db.c (struct thread_db): Use new typedefs.
2683 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2684 CHK calls.
2685 (disable_thread_event_reporting): Cast result of dlsym to
2686 destination function pointer type.
2687 (thread_db_mourn): Use td_ta_delete_ftype.
2688
2689 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2690
2691 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2692 arch variant.
2693 (CDX_BREAKPOINT): Define for R2.
2694 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2695 (the_low_target): Add comments.
2696
2697 2015-07-30 Yao Qi <yao.qi@linaro.org>
2698
2699 * linux-arm-low.c (arm_hwcap): Remove it.
2700 (arm_read_description): New local variable arm_hwcap. Don't
2701 set arm_hwcap to zero.
2702
2703 2015-07-30 Yao Qi <yao.qi@linaro.org>
2704
2705 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2706 Use regcache->tdesc instead.
2707 (arm_store_wmmxregset): Likewise.
2708 (arm_fill_vfpregset): Likewise.
2709 (arm_store_vfpregset): Likewise.
2710
2711 2015-07-30 Yao Qi <yao.qi@linaro.org>
2712
2713 * linux-arm-low.c: Include arch/arm.h.
2714 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2715 (arm_store_gregset): Likewise.
2716
2717 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2718
2719 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2720 ptrace's 4th parameter.
2721
2722 2015-07-27 Yao Qi <yao.qi@linaro.org>
2723
2724 * configure.srv (case aarch64*-*-linux*): Don't set
2725 srv_linux_usrregs.
2726
2727 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2728
2729 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2730 sys/ptrace.h.
2731 * linux-arm-low.c: Likewise.
2732 * linux-cris-low.c: Likewise.
2733 * linux-crisv32-low.c: Likewise.
2734 * linux-low.c: Likewise.
2735 * linux-m68k-low.c: Likewise.
2736 * linux-mips-low.c: Likewise.
2737 * linux-nios2-low.c: Likewise.
2738 * linux-s390-low.c: Likewise.
2739 * linux-sparc-low.c: Likewise.
2740 * linux-tic6x-low.c: Likewise.
2741 * linux-tile-low.c: Likewise.
2742 * linux-x86-low.c: Likewise.
2743
2744 2015-07-24 Pedro Alves <palves@redhat.com>
2745
2746 * config.in: Regenerate.
2747 * configure: Regenerate.
2748
2749 2015-07-24 Pedro Alves <palves@redhat.com>
2750
2751 * acinclude.m4: Include ../ptrace.m4.
2752 * configure.ac: Call GDB_AC_PTRACE.
2753 * config.in, configure: Regenerate.
2754
2755 2015-07-24 Yao Qi <yao.qi@linaro.org>
2756
2757 * linux-low.c (linux_create_inferior): Remove setting to
2758 proc->priv->new_inferior.
2759 (linux_attach): Likewise.
2760 (linux_low_filter_event): Likewise.
2761 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2762
2763 2015-07-24 Yao Qi <yao.qi@linaro.org>
2764
2765 * linux-low.c (linux_arch_setup): New function.
2766 (linux_low_filter_event): If proc->tdesc is NULL and
2767 proc->attached is true, call the_low_target.arch_setup.
2768 Otherwise, keep status pending, and return.
2769 (linux_resume_one_lwp_throw): Don't call get_pc if
2770 thread->while_stepping isn't NULL. Don't call
2771 get_thread_regcache if proc->tdesc is NULL.
2772 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2773 (linux_target_ops): Install arch_setup.
2774 * server.c (start_inferior): Call the_target->arch_setup.
2775 * target.h (struct target_ops) <arch_setup>: New field.
2776 (target_arch_setup): New marco.
2777 * lynx-low.c (lynx_target_ops): Update.
2778 * nto-low.c (nto_target_ops): Update.
2779 * spu-low.c (spu_target_ops): Update.
2780 * win32-low.c (win32_target_ops): Update.
2781
2782 2015-07-24 Yao Qi <yao.qi@linaro.org>
2783
2784 * linux-low.c (linux_add_process): Don't set
2785 proc->priv->new_inferior.
2786 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2787 (linux_attach): Likewise.
2788
2789 2015-07-24 Yao Qi <yao.qi@linaro.org>
2790
2791 * server.c (start_inferior): Code refactor.
2792
2793 2015-07-24 Yao Qi <yao.qi@linaro.org>
2794
2795 * server.c (process_serial_event): Set general_thread.
2796
2797 2015-07-21 Yao Qi <yao.qi@linaro.org>
2798
2799 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2800 aarch64_linux_get_debug_reg_capacity.
2801
2802 2015-07-17 Yao Qi <yao.qi@linaro.org>
2803
2804 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2805 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2806 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2807 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2808 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2809 (AARCH64_HWP_ALIGNMENT): Likewise.
2810 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2811 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2812 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2813 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2814 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2815 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2816 (struct aarch64_debug_reg_state): Likewise.
2817 (struct arch_lwp_info): Likewise.
2818 (aarch64_align_watchpoint): Likewise.
2819 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2820 (aarch64_watchpoint_length): Likewise.
2821 (aarch64_point_encode_ctrl_reg): Likewise
2822 (aarch64_point_is_aligned): Likewise.
2823 (aarch64_align_watchpoint): Likewise.
2824 (aarch64_linux_set_debug_regs):
2825 (aarch64_dr_state_insert_one_point): Likewise.
2826 (aarch64_dr_state_remove_one_point): Likewise.
2827 (aarch64_handle_breakpoint): Likewise.
2828 (aarch64_handle_aligned_watchpoint): Likewise.
2829 (aarch64_handle_unaligned_watchpoint): Likewise.
2830 (aarch64_handle_watchpoint): Likewise.
2831
2832 2015-07-17 Yao Qi <yao.qi@linaro.org>
2833
2834 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2835 and don't aarch64_get_debug_reg_state. All callers update.
2836 (aarch64_handle_aligned_watchpoint): Likewise.
2837 (aarch64_handle_unaligned_watchpoint): Likewise.
2838 (aarch64_handle_watchpoint): Likewise.
2839 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2840 (aarch64_remove_point): Likewise.
2841
2842 2015-07-17 Yao Qi <yao.qi@linaro.org>
2843
2844 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2845 debug_printf.
2846 (aarch64_handle_unaligned_watchpoint): Likewise.
2847
2848 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2849
2850 Revert the previous 3 commits:
2851 Move gdb_regex* to common/
2852 Move linux_find_memory_regions_full & co.
2853 gdbserver build-id attribute generator
2854
2855 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2856 Jan Kratochvil <jan.kratochvil@redhat.com>
2857
2858 gdbserver build-id attribute generator.
2859 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2860 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2861 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2862 (find_phdr): New.
2863 (get_dynamic): Use find_pdhr to traverse program headers.
2864 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2865 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2866 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2867 (get_hex_build_id): New.
2868 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2869 to reply XML document.
2870
2871 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2872 Jan Kratochvil <jan.kratochvil@redhat.com>
2873
2874 * target.c: Include target/target-utils.h and fcntl.h.
2875 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2876 (target_fileio_read_stralloc): New functions.
2877
2878 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2879
2880 * Makefile.in (OBS): Add gdb_regex.o.
2881 (gdb_regex.o): New.
2882 * config.in: Rebuilt.
2883 * configure: Rebuilt.
2884
2885 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2886 Jan Kratochvil <jan.kratochvil@redhat.com>
2887
2888 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2889 * Makefile.in (OBS): Add target-utils.o.
2890 (linux-maps.o, target-utils.o): New.
2891 * configure.srv (srv_linux_obj): Add linux-maps.o.
2892
2893 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2894
2895 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2896 function, return 1.
2897 (the_low_target): Install it.
2898
2899 2015-07-14 Pedro Alves <palves@redhat.com>
2900
2901 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2902 Instead, ignore ECHILD, and throw an error for other errnos.
2903
2904 2015-07-10 Pedro Alves <palves@redhat.com>
2905
2906 * event-loop.c (struct callback_event) <data>: Change type to
2907 gdb_client_data instance instead of gdb_client_data pointer.
2908 (append_callback_event): Adjust.
2909
2910 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2911
2912 * linux-aarch64-low.c: Add comments for each linux_target_ops
2913 method. Remove comments already covered in target_ops and
2914 linux_target_ops definitions.
2915 (the_low_target): Add comments for each unimplemented method.
2916
2917 2015-07-09 Yao Qi <yao.qi@linaro.org>
2918
2919 * linux-aarch64-low.c (aarch64_regmap): Remove.
2920 (aarch64_usrregs_info): Remove.
2921 (regs_info): Set field usrregs to NULL.
2922
2923 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2924
2925 * linux-low.c: Include "rsp-low.h"
2926 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2927 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2928 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2929 (handle_btrace_enable_pt): New.
2930 (handle_btrace_general_set): Support "pt".
2931 (handle_btrace_conf_general_set): Support "pt:size".
2932
2933 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2934
2935 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2936 Z_PACKET_SW_BP.
2937
2938 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2939
2940 * linux-aarch64-low.c: Remove comment about endianness.
2941 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2942 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2943 memcmp.
2944
2945 2015-06-24 Gary Benson <gbenson@redhat.com>
2946
2947 * linux-i386-ipa.c (stdint.h): Do not include.
2948 * lynx-i386-low.c (stdint.h): Likewise.
2949 * lynx-ppc-low.c (stdint.h): Likewise.
2950 * mem-break.c (stdint.h): Likewise.
2951 * thread-db.c (stdint.h): Likewise.
2952 * tracepoint.c (stdint.h): Likewise.
2953 * win32-low.c (stdint.h): Likewise.
2954
2955 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2956
2957 * server.c (write_qxfer_response): Update call to
2958 remote_escape_output.
2959
2960 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2961 Jan Kratochvil <jan.kratochvil@redhat.com>
2962
2963 Merge multiple hex conversions.
2964 * gdbreplay.c (tohex): Rename to 'fromhex'.
2965 (logchar): Use fromhex.
2966
2967 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2968
2969 * server.c (handle_qxfer_libraries): Set `version' attribute for
2970 <library-list>.
2971
2972 2015-06-10 Gary Benson <gbenson@redhat.com>
2973
2974 * target.h (struct target_ops) <multifs_open>: New field.
2975 <multifs_unlink>: Likewise.
2976 <multifs_readlink>: Likewise.
2977 * linux-low.c (nat/linux-namespaces.h): New include.
2978 (linux_target_ops): Initialize the_target->multifs_open,
2979 the_target->multifs_unlink and the_target->multifs_readlink.
2980 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2981 * hostio.c (hostio_fs_pid): New static variable.
2982 (hostio_handle_new_gdb_connection): New function.
2983 (handle_setfs): Likewise.
2984 (handle_open): Use the_target->multifs_open as appropriate.
2985 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2986 (handle_readlink): Use the_target->multifs_readlink as
2987 appropriate.
2988 (handle_vFile): Handle vFile:setfs packets.
2989 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2990 after target_handle_new_gdb_connection.
2991
2992 2015-06-10 Gary Benson <gbenson@redhat.com>
2993
2994 * configure.ac (AC_CHECK_FUNCS): Add setns.
2995 * config.in: Regenerate.
2996 * configure: Likewise.
2997 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2998 (linux-namespaces.o): New rule.
2999 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3000
3001 2015-06-09 Gary Benson <gbenson@redhat.com>
3002
3003 * hostio.c (handle_open): Process mode argument with
3004 fileio_to_host_mode.
3005
3006 2015-06-01 Yao Qi <yao.qi@linaro.org>
3007
3008 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3009 * linux-x86-low.c: Likewise.
3010
3011 2015-05-28 Don Breazeal <donb@codesourcery.com>
3012
3013 * linux-low.c (handle_extended_wait): Initialize
3014 thread_info.last_resume_kind for new fork children.
3015
3016 2015-05-15 Pedro Alves <palves@redhat.com>
3017
3018 * target.h (target_handle_new_gdb_connection): Rewrite using if
3019 wrapped in do/while.
3020
3021 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3022
3023 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3024 * configure, config.in: Regenerate.
3025 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3026 Declare typedef.
3027
3028 2015-05-12 Don Breazeal <donb@codesourcery.com>
3029
3030 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3031 PTRACE_EVENT_VFORK_DONE.
3032 (linux_low_ptrace_options, extended_event_reported): Add vfork
3033 events.
3034 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3035 and "vforkdone" for RSP 'T' Stop Reply Packet.
3036 * server.h (report_vfork_events): Declare
3037 global variable.
3038
3039 2015-05-12 Don Breazeal <donb@codesourcery.com>
3040
3041 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3042 (the_low_target) <new_fork>: Initialize new member.
3043 * linux-arm-low.c (arm_new_fork): New function.
3044 (the_low_target) <new_fork>: Initialize new member.
3045 * linux-low.c (handle_extended_wait): Call new target function
3046 new_fork.
3047 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3048 * linux-mips-low.c (mips_add_watchpoint): New function
3049 extracted from mips_insert_point.
3050 (the_low_target) <new_fork>: Initialize new member.
3051 (mips_linux_new_fork): New function.
3052 (mips_insert_point): Call mips_add_watchpoint.
3053 * linux-x86-low.c (x86_linux_new_fork): New function.
3054 (the_low_target) <new_fork>: Initialize new member.
3055
3056 2015-05-12 Don Breazeal <donb@codesourcery.com>
3057
3058 * linux-low.c (handle_extended_wait): Implement return value,
3059 rename argument 'event_child' to 'event_lwp', handle
3060 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3061 (linux_low_ptrace_options): New function.
3062 (linux_low_filter_event): Call linux_low_ptrace_options,
3063 use different argument fo linux_enable_event_reporting,
3064 use return value from handle_extended_wait.
3065 (extended_event_reported): New function.
3066 (linux_wait_1): Call extended_event_reported and set
3067 status to report fork events.
3068 (linux_write_memory): Add pid to debug message.
3069 (reset_lwp_ptrace_options_callback): New function.
3070 (linux_handle_new_gdb_connection): New function.
3071 (linux_target_ops): Initialize new structure member.
3072 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3073 * lynx-low.c: Initialize new structure member.
3074 * remote-utils.c (prepare_resume_reply): Implement stop reason
3075 "fork" for "T" stop message.
3076 * server.c (handle_query): Call handle_new_gdb_connection.
3077 * server.h (report_fork_events): Declare global flag.
3078 * target.h (struct target_ops) <handle_new_gdb_connection>:
3079 New member.
3080 (target_handle_new_gdb_connection): New macro.
3081 * win32-low.c: Initialize new structure member.
3082
3083 2015-05-12 Don Breazeal <donb@codesourcery.com>
3084
3085 * mem-break.c (APPEND_TO_LIST): Define macro.
3086 (clone_agent_expr): New function.
3087 (clone_one_breakpoint): New function.
3088 (clone_all_breakpoints): New function.
3089 * mem-break.h: Declare new functions.
3090
3091 2015-05-12 Don Breazeal <donb@codesourcery.com>
3092
3093 * linux-low.c (linux_supports_fork_events): New function.
3094 (linux_supports_vfork_events): New function.
3095 (linux_target_ops): Initialize new structure members.
3096 (initialize_low): Call linux_check_ptrace_features.
3097 * lynx-low.c (lynx_target_ops): Initialize new structure
3098 members.
3099 * server.c (report_fork_events, report_vfork_events):
3100 New global flags.
3101 (handle_query): Add new features to qSupported packet and
3102 response.
3103 (captured_main): Initialize new global variables.
3104 * target.h (struct target_ops) <supports_fork_events>:
3105 New member.
3106 <supports_vfork_events>: New member.
3107 (target_supports_fork_events): New macro.
3108 (target_supports_vfork_events): New macro.
3109 * win32-low.c (win32_target_ops): Initialize new structure
3110 members.
3111
3112 2015-05-12 Gary Benson <gbenson@redhat.com>
3113
3114 * server.c (handle_qxfer_exec_file): Use current process
3115 if annex is empty.
3116
3117 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3118
3119 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3120 Remove HAVE_PTRACE_GETREGS conditionals.
3121 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3122 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3123
3124 2015-05-08 Yao Qi <yao.qi@linaro.org>
3125
3126 * linux-low.c (linux_supports_conditional_breakpoints): New
3127 function.
3128 (linux_target_ops): Install new target method.
3129 * lynx-low.c (lynx_target_ops): Install NULL hook for
3130 supports_conditional_breakpoints.
3131 * nto-low.c (nto_target_ops): Likewise.
3132 * spu-low.c (spu_target_ops): Likewise.
3133 * win32-low.c (win32_target_ops): Likewise.
3134 * server.c (handle_query): Check
3135 target_supports_conditional_breakpoints.
3136 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3137 New field.
3138 (target_supports_conditional_breakpoints): New macro.
3139
3140 2015-05-06 Pedro Alves <palves@redhat.com>
3141
3142 PR server/18081
3143 * server.c (start_inferior): If the process exits, mourn it.
3144
3145 2015-04-21 Gary Benson <gbenson@redhat.com>
3146
3147 * hostio.c (fileio_open_flags_to_host): Factored out to
3148 fileio_to_host_openflags in common/fileio.c. Single use
3149 updated.
3150
3151 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3152
3153 * linux-xtensa-low.c (xtensa_fill_gregset)
3154 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3155 XCHAL_HAVE_LOOP.
3156
3157 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3158
3159 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3160 (regs_info): Replace usrregs pointer with NULL.
3161
3162 2015-04-17 Gary Benson <gbenson@redhat.com>
3163
3164 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3165 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3166 * server.c (handle_qxfer_exec_file): New function.
3167 (qxfer_packets): Add exec-file entry.
3168 (handle_query): Report qXfer:exec-file:read as supported packet.
3169
3170 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3171
3172 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3173
3174 2015-04-09 Gary Benson <gbenson@redhat.com>
3175
3176 * hostio-errno.c (errno_to_fileio_error): Remove function.
3177 Update caller to use remote_fileio_to_fio_error.
3178
3179 2015-04-09 Yao Qi <yao.qi@linaro.org>
3180
3181 * linux-low.c (linux_insert_point): Call
3182 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3183 (linux_remove_point): Call remove_memory_breakpoint if type is
3184 raw_bkpt_type_sw.
3185 * linux-x86-low.c (x86_insert_point): Don't call
3186 insert_memory_breakpoint.
3187 (x86_remove_point): Don't call remove_memory_breakpoint.
3188
3189 2015-04-01 Pedro Alves <palves@redhat.com>
3190 Cleber Rosa <crosa@redhat.com>
3191
3192 * server.c (gdbserver_usage): Reorganize and extend the usage
3193 message.
3194
3195 2015-03-24 Pedro Alves <palves@redhat.com>
3196
3197 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3198 output. Also dump TRAP_TRACE.
3199 (linux_low_filter_event): In debug output, distinguish a
3200 resume_stop SIGSTOP from a delayed SIGSTOP.
3201
3202 2015-03-24 Gary Benson <gbenson@redhat.com>
3203
3204 * linux-x86-low.c (x86_linux_new_thread): Moved to
3205 nat/x86-linux.c.
3206 (x86_linux_prepare_to_resume): Likewise.
3207
3208 2015-03-24 Gary Benson <gbenson@redhat.com>
3209
3210 * Makefile.in (x86-linux-dregs.o): New rule.
3211 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3212 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3213 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3214 (x86_linux_dr_get): Likewise.
3215 (x86_linux_dr_set): Likewise.
3216 (update_debug_registers_callback): Likewise.
3217 (x86_linux_dr_set_addr): Likewise.
3218 (x86_linux_dr_get_addr): Likewise.
3219 (x86_linux_dr_set_control): Likewise.
3220 (x86_linux_dr_get_control): Likewise.
3221 (x86_linux_dr_get_status): Likewise.
3222 (x86_linux_update_debug_registers): Likewise.
3223
3224 2015-03-24 Gary Benson <gbenson@redhat.com>
3225
3226 * linux-x86-low.c (x86_linux_update_debug_registers):
3227 New function, factored out from...
3228 (x86_linux_prepare_to_resume): ...this.
3229
3230 2015-03-24 Gary Benson <gbenson@redhat.com>
3231
3232 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3233 (x86_linux_dr_set): Likewise.
3234 (update_debug_registers_callback): Likewise.
3235 (x86_linux_dr_set_addr): Likewise.
3236 (x86_linux_dr_get_addr): Likewise.
3237 (x86_linux_dr_set_control): Likewise.
3238 (x86_linux_dr_get_control): Likewise.
3239 (x86_linux_dr_get_status): Likewise.
3240 (x86_linux_prepare_to_resume): Likewise.
3241
3242 2015-03-24 Gary Benson <gbenson@redhat.com>
3243
3244 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3245 Use perror_with_name. Pass string through gettext.
3246 (x86_linux_dr_set): Likewise.
3247
3248 2015-03-24 Gary Benson <gbenson@redhat.com>
3249
3250 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3251 (x86_linux_dr_set_addr): ...this.
3252 (x86_dr_low_get_addr): Rename to...
3253 (x86_linux_dr_get_addr): ...this.
3254 (x86_dr_low_set_control): Rename to...
3255 (x86_linux_dr_set_control): ...this.
3256 (x86_dr_low_get_control): Rename to...
3257 (x86_linux_dr_get_control): ...this.
3258 (x86_dr_low_get_status): Rename to...
3259 (x86_linux_dr_get_status): ...this.
3260 (x86_dr_low): Update with new function names.
3261
3262 2015-03-24 Gary Benson <gbenson@redhat.com>
3263
3264 * Makefile.in (x86-linux.o): New rule.
3265 * configure.srv: Add x86-linux.o to relevant targets.
3266 * linux-low.c (lwp_set_arch_private_info): New function.
3267 (lwp_arch_private_info): Likewise.
3268 * linux-x86-low.c: Include nat/x86-linux.h.
3269 (arch_lwp_info): Removed structure.
3270 (update_debug_registers_callback):
3271 Use lwp_set_debug_registers_changed.
3272 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3273 and lwp_set_debug_registers_changed.
3274 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3275
3276 2015-03-24 Gary Benson <gbenson@redhat.com>
3277
3278 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3279 * linux-arm-low.c (arm_new_thread): Likewise.
3280 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3281 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3282 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3283 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3284
3285 2015-03-24 Gary Benson <gbenson@redhat.com>
3286
3287 * linux-low.c (ptid_of_lwp): New function.
3288 (lwp_is_stopped): Likewise.
3289 (lwp_stop_reason): Likewise.
3290 * linux-x86-low.c (update_debug_registers_callback):
3291 Use lwp_is_stopped.
3292 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3293 lwp_stop_reason.
3294
3295 2015-03-24 Gary Benson <gbenson@redhat.com>
3296
3297 * linux-low.h (linux_stop_lwp): Remove declaration.
3298
3299 2015-03-24 Gary Benson <gbenson@redhat.com>
3300
3301 * linux-low.h: Include nat/linux-nat.h.
3302 * linux-low.c (iterate_over_lwps_args): New structure.
3303 (iterate_over_lwps_filter): New function.
3304 (iterate_over_lwps): Likewise.
3305 * linux-x86-low.c (update_debug_registers_callback):
3306 Update signature to what iterate_over_lwps expects.
3307 Remove PID check that iterate_over_lwps now performs.
3308 (x86_dr_low_set_addr): Use iterate_over_lwps.
3309 (x86_dr_low_set_control): Likewise.
3310
3311 2015-03-24 Gary Benson <gbenson@redhat.com>
3312
3313 * linux-x86-low.c (x86_debug_reg_state): New function.
3314 (x86_linux_prepare_to_resume): Use the above.
3315
3316 2015-03-24 Gary Benson <gbenson@redhat.com>
3317
3318 * linux-low.c (current_lwp_ptid): New function.
3319 * linux-x86-low.c: Include nat/linux-nat.h.
3320 (x86_dr_low_get_addr): Use current_lwp_ptid.
3321 (x86_dr_low_get_control): Likewise.
3322 (x86_dr_low_get_status): Likewise.
3323
3324 2015-03-20 Pedro Alves <palves@redhat.com>
3325
3326 * tracepoint.c (cmd_qtstatus): Make "str" const.
3327
3328 2015-03-20 Pedro Alves <palves@redhat.com>
3329
3330 * server.c (handle_general_set): Make "req_str" const.
3331
3332 2015-03-19 Pedro Alves <palves@redhat.com>
3333
3334 * linux-low.c (linux_resume_one_lwp): Rename to ...
3335 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3336 instead call perror_with_name.
3337 (check_ptrace_stopped_lwp_gone): New function.
3338 (linux_resume_one_lwp): Reimplement as wrapper around
3339 linux_resume_one_lwp_throw that swallows errors if the LWP is
3340 gone.
3341
3342 2015-03-19 Pedro Alves <palves@redhat.com>
3343
3344 * linux-low.c (count_events_callback, select_event_lwp_callback):
3345 No longer check whether the thread has resume_stop as last resume
3346 kind.
3347
3348 2015-03-19 Pedro Alves <palves@redhat.com>
3349
3350 * linux-low.c (count_events_callback, select_event_lwp_callback):
3351 Use the lwp's status_pending_p field, not the thread's.
3352
3353 2015-03-19 Pedro Alves <palves@redhat.com>
3354
3355 * linux-low.c (select_event_lwp_callback): Update comments to
3356 no longer mention SIGTRAP.
3357
3358 2015-03-18 Gary Benson <gbenson@redhat.com>
3359
3360 * server.c (handle_query): Do not report vFile:fstat as supported.
3361
3362 2015-03-11 Gary Benson <gbenson@redhat.com>
3363
3364 * hostio.c (sys/types.h): New include.
3365 (sys/stat.h): Likewise.
3366 (common-remote-fileio.h): Likewise.
3367 (handle_fstat): New function.
3368 (handle_vFile): Handle vFile:fstat packets.
3369
3370 2015-03-11 Gary Benson <gbenson@redhat.com>
3371
3372 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3373 struct stat.st_blocks and struct stat.st_blksize.
3374 * configure: Regenerate.
3375 * config.in: Likewise.
3376 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3377 (OBS): Add common-remote-fileio.o.
3378 (common-remote-fileio.o): New rule.
3379
3380 2015-03-09 Pedro Alves <palves@redhat.com>
3381
3382 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3383 'struct sockaddr' pointer in 'accept' call.
3384
3385 2015-03-09 Pedro Alves <palves@redhat.com>
3386
3387 Revert:
3388 2015-03-07 Pedro Alves <palves@redhat.com>
3389 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3390 or <winsock2.h> here. Instead include "gdb_socket.h".
3391 (remote_open): Use union gdb_sockaddr_u.
3392 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3393 or <winsock2.h> here. Instead include "gdb_socket.h".
3394 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3395 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3396 or <sys/un.h>.
3397 (init_named_socket, gdb_agent_helper_thread): Use union
3398 gdb_sockaddr_u.
3399
3400 2015-03-07 Pedro Alves <palves@redhat.com>
3401
3402 * configure.ac (build_warnings): Move
3403 -Wdeclaration-after-statement to the C-specific set.
3404 * configure: Regenerate.
3405
3406 2015-03-07 Pedro Alves <palves@redhat.com>
3407
3408 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3409 or <winsock2.h> here. Instead include "gdb_socket.h".
3410 (remote_open): Use union gdb_sockaddr_u.
3411 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3412 or <winsock2.h> here. Instead include "gdb_socket.h".
3413 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3414 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3415 or <sys/un.h>.
3416 (init_named_socket, gdb_agent_helper_thread): Use union
3417 gdb_sockaddr_u.
3418
3419 2015-03-07 Pedro Alves <palves@redhat.com>
3420
3421 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3422 instead.
3423
3424 2015-03-06 Yao Qi <yao.qi@linaro.org>
3425
3426 * linux-aarch64-low.c (aarch64_insert_point): Use
3427 show_debug_regs as a boolean.
3428 (aarch64_remove_point): Likewise.
3429
3430 2015-03-05 Pedro Alves <palves@redhat.com>
3431
3432 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3433 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3434 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3435 * nto-low.c (nto_target_ops): Likewise.
3436 * spu-low.c (spu_target_ops): Likewise.
3437 * win32-low.c (win32_target_ops): Likewise.
3438
3439 2015-03-04 Pedro Alves <palves@redhat.com>
3440
3441 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3442 Decide whether a breakpoint triggered based on the SIGTRAP's
3443 siginfo.si_code.
3444 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3445 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3446 (linux_low_filter_event): Check for breakpoints before checking
3447 watchpoints.
3448 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3449 siginfo.si_code.
3450 (linux_stopped_by_sw_breakpoint)
3451 (linux_supports_stopped_by_sw_breakpoint)
3452 (linux_stopped_by_hw_breakpoint)
3453 (linux_supports_stopped_by_hw_breakpoint): New functions.
3454 (linux_target_ops): Install new target methods.
3455
3456 2015-03-04 Pedro Alves <palves@redhat.com>
3457
3458 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3459 * server.c (swbreak_feature, hwbreak_feature): New globals.
3460 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3461 (captured_main): Clear swbreak_feature and hwbreak_feature.
3462 * server.h (swbreak_feature, hwbreak_feature): Declare.
3463 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3464 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3465 supports_stopped_by_hw_breakpoint>: New fields.
3466 (target_supports_stopped_by_sw_breakpoint)
3467 (target_stopped_by_sw_breakpoint)
3468 (target_supports_stopped_by_hw_breakpoint)
3469 (target_stopped_by_hw_breakpoint): Declare.
3470
3471 2015-03-04 Pedro Alves <palves@redhat.com>
3472
3473 enum lwp_stop_reason -> enum target_stop_reason
3474 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3475 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3476 (linux_wait_1, stuck_in_jump_pad_callback)
3477 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3478 (linux_stopped_by_watchpoint):
3479 * linux-low.h (enum lwp_stop_reason): Delete.
3480 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3481 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3482
3483 2015-03-04 Yao Qi <yao.qi@linaro.org>
3484
3485 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3486
3487 2015-03-03 Gary Benson <gbenson@redhat.com>
3488
3489 * hostio.c (handle_vFile): Fix prefix lengths.
3490
3491 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3492
3493 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3494 ptr_bits.
3495
3496 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3497
3498 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3499 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3500 (clean): Add "rm -f" for above C files.
3501 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3502 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3503 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3504 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3505 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3506 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3507 (init_registers_s390x_vx_linux64)
3508 (init_registers_s390x_tevx_linux64)
3509 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3510 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3511 declarations.
3512 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3513 (s390_store_vxrs_high): New functions.
3514 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3515 NT_S390_VXRS_HIGH.
3516 (s390_arch_setup): Add logic for selecting one of the new target
3517 descriptions. Activate the new vector regsets if applicable.
3518 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3519 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3520 and init_registers_s390x_tevx_linux64.
3521
3522 2015-03-01 Pedro Alves <palves@redhat.com>
3523
3524 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3525 parameter.
3526
3527 2015-02-27 Pedro Alves <palves@redhat.com>
3528
3529 * linux-x86-low.c (u_debugreg_offset): New function.
3530 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3531
3532 2015-02-27 Pedro Alves <palves@redhat.com>
3533
3534 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3535 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3536 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3537 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3538 (ps_lsetfpregs, ps_getpid)
3539 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3540 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3541 (ps_lsetxregs, ps_plog): Declare.
3542
3543 2015-02-27 Pedro Alves <palves@redhat.com>
3544
3545 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3546 IP_AGENT_EXPORT_FUNC.
3547 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3548 IP_AGENT_EXPORT_FUNC.
3549 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3550 (IP_AGENT_EXPORT): Delete.
3551 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3552 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3553 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3554 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3555 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3556 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3557 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3558 (traceframe_read_count, traceframe_write_count)
3559 (traceframes_created, trace_state_variables, get_raw_reg)
3560 (get_trace_state_variable_value, set_trace_state_variable_value)
3561 (ust_loaded, helper_thread_id, cmd_buf): Use
3562 IPA_SYM_EXPORTED_NAME.
3563 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3564 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3565 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3566 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3567 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3568 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3569 EXTERN_C_PUSH/EXTERN_C_POP.
3570 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3571 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3572 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3573 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3574 (traceframe_write_count, traceframe_read_count)
3575 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3576 (about_to_request_buffer_space, get_trace_state_variable_value)
3577 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3578 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3579 EXTERN_C_PUSH/EXTERN_C_POP.
3580 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3581 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3582 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3583 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3584 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3585 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3586 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3587 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3588 Define.
3589 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3590 (IP_AGENT_EXPORT_VAR_DECL): Define.
3591 (tracing): Declare.
3592 (gdb_agent_get_raw_reg): Declare.
3593
3594 2015-02-27 Tom Tromey <tromey@redhat.com>
3595 Pedro Alves <palves@redhat.com>
3596
3597 Rename symbols whose names are reserved C++ keywords throughout.
3598
3599 2015-02-27 Pedro Alves <palves@redhat.com>
3600
3601 * Makefile.in (COMPILER): New, get it from autoconf.
3602 (CXX): Get from autoconf instead.
3603 (COMPILE.pre): Use COMPILER.
3604 (CC-LD): Rename to ...
3605 (CC_LD): ... this. Use COMPILER.
3606 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3607 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3608 * acinclude.m4: Include build-with-cxx.m4.
3609 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3610 Disable -Werror by default if building in C++ mode.
3611 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3612 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3613 the C++ compiler. Save/restore CXXFLAGS too.
3614 * configure: Regenerate.
3615
3616 2015-02-27 Pedro Alves <palves@redhat.com>
3617
3618 * acinclude.m4: Include libiberty.m4.
3619 * configure.ac: Call libiberty_INIT.
3620 * config.in, configure: Regenerate.
3621
3622 2015-02-26 Pedro Alves <palves@redhat.com>
3623
3624 * linux-low.c (linux_wait_1): When incrementing the PC past a
3625 program breakpoint always use the_low_target.breakpoint_len as
3626 increment, rather than the maximum between that and
3627 the_low_target.decr_pc_after_break.
3628
3629 2015-02-23 Pedro Alves <palves@redhat.com>
3630
3631 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3632 thread was doing a step-over; always adjust the PC if
3633 we stepped over a permanent breakpoint.
3634 (linux_wait_1): If we stepped over breakpoint that was on top of a
3635 permanent breakpoint, manually advance the PC past it.
3636
3637 2015-02-23 Pedro Alves <palves@redhat.com>
3638
3639 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3640 modes.
3641 (x86_fill_gregset, x86_store_gregset): Use it when handling
3642 $orig_eax.
3643
3644 2015-02-20 Pedro Alves <palves@redhat.com>
3645
3646 * thread-db.c: Include "nat/linux-procfs.h".
3647 (thread_db_init): Skip listing new threads if the kernel supports
3648 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3649
3650 2015-02-20 Pedro Alves <palves@redhat.com>
3651
3652 * linux-low.c (status_pending_p_callback): Use ptid_match.
3653
3654 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3655
3656 PR breakpoints/16812
3657 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3658 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3659 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3660
3661 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3662
3663 PR breakpoints/15956
3664 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3665
3666 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3667
3668 * linux-low.c (linux_low_btrace_conf): Print size.
3669 * server.c (handle_btrace_conf_general_set): New.
3670 (hanle_general_set): Call handle_btrace_conf_general_set.
3671 (handle_query): Report Qbtrace-conf:bts:size as supported.
3672
3673 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3674
3675 * linux-low.c (linux_low_enable_btrace): Update parameters.
3676 (linux_low_btrace_conf): New.
3677 (linux_target_ops)<to_btrace_conf>: Initialize.
3678 * server.c (current_btrace_conf): New.
3679 (handle_btrace_enable): Rename to ...
3680 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3681 to target_enable_btrace. Update comment. Update users.
3682 (handle_qxfer_btrace_conf): New.
3683 (qxfer_packets): Add btrace-conf entry.
3684 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3685 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3686 (target_ops)<read_btrace_conf>: New.
3687 (target_enable_btrace): Update parameters.
3688 (target_read_btrace_conf): New.
3689
3690 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3691
3692 * server.c (handle_btrace_general_set): Remove call to
3693 target_supports_btrace.
3694 (supported_btrace_packets): New.
3695 (handle_query): Call supported_btrace_packets.
3696 * target.h: include btrace-common.h.
3697 (btrace_target_info): Removed.
3698 (supports_btrace, target_supports_btrace): Update parameters.
3699
3700 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3701
3702 * Makefile.in (SFILES): Add common/btrace-common.c.
3703 (OBS): Add common/btrace-common.o.
3704 (btrace-common.o): Add build rules.
3705 * linux-low: Include btrace-common.h.
3706 (linux_low_read_btrace): Use struct btrace_data. Call
3707 btrace_data_init and btrace_data_fini.
3708
3709 2015-02-06 Pedro Alves <palves@redhat.com>
3710
3711 * thread-db.c (find_new_threads_callback): Add debug output.
3712
3713 2015-02-04 Pedro Alves <palves@redhat.com>
3714
3715 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3716 (resume_stopped_resumed_lwps): New function.
3717 (linux_wait_for_event_filtered): Use it.
3718
3719 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3720
3721 * Makefile.in (SFILES): Add linux-personality.c.
3722 (linux-personality.o): New rule.
3723 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3724 list of objects to be built.
3725 * linux-low.c: Include nat/linux-personality.h.
3726 (linux_create_inferior): Remove code to disable address space
3727 randomization (moved to ../nat/linux-personality.c). Create
3728 cleanup to disable address space randomization.
3729
3730 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3731
3732 * Makefile.in (posix-strerror.o): New rule.
3733 (mingw-strerror.o): Likewise.
3734 * configure: Regenerated.
3735 * configure.ac: Source file ../common/common.host. Initialize new
3736 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3737
3738 2015-01-14 Yao Qi <yao@codesourcery.com>
3739
3740 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3741 (ppc-linux.o): New rule.
3742 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3743 * configure.ac: AC_CHECK_FUNCS(getauxval).
3744 * config.in: Re-generated.
3745 * configure: Re-generated.
3746 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3747 ppc64_64bit_inferior_p
3748
3749 2015-01-14 Yao Qi <yao@codesourcery.com>
3750
3751 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3752 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3753 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3754 (PT_ORIG_R3, PT_TRAP): Likewise.
3755 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3756 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3757 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3758
3759 2015-01-10 Joel Brobecker <brobecker@adacore.com>
3760
3761 * i387-fp.c (i387_cache_to_xsave): In look over
3762 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3763 zmmh_low_space field by use of zmmh_high_space.
3764
3765 2015-01-09 Pedro Alves <palves@redhat.com>
3766
3767 * linux-low.c (step_over_bkpt): Move higher up in the file.
3768 (handle_extended_wait): Don't store the stop_pc here.
3769 (get_stop_pc): Adjust comments and rename to ...
3770 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3771 stopped for a software breakpoint or hardware breakpoint.
3772 (thread_still_has_status_pending_p): New function.
3773 (status_pending_p_callback): Use
3774 thread_still_has_status_pending_p. If the event is no longer
3775 interesting, resume the LWP.
3776 (handle_tracepoints): Add assert.
3777 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3778 (wstatus_maybe_breakpoint): New function.
3779 (cancel_breakpoint): Delete function.
3780 (check_stopped_by_watchpoint): New function, factored out from
3781 linux_low_filter_event.
3782 (lp_status_maybe_breakpoint): Delete function.
3783 (linux_low_filter_event): Remove filter_ptid argument.
3784 Leave thread group exits pending here. Store the LWP's stop PC.
3785 Always leave events pending.
3786 (linux_wait_for_event_filtered): Pull all events out of the
3787 kernel, and leave them all pending.
3788 (count_events_callback, select_event_lwp_callback): Consider all
3789 events.
3790 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3791 (select_event_lwp): Only give preference to the stepping LWP in
3792 all-stop mode. Adjust comments.
3793 (ignore_event): New function.
3794 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3795 references to cancel_breakpoints. Adjust to renames. Also give
3796 equal priority to all LWPs that have had events in non-stop mode.
3797 If reporting a software breakpoint event, unadjust the LWP's PC.
3798 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3799 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3800 Adjust.
3801 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3802 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3803 (linux_stopped_by_watchpoint): Adjust.
3804 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3805 * linux-low.h (enum lwp_stop_reason): New.
3806 (struct lwp_info) <stop_pc>: Adjust comment.
3807 <stopped_by_watchpoint>: Delete field.
3808 <stop_reason>: New field.
3809 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3810 * mem-break.c (software_breakpoint_inserted_here)
3811 (hardware_breakpoint_inserted_here): New function.
3812 * mem-break.h (software_breakpoint_inserted_here)
3813 (hardware_breakpoint_inserted_here): Declare.
3814 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3815 (cancel_breakpoints): Delete.
3816 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3817 (upload_fast_traceframes): Remove references to
3818 cancel_breakpoints.
3819
3820 2015-01-09 Pedro Alves <palves@redhat.com>
3821
3822 * thread-db.c (find_new_threads_callback): Ignore thread if the
3823 kernel thread ID is -1.
3824
3825 2015-01-09 Pedro Alves <palves@redhat.com>
3826
3827 * linux-low.c (linux_attach_fail_reason_string): Move to
3828 nat/linux-ptrace.c, and rename.
3829 (linux_attach_lwp): Update comment.
3830 (attach_proc_task_lwp_callback): New function.
3831 (linux_attach): Adjust to rename and use
3832 linux_proc_attach_tgid_threads.
3833 (linux_attach_fail_reason_string): Delete declaration.
3834
3835 2015-01-01 Joel Brobecker <brobecker@adacore.com>
3836
3837 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3838 * server.c (gdbserver_version): Likewise.
3839
3840 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3841
3842 * remote-utils.c: Include ctype.h.
3843 (input_interrupt): Explicitly handle the case when the char
3844 received is the NUL byte. Improve the printing of non-ASCII
3845 characters.
3846
3847 2014-12-16 Joel Brobecker <brobecker@adacore.com>
3848
3849 * linux-low.c (linux_low_filter_event): Update call to
3850 linux_enable_event_reporting following the addition of
3851 a new parameter to that function.
3852
3853 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
3854
3855 PR server/17457
3856 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3857 (AARCH64_FPCR_REGNO): Likewise.
3858 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3859 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3860 (aarch64_store_fpregset): Likewise.
3861
3862 2014-12-15 Joel Brobecker <brobecker@adacore.com>
3863
3864 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3865 Remove FIXME comment about assumption about N.
3866
3867 2014-12-13 Joel Brobecker <brobecker@adacore.com>
3868
3869 * configure.ac: If large-file support is disabled in GDBserver,
3870 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3871 * configure: Regenerate.
3872
3873 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3874
3875 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3876 warning upon ENODATA from ptrace.
3877 * linux-s390-low.c (s390_store_tdb): New.
3878 (s390_regsets): Add regset for NT_S390_TDB.
3879
3880 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3881
3882 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3883 without a fill_function.
3884 * linux-s390-low.c (s390_fill_last_break): Remove.
3885 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3886 (s390_arch_setup): Use regset's size instead of fill_function for
3887 loop end condition.
3888
3889 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3890
3891 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3892 the regset's store function when ptrace returned an error.
3893 * regcache.c (get_thread_regcache): Invalidate register cache
3894 before fetching inferior's registers.
3895
3896 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3897
3898 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3899 while-loop as for-loop.
3900 (regsets_store_inferior_registers): Likewise.
3901
3902 2014-11-28 Yao Qi <yao@codesourcery.com>
3903
3904 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3905 * config.in, configure: Re-generate.
3906 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3907 is defined.
3908
3909 2014-11-21 Yao Qi <yao@codesourcery.com>
3910
3911 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3912 (AC_CHECK_HEADERS): Remove malloc.h.
3913 * configure: Re-generated.
3914 * config.in: Re-generated.
3915 * server.h: Don't include alloca.h and malloc.h.
3916 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3917 Don't include malloc.h.
3918
3919 2014-11-17 Joel Brobecker <brobecker@adacore.com>
3920
3921 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3922 corresponding ERRNO check in same block.
3923
3924 2014-11-12 Pedro Alves <palves@redhat.com>
3925
3926 * server.c (cont_thread): Update comment.
3927 (start_inferior, attach_inferior): No longer clear cont_thread.
3928 (handle_v_cont): No longer set cont_thread.
3929 (captured_main): Clear cont_thread each time a GDB connects.
3930
3931 2014-11-12 Pedro Alves <palves@redhat.com>
3932
3933 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3934 thread, and don't resume all threads if the Hc thread has exited.
3935
3936 2014-11-12 Pedro Alves <palves@redhat.com>
3937
3938 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3939 the process group instead of to a specific LWP.
3940
3941 2014-10-15 Pedro Alves <palves@redhat.com>
3942
3943 PR server/17487
3944 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3945 parameter.
3946 (arm_set_thread_context): Delete.
3947 (the_low_target): Adjust.
3948 * win32-i386-low.c (debug_registers_changed)
3949 (debug_registers_used): Delete.
3950 (update_debug_registers_callback): New function.
3951 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3952 needing to update their debug registers.
3953 (win32_get_current_dr): New function.
3954 (x86_dr_low_get_addr, x86_dr_low_get_control)
3955 (x86_dr_low_get_status): Fetch the debug register from the thread
3956 record's context.
3957 (i386_initial_stuff): Adjust.
3958 (i386_get_thread_context): Remove current_event parameter. Don't
3959 clear debug_registers_changed nor copy DR values to
3960 debug_reg_state.
3961 (i386_set_thread_context): Delete.
3962 (i386_prepare_to_resume): New function.
3963 (i386_thread_added): Mark the thread as needing to update irs
3964 debug registers.
3965 (the_low_target): Remove i386_set_thread_context and install
3966 i386_prepare_to_resume.
3967 * win32-low.c (win32_get_thread_context): Adjust.
3968 (win32_set_thread_context): Use SetThreadContext
3969 directly.
3970 (win32_prepare_to_resume): New function.
3971 (win32_require_context): New function, factored out from ...
3972 (thread_rec): ... this.
3973 (continue_one_thread): Call win32_prepare_to_resume on each thread
3974 we're about to continue.
3975 (win32_resume): Call win32_prepare_to_resume on the event thread.
3976 * win32-low.h (struct win32_thread_info)
3977 <debug_registers_changed>: New field.
3978 (struct win32_target_ops): Change prototype of set_thread_context,
3979 delete set_thread_context and add prepare_to_resume.
3980 (win32_require_context): New declaration.
3981
3982 2014-10-08 Gary Benson <gbenson@redhat.com>
3983
3984 * server.h: Do not include common-exceptions.h.
3985
3986 2014-10-08 Gary Benson <gbenson@redhat.com>
3987
3988 * server.h: Do not include cleanups.h.
3989
3990 2014-09-30 James Hogan <james.hogan@imgtec.com>
3991
3992 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3993 mips64-dsp-linux.c.
3994
3995 2014-09-23 Yao Qi <yao@codesourcery.com>
3996
3997 * linux-low.c (lp_status_maybe_breakpoint): New function.
3998 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3999 (count_events_callback): Likewise.
4000 (select_event_lwp_callback): Likewise.
4001 (cancel_breakpoints_callback): Likewise.
4002
4003 2014-09-19 Don Breazeal <donb@codesourcery.com>
4004
4005 * linux-low.c (handle_extended_wait): Call
4006 linux_ptrace_get_extended_event.
4007 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4008 linux_is_extended_waitstatus.
4009
4010 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4011
4012 * Makefile.in (CPPFLAGS): Define.
4013 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4014 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4015
4016 2014-09-16 Gary Benson <gbenson@redhat.com>
4017
4018 * inferiors.h (current_inferior): Renamed as...
4019 (current_thread): New variable. All uses updated.
4020 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4021 (maybe_move_out_of_jump_pad): Likewise.
4022 (cancel_breakpoint): Likewise.
4023 (linux_low_filter_event): Likewise.
4024 (wait_for_sigstop): Likewise.
4025 (linux_resume_one_lwp): Likewise.
4026 (need_step_over_p): Likewise.
4027 (start_step_over): Likewise.
4028 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4029 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4030 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4031 and save_inferior as saved_thread.
4032 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4033 saved_thread.
4034 (regcache_invalidate_thread): Likewise.
4035 * remote-utils.c (prepare_resume_reply): Likewise.
4036 * thread-db.c (thread_db_get_tls_address): Likewise.
4037 (disable_thread_event_reporting): Likewise.
4038 (remove_thread_event_breakpoints): Likewise.
4039 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4040 as saved_thread.
4041 * target.h (set_desired_inferior): Renamed as...
4042 (set_desired_thread): New declaration. All uses updated.
4043 * server.c (myresume): Updated comment to reference thread instead
4044 of inferior.
4045 (handle_serial_event): Likewise.
4046 (handle_target_event): Likewise.
4047
4048 2014-09-12 Tom Tromey <tromey@redhat.com>
4049 Gary Benson <gbenson@redhat.com>
4050
4051 * regcache.h: Include common-regcache.h.
4052 (regcache_read_pc): Don't declare.
4053 * regcache.c (get_thread_regcache_for_ptid): New function.
4054
4055 2014-09-11 Tom Tromey <tromey@redhat.com>
4056 Gary Benson <gbenson@redhat.com>
4057
4058 * symbol.c: New file.
4059 * Makefile.in (SFILES): Add symbol.c.
4060 (OBS): Add symbol.o.
4061
4062 2014-09-11 Gary Benson <gbenson@redhat.com>
4063
4064 * target.c (target_stop_ptid, target_continue_ptid): New
4065 functions.
4066
4067 2014-09-11 Tom Tromey <tromey@redhat.com>
4068 Gary Benson <gbenson@redhat.com>
4069
4070 * target.h: Include target/target.h.
4071 * target.c (target_read_memory, target_read_uint32)
4072 (target_write_memory): New functions.
4073
4074 2014-09-11 Gary Benson <gbenson@redhat.com>
4075
4076 * server.h (debug_hw_points): Don't declare.
4077 * server.c (debug_hw_points): Don't define. Replace all uses
4078 with show_debug_regs.
4079 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4080 all uses with show_debug_regs.
4081
4082 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4083
4084 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4085 endianness into account.
4086 (ppc_supply_ptrace_register): Likewise.
4087
4088 2014-09-03 James Hogan <james.hogan@imgtec.com>
4089
4090 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4091 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4092
4093 2014-09-03 Gary Benson <gbenson@redhat.com>
4094
4095 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4096 ALL_DEBUG_ADDRESS_REGISTERS.
4097
4098 2014-09-02 Gary Benson <gbenson@redhat.com>
4099
4100 * i386-low.h: Renamed as...
4101 * x86-low.h: New file. All type, function and variable name
4102 prefixes changed from "i386_" to "x86_". All references updated.
4103 * i386-low.c: Renamed as...
4104 * x86-low.c: New file. All type, function and variable name
4105 prefixes changed from "i386_" to "x86_". All references updated.
4106
4107 2014-09-02 Gary Benson <gbenson@redhat.com>
4108
4109 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4110 (x86_linux_new_thread): Likewise.
4111
4112 2014-08-29 Gary Benson <gbenson@redhat.com>
4113
4114 * server.h (setjmp.h): Do not include.
4115 (toplevel): Do not declare.
4116 (common-exceptions.h): Include.
4117 (cleanups.h): Likewise.
4118 * server.c (toplevel): Do not define.
4119 (exit_code): New static global.
4120 (detach_or_kill_for_exit_cleanup): New function.
4121 (main): New function. Original main renamed to...
4122 (captured_main): New function.
4123 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4124
4125 2014-08-29 Gary Benson <gbenson@redhat.com>
4126
4127 * Makefile.in (SFILES): Add common/common-exceptions.c.
4128 (OBS): Add common-exceptions.o.
4129 (common-exceptions.o): New rule.
4130 * utils.c (prepare_to_throw_exception): New function.
4131
4132 2014-08-29 Gary Benson <gbenson@redhat.com>
4133
4134 * config.in: Regenerate.
4135 * configure: Likewise.
4136
4137 2014-08-29 Gary Benson <gbenson@redhat.com>
4138
4139 * Makefile.in (SFILES): Add common/cleanups.c.
4140 (OBS): cleanups.o.
4141 (cleanups.o): New rule.
4142
4143 2014-08-29 Gary Benson <gbenson@redhat.com>
4144
4145 * utils.c (internal_vwarning): New function.
4146
4147 2014-08-28 Gary Benson <gbenson@redhat.com>
4148
4149 * utils.h (fatal): Remove declaration.
4150 * utils.c (fatal): Remove function.
4151
4152 2014-08-28 Gary Benson <gbenson@redhat.com>
4153
4154 * tracepoint.c (gdb_agent_init): Replace fatal with
4155 perror_with_name.
4156 (initialize_tracepoint): Likewise.
4157
4158 2014-08-28 Gary Benson <gbenson@redhat.com>
4159
4160 * remote-utils.c (remote_prepare): Replace fatal with error.
4161
4162 2014-08-28 Gary Benson <gbenson@redhat.com>
4163
4164 * linux-low.c (linux_async): Replace fatal with warning.
4165 Tidy up and return.
4166 (linux_start_non_stop): Return -1 if linux_async failed.
4167
4168 2014-08-28 Gary Benson <gbenson@redhat.com>
4169
4170 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4171 gdb_assert.
4172 (i386_dr_low_get_addr): Remove vague comment.
4173 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4174 gdb_assert.
4175
4176 2014-08-28 Gary Benson <gbenson@redhat.com>
4177
4178 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4179 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4180 internal_error.
4181 (linux_resume_one_lwp): Likewise.
4182 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4183 gdb_assert.
4184 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4185 with internal_error.
4186 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4187 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4188 (find_register_by_name): Replace fatal with internal_error.
4189 (find_regno): Likewise.
4190 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4191 * thread-db.c (thread_db_create_event): Likewise.
4192 (thread_db_load_search): Likewise.
4193 (try_thread_db_load_1): Likewise.
4194 * tracepoint.c (get_jump_space_head): Replace fatal with
4195 internal_error.
4196 (claim_trampoline_space): Likewise.
4197 (have_fast_tracepoint_trampoline_buffer): Likewise.
4198 (cmd_qtstart): Likewise.
4199 (stop_tracing): Likewise.
4200 (fast_tracepoint_collecting): Likewise.
4201 (target_malloc): Likewise.
4202 (download_tracepoint): Likewise.
4203 (download_trace_state_variables): Replace check with gdb_assert.
4204 (upload_fast_traceframes): Replace fatal with internal_error.
4205
4206 2014-08-19 Tom Tromey <tromey@redhat.com>
4207 Gary Benson <gbenson@redhat.com>
4208
4209 * Makefile.in (SFILES): Add common/common-debug.c.
4210 (OBS): Add common-debug.o.
4211 (common-debug.o): New rule.
4212 * debug.h (debug_printf): Don't declare.
4213 * debug.c (debug_printf): Renamed and rewritten as...
4214 (debug_vprintf): New function.
4215
4216 2014-08-19 Gary Benson <gbenson@redhat.com>
4217
4218 * utils.h: Do not include print-utils.h.
4219
4220 2014-08-19 Tom Tromey <tromey@redhat.com>
4221 Gary Benson <gbenson@redhat.com>
4222
4223 * server.h: Add static assertion.
4224 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4225
4226 2014-08-19 Tom Tromey <tromey@redhat.com>
4227 Gary Benson <gbenson@redhat.com>
4228
4229 * Makefile.in (SFILES): Add common/errors.c.
4230 (OBS): Add errors.o.
4231 (IPA_OBS): Add errors-ipa.o.
4232 (errors.o): New rule.
4233 (errors-ipa.o): Likewise.
4234 * utils.h (perror_with_name, error, warning): Don't declare.
4235 * utils.c (warning): Renamed and rewritten as...
4236 (vwarning): New function.
4237 (error): Renamed and rewritten as...
4238 (verror): New function.
4239 (internal_error): Renamed and rewritten as...
4240 (internal_verror): New function.
4241
4242 2014-08-07 Gary Benson <gbenson@redhat.com>
4243
4244 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4245 * configure: Regenerate.
4246 * config.in: Likewise.
4247 * server.h: Do not include errno.h.
4248 * event-loop.c: Likewise.
4249 * hostio-errno.c: Likewise.
4250 * linux-low.c: Likewise.
4251 * remote-utils.c: Likewise.
4252 * spu-low.c: Likewise.
4253 * utils.c: Likewise.
4254 * gdbreplay.c: Unconditionally include errno.h.
4255
4256 2014-08-07 Gary Benson <gbenson@redhat.com>
4257
4258 * server.h: Do not include string.h.
4259 * event-loop.c: Likewise.
4260 * linux-low.c: Likewise.
4261 * regcache.c: Likewise.
4262 * remote-utils.c: Likewise.
4263 * spu-low.c: Likewise.
4264 * utils.c: Likewise.
4265
4266 2014-08-07 Gary Benson <gbenson@redhat.com>
4267
4268 * server.h: Do not include gdb_assert.h.
4269
4270 2014-08-07 Gary Benson <gbenson@redhat.com>
4271
4272 * server.h: Do not include common-utils.h.
4273
4274 2014-08-07 Gary Benson <gbenson@redhat.com>
4275
4276 * server.h: Do not include ptid.h.
4277 * notif.h: Likewise.
4278
4279 2014-08-07 Gary Benson <gbenson@redhat.com>
4280
4281 * server.h: Do not include gdb_locale.h.
4282
4283 2014-08-07 Gary Benson <gbenson@redhat.com>
4284
4285 * server.h: Do not include gdb/signals.h.
4286 * win32-low.c: Likewise.
4287
4288 2014-08-07 Gary Benson <gbenson@redhat.com>
4289
4290 * server.h: Do not include pathmax.h.
4291
4292 2014-08-07 Gary Benson <gbenson@redhat.com>
4293
4294 * server.h: Do not include libiberty.h.
4295 * linux-bfin-low.c: Likewise.
4296
4297 2014-08-07 Gary Benson <gbenson@redhat.com>
4298
4299 * server.h: Do not include ansidecl.h.
4300
4301 2014-08-07 Gary Benson <gbenson@redhat.com>
4302
4303 * linux-x86-low.c: Do not include stddef.h.
4304 * lynx-ppc-low.c: Likewise.
4305 * tracepoint.c: Likewise.
4306
4307 2014-08-07 Gary Benson <gbenson@redhat.com>
4308
4309 * server.h: Do not include stdarg.h.
4310 * nto-low.c: Likewise.
4311
4312 2014-08-07 Gary Benson <gbenson@redhat.com>
4313
4314 * server.h: Do not include stdlib.h.
4315 * inferiors.c: Likewise.
4316 * linux-low.c: Likewise.
4317 * regcache.c: Likewise.
4318 * spu-low.c: Likewise.
4319 * tracepoint.c: Likewise.
4320 * utils.c: Likewise.
4321
4322 2014-08-07 Gary Benson <gbenson@redhat.com>
4323
4324 * server.h: Do not include stdio.h.
4325 * linux-low.c: Likewise.
4326 * remote-utils.c: Likewise.
4327 * spu-low.c: Likewise.
4328 * utils.c: Likewise.
4329 * wincecompat.c: Likewise.
4330
4331 2014-08-06 Gary Benson <gbenson@redhat.com>
4332
4333 * regcache.c (init_register_cache): Move conditionals inside if.
4334
4335 2014-08-06 Gary Benson <gbenson@redhat.com>
4336
4337 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4338
4339 2014-07-31 Gary Benson <gbenson@redhat.com>
4340
4341 * ax.h: Do not include server.h.
4342 * gdbthread.h: Likewise.
4343 * lynx-low.h: Likewise.
4344 * notif.h: Likewise.
4345
4346 2014-07-30 Gary Benson <gbenson@redhat.com>
4347
4348 * server.h: Include common-defs.h.
4349 Do not include config.h or build-gnulib-gdbserver/config.h.
4350
4351 2014-07-30 Gary Benson <gbenson@redhat.com>
4352
4353 * hostio-errno.c: Move server.h to top of includes list.
4354 * inferiors.c: Likewise.
4355 * linux-x86-low.c: Likewise.
4356 * notif.c: Include server.h.
4357
4358 2014-07-24 Tom Tromey <tromey@redhat.com>
4359 Gary Benson <gbenson@redhat.com>
4360
4361 * server.h (CORE_ADDR): Now unsigned.
4362
4363 2014-07-16 Pedro Alves <palves@redhat.com>
4364
4365 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4366
4367 2014-07-15 Pedro Alves <palves@redhat.com>
4368
4369 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4370 copy.
4371
4372 2014-07-11 Pedro Alves <palves@redhat.com>
4373
4374 * linux-low.c (kill_wait_lwp): New function, based on
4375 kill_one_lwp_callback, but use my_waitpid directly.
4376 (kill_one_lwp_callback, linux_kill): Use it.
4377
4378 2014-06-23 Pedro Alves <palves@redhat.com>
4379
4380 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4381 before setting DR0..DR3.
4382
4383 2014-06-20 Gary Benson <gbenson@redhat.com>
4384
4385 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4386 * configure: Regenerated.
4387 * config.in: Likewise.
4388
4389 2014-06-20 Gary Benson <gbenson@redhat.com>
4390
4391 * Makefile.in (SFILES): Update locations for files moved
4392 from common to nat.
4393 (object file files): Reordered.
4394
4395 2014-06-20 Gary Benson <gbenson@redhat.com>
4396
4397 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4398 (i386_dr_low_set_addr): Likewise.
4399 (i386_dr_low_get_addr): Likewise.
4400 (i386_dr_low_can_set_control): Likewise.
4401 (i386_dr_low_set_control): Likewise.
4402 (i386_dr_low_get_control): Likewise.
4403 (i386_dr_low_get_status): Likewise.
4404 (i386_get_debug_register_length): Likewise.
4405 * linux-x86-low.c (i386_dr_low_set_addr):
4406 Changed signature. Made static.
4407 (i386_dr_low_get_addr): Likewise.
4408 (i386_dr_low_set_control): Likewise.
4409 (i386_dr_low_get_control): Likewise.
4410 (i386_dr_low_get_status): Likewise.
4411 (i386_dr_low): New global variable.
4412 * win32-i386-low.c (i386_dr_low_set_addr):
4413 Changed signature. Made static.
4414 (i386_dr_low_get_addr): Likewise.
4415 (i386_dr_low_set_control): Likewise.
4416 (i386_dr_low_get_control): Likewise.
4417 (i386_dr_low_get_status): Likewise.
4418 (i386_dr_low): New global variable.
4419
4420 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4421
4422 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4423 * Makefile.in (AR, AR_FLAGS): Define.
4424 * configure: Regenerate.
4425
4426 2014-06-19 Gary Benson <gbenson@redhat.com>
4427
4428 * Makefile.in (i386-dregs.o): New rule.
4429 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4430 * i386-low.c (target.h): Remove include.
4431 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4432 (DR_CONTROL_SHIFT): Likewise.
4433 (DR_CONTROL_SIZE): Likewise.
4434 (DR_RW_EXECUTE): Likewise.
4435 (DR_RW_WRITE): Likewise.
4436 (DR_RW_READ): Likewise.
4437 (DR_RW_IORW): Likewise.
4438 (DR_LEN_1): Likewise.
4439 (DR_LEN_2): Likewise.
4440 (DR_LEN_4): Likewise.
4441 (DR_LEN_8): Likewise.
4442 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4443 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4444 (DR_ENABLE_SIZE): Likewise.
4445 (DR_LOCAL_SLOWDOWN): Likewise.
4446 (DR_GLOBAL_SLOWDOWN): Likewise.
4447 (DR_CONTROL_RESERVED): Likewise.
4448 (I386_DR_CONTROL_MASK): Likewise.
4449 (I386_DR_VACANT): Likewise.
4450 (I386_DR_LOCAL_ENABLE): Likewise.
4451 (I386_DR_GLOBAL_ENABLE): Likewise.
4452 (I386_DR_DISABLE): Likewise.
4453 (I386_DR_SET_RW_LEN): Likewise.
4454 (I386_DR_GET_RW_LEN): Likewise.
4455 (I386_DR_WATCH_HIT): Likewise.
4456 (i386_wp_op_t): Likewise.
4457 (i386_show_dr): Likewise.
4458 (i386_length_and_rw_bits): Likewise.
4459 (i386_insert_aligned_watchpoint): Likewise.
4460 (i386_remove_aligned_watchpoint): Likewise.
4461 (i386_handle_nonaligned_watchpoint): Likewise.
4462 i386_update_inferior_debug_regs(): Likewise.
4463 (i386_dr_insert_watchpoint): Likewise.
4464 (i386_dr_remove_watchpoint): Likewise.
4465 (i386_dr_region_ok_for_watchpoint): Likewise.
4466 (i386_dr_stopped_data_address): Likewise.
4467 (i386_dr_stopped_by_watchpoint): Likewise.
4468
4469 2014-06-19 Gary Benson <gbenson@redhat.com>
4470
4471 * i386-low.c (i386_dr_show): Renamed to
4472 i386_show_dr and made static. All uses updated.
4473 (i386_dr_length_and_rw_bits): Renamed to
4474 i386_length_and_rw_bits and made static.
4475 All uses updated.
4476 (i386_dr_insert_aligned_watchpoint): Renamed to
4477 i386_insert_aligned_watchpoint and made static.
4478 All uses updated.
4479 (i386_dr_remove_aligned_watchpoint): Renamed to
4480 i386_remove_aligned_watchpoint and made static.
4481 All uses updated.
4482 (i386_dr_update_inferior_debug_regs): Renamed to
4483 i386_update_inferior_debug_regs and made static.
4484 All uses updated.
4485
4486 2014-06-18 Gary Benson <gbenson@redhat.com>
4487
4488 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4489 (i386_dr_low_can_set_control): Likewise.
4490 (i386_get_debug_register_length): Likewise.
4491 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4492 (i386_dr_low_can_set_control): Likewise.
4493 (i386_get_debug_register_length): Likewise.
4494
4495 2014-06-17 Gary Benson <gbenson@redhat.com>
4496
4497 * i386-low.h (i386-dregs.h): New include.
4498 (DR_FIRSTADDR): Now in i386-dregs.h.
4499 (DR_LASTADDR): Likewise.
4500 (DR_NADDR): Likewise.
4501 (DR_STATUS): Likewise.
4502 (DR_CONTROL): Likewise.
4503 (i386_debug_reg_state): Likewise.
4504 (i386_dr_insert_watchpoint): Likewise.
4505 (i386_dr_remove_watchpoint): Likewise.
4506 (i386_dr_region_ok_for_watchpoint): Likewise.
4507 (i386_dr_stopped_data_address): Likewise.
4508 (i386_dr_stopped_by_watchpoint): Likewise.
4509 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4510
4511 2014-06-18 Gary Benson <gbenson@redhat.com>
4512
4513 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4514 i386_dr_insert_watchpoint.
4515 (i386_low_remove_watchpoint): Renamed to
4516 i386_dr_remove_watchpoint.
4517 (i386_low_region_ok_for_watchpoint): Renamed to
4518 i386_dr_region_ok_for_watchpoint.
4519 (i386_low_stopped_data_address): Renamed to
4520 i386_dr_stopped_data_address.
4521 (i386_low_stopped_by_watchpoint): Renamed to
4522 i386_dr_stopped_by_watchpoint.
4523 * i386-low.c (i386_show_dr): Renamed to
4524 i386_dr_show and made nonstatic. All uses updated.
4525 (i386_length_and_rw_bits): Renamed to
4526 i386_dr_length_and_rw_bits and made nonstatic.
4527 All uses updated.
4528 (i386_insert_aligned_watchpoint): Renamed to
4529 i386_dr_insert_aligned_watchpoint and made nonstatic.
4530 All uses updated.
4531 (i386_remove_aligned_watchpoint): Renamed to
4532 i386_dr_remove_aligned_watchpoint and made nonstatic.
4533 All uses updated.
4534 (i386_update_inferior_debug_regs): Renamed to
4535 i386_dr_update_inferior_debug_regs and made nonstatic.
4536 All uses updated.
4537 (i386_low_insert_watchpoint): Renamed to
4538 i386_dr_insert_watchpoint. All uses updated.
4539 (i386_low_remove_watchpoint): Renamed to
4540 i386_dr_remove_watchpoint. All uses updated.
4541 (i386_low_region_ok_for_watchpoint): Renamed to
4542 i386_dr_region_ok_for_watchpoint. All uses updated.
4543 (i386_low_stopped_data_address): Renamed to
4544 i386_dr_stopped_data_address. All uses updated.
4545 (i386_low_stopped_by_watchpoint): Renamed to
4546 i386_dr_stopped_by_watchpoint. All uses updated.
4547
4548 2014-06-18 Gary Benson <gbenson@redhat.com>
4549
4550 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4551 (i386_dr_low_can_set_control): Likewise.
4552 (i386_insert_aligned_watchpoint): New check.
4553
4554 2014-06-18 Gary Benson <gbenson@redhat.com>
4555
4556 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4557 Renamed to state.
4558
4559 2014-06-18 Gary Benson <gbenson@redhat.com>
4560
4561 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4562 instead of fatal and error.
4563 (i386_handle_nonaligned_watchpoint): Likewise.
4564
4565 2014-06-18 Gary Benson <gbenson@redhat.com>
4566
4567 * i386-low.c (i386_get_debug_register_length): New macro.
4568 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4569 (i386_show_dr): Use debug_printf instead of fprintf. Use
4570 phex to format values.
4571
4572 2014-06-18 Gary Benson <gbenson@redhat.com>
4573
4574 * i386-low.h: Comment changes.
4575 * i386-low.c: Likewise.
4576
4577 2014-06-18 Gary Benson <gbenson@redhat.com>
4578
4579 * i386-low.c: Whitespace changes.
4580
4581 2014-06-12 Tom Tromey <tromey@redhat.com>
4582
4583 * utils.c (freeargv): Remove.
4584
4585 2014-06-12 Tom Tromey <tromey@redhat.com>
4586
4587 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4588 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4589 (parse_debug_format_options): Likewise.
4590 (gdbserver_usage): Likewise.
4591 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4592 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4593 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4594 against libiberty.
4595 ($(LIBGNU)): Depend on libiberty.
4596 (all-lib): Recurse into all subdirs.
4597 (install-only): Invoke "install" target in subdirs.
4598 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4599 targets.
4600 * configure: Rebuild.
4601 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4602 for vasprintf, vsnprintf, or gettimeofday.
4603 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4604 srv_tgtobj.
4605
4606 2014-06-05 Joel Brobecker <brobecker@adacore.com>
4607
4608 * development.sh: Delete.
4609 * Makefile.in (config.status): Adjust dependency on development.sh.
4610 * configure.ac: Adjust development.sh source call.
4611 * configure: Regenerate.
4612
4613 2014-06-02 Pedro Alves <palves@redhat.com>
4614
4615 * ax.c (gdb_free_agent_expr): New function.
4616 * ax.h (gdb_free_agent_expr): New declaration.
4617 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4618 list.
4619 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4620 static.
4621 (clear_breakpoint_conditions_and_commands): New function.
4622 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4623 (clear_breakpoint_conditions_and_commands): New declaration.
4624
4625 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4626
4627 * linux-aarch64-low.c (asm/ptrace.h): Include.
4628
4629 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4630
4631 Fix TLS access for -static -pthread.
4632 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4633 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4634 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4635
4636 2014-05-20 Pedro Alves <palves@redhat.com>
4637
4638 * linux-aarch64-low.c (aarch64_insert_point)
4639 (aarch64_remove_point): No longer check whether the type is
4640 supported here. Adjust to new interface.
4641 (the_low_target): Install aarch64_supports_z_point_type as
4642 supports_z_point_type method.
4643 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4644 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4645 instead of a Z packet char. Adjust.
4646 (arm_supports_z_point_type): New function.
4647 (arm_insert_point, arm_remove_point): Adjust to new interface.
4648 (the_low_target): Install arm_supports_z_point_type.
4649 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4650 (cris_insert_point, cris_remove_point): Adjust to new interface.
4651 Don't check whether the type is supported here.
4652 (the_low_target): Install cris_supports_z_point_type.
4653 * linux-low.c (linux_supports_z_point_type): New function.
4654 (linux_insert_point, linux_remove_point): Adjust to new interface.
4655 * linux-low.h (struct linux_target_ops) <insert_point,
4656 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4657 raw_breakpoint pointer parameter.
4658 <supports_z_point_type>: New method.
4659 * linux-mips-low.c (mips_supports_z_point_type): New function.
4660 (mips_insert_point, mips_remove_point): Adjust to new interface.
4661 Use mips_supports_z_point_type.
4662 (the_low_target): Install mips_supports_z_point_type.
4663 * linux-ppc-low.c (the_low_target): Install NULL as
4664 supports_z_point_type method.
4665 * linux-s390-low.c (the_low_target): Install NULL as
4666 supports_z_point_type method.
4667 * linux-sparc-low.c (the_low_target): Install NULL as
4668 supports_z_point_type method.
4669 * linux-x86-low.c (x86_supports_z_point_type): New function.
4670 (x86_insert_point): Adjust to new insert_point interface. Use
4671 insert_memory_breakpoint. Adjust to new
4672 i386_low_insert_watchpoint interface.
4673 (x86_remove_point): Adjust to remove_point interface. Use
4674 remove_memory_breakpoint. Adjust to new
4675 i386_low_remove_watchpoint interface.
4676 (the_low_target): Install x86_supports_z_point_type.
4677 * lynx-low.c (lynx_target_ops): Install NULL as
4678 supports_z_point_type callback.
4679 * nto-low.c (nto_supports_z_point_type): New.
4680 (nto_insert_point, nto_remove_point): Adjust to new interface.
4681 (nto_target_ops): Install nto_supports_z_point_type.
4682 * mem-break.c: Adjust intro comment.
4683 (struct raw_breakpoint) <raw_type, size>: New fields.
4684 <inserted>: Update comment.
4685 <shlib_disabled>: Delete field.
4686 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4687 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4688 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4689 (raw_bkpt_type_to_target_hw_bp_type): New function.
4690 (find_enabled_raw_code_breakpoint_at): New function.
4691 (find_raw_breakpoint_at): New type and size parameters. Use them.
4692 (insert_memory_breakpoint): New function, based off
4693 set_raw_breakpoint_at.
4694 (remove_memory_breakpoint): New function.
4695 (set_raw_breakpoint_at): Reimplement.
4696 (set_breakpoint): New, based on set_breakpoint_at.
4697 (set_breakpoint_at): Reimplement.
4698 (delete_raw_breakpoint): Go through the_target->remove_point
4699 instead of assuming memory breakpoints.
4700 (find_gdb_breakpoint_at): Delete.
4701 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4702 (find_gdb_breakpoint): New function.
4703 (set_gdb_breakpoint_at): Delete.
4704 (z_type_supported): New function.
4705 (set_gdb_breakpoint_1): New function, loosely based off
4706 set_gdb_breakpoint_at.
4707 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4708 (delete_gdb_breakpoint_at): Delete.
4709 (delete_gdb_breakpoint_1): New function, loosely based off
4710 delete_gdb_breakpoint_at.
4711 (delete_gdb_breakpoint): New function.
4712 (clear_gdb_breakpoint_conditions): Rename to ...
4713 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4714 breakpoint.
4715 (add_condition_to_breakpoint): Make static.
4716 (add_breakpoint_condition): Take a struct breakpoint pointer
4717 instead of an address. Adjust.
4718 (gdb_condition_true_at_breakpoint): Rename to ...
4719 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4720 z_type parameter.
4721 (gdb_condition_true_at_breakpoint): Reimplement.
4722 (add_breakpoint_commands): Take a struct breakpoint pointer
4723 instead of an address. Adjust.
4724 (gdb_no_commands_at_breakpoint): Rename to ...
4725 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4726 parameter. Return true if no breakpoint was found. Change debug
4727 output.
4728 (gdb_no_commands_at_breakpoint): Reimplement.
4729 (run_breakpoint_commands): Rename to ...
4730 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4731 and change return type to boolean.
4732 (run_breakpoint_commands): New function.
4733 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4734 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4735 breakpoint. Go through the_target->remove_point instead of
4736 assuming memory breakpoint.
4737 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4738 software and hardware breakpoints.
4739 (reinsert_raw_breakpoint): Go through the_target->insert_point
4740 instead of assuming memory breakpoint.
4741 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4742 software and hardware breakpoints.
4743 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4744 Check both software and hardware breakpoints.
4745 (validate_inserted_breakpoint): Assert the breakpoint is a
4746 software breakpoint. Set the inserted flag to -1 instead of
4747 setting shlib_disabled.
4748 (delete_disabled_breakpoints): Adjust.
4749 (validate_breakpoints): Only validate software breakpoints.
4750 Adjust to inserted flag change.
4751 (check_mem_read, check_mem_write): Skip breakpoint types other
4752 than software breakpoints. Adjust to inserted flag change.
4753 * mem-break.h (enum raw_bkpt_type): New enum.
4754 (raw_breakpoint, struct process_info): Forward declare.
4755 (Z_packet_to_target_hw_bp_type): Delete declaration.
4756 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4757 (set_gdb_breakpoint, delete_gdb_breakpoint)
4758 (clear_breakpoint_conditions): New declarations.
4759 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4760 (breakpoint_inserted_here): Update comment.
4761 (add_breakpoint_condition, add_breakpoint_commands): Replace
4762 address parameter with a breakpoint pointer parameter.
4763 (gdb_breakpoint_here): Update comment.
4764 (delete_gdb_breakpoint_at): Delete.
4765 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4766 * server.c (process_point_options): Take a struct breakpoint
4767 pointer instead of an address. Adjust.
4768 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4769 delete_gdb_breakpoint.
4770 * spu-low.c (spu_target_ops): Install NULL as
4771 supports_z_point_type method.
4772 * target.h: Include mem-break.h.
4773 (struct target_ops) <prepare_to_access_memory>: Update comment.
4774 <supports_z_point_type>: New field.
4775 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4776 instead of a char. Also take a raw breakpoint pointer.
4777 * win32-arm-low.c (the_low_target): Install NULL as
4778 supports_z_point_type.
4779 * win32-i386-low.c (i386_supports_z_point_type): New function.
4780 (i386_insert_point, i386_remove_point): Adjust to new interface.
4781 (the_low_target): Install i386_supports_z_point_type.
4782 * win32-low.c (win32_supports_z_point_type): New function.
4783 (win32_insert_point, win32_remove_point): Adjust to new interface.
4784 (win32_target_ops): Install win32_supports_z_point_type.
4785 * win32-low.h (struct win32_target_ops):
4786 <supports_z_point_type>: New method.
4787 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4788 instead of a char. Also take a raw breakpoint pointer.
4789
4790 2014-05-20 Pedro Alves <palves@redhat.com>
4791
4792 * mem-break.h: Include break-common.h.
4793 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4794 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4795 (Z_packet_to_target_hw_bp_type): New declaration.
4796 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4797 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4798 (Z_PACKET_ACCESS_WP): Delete macros.
4799 (Z_packet_to_hw_type): Delete function.
4800 * i386-low.h: Don't include break-common.h here.
4801 (Z_packet_to_hw_type): Delete declaration.
4802 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4803 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4804 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4805 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4806 * linux-aarch64-low.c: Don't include break-common.h here.
4807 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4808 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4809 (Z_packet_to_target_hw_bp_type): Delete function.
4810 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4811 function.
4812 (mips_insert_point, mips_remove_point): Use
4813 Z_packet_to_target_hw_bp_type.
4814
4815 2014-05-20 Pedro Alves <palves@redhat.com>
4816
4817 * linux-aarch64-low.c: Include break-common.h.
4818 (enum target_point_type): Delete.
4819 (Z_packet_to_point_type): Rename to ...
4820 (Z_packet_to_target_hw_bp_type): ... this, and return a
4821 target_hw_bp_type instead.
4822 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4823 instead of an enum target_point_type.
4824 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4825 breakpoint type.
4826 (aarch64_dr_state_insert_one_point)
4827 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4828 (aarch64_handle_aligned_watchpoint)
4829 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4830 Take an enum target_hw_bp_type instead of an enum
4831 target_point_type.
4832 (aarch64_supports_z_point_type): New function.
4833 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4834 use Z_packet_to_target_hw_bp_type.
4835
4836 2014-05-20 Joel Brobecker <brobecker@adacore.com>
4837
4838 * configure.ac: Only use -Werror by default when DEVELOPMENT
4839 is true.
4840 * configure: Regenerate.
4841
4842 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4843
4844 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4845 * linux-x86-low.c (X86_64_USER_REGS): New.
4846 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4847
4848 2014-04-28 Yao Qi <yao@codesourcery.com>
4849
4850 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4851 name.
4852
4853 2014-04-25 Pedro Alves <palves@redhat.com>
4854
4855 PR server/16255
4856 * linux-low.c (linux_attach_fail_reason_string): New function.
4857 (linux_attach_lwp): Delete.
4858 (linux_attach_lwp_1): Rename to ...
4859 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4860 argument. Remove "initial" parameter. Return int instead of
4861 void. Don't error or warn here.
4862 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4863 failure to attach to the tgid. Call warning when failing to
4864 attach to an lwp.
4865 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4866 argument. Remove "initial" parameter. Return int instead of
4867 void. Don't error or warn here.
4868 (linux_attach_fail_reason_string): New declaration.
4869 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4870 interface change. Use linux_attach_fail_reason_string.
4871
4872 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
4873 Walfred Tedeschi <walfred.tedeschi@intel.com>
4874
4875 * Makefile.in: Added rules to handle new files
4876 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4877 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4878 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4879 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4880 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4881 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4882 x32-avx512-linux.o.
4883 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4884 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4885 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4886 i386/x32-avx512.xml.
4887 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4888 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4889 i386/x32-avx512-linux.xml.
4890 * i387-fp.c (num_avx512_k_registers): New constant for number
4891 of K registers.
4892 (num_avx512_zmmh_low_registers): New constant for number of
4893 lower ZMM registers (0-15).
4894 (num_avx512_zmmh_high_registers): New constant for number of
4895 higher ZMM registers (16-31).
4896 (num_avx512_ymmh_registers): New contant for number of higher
4897 YMM registers (ymm16-31 added by avx521 on x86_64).
4898 (num_avx512_xmm_registers): New constant for number of higher
4899 XMM registers (xmm16-31 added by AVX512 on x86_64).
4900 (struct i387_xsave): Add space for AVX512 registers.
4901 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4902 Add code to handle AVX512 registers.
4903 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4904 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4905 prototypei from generated file.
4906 (tdesc_amd64_avx512_linux): Likewise.
4907 (init_registers_x32_avx512_linux): Likewise.
4908 (tdesc_x32_avx512_linux): Likewise.
4909 (init_registers_i386_avx512_linux): Likewise.
4910 (tdesc_i386_avx512_linux): Likewise.
4911 (x86_64_regmap): Add AVX512 registers.
4912 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4913 mask.
4914 (initialize_low_arch): Add code to initialize AVX512 registers.
4915
4916 2014-04-23 Pedro Alves <palves@redhat.com>
4917
4918 * mem-break.c (find_gdb_breakpoint_at): Make static.
4919 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4920
4921 2014-04-23 Pedro Alves <palves@redhat.com>
4922
4923 * i386-low.c: Don't include break-common.h here.
4924 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4925 prototype to take target_hw_bp_type as argument instead of a Z
4926 packet char.
4927 * i386-low.h: Include break-common.h here.
4928 (Z_packet_to_hw_type): Declare.
4929 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4930 prototypes.
4931 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4932 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4933 (x86_remove_point): Convert the packet number to a
4934 target_hw_bp_type before calling i386_low_remove_watchpoint.
4935 * win32-i386-low.c (i386_insert_point): Convert the packet number
4936 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4937 (i386_remove_point): Convert the packet number to a
4938 target_hw_bp_type before calling i386_low_remove_watchpoint.
4939
4940 2014-04-23 Pedro Alves <palves@redhat.com>
4941
4942 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4943
4944 2014-04-10 Pedro Alves <palves@redhat.com>
4945
4946 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4947 Check if the condition or command is NULL before checking if the
4948 breakpoint is known. On success, return true.
4949 * mem-break.h (add_breakpoint_condition): Document return.
4950 (add_breakpoint_commands): Add describing comment.
4951 * server.c (skip_to_semicolon): New function.
4952 (process_point_options): Use it.
4953
4954 2014-04-09 Pedro Alves <palves@redhat.com>
4955
4956 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4957 to lwpid_of.
4958
4959 2014-02-27 Pedro Alves <palves@redhat.com>
4960
4961 PR 12702
4962 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4963 macros.
4964 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4965 output.
4966 (last_thread_of_process_p): Take a PID argument instead of a
4967 thread pointer.
4968 (linux_wait_for_lwp): Delete.
4969 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4970 functions.
4971 (linux_low_filter_event): New function, party factored out from
4972 linux_wait_for_event.
4973 (linux_wait_for_event): Rename to ...
4974 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4975 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4976 sigsuspend. Check for zombie leaders.
4977 (linux_wait_for_event): Reimplement as wrapper around
4978 linux_wait_for_event_filtered.
4979 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4980 a normal or signal exit is seen, it's the whole process exiting.
4981 (wait_for_sigstop): No longer a for_each_inferior callback.
4982 Rewrite on top of linux_wait_for_event_filtered.
4983 (stop_all_lwps): Call wait_for_sigstop directly.
4984 * server.c (resume, handle_target_event): Handle
4985 TARGET_WAITKIND_NO_RESUMED.
4986
4987 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4988
4989 * win32-low.c (psapi_get_dll_name,
4990 * win32_CreateToolhelp32Snapshot): Delete.
4991 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4992 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4993 Delete.
4994 (handle_load_dll): Add function description.
4995 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4996
4997 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4998
4999 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5000 Add comment.
5001 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5002 base address when calling win32_add_one_solib.
5003 (handle_load_dll): Delete local variable load_addr.
5004 Remove 0x1000 offset applied to DLL base address when calling
5005 win32_add_one_solib.
5006 (handle_unload_dll): Add comment.
5007
5008 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5009
5010 * win32-low.c (win32_add_all_dlls): Renames
5011 win32_ensure_ntdll_loaded. Rewrite function documentation.
5012 Adjust implementation to always load all DLLs.
5013 Add 0x1000 offset to DLL base address when calling
5014 win32_add_one_solib.
5015 (child_initialization_done): New static global.
5016 (do_initial_child_stuff): Set child_initialization_done to
5017 zero during child initialization, and 1 after. Replace call
5018 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5019 Add comment.
5020 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5021 (handle_unload_dll): Add function documentation.
5022 (get_child_debug_event): Ignore load and unload DLL events
5023 during child initialization.
5024
5025 2014-02-20 Doug Evans <dje@google.com>
5026
5027 Remove global all_lwps.
5028 * inferiors.h (ptid_of): Move here from linux-low.h.
5029 (pid_of, lwpid_of): Ditto.
5030 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5031 parameter is a struct thread_info * now.
5032 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5033 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5034 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5035 directly.
5036 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5037 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5038 * linux-arm-low.c (update_registers_callback): Update, "entry"
5039 parameter is a struct thread_info * now.
5040 Fetch lwpid from current_inferior directly.
5041 (arm_insert_point): Pass &all_threads to find_inferior instead of
5042 &all_lwps.
5043 (arm_remove_point): Ditto.
5044 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5045 (arm_prepare_to_resume): Fetch pid from thread.
5046 (arm_read_description): Fetch lwpid from current_inferior directly.
5047 * linux-low.c (all_lwps): Delete.
5048 (delete_lwp): Delete call to remove_inferior.
5049 (handle_extended_wait): Fetch lwpid from thread.
5050 (add_lwp): Don't set lwp->entry.id. Remove call to
5051 add_inferior_to_list.
5052 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5053 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5054 (kill_one_lwp_callback): Ditto.
5055 (linux_kill): Don't dereference NULL pointer.
5056 Fetch ptid,lwpid from thread.
5057 (get_detach_signal): Fetch ptid from thread.
5058 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5059 Simplify call to regcache_invalidate_thread.
5060 (delete_lwp_callback): Update, "entry" parameter is a
5061 struct thread_info * now. Fetch pid from thread.
5062 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5063 (status_pending_p_callback): Update, "entry" parameter is a
5064 struct thread_info * now. Fetch ptid from thread.
5065 (find_lwp_pid): Update, "entry" parameter is a
5066 struct thread_info * now.
5067 (linux_wait_for_lwp): Fetch pid from thread.
5068 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5069 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5070 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5071 (dequeue_one_deferred_signal): Ditto.
5072 (cancel_breakpoint): Fetch ptid from current_inferior.
5073 (linux_wait_for_event): Pass &all_threads to find_inferior,
5074 not &all_lwps. Fetch ptid, lwpid from thread.
5075 (count_events_callback): Update, "entry" parameter is a
5076 struct thread_info * now.
5077 (select_singlestep_lwp_callback): Ditto.
5078 (select_event_lwp_callback): Ditto.
5079 (cancel_breakpoints_callback): Ditto.
5080 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5081 not &all_lwps.
5082 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5083 (unsuspend_one_lwp): Update, "entry" parameter is a
5084 struct thread_info * now.
5085 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5086 not &all_lwps.
5087 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5088 Fetch lwpid from thread, not lwp.
5089 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5090 Pass &all_threads to find_inferior, not &all_lwps.
5091 (send_sigstop): Fetch lwpid from thread, not lwp.
5092 (send_sigstop_callback): Update, "entry" parameter is a
5093 struct thread_info * now.
5094 (suspend_and_send_sigstop_callback): Ditto.
5095 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5096 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5097 struct thread_info * now.
5098 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5099 from thread, lwp.
5100 (lwp_running): Update, "entry" parameter is a
5101 struct thread_info * now.
5102 (stop_all_lwps): Fetch ptid from thread.
5103 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5104 (linux_resume_one_lwp): Fetch lwpid from thread.
5105 (linux_set_resume_request): Update, "entry" parameter is a
5106 struct thread_info * now. Fetch pid, lwpid from thread.
5107 (resume_status_pending_p): Update, "entry" parameter is a
5108 struct thread_info * now.
5109 (need_step_over_p): Ditto. Fetch lwpid from thread.
5110 (start_step_over): Fetch lwpid from thread.
5111 (linux_resume_one_thread): Update, "entry" parameter is a
5112 struct thread_info * now. Fetch lwpid from thread.
5113 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5114 (proceed_one_lwp): Update, "entry" parameter is a
5115 struct thread_info * now. Fetch lwpid from thread.
5116 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5117 struct thread_info * now.
5118 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5119 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5120 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5121 directly.
5122 (regsets_store_inferior_registers): Ditto.
5123 (fetch_register, store_register): Ditto.
5124 (linux_read_memory, linux_write_memory): Ditto.
5125 (linux_request_interrupt): Ditto.
5126 (linux_read_auxv): Ditto.
5127 (linux_xfer_siginfo): Ditto.
5128 (linux_qxfer_spu): Ditto.
5129 (linux_qxfer_libraries_svr4): Ditto.
5130 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5131 moved to inferiors.h.
5132 (get_lwp): Delete.
5133 (get_thread_lwp): Update.
5134 (struct lwp_info): Delete member "entry". Simplify comment for
5135 member "thread".
5136 (all_lwps): Delete.
5137 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5138 current_inferior directly.
5139 (update_watch_registers_callback): Update, "entry" parameter is a
5140 struct thread_info * now. Fetch pid from thread.
5141 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5142 (mips_insert_point): Fetch lwpid from current_inferior.
5143 Pass &all_threads to find_inferior, not &all_lwps.
5144 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5145 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5146 directly.
5147 (mips_stopped_data_address): Ditto.
5148 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5149 directly.
5150 * linux-tile-low.c (tile_arch_setup): Ditto.
5151 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5152 (update_debug_registers_callback): Update, "entry" parameter is a
5153 struct thread_info * now. Fetch pid from thread.
5154 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5155 Pass &all_threads to find_inferior, not &all_lwps.
5156 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5157 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5158 Pass &all_threads to find_inferior, not &all_lwps.
5159 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5160 (i386_dr_low_get_status): Ditto.
5161 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5162 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5163 (x86_linux_read_description): Ditto.
5164 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5165
5166 2014-02-20 Doug Evans <dje@google.com>
5167
5168 * inferiors.c (get_first_inferior): Fix buglet.
5169
5170 2014-02-19 Doug Evans <dje@google.com>
5171
5172 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5173 * inferiors.c (add_thread): Change result type to struct thread_info *.
5174 All callers updated.
5175 (add_lwp): Call add_thread here instead of in callers.
5176 All callers updated.
5177 * linux-low.h (get_lwp_thread): Rewrite.
5178 (struct lwp_info): New member "thread".
5179
5180 2014-02-19 Doug Evans <dje@google.com>
5181
5182 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5183 All callers updated.
5184
5185 2014-02-19 Doug Evans <dje@google.com>
5186
5187 * inferiors.c (add_thread): Fix whitespace.
5188
5189 2014-02-19 Doug Evans <dje@google.com>
5190
5191 * dll.c (clear_dlls): Replace accessing list implemention details
5192 with API function.
5193 * gdbthread.h (get_first_thread): Declare.
5194 * inferiors.c (for_each_inferior_with_data): New function.
5195 (get_first_thread): New function.
5196 (find_thread_ptid): Simplify.
5197 (get_first_inferior): New function.
5198 (clear_list): Delete.
5199 (one_inferior_p): New function.
5200 (clear_inferior_list): New function.
5201 (clear_inferiors): Update.
5202 * inferiors.h (for_each_inferior_with_data): Declare.
5203 (clear_inferior_list): Declare.
5204 (one_inferior_p): Declare.
5205 (get_first_inferior): Declare.
5206 * linux-low.c (linux_wait_for_event): Replace accessing list
5207 implemention details with API function.
5208 * server.c (target_running): Ditto.
5209 (accumulate_file_name_length): New function.
5210 (emit_dll_description): New function.
5211 (handle_qxfer_libraries): Replace accessing list implemention
5212 details with API function.
5213 (handle_qxfer_threads_worker): New function.
5214 (handle_qxfer_threads_proper): Replace accessing list implemention
5215 details with API function.
5216 (handle_query): Ditto.
5217 (visit_actioned_threads_callback_ftype): New typedef.
5218 (visit_actioned_threads_data): New struct.
5219 (visit_actioned_threads): Rewrite to be find_inferior callback.
5220 (resume): Call find_inferior.
5221 (handle_status): Replace accessing list implemention
5222 details with API function.
5223 (process_serial_event): Replace accessing list implemention details
5224 with API function.
5225 * target.c (set_desired_inferior): Replace accessing list implemention
5226 details with API function.
5227 * tracepoint.c (same_process_p): New function.
5228 (gdb_agent_about_to_close): Replace accessing list implemention
5229 details with API function.
5230 * win32-low.c (child_delete_thread): Replace accessing list
5231 implemention details with API function.
5232 (match_dll_by_basename): New function.
5233 (dll_is_loaded_by_basename): New function.
5234 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5235 details call to dll_is_loaded_by_basename.
5236
5237 2014-02-19 Doug Evans <dje@google.com>
5238
5239 * dll.h (struct dll_info): Add comment.
5240 * gdbthread.h (struct thread_info): Add comment.
5241 (current_ptid): Simplify.
5242 * inferiors.c (add_process): Update.
5243 (remove_process): Update.
5244 * inferiors.h (struct process_info): Rename member "head" to "entry".
5245 * linux-low.c (delete_lwp): Update.
5246 (add_lwp): Update.
5247 (last_thread_of_process_p): Update.
5248 (kill_one_lwp_callback, linux_kill): Update.
5249 (status_pending_p_callback): Update.
5250 (wait_for_sigstop): Update. Simplify read of ptid.
5251 (start_step_over): Update.
5252 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5253 (get_lwp_thread): Update.
5254 (struct lwp_info): Rename member "head" to "entry".
5255 * regcache.h (inferior_list_entry): Delete.
5256 * server.c (kill_inferior_callback): Update.
5257 (detach_or_kill_inferior_callback): Update.
5258 (print_started_pid): Update.
5259 (print_attached_pid): Update.
5260 (process_serial_event): Simplify read of ptid.
5261 * thread-db.c (thread_db_create_event): Update.
5262 (thread_db_get_tls_address): Update.
5263 * win32-low.c (current_inferior_ptid): Simplify.
5264
5265 2014-02-19 Tom Tromey <tromey@redhat.com>
5266
5267 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5268 argument.
5269 (target_supports_btrace): Update.
5270
5271 2014-02-14 Yao Qi <yao@codesourcery.com>
5272
5273 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5274 (rsp-low-ipa.o): New target.
5275
5276 2014-02-12 Tom Tromey <tromey@redhat.com>
5277
5278 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5279 convert_ascii_to_int.
5280 * regcache.c (registers_to_string): Likewise.
5281 * remote-utils.c (decode_M_packet): Likewise.
5282 * server.c (process_serial_event): Likewise.
5283
5284 2014-02-12 Tom Tromey <tromey@redhat.com>
5285
5286 * server.c (handle_query, handle_v_run): Use hex2bin, not
5287 unhexify.
5288 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5289
5290 2014-02-12 Tom Tromey <tromey@redhat.com>
5291
5292 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5293 convert_int_to_ascii.
5294 * regcache.c (registers_to_string, collect_register_as_string):
5295 Likewise.
5296 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5297 Likewise.
5298 * server.c (process_serial_event): Likewise.
5299 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5300 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5301
5302 2014-02-12 Tom Tromey <tromey@redhat.com>
5303
5304 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5305 bin2hex, not hexify.
5306 * tracepoint.c (cmd_qtstatus): Likewise.
5307
5308 2014-02-12 Tom Tromey <tromey@redhat.com>
5309
5310 * remote-utils.c (monitor_output): Pass explicit length to
5311 hexify.
5312
5313 2014-02-12 Tom Tromey <tromey@redhat.com>
5314
5315 * tracepoint.c: Include rsp-low.h.
5316 * server.c: Include rsp-low.h.
5317 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5318 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5319 declare.
5320 * remote-utils.c: Include rsp-low.h.
5321 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5322 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5323 (convert_int_to_ascii, convert_ascii_to_int): Move to
5324 common/rsp-low.c.
5325 * regcache.c: Include rsp-low.h.
5326 * ax.c: Include rsp-low.h.
5327 * Makefile.in (SFILES): Add common/rsp-low.c.
5328 (OBS): Add rsp-low.o.
5329 (rsp-low.o): New target.
5330
5331 2014-02-12 Tom Tromey <tromey@redhat.com>
5332
5333 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5334 Include print-utils.h.
5335 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5336 (plongest, thirty_two, phex_nz): Remove.
5337 * Makefile.in (SFILES): Add common/print-utils.c.
5338 (OBS): Add print-utils.o.
5339 (print-utils-ipa.o): New target.
5340 (print-utils.o): New target.
5341 (IPA_OBJS): Add print-utils-ipa.o.
5342
5343 2014-02-06 Tom Tromey <tromey@redhat.com>
5344
5345 * Makefile.in (SFILES): Fix indentation.
5346
5347 2014-02-05 Doug Evans <dje@google.com>
5348
5349 * linux-low.c (linux_wait_for_event): Improve comment.
5350 (linux_wait_1): Keep current_inferior in sync with event_child.
5351
5352 2014-01-22 Doug Evans <dje@google.com>
5353
5354 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5355
5356 2014-01-22 Doug Evans <dje@google.com>
5357
5358 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5359 * configure: Regenerate.
5360 * config.in: Regenerate.
5361 * Makefile.in (SFILES): Add debug.c.
5362 (OBS): Add debug.o.
5363 * debug.c: New file.
5364 * debug.h: New file.
5365 * linux-aarch64-low.c (*): Update all debugging printfs to use
5366 debug_printf instead of fprintf.
5367 * linux-arm-low.c (*): Ditto.
5368 * linux-cris-low.c (*): Ditto.
5369 * linux-crisv32-low.c (*): Ditto.
5370 * linux-m32r-low.c (*): Ditto.
5371 * linux-sparc-low.c (*): Ditto.
5372 * linux-x86.c (*): Ditto.
5373 * linux-low.c (*): Ditto.
5374 (linux_wait_1): Add calls to debug_enter, debug_exit.
5375 (linux_wait): Remove redundant debugging printf.
5376 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5377 (linux_resume, unstop_all_lwps): Ditto.
5378 * mem-break.c (*): Update all debugging printfs to use
5379 debug_printf instead of fprintf.
5380 * remote-utils.c (*): Ditto.
5381 * thread-db.c (*): Ditto.
5382 * server.c #include <ctype.h>, "gdb_vecs.h".
5383 (debug_threads): Moved to debug.c.
5384 (*): Update all debugging printfs to use debug_printf instead of
5385 fprintf.
5386 (start_inferior): Replace call to fflush with call to debug_flush.
5387 (monitor_show_help): Mention set debug-format.
5388 (parse_debug_format_options): New function.
5389 (handle_monitor_command): Handle "monitor set debug-format".
5390 (gdbserver_usage): Mention --debug-format.
5391 (main): Parse --debug-format.
5392 * server.h (debug_threads): Declaration moved to debug.h.
5393 #include "debug.h".
5394 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5395 trace_debug_1 that uses debug_printf.
5396 (tracepoint_look_up_symbols): Update all debugging printfs to use
5397 debug_printf instead of fprintf.
5398
5399 2014-01-20 Baruch Siach <baruch@tkos.co.il>
5400
5401 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5402 sys/ptrace.h.
5403
5404 2014-01-17 Pedro Alves <palves@redhat.com>
5405
5406 PR build/16445
5407 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5408 defined after including gdb_proc_service.h.
5409
5410 2014-01-16 Doug Evans <dje@google.com>
5411
5412 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5413 (match_dll): Use it.
5414
5415 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5416
5417 * target.h (target_ops) <read_btrace>: Change parameters and
5418 return type to allow error reporting.
5419 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5420 trace reading errors on.
5421 * linux-low.c (linux_low_read_btrace): Pass trace reading
5422 errors on.
5423 (linux_low_disable_btrace): New.
5424
5425 2014-01-15 Doug Evans <dje@google.com>
5426
5427 * inferiors.c (thread_id_to_gdb_id): Delete.
5428 * inferiors.h (thread_id_to_gdb_id): Delete.
5429
5430 2014-01-13 Eli Zaretskii <eliz@gnu.org>
5431
5432 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5433 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5434 versions.
5435
5436 2014-01-08 Pedro Alves <palves@redhat.com>
5437
5438 * server.c (handle_status): Don't discard previous queued stop
5439 replies or thread's pending status here.
5440 (main) <disconnection>: Do it here instead.
5441
5442 2014-01-08 Pedro Alves <palves@redhat.com>
5443
5444 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5445 * server.c (visit_actioned_threads, handle_pending_status): New
5446 function.
5447 (handle_v_cont): Factor out parts to ...
5448 (resume): ... this new function. If in all-stop, and a thread
5449 being resumed has a pending status, report it without actually
5450 resuming.
5451 (myresume): Adjust to use the new 'resume' function.
5452 (clear_pending_status_callback, set_pending_status_callback)
5453 (find_status_pending_thread_callback): New functions.
5454 (handle_status): Handle the case of multiple threads having
5455 interesting statuses to report. Report threads' real last signal
5456 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5457 with an interesting thread to report the status for, instead of
5458 always reporting the status of the first thread.
5459
5460 2014-01-01 Joel Brobecker <brobecker@adacore.com>
5461
5462 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5463 * gdbreplay.c (gdbreplay_version): Likewise.
5464
5465 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5466
5467 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5468 iov.iov_len with the real length in use.
5469
5470 2013-12-13 Joel Brobecker <brobecker@adacore.com>
5471
5472 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5473 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5474 for all targets that use win32-low.c.
5475 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5476 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5477
5478 2013-12-13 Pedro Alves <palves@redhat.com>
5479
5480 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5481 if equal to TARGET_WAITKIND_LOADED.
5482 * win32-low.c (cached_status): New static global.
5483 (win32_wait): Add declaration.
5484 (do_initial_child_stuff): Flush all initial pending debug events
5485 up to the initial breakpoint.
5486 (win32_wait): If CACHED_STATUS was set, return that instead
5487 of doing a real wait. Remove the code resuming the execution
5488 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5489 during the initial phase. Also remove the code changing
5490 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5491 TARGET_WAITKIND_STOPPED.
5492
5493 2013-12-11 Yao Qi <yao@codesourcery.com>
5494
5495 * notif.c (handle_notif_ack): Return 0 if no notification
5496 matches.
5497
5498 2013-11-20 Doug Evans <dje@google.com>
5499
5500 * linux-low.c (linux_set_resume_request): Fix comment.
5501
5502 2013-11-20 Doug Evans <dje@google.com>
5503
5504 * linux-low.c (resume_status_pending_p): Tweak comment.
5505
5506 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5507
5508 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5509 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5510 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5511 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5512 (srv_amd64_regobj): Add amd64-mpx.o.
5513 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5514 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5515 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5516 * i387-fp.c (num_pl_bnd_register) Added constant.
5517 (num_pl_bnd_cfg_registers) Added constant.
5518 (struct i387_xsave) Added reserved area and MPX fields.
5519 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5520 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5521 function.
5522 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5523 (init_registers_amd64_mpx_linux): Declare new function.
5524 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5525 (x86_64_regmap): Add MPX registers.
5526 (x86_linux_read_description): Add MPX case.
5527 (initialize_low_arch): Initialize MPX targets.
5528
5529 2013-11-18 Tom Tromey <tromey@redhat.com>
5530
5531 * configure: Rebuild.
5532 * configure.ac: Don't check for stdlib.h.
5533 * gdbreplay.c: Unconditionally include stdlib.h.
5534
5535 2013-11-18 Tom Tromey <tromey@redhat.com>
5536
5537 * config.in: Rebuild.
5538 * configure: Rebuild.
5539 * configure.ac: Don't use AC_HEADER_DIRENT.
5540
5541 2013-11-18 Tom Tromey <tromey@redhat.com>
5542
5543 * server.h: Don't check HAVE_STRING_H.
5544 * gdbreplay.c: Don't check HAVE_STRING_H.
5545 * configure: Rebuild.
5546
5547 2013-11-18 Tom Tromey <tromey@redhat.com>
5548
5549 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5550 LIBGNU.
5551
5552 2013-11-08 Tom Tromey <tromey@redhat.com>
5553
5554 * configure, config.in: Rebuild.
5555 * configure.ac: Remove unused configury.
5556
5557 2013-11-08 Tom Tromey <tromey@redhat.com>
5558
5559 * acinclude.m4: Include common.m4, codeset.m4.
5560 * configure, config.in: Rebuild.
5561 * configure.ac: Use GDB_AC_COMMON.
5562
5563 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5564
5565 * linux-s390-low.c (HWCAP_S390_TE): New define.
5566 (s390_arch_setup): Consider the TE field in the HWCAP for
5567 determining 'have_regset_tdb'.
5568
5569 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5570
5571 PR gdb/16014
5572 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5573 call to sizeof.
5574
5575 2013-10-02 Pedro Alves <palves@redhat.com>
5576
5577 * server.c (process_serial_event): Don't output "GDBserver
5578 exiting" if GDB is connected through stdio.
5579 * target.c (mywait): Likewise, be silent if GDB is connected
5580 through stdio.
5581
5582 2013-10-01 Joel Brobecker <brobecker@adacore.com>
5583
5584 * lynx-low.c (lynx_add_threads_after_attach): New function.
5585 (lynx_attach): Remove call to add_thread. Add call to
5586 lynx_add_threads_after_attach instead.
5587
5588 2013-09-28 Mike Frysinger <vapier@gentoo.org>
5589
5590 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5591 * config.in, configure: Regenerated.
5592
5593 2013-09-18 Yao Qi <yao@codesourcery.com>
5594
5595 PR server/15959
5596 * server.c (start_inferior): Clear 'resume_info'.
5597
5598 2013-09-16 Jiong Wang <jiwang@tilera.com>
5599
5600 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5601 for each register.
5602
5603 2013-09-16 Jiong Wang <jiwang@tilera.com>
5604
5605 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5606 linux-tile-low.o to srv_tgtobj.
5607
5608 2013-09-16 Will Newton <will.newton@linaro.org>
5609
5610 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5611 out regs.
5612
5613 2013-09-06 Pedro Alves <palves@redhat.com>
5614
5615 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5616 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5617 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5618 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5619 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5620 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5621
5622 2013-09-06 Pedro Alves <palves@redhat.com>
5623
5624 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5625 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5626
5627 2013-09-06 Pedro Alves <palves@redhat.com>
5628
5629 * linux-amd64-ipa.c: Include tracepoint.h.
5630 * linux-i386-ipa.c: Include tracepoint.h.
5631
5632 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5633
5634 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5635 (ps_get_thread_area): New function.
5636
5637 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5638
5639 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5640 (initialize_low_arch): Call init_registers_crisv32 rather than
5641 init_register_crisv32.
5642
5643 2013-09-05 Pedro Alves <palves@redhat.com>
5644
5645 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5646 to ...
5647 * hostio.h: ... this new file.
5648 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5649 win32-low.c: Include hostio.h.
5650
5651 2013-09-05 Pedro Alves <palves@redhat.com>
5652
5653 * server.h (gdb_client_data, handler_func, callback_handler_func)
5654 (delete_file_handler, add_file_handler, append_callback_event)
5655 (delete_callback_event, start_event_loop, initialize_event_loop):
5656 Move to event-loop.h and include it.
5657 * event-loop.h: New file.
5658
5659 2013-09-05 Pedro Alves <palves@redhat.com>
5660
5661 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5662 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5663 (loaded_dll, unloaded_dll): Move to ...
5664 * dll.h: ... this new file.
5665 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5666
5667 2013-09-05 Pedro Alves <palves@redhat.com>
5668
5669 * server.h (current_process, get_thread_process, all_processes)
5670 (add_inferior_to_list, for_each_inferior, current_inferior)
5671 (remove_inferior, add_process, remove_process, find_process_pid)
5672 (have_started_inferiors_p, have_attached_inferiors_p)
5673 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5674 (clear_inferiors, find_inferior, find_inferior_id)
5675 (inferior_target_data, set_inferior_target_data)
5676 (inferior_regcache_data, set_inferior_regcache_data): Move to
5677 inferiors.h, and include it.
5678 * inferiors.h: New file.
5679
5680 2013-09-05 Pedro Alves <palves@redhat.com>
5681
5682 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5683 Move ...
5684 * ax.h: ... here.
5685
5686 2013-09-05 Pedro Alves <palves@redhat.com>
5687
5688 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5689 tracepoint.h.
5690 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5691 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5692 (handle_tracepoint_general_set, handle_tracepoint_query)
5693 (tracepoint_finished_step, tracepoint_was_hit)
5694 (release_while_stepping_state_list, current_traceframe)
5695 (in_readonly_region, traceframe_read_mem)
5696 (fetch_traceframe_registers, traceframe_read_sdata)
5697 (traceframe_read_info, struct fast_tpoint_collect_status)
5698 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5699 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5700 (supply_fast_tracepoint_registers)
5701 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5702 (ipa_tdesc, claim_trampoline_space)
5703 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5704 (agent_mem_read, agent_get_trace_state_variable_value)
5705 (agent_set_trace_state_variable_value, agent_tsv_read)
5706 (agent_mem_read_string, get_raw_reg_func_addr)
5707 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5708 * tracepoint.h: ... this new file.
5709
5710 2013-09-05 Pedro Alves <palves@redhat.com>
5711
5712 * server.h (perror_with_name, error, fatal, warning, paddress)
5713 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5714 include it.
5715 * utils.h: New file.
5716
5717 2013-09-05 Pedro Alves <palves@redhat.com>
5718
5719 * server.h (remote_debug, noack_mode, transport_is_reliable)
5720 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5721 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5722 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5723 (write_enn, initialize_async_io, enable_async_io)
5724 (disable_async_io, check_remote_input_interrupt_request)
5725 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5726 (dead_thread_notify, prepare_resume_reply)
5727 (decode_address_to_semicolon, decode_address, decode_m_packet)
5728 (decode_M_packet, decode_X_packet, decode_xfer_write)
5729 (decode_search_memory_packet, unhexify, hexify)
5730 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5731 (look_up_one_symbol, relocate_instruction)
5732 (monitor_output): Move to remote-utils.h, and include it.
5733 * remote-utils.h: New file.
5734
5735 2013-09-05 Pedro Alves <palves@redhat.com>
5736
5737 * server.h (_): Delete.
5738
5739 2013-09-02 Pedro Alves <palves@redhat.com>
5740
5741 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5742 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5743 allocated.
5744 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5745
5746 2013-09-02 Pierre Muller <muller@sourceware.org>
5747
5748 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5749 or WriteProcessMemory complete successfully and handle
5750 ERROR_PARTIAL_COPY error.
5751
5752 2013-09-02 Pedro Alves <palves@redhat.com>
5753
5754 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5755 error instead of EIO.
5756
5757 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5758
5759 PR server/15604
5760 * linux-low.c: Include filestuff.h.
5761 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5762 * lynx-low.c: Include filestuff.h.
5763 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5764 * server.c: Include filestuff.h.
5765 (main): Call notice_open_fds.
5766 * spu-low.c: Include filestuff.h.
5767 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5768
5769 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
5770
5771 * Makefile.in: Explain why ../target and ../nat are not
5772 listed as include file search paths.
5773 (linux-waitpid.o): New object file rule.
5774 * configure.srv (srv_native_linux_obj): New variable.
5775 Replace all occurrences of linux native object files with
5776 $srv_native_linux_obj.
5777 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5778 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5779 (linux_enable_event_reporting): Remove declaration.
5780 (my_waitpid): Moved to common/linux-waitpid.c.
5781 (linux_wait_for_event): Pass ptid when calling
5782 linux_enable_event_reporting.
5783 (linux_supports_tracefork_flag): Remove.
5784 (linux_enable_event_reporting): Likewise.
5785 (linux_tracefork_grandchild): Remove.
5786 (STACK_SIZE): Moved to common/linux-ptrace.c.
5787 (linux_tracefork_child): Remove.
5788 (linux_test_for_tracefork): Remove.
5789 (linux_look_up_symbols): Call linux_supports_traceclone.
5790 (initialize_low): Remove call to linux_test_for_tracefork.
5791 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5792 common/linux-ptrace.h.
5793 (PTRACE_TYPE_ARG4): Likewise.
5794 Include linux-ptrace.h.
5795
5796 2013-08-21 Pedro Alves <palves@redhat.com>
5797
5798 * config.in: Renegerate.
5799
5800 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
5801
5802 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5803 (SFILES): Remove $(srcdir)/common/target-common.c and
5804 add $(srcdir)/target/waitstatus.c.
5805 (OBS): Remove target-common.o and add waitstatus.o.
5806 (server_h): Remove $(srcdir)/../common/target-common.h and
5807 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5808 and $(srcdir)/../target/waitstatus.h.
5809 (target-common.o): Remove.
5810 (waitstatus.o): New target object file.
5811 * target.h: Do not include target-common.h and
5812 include target/resume.h, target/wait.h and
5813 target/waitstatus.h.
5814
5815 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
5816
5817 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5818 to PTRACE_TYPE_ARG3.
5819 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5820 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5821 PTRACE_TYPE_ARG4.
5822 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5823 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5824
5825 2013-07-27 Jie Zhang <jie@codesourcery.com>
5826 Daniel Jacobowitz <dan@codesourcery.com>
5827 Yao Qi <yao@codesourcery.com>
5828
5829 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5830 (mips-linux-watch.o): New rule.
5831 (mips_linux_watch_h): New variable.
5832 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5833 srv_tgtobj.
5834 * linux-mips-low.c: Include mips-linux-watch.h.
5835 (struct arch_process_info, struct arch_lwp_info): New.
5836 (update_watch_registers_callback): New function.
5837 (mips_linux_new_process, mips_linux_new_thread) New functions.
5838 (mips_linux_prepare_to_resume, mips_insert_point): New
5839 functions.
5840 (mips_remove_point, mips_stopped_by_watchpoint): New
5841 functions.
5842 (rsp_bp_type_to_target_hw_bp_type): New function.
5843 (mips_stopped_data_address): New function.
5844 (the_low_target): Add watchpoint support functions.
5845
5846 2013-07-27 Yao Qi <yao@codesourcery.com>
5847
5848 * i386-low.c: Include break-common.h.
5849 (enum target_hw_bp_type): Remove.
5850
5851 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
5852
5853 * Makefile.in (SFILES): /common/target-common.c.
5854 (OBS): Add target-common.o.
5855 (server_h): Add $(srcdir)/../common/target-common.h.
5856 (target-common.o): New target.
5857 * server.c (queue_stop_reply_callback): Free
5858 status string after use.
5859 * target.c (target_waitstatus_to_string): Remove.
5860 * target.h: Include target-common.h.
5861 (resume_kind): Likewise.
5862 (target_waitkind): Likewise.
5863 (target_waitstatus): Likewise.
5864 (TARGET_WNOHANG): Likewise.
5865
5866 2013-07-04 Yao Qi <yao@codesourcery.com>
5867
5868 * Makefile.in (host_alias): Use @host_noncanonical@.
5869 (target_alias): Use @target_noncanonical@.
5870 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5871 ACX_NONCANONICAL_HOST.
5872 * configure: Regenerated.
5873
5874 Revert:
5875 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5876
5877 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5878 * configure: Rebuild.
5879 * Makefile.in (version_host, version_target): Get from configure.
5880 (version.c): Use $(version_host) and $(version_target).
5881
5882 2013-07-03 Pedro Alves <palves@redhat.com>
5883
5884 * Makefile.in (config.status): Depend on development.sh.
5885 * acinclude.m4: Include libmcheck.m4.
5886 * configure: Regenerate.
5887
5888 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5889
5890 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5891 attribute inside the parentheses.
5892 (winapi_DebugSetProcessKillOnExit): Ditto.
5893 (winapi_DebugBreakProcess): Ditto.
5894 (winapi_GenerateConsoleCtrlEvent): Ditto.
5895
5896 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5897
5898 * notif.h (notif_event): Add a dummy member to avoid compiler
5899 errors.
5900
5901 2013-07-01 Pedro Alves <palves@redhat.com>
5902
5903 * hostio.c (HOSTIO_PATH_MAX): Define.
5904 (require_filename, handle_open, handle_unlink, handle_readlink):
5905 Use it.
5906
5907 2013-07-01 Pedro Alves <palves@redhat.com>
5908
5909 * server.h: Include "pathmax.h".
5910 * linux-low.c: Don't include sys/param.h.
5911 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5912 MAXPATHLEN.
5913 * win32-low.c: Don't include sys/param.h.
5914 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5915
5916 2013-07-01 Pedro Alves <palves@redhat.com>
5917
5918 * event-loop.c: Don't check HAVE_UNISTD_H before including
5919 <unistd.h>.
5920 * gdbreplay.c: Likewise.
5921 * remote-utils.c: Likewise.
5922 * server.c: Likewise.
5923 * configure.ac: Don't check for unistd.h.
5924 * configure: Regenerate.
5925
5926 2013-06-28 Tom Tromey <tromey@redhat.com>
5927
5928 * Makefile.in (version.c): Use version.in, not
5929 common/version.in.
5930
5931 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5932
5933 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5934 * configure: Rebuild.
5935 * Makefile.in (version_host, version_target): Get from configure.
5936 (version.c): Use $(version_host) and $(version_target).
5937
5938 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5939
5940 Fix trace-status to output user name without trailing colon.
5941 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5942
5943 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5944
5945 Fix trace-status to output proper start-time and stop-time.
5946 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5947 output start time and stop time in hex as gdb expects.
5948
5949 2013-06-26 Pedro Alves <pedro@codesourcery.com>
5950
5951 * tracepoint.c (build_traceframe_info_xml): Output trace state
5952 variables present in the trace buffer.
5953
5954 2013-06-24 Tom Tromey <tromey@redhat.com>
5955
5956 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5957 create-version.sh.
5958 (version.o): Remove.
5959 * gdbreplay.c: Include version.h.
5960 (version, host_name): Don't declare.
5961 * server.h: Include version.h.
5962 (version, host_name): Don't declare.
5963
5964 2013-06-12 Pedro Alves <palves@redhat.com>
5965
5966 * linux-x86-low.c (linux_is_elf64): Delete global.
5967 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5968 with local linux_pid_exe_is_elf_64_file use.
5969
5970 2013-06-11 Pedro Alves <palves@redhat.com>
5971
5972 * linux-low.c (regset_disabled, disable_regset): New functions.
5973 (regsets_fetch_inferior_registers)
5974 (regsets_store_inferior_registers): Use them.
5975 (initialize_regsets_info); Don't allocate the disabled_regsets
5976 array here.
5977 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5978 comment.
5979
5980 2013-06-11 Pedro Alves <palves@redhat.com>
5981
5982 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5983 xmalloc.
5984
5985 2013-06-11 Pedro Alves <palves@redhat.com>
5986
5987 * linux-x86-low.c (initialize_low_arch): Call
5988 init_registers_x32_avx_linux.
5989
5990 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5991
5992 Fix compatibility with Android Bionic.
5993 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5994 it is not empty.
5995
5996 2013-06-07 Pedro Alves <palves@redhat.com>
5997
5998 PR server/14823
5999 * Makefile.in (OBS): Add tdesc.o.
6000 (IPA_OBJS): Add tdesc-ipa.o.
6001 (tdesc-ipa.o): New rule.
6002 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6003 interface.
6004 * linux-low.c (new_inferior): Delete.
6005 (disabled_regsets, num_regsets): Delete.
6006 (linux_add_process): Adjust to set the new per-process
6007 new_inferior flag.
6008 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6009 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6010 was a stop. When calling arch_setup, switch the current inferior
6011 to the thread that got an event.
6012 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6013 (regsets_fetch_inferior_registers)
6014 (regsets_store_inferior_registers): New regsets_info parameter.
6015 Adjust to use it.
6016 (linux_register_in_regsets): New regs_info parameter. Adjust to
6017 use it.
6018 (register_addr, fetch_register, store_register): New usrregs_info
6019 parameter. Adjust to use it.
6020 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6021 parameter regs_info. Adjust to use it.
6022 (linux_fetch_registers): Get the current inferior's regs_info, and
6023 adjust to use it.
6024 (linux_store_registers): Ditto.
6025 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6026 (initialize_low): Don't initialize the target_regsets here. Call
6027 initialize_low_arch.
6028 * linux-low.h (target_regsets): Delete declaration.
6029 (struct regsets_info): New.
6030 (struct usrregs_info): New.
6031 (struct regs_info): New.
6032 (struct process_info_private) <new_inferior>: New field.
6033 (struct linux_target_ops): Delete the num_regs, regmap, and
6034 regset_bitmap fields. New field regs_info.
6035 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6036 * i387-fp.c (num_xmm_registers): Delete.
6037 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6038 calls to new interface.
6039 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6040 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6041 Infer the number of xmm registers from the regcache's target
6042 description.
6043 * i387-fp.h (num_xmm_registers): Delete.
6044 * inferiors.c (add_thread): Don't install the thread's regcache
6045 here.
6046 * proc-service.c (gregset_info): Fetch the current inferior's
6047 regs_info. Adjust to use it.
6048 * regcache.c: Include tdesc.h.
6049 (register_bytes, reg_defs, num_registers)
6050 (gdbserver_expedite_regs): Delete.
6051 (get_thread_regcache): If the thread doesn't have a regcache yet,
6052 create one, instead of aborting gdbserver.
6053 (regcache_invalidate_one): Rename to ...
6054 (regcache_invalidate_thread): ... this.
6055 (regcache_invalidate_one): New.
6056 (regcache_invalidate): Only invalidate registers of the current
6057 process.
6058 (init_register_cache): Add target_desc parameter, and use it.
6059 (new_register_cache): Ditto. Assert the target description has a
6060 non zero registers_size.
6061 (regcache_cpy): Add assertions. Adjust.
6062 (realloc_register_cache, set_register_cache): Delete.
6063 (registers_to_string, registers_from_string): Adjust.
6064 (find_register_by_name, find_regno, find_register_by_number)
6065 (register_cache_size): Add target_desc parameter, and use it.
6066 (free_register_cache_thread, free_register_cache_thread_one)
6067 (regcache_release, register_cache_size): New.
6068 (register_size): Add target_desc parameter, and use it.
6069 (register_data, supply_register, supply_register_zeroed)
6070 (supply_regblock, supply_register_by_name, collect_register)
6071 (collect_register_as_string, collect_register_by_name): Adjust.
6072 * regcache.h (struct target_desc): Forward declare.
6073 (struct regcache) <tdesc>: New field.
6074 (init_register_cache, new_register_cache): Add target_desc
6075 parameter.
6076 (regcache_invalidate_thread): Declare.
6077 (regcache_invalidate_one): Delete declaration.
6078 (regcache_release): Declare.
6079 (find_register_by_number, register_cache_size, register_size)
6080 (find_regno): Add target_desc parameter.
6081 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6082 declarations.
6083 * remote-utils.c: Include tdesc.h.
6084 (outreg, prepare_resume_reply): Adjust.
6085 * server.c: Include tdesc.h.
6086 (gdbserver_xmltarget): Delete declaration.
6087 (get_features_xml, process_serial_event): Adjust.
6088 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6089 declare.
6090 (struct process_info) <tdesc>: New field.
6091 (ipa_tdesc): Declare.
6092 * tdesc.c: New file.
6093 * tdesc.h: New file.
6094 * tracepoint.c: Include tdesc.h.
6095 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6096 (get_context_regcache): Adjust to pass ipa_tdesc down.
6097 (do_action_at_tracepoint): Adjust to get the register cache size
6098 from the context regcache's description.
6099 (traceframe_walk_blocks): Adjust to get the register cache size
6100 from the current trace frame's description.
6101 (traceframe_get_pc): Adjust to get current trace frame's
6102 description and pass it down.
6103 (gdb_collect): Adjust to get the register cache size from the
6104 IPA's description.
6105 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6106 (gdbserver_xmltarget): Delete.
6107 (initialize_low_tracepoint): Set the ipa's target description.
6108 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6109 (initialize_low_tracepoint): Set the ipa's target description.
6110 * linux-x86-low.c: Include tdesc.h.
6111 [__x86_64__] (is_64bit_tdesc): New.
6112 (ps_get_thread_area, x86_get_thread_area): Use it.
6113 (i386_cannot_store_register): Rename to ...
6114 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6115 (i386_cannot_fetch_register): Rename to ...
6116 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6117 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6118 to new interface.
6119 (target_regsets): Rename to ...
6120 (x86_regsets): ... this.
6121 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6122 interface.
6123 (x86_siginfo_fixup): Use is_64bit_tdesc.
6124 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6125 (tdesc_x32_avx_linux, tdesc_x32_linux)
6126 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6127 Declare.
6128 (x86_linux_update_xmltarget): Delete.
6129 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6130 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6131 (AMD64_LINUX_USER64_CS): New.
6132 (x86_linux_read_description): New, based on
6133 x86_linux_update_xmltarget.
6134 (same_process_callback): New.
6135 (x86_arch_setup_process_callback): New.
6136 (x86_linux_update_xmltarget): New.
6137 (x86_regsets_info): New.
6138 (amd64_linux_regs_info): New.
6139 (i386_linux_usrregs_info): New.
6140 (i386_linux_regs_info): New.
6141 (x86_linux_regs_info): New.
6142 (x86_arch_setup): Reimplement.
6143 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6144 (x86_emit_ops): Ditto.
6145 (the_low_target): Adjust. Install x86_linux_regs_info,
6146 x86_cannot_fetch_register, and x86_cannot_store_register.
6147 (initialize_low_arch): New.
6148 * linux-ia64-low.c (tdesc_ia64): Declare.
6149 (ia64_fetch_register): Adjust.
6150 (ia64_usrregs_info, regs_info): New globals.
6151 (ia64_regs_info): New function.
6152 (the_low_target): Adjust.
6153 (initialize_low_arch): New function.
6154 * linux-sparc-low.c (tdesc_sparc64): Declare.
6155 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6156 Adjust.
6157 (sparc_arch_setup): New function.
6158 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6159 (the_low_target): Adjust.
6160 (initialize_low_arch): New function.
6161 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6162 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6163 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6164 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6165 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6166 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6167 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6168 (tdesc_powerpc_isa205_vsx64l): Declare.
6169 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6170 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6171 (ppc_set_pc, ppc_get_hwcap): Adjust.
6172 (ppc_usrregs_info): Forward declare.
6173 (!__powerpc64__) ppc_regmap_adjusted: New global.
6174 (ppc_arch_setup): Adjust to the current process'es target
6175 description.
6176 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6177 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6178 (ppc_store_evrregset): Adjust.
6179 (target_regsets): Rename to ...
6180 (ppc_regsets): ... this, and make static.
6181 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6182 (ppc_regs_info): New function.
6183 (the_low_target): Adjust.
6184 (initialize_low_arch): New function.
6185 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6186 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6187 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6188 (tdesc_s390x_linux64v2): Declare.
6189 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6190 (s390_fill_gregset, s390_store_last_break): Adjust.
6191 (target_regsets): Rename to ...
6192 (s390_regsets): ... this, and make static.
6193 (s390_get_pc, s390_set_pc): Adjust.
6194 (s390_get_hwcap): New target_desc parameter, and use it.
6195 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6196 (s390_arch_setup): Adjust to set the current process'es target
6197 description. Don't adjust the regmap.
6198 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6199 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6200 (regs_info_3264): New globals.
6201 (s390_regs_info): New function.
6202 (the_low_target): Adjust.
6203 (initialize_low_arch): New function.
6204 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6205 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6206 [__mips64] (init_registers_mips_linux)
6207 (init_registers_mips_dsp_linux): Delete defines.
6208 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6209 (have_dsp): New global.
6210 (mips_read_description): New, based on mips_arch_setup.
6211 (mips_arch_setup): Reimplement.
6212 (get_usrregs_info): New function.
6213 (mips_cannot_fetch_register, mips_cannot_store_register)
6214 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6215 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6216 (target_regsets): Rename to ...
6217 (mips_regsets): ... this, and make static.
6218 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6219 (dsp_regs_info, regs_info): New globals.
6220 (mips_regs_info): New function.
6221 (the_low_target): Adjust.
6222 (initialize_low_arch): New function.
6223 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6224 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6225 Declare.
6226 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6227 (arm_read_description): New, with bits factored from
6228 arm_arch_setup.
6229 (arm_arch_setup): Reimplement.
6230 (target_regsets): Rename to ...
6231 (arm_regsets): ... this, and make static.
6232 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6233 (arm_regs_info): New function.
6234 (the_low_target): Adjust.
6235 (initialize_low_arch): New function.
6236 * linux-m68k-low.c (tdesc_m68k): Declare.
6237 (target_regsets): Rename to ...
6238 (m68k_regsets): ... this, and make static.
6239 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6240 (m68k_regs_info): New function.
6241 (m68k_arch_setup): New function.
6242 (the_low_target): Adjust.
6243 (initialize_low_arch): New function.
6244 * linux-sh-low.c (tdesc_sharch): Declare.
6245 (target_regsets): Rename to ...
6246 (sh_regsets): ... this, and make static.
6247 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6248 (sh_regs_info, sh_arch_setup): New functions.
6249 (the_low_target): Adjust.
6250 (initialize_low_arch): New function.
6251 * linux-bfin-low.c (tdesc_bfin): Declare.
6252 (bfin_arch_setup): New function.
6253 (bfin_usrregs_info, regs_info): New globals.
6254 (bfin_regs_info): New function.
6255 (the_low_target): Adjust.
6256 (initialize_low_arch): New function.
6257 * linux-cris-low.c (tdesc_cris): Declare.
6258 (cris_arch_setup): New function.
6259 (cris_usrregs_info, regs_info): New globals.
6260 (cris_regs_info): New function.
6261 (the_low_target): Adjust.
6262 (initialize_low_arch): New function.
6263 * linux-cris-low.c (tdesc_crisv32): Declare.
6264 (cris_arch_setup): New function.
6265 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6266 (cris_regs_info): New function.
6267 (the_low_target): Adjust.
6268 (initialize_low_arch): New function.
6269 * linux-m32r-low.c (tdesc_m32r): Declare.
6270 (m32r_arch_setup): New function.
6271 (m32r_usrregs_info, regs_info): New globals.
6272 (m32r_regs_info): Adjust.
6273 (initialize_low_arch): New function.
6274 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6275 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6276 (tic6x_usrregs_info): Forward declare.
6277 (tic6x_read_description): New function, based on ...
6278 (tic6x_arch_setup): ... this. Reimplement.
6279 (target_regsets): Rename to ...
6280 (tic6x_regsets): ... this, and make static.
6281 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6282 (tic6x_regs_info): New function.
6283 (the_low_target): Adjust.
6284 (initialize_low_arch): New function.
6285 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6286 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6287 (target_regsets): Rename to ...
6288 (xtensa_regsets): ... this, and make static.
6289 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6290 globals.
6291 (xtensa_arch_setup, xtensa_regs_info): New functions.
6292 (the_low_target): Adjust.
6293 (initialize_low_arch): New function.
6294 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6295 (nios2_arch_setup): Set the current process'es tdesc.
6296 (target_regsets): Rename to ...
6297 (nios2_regsets): ... this.
6298 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6299 (nios2_regs_info): New function.
6300 (the_low_target): Adjust.
6301 (initialize_low_arch): New function.
6302 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6303 (aarch64_arch_setup): Set the current process'es tdesc.
6304 (target_regsets): Rename to ...
6305 (aarch64_regsets): ... this.
6306 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6307 (aarch64_regs_info): New function.
6308 (the_low_target): Adjust.
6309 (initialize_low_arch): New function.
6310 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6311 globals.
6312 (target_regsets): Rename to ...
6313 (tile_regsets): ... this.
6314 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6315 (tile_regs_info): New function.
6316 (tile_arch_setup): Set the current process'es tdesc.
6317 (the_low_target): Adjust.
6318 (initialize_low_arch): New function.
6319 * spu-low.c (tdesc_spu): Declare.
6320 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6321 * win32-arm-low.c (tdesc_arm): Declare.
6322 (arm_arch_setup): New function.
6323 (the_low_target): Install arm_arch_setup instead of
6324 init_registers_arm.
6325 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6326 (init_windows_x86): Rename to ...
6327 (i386_arch_setup): ... this. Set `win32_tdesc'.
6328 (the_low_target): Adjust.
6329 * win32-low.c (win32_tdesc): New global.
6330 (child_add_thread): Don't create the thread cache here.
6331 (do_initial_child_stuff): Set the new process'es tdesc.
6332 * win32-low.h (struct target_desc): Forward declare.
6333 (win32_tdesc): Declare.
6334 * lynx-i386-low.c (tdesc_i386): Declare global.
6335 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6336 * lynx-low.c (lynx_tdesc): New global.
6337 (lynx_add_process): Set the new process'es tdesc.
6338 * lynx-low.h (struct target_desc): Forward declare.
6339 (lynx_tdesc): Declare global.
6340 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6341 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6342 * nto-low.c (nto_tdesc): New global.
6343 (do_attach): Set the new process'es tdesc.
6344 * nto-low.h (struct target_desc): Forward declare.
6345 (nto_tdesc): Declare.
6346 * nto-x86-low.c (tdesc_i386): Declare.
6347 (nto_x86_arch_setup): Set `nto_tdesc'.
6348
6349 2013-06-04 Gary Benson <gbenson@redhat.com>
6350
6351 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6352 to qSupported response when appropriate.
6353 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6354 with nonzero-length annex.
6355 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6356 arguments supplied in annex.
6357
6358 2013-05-31 Doug Evans <dje@google.com>
6359
6360 PR server/15594
6361 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6362 64 bits in 64-cross-32 environment.
6363
6364 2013-05-28 Pedro Alves <palves@redhat.com>
6365
6366 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6367 (aarch64-without-fpu.c): Delete rule.
6368 * configure.srv (aarch64*-*-linux*): Remove references to
6369 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6370 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6371 declaration.
6372
6373 2013-05-24 Pedro Alves <palves@redhat.com>
6374
6375 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6376 instead of strchr/decode_address. Error if the range isn't split
6377 with a ','. Don't assume there's be a ':' in the action.
6378
6379 2013-05-23 Yao Qi <yao@codesourcery.com>
6380 Pedro Alves <palves@redhat.com>
6381
6382 * linux-low.c (lwp_in_step_range): New function.
6383 (linux_wait_1): If the thread was range stepping and stopped
6384 outside the stepping range, report the stop to GDB. Otherwise,
6385 continue stepping. Add range stepping debug output.
6386 (linux_set_resume_request): Copy the step range from the resume
6387 request to the lwp.
6388 (linux_supports_range_stepping): New.
6389 (linux_target_ops) <supports_range_stepping>: Set to
6390 linux_supports_range_stepping.
6391 * linux-low.h (struct linux_target_ops)
6392 <supports_range_stepping>: New field.
6393 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6394 * linux-x86-low.c (x86_supports_range_stepping): New.
6395 (the_low_target) <supports_range_stepping>: Set to
6396 x86_supports_range_stepping.
6397 * server.c (handle_v_cont): Handle 'r' action.
6398 (handle_v_requests): Append ";r" if the target supports range
6399 stepping.
6400 * target.h (struct thread_resume) <step_range_start,
6401 step_range_end>: New fields.
6402 (struct target_ops) <supports_range_stepping>:
6403 New field.
6404 (target_supports_range_stepping): New macro.
6405
6406 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6407
6408 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6409 confusion in comment.
6410
6411 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6412
6413 * lynx-low.c (struct process_info_private): New type.
6414 (lynx_add_process): New function.
6415 (lynx_create_inferior, lynx_attach): Replace calls to
6416 add_process by calls to lynx_add_process.
6417 (lynx_resume): If PTID is null, then try using
6418 current_process()->private->last_wait_event_ptid.
6419 Add comments.
6420 (lynx_clear_inferiors): Delete. The contents of that function
6421 has been inlined in lynx_mourn;
6422 (lynx_wait_1): Save the ptid in the process's private data.
6423 (lynx_mourn): Free the process' private data. Replace call
6424 to lynx_clear_inferiors by call to clear_inferiors.
6425
6426 2013-05-17 Yao Qi <yao@codesourcery.com>
6427
6428 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6429 the right place.
6430
6431 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
6432
6433 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6434 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6435 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6436 PT_TEXT_END_ADDR guards. Update comments.
6437 (linux_target_op) <read_offsets>: Conditionally define to
6438 linux_read_offsets if the target is UCLIBC and if it defines
6439 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6440
6441 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6442 Andrew Jenner <andrew@codesourcery.com>
6443
6444 * Makefile.in (SFILES): Add linux-nios2-low.c.
6445 (clean): Add action to delete nios2-linux.c.
6446 (nios2-linux.c): New rule.
6447 * configure.srv: Add nios2*-*-linux*.
6448 * linux-nios2-low.c: New.
6449
6450 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6451
6452 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6453
6454 2013-04-25 Hui Zhu <hui@codesourcery.com>
6455
6456 PR gdb/15186
6457 * ax.c (ax_printf): Add fflush.
6458
6459 2013-04-22 Tom Tromey <tromey@redhat.com>
6460
6461 * Makefile.in (SFILES): Add filestuff.c.
6462 (OBS): Add filestuff.o.
6463 (filestuff.o): New target.
6464 * config.in, configure: Rebuild.
6465 * configure.ac: Check for fdwalk, pipe2.
6466
6467 2013-04-17 Pedro Alves <palves@redhat.com>
6468
6469 * configure.ac (USE_THREAD_DB): Delete variable.
6470 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6471 Don't AC_SUBST USE_THREAD_DB.
6472 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6473 * config.in, configure: Regenerate.
6474
6475 2013-04-16 Pedro Alves <palves@redhat.com>
6476
6477 * linux-low.h (struct lwp_info) <thread_known>: Move under
6478 the USE_THREAD_DB #ifdef.
6479
6480 2013-04-16 Pedro Alves <palves@redhat.com>
6481
6482 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6483 (linux-low.o): Delete rule.
6484 * linux-low.h: Always include "gdb_thread_db.h" instead of
6485 conditionally including thread_db.h.
6486 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6487 HAVE_THREAD_DB_H.
6488
6489 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6490
6491 * Makefile.in (install-only): Fix make install regression.
6492
6493 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6494
6495 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6496 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6497 installation.
6498 * gdbserver.1: Remove.
6499
6500 2013-03-22 Pedro Alves <palves@redhat.com>
6501
6502 * linux-low.c (handle_extended_wait): Don't call
6503 linux_enable_event_reporting.
6504
6505 2013-03-15 Tony Theodore <tonyt@logyst.com>
6506
6507 PR build/9098:
6508 * Makefile.in (SHELL): Use @SHELL@.
6509
6510 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6511
6512 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6513 compiler warning.
6514
6515 2013-03-13 Joel Brobecker <brobecker@adacore.com>
6516
6517 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6518 Remove extraneous NULL element.
6519
6520 2013-03-13 Yao Qi <yao@codesourcery.com>
6521
6522 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6523 'V' block in trace frame.
6524
6525 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6526
6527 * target.h (struct target_ops): Add btrace ops.
6528 (target_supports_btrace): New macro.
6529 (target_enable_btrace): New macro.
6530 (target_disable_btrace): New macro.
6531 (target_read_btrace): New macro.
6532 * gdbthread.h (struct thread_info): Add btrace field.
6533 * server.c: Include btrace-common.h.
6534 (handle_btrace_general_set): New function.
6535 (handle_btrace_enable): New function.
6536 (handle_btrace_disable): New function.
6537 (handle_general_set): Call handle_btrace_general_set.
6538 (handle_qxfer_btrace): New function.
6539 (struct qxfer qxfer_packets[]): Add btrace entry.
6540 * inferiors.c (remove_thread): Disable btrace.
6541 * linux-low: Include linux-btrace.h.
6542 (linux_low_enable_btrace): New function.
6543 (linux_low_read_btrace): New function.
6544 (linux_target_ops): Add btrace ops.
6545 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6546 Add srv_linux_btrace=yes.
6547 (x86_64-*-linux*): Add linux-btrace.o.
6548 Add srv_linux_btrace=yes.
6549 * configure.ac: Define HAVE_LINUX_BTRACE.
6550 * config.in: Regenerated.
6551 * configure: Regenerated.
6552
6553 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6554
6555 * server.c (handle_qxfer): Preserve error message if -3 is
6556 returned.
6557 (qxfer): Document the -3 return value.
6558
6559 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6560
6561 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6562 (linux_btrace_h): New variable.
6563 (linux-btrace.o): New rule.
6564
6565 2013-03-08 Stan Shebs <stan@codesourcery.com>
6566 Hafiz Abid Qadeer <abidh@codesourcery.com>
6567
6568 * tracepoint.c (trace_buffer_size): New global.
6569 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6570 (init_trace_buffer): Change to one-argument function. Allocate
6571 trace buffer memory.
6572 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6573 handle QTBuffer:size packet.
6574 (cmd_bigqtbuffer_size): New function.
6575 (initialize_tracepoint): Call init_trace_buffer with
6576 DEFAULT_TRACE_BUFFER_SIZE.
6577 * server.c (handle_query): Add QTBuffer:size in the
6578 supported packets.
6579
6580 2013-03-07 Yao Qi <yao@codesourcery.com>
6581
6582 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6583 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6584 of -1.
6585 (cmd_qtsp): Adjust condition. Do post increment.
6586 Set cur_action and cur_step_action back to 0.
6587
6588 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6589
6590 PR server/15236
6591 * linux-low.c (linux_write_memory): Return early success if LEN is
6592 zero.
6593
6594 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
6595
6596 * configure.srv: Add x86_64-*-cygwin* as target.
6597
6598 2013-02-28 Tom Tromey <tromey@redhat.com>
6599
6600 * configure.ac: Invoke AC_SYS_LARGEFILE.
6601 * configure, config.in: Rebuild.
6602
6603 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
6604
6605 * win32-low.c: Throughout, fix format strings and casts of
6606 printf-like functions to avoid type related warnings on all
6607 platforms.
6608 (get_child_debug_event): Print dwDebugEventCode as hex since
6609 that's how it's usually documented.
6610
6611 2013-02-28 Yao Qi <yao@codesourcery.com>
6612
6613 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6614 pulongest.
6615
6616 2013-02-27 Jiong Wang <jiwang@tilera.com>
6617
6618 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6619 (reg-tilegx32.c): New rule.
6620 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6621 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6622 different register info initializer according to elf class.
6623 (init_registers_tilgx32): New function. The tilegx32 register info
6624 initializer.
6625 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6626 (tile_store_gregset): Likewise.
6627
6628 2013-02-27 Yao Qi <yao@codesourcery.com>
6629
6630 * server.c (process_point_options): Print debug message when
6631 debug_threads is true.
6632
6633 2013-02-26 Yao Qi <yao@codesourcery.com>
6634
6635 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6636
6637 2013-02-19 Pedro Alves <palves@redhat.com>
6638 Kai Tietz <ktietz@redhat.com>
6639
6640 PR gdb/15161
6641
6642 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6643 instead of strtoul to extract address from packet.
6644 (process_serial_event) <'z'>: Likewise.
6645
6646 2013-02-18 Yao Qi <yao@codesourcery.com>
6647
6648 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6649
6650 2013-02-14 Pedro Alves <palves@redhat.com>
6651
6652 Plug memory leak.
6653
6654 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6655 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6656
6657 2013-02-14 Pedro Alves <palves@redhat.com>
6658
6659 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6660
6661 2013-02-14 Pedro Alves <palves@redhat.com>
6662
6663 * tracepoint.c (save_string): Delete.
6664 (add_tracepoint_action): Use savestring instead of save_string.
6665
6666 2013-02-12 Pedro Alves <palves@redhat.com>
6667
6668 * linux-xtensa-low.c: Ditto.
6669 * xtensa-xtregs.c: Ditto.
6670
6671 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6672
6673 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6674 thread_db.
6675
6676 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6677
6678 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6679 aarch64_num_wp_regs and aarch64_num_bp_regs to
6680 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6681
6682 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6683
6684 * linux-aarch64-low.c (ps_get_thread_area): Replace
6685 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6686
6687 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6688 Marcus Shawcroft <marcus.shawcroft@arm.com>
6689 Nigel Stephens <nigel.stephens@arm.com>
6690 Yufeng Zhang <yufeng.zhang@arm.com>
6691
6692 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6693 (aarch64.c, aarch64-without-fpu.c): New targets.
6694 * configure.srv (aarch64*-*-linux*): New.
6695 * linux-aarch64-low.c: New file.
6696
6697 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6698
6699 * linux-low.c (handle_extended_wait, linux_create_inferior)
6700 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6701 (dequeue_one_deferred_signal, linux_resume_one_thread)
6702 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6703 (linux_tracefork_grandchild, linux_test_for_tracefork)
6704 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6705 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6706 where the argument is 0.
6707
6708 2013-01-25 Yao Qi <yao@codesourcery.com>
6709
6710 * event-loop.c: Include "queue.h".
6711 (gdb_event_p): New typedef.
6712 (struct gdb_event) <next_event>: Remove.
6713 (event_queue): Change to QUEUE(gdb_event_p).
6714 (async_queue_event): Remove.
6715 (gdb_event_xfree): New.
6716 (initialize_event_loop): New.
6717 (process_event): Use API from QUEUE.
6718 (wait_for_event): Likewise.
6719 * server.c (main): Call initialize_event_loop.
6720 * server.h (initialize_event_loop): Declare.
6721
6722 2013-01-18 Yao Qi <yao@codesourcery.com>
6723
6724 * ax.h (struct eval_agent_expr_context): New.
6725 (gdb_eval_agent_expr): Update declaration.
6726 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6727 TFRAME. Add new argument CTX.
6728 * server.h (struct eval_agent_expr_context): Declare.
6729 (agent_mem_read, agent_tsv_read): Update declaration.
6730 (agent_mem_read_string): Likewise.
6731 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6732 (add_traceframe_block): Add new argument TPOINT.
6733 Increase TPOINT->traceframe_usage.
6734 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6735 eval_tracepoint_agent_expr.
6736 (condition_true_at_tracepoint): Likewise.
6737 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6738 (agent_mem_read_string, agent_tsv_read): Likewise.
6739
6740 2013-01-16 Yao Qi <yao@codesourcery.com>
6741
6742 * linux-low.c (linux_resume_one_lwp): Don't check
6743 'lwp->bp_reinsert != 0'.
6744
6745 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6746 Pedro Alves <palves@redhat.com>
6747
6748 * lynx-low.c (ptrace_request_to_str): Define a temporary
6749 macro and use it to simplify this function's implementation.
6750
6751 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6752
6753 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6754 sets errno.
6755
6756 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6757
6758 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6759
6760 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6761
6762 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6763
6764 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6765
6766 * lynx-low.c (lynx_resume): Use the resume_info parameter
6767 to determine the ptid for the lynx_ptrace call, unless
6768 it is equal to minus_one_ptid, in which case we use the
6769 ptid of the current_inferior.
6770 (lynx_wait_1): After having received a thread create/exit
6771 event, resume the inferior's execution using the signaling
6772 thread's ptid, rather than the old ptid.
6773
6774 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6775
6776 * lynx-low.c (lynx_resume): Delete variable ret.
6777
6778 2013-01-01 Joel Brobecker <brobecker@adacore.com>
6779
6780 * gdbreplay.c (gdbreplay_version): Update copyright year.
6781 * server.c (gdbserver_version): Likewise.
6782
6783 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6784
6785 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6786 new thread.
6787
6788 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6789
6790 * lynx-low.c (ptrace_request_to_str): Add handling for
6791 PTRACE_GETTRACESIG.
6792
6793 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6794
6795 * lynx-low.c (lynx_attach): Delete variable new_process.
6796
6797 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6798
6799 * lynx-low.c (lynx_create_inferior): Delete variable
6800 new_process.
6801
6802 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6803
6804 * lynx-low.c (ptrace_request_to_str): Do not handle
6805 PTRACE_GETTHREADLIST if this macro does not exist.
6806
6807 2012-12-15 Yao Qi <yao@codesourcery.com>
6808
6809 * Makefile.in (OBS): Add notif.o.
6810 * notif.c, notif.h: New.
6811 * server.c: Include "notif.h".
6812 (struct vstop_notif) <next>: Remove.
6813 <base>: New field.
6814 (queue_stop_reply): Update.
6815 (push_event, send_next_stop_reply): Remove.
6816 (discard_queued_stop_replies): Update.
6817 (notif_stop): New variable.
6818 (handle_v_stopped): Remove.
6819 (handle_v_requests): Don't call handle_v_stopped. Call
6820 handle_ack_notif instead.
6821 (queue_stop_reply_callback): Call notif_event_enque instead
6822 of queue_stop_reply.
6823 (handle_status): Don't call send_next_stop_reply, call
6824 notif_write_event instead.
6825 (kill_inferior_callback): Likewise.
6826 (detach_or_kill_inferior_callback): Likewise.
6827 (main): Call initialize_notif.
6828 (process_serial_event): Call QUEUE_is_empty.
6829 (handle_target_event): Call notif_push instead of push event.
6830 * server.h (push_event): Remove declaration.
6831
6832 2012-12-10 Tom Tromey <tromey@redhat.com>
6833
6834 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6835 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6836 macros.
6837 (.c.o): Rewrite.
6838 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6839 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6840 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6841 (amd64-linux-ipa.o, ax.o): Rewrite.
6842 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6843 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6844 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6845 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6846 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6847 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6848 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6849 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6850 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6851 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6852 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6853 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6854 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6855 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6856 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6857 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6858 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6859 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6860 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6861 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6862 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6863 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6864 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6865 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6866 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6867 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6868 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6869 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6870 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6871 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6872 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6873 (reg-tilegx.o): Remove.
6874 (all_object_files): New macro.
6875 Include .deps files.
6876 * aclocal.m4, configure: Rebuild.
6877 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6878 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6879 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6880
6881 2012-12-05 Tom Tromey <tromey@redhat.com>
6882
6883 PR gdb/14917:
6884 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6885
6886 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
6887
6888 * configure.ac: Check for linux/perf_event.h.
6889 * config.in: Regenerated.
6890 * configure: Regenerated.
6891
6892 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6893
6894 * hostio.c (handle_readlink): Decrease buffer size
6895 parameter passed to readlink by one byte.
6896
6897 2012-11-26 Yao Qi <yao@codesourcery.com>
6898
6899 * configure.ac (build_warnings): Append '-Wempty-body'.
6900 * configure: Regenerated.
6901 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6902 body.
6903
6904 2012-11-15 Pierre Muller <muller@sourceware.org>
6905
6906 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6907 * config.in: Regenerate.
6908 * configure: Regenerate.
6909 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6910 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6911 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6912 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6913 header.
6914 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6915 instead of <sys/wait.h> header.
6916 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6917
6918 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
6919
6920 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6921 (various make rules): Remove -DGDBSERVER
6922
6923 2012-11-09 Yao Qi <yao@codesourcery.com>
6924
6925 * spu-low.c (current_ptid): Move it to ..
6926 * gdbthread.h: ... here. New.
6927 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6928 * server.c (myresume, process_serial_event): Likewise.
6929 * thread-db.c (thread_db_find_new_threads): Likewise.
6930 * tracepoint.c (run_inferior_command): Likewise.
6931
6932 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
6933
6934 * server.c (handle_search_memory_1): Include access length in
6935 warning message.
6936
6937 2012-09-05 Michael Brandt <michael.brandt@axis.com>
6938
6939 * linux-crisv32-low.c: Fix compile errors.
6940
6941 2012-09-04 Yao Qi <yao@codesourcery.com>
6942
6943 * tracepoint.c (cmd_qtsv): Adjust debug message.
6944 Don't check CUR_TPOINT.
6945
6946 2012-08-28 Yao Qi <yao@codesourcery.com>
6947
6948 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6949 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6950 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6951 Remove declarations of xmalloc, xreallloc, xstrdup and
6952 freeargv.
6953 * Makefile.in (libiberty_h): New.
6954 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6955 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6956
6957 2012-08-23 Yao Qi <yao@codesourcery.com>
6958
6959 * server.h: Remove declaration of 'xsnprintf'.
6960
6961 2012-08-22 Keith Seitz <keiths@redhat.com>
6962
6963 * server.h: Include build-gnulib-gbserver/config.h.
6964 * gdbreplay.c: Likewise.
6965
6966 2012-08-08 Doug Evans <dje@google.com>
6967
6968 * Makefile.in (SFILES): Add gdb_vecs.c.
6969 (OBS): Add gdb_vecs.o.
6970 (gdb_vecs_h, host_defs_h): New variables.
6971 (thread-db.o): Add $(gdb_vecs_h) dependency.
6972 (gdb_vecs.o): New rule.
6973 * thread-db.c: #include "gdb_vecs.h".
6974 (thread_db_load_search): Use a vector to iterate over path elements.
6975 Handle text appearing after "$pdir".
6976
6977 * configure.ac: Add check for strstr.
6978 * config.in: Regenerate.
6979 * configure: Regenerate.
6980
6981 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6982
6983 * hostio.c (handle_pread): If pread fails, fall back to attempting
6984 lseek/read.
6985 (handle_pwrite): Likewise for pwrite.
6986
6987 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6988
6989 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6990 between unsupported TYPE and unimplementable ADDR/LEN combination.
6991 (arm_insert_point): Act on new return value.
6992
6993 2012-07-31 Pedro Alves <palves@redhat.com>
6994
6995 * server.c (process_point_options): Only skip tokens if we find
6996 one that is unrecognized. Don't treat 'X' specially while
6997 skipping unrecognized tokens.
6998
6999 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7000
7001 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7002 to 4-byte-align HW breakpoint addresses for Thumb.
7003
7004 2012-07-27 Yao Qi <yao@codesourcery.com>
7005
7006 PR remote/14161.
7007
7008 * server.h: Declare gdb_agent_about_to_close.
7009 * target.c (kill_inferior): Include "agent.h".
7010 New. Send command 'kill'.
7011 * target.h (kill_inferior): Removed macro.
7012 * tracepoint.c (gdb_agent_about_to_close): New.
7013 (gdb_agent_helper_thread): Handle command 'close'.
7014 Wait endlessly until the inferior stops.
7015 Install gdb_agent_remove_socket to atexit hook.
7016 (agent_socket_name): New static variable.
7017 (gdb_agent_socket_init): Replace local variable 'name' with
7018 'agent_socket_name'.
7019 (gdb_agent_remove_socket): New.
7020
7021 2012-07-27 Yao Qi <yao@codesourcery.com>
7022
7023 * server.c (process_point_options): Stop at 'X' when parsing.
7024
7025 2012-07-19 Michael Eager <eager@eagercon.com>
7026
7027 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7028 to hw_execute.
7029 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7030 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7031 hardware breakpoint.
7032
7033 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7034
7035 * gdbserver/linux-low.c (initialize_low): Call
7036 linux_ptrace_init_warnings.
7037
7038 2012-07-02 Doug Evans <dje@google.com>
7039
7040 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7041 pointer to int.
7042
7043 2012-07-02 Stan Shebs <stan@codesourcery.com>
7044
7045 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7046 (ax.o): Add it to build rule.
7047 (ax-ipa.o): Ditto.
7048 (OBS): Add format.o.
7049 (IPA_OBS): Add format.o.
7050 * server.c (handle_query): Claim support for breakpoint commands.
7051 (process_point_options): Add command case.
7052 (process_serial_event): Leave running if there are printfs in
7053 effect.
7054 * mem-break.h (any_persistent_commands): Declare.
7055 (add_breakpoint_commands): Declare.
7056 (gdb_no_commands_at_breakpoint): Declare.
7057 (run_breakpoint_commands): Declare.
7058 * mem-break.c (struct point_command_list): New struct.
7059 (struct breakpoint): New field command_list.
7060 (any_persistent_commands): New function.
7061 (add_commands_to_breakpoint): New function.
7062 (add_breakpoint_commands): New function.
7063 (gdb_no_commands_at_breakpoint): New function.
7064 (run_breakpoint_commands): New function.
7065 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7066 locally.
7067 * ax.c: Include format.h.
7068 (ax_printf): New function.
7069 (gdb_eval_agent_expr): Add printf opcode.
7070
7071 2012-06-13 Yao Qi <yao@codesourcery.com>
7072
7073 * server.c (start_inferior): Remove duplicated writes to fields
7074 'last_resume_kind' and 'last_status' of 'current_inferior'.
7075
7076 2012-06-12 Yao Qi <yao@codesourcery.com>
7077 Pedro Alves <palves@redhat.com>
7078
7079 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7080 comment.
7081 * server.c (handle_v_cont): Extend comment.
7082
7083 2012-06-11 Yao Qi <yao@codesourcery.com>
7084
7085 * linux-low.c (linux_attach): Add 'static'.
7086
7087 2012-06-06 Yao Qi <yao@codesourcery.com>
7088
7089 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7090
7091 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7092
7093 Fix gcc -flto compilation warning.
7094 * server.c (main): Make variable multi_mode and attach volatile.
7095
7096 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7097
7098 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7099 if the platform doesn't know about it.
7100
7101 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7102
7103 * Makefile.in (SFILES): Add linux-tile-low.c.
7104 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7105 * configure.srv: Handle tilegx-*-linux*.
7106 * linux-tile-low.c: New file.
7107
7108 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7109
7110 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7111
7112 2012-05-24 Pedro Alves <palves@redhat.com>
7113
7114 PR gdb/7205
7115
7116 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7117
7118 2012-05-24 Pedro Alves <palves@redhat.com>
7119
7120 PR gdb/7205
7121
7122 Replace target_signal with gdb_signal throughout.
7123
7124 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7125
7126 * linux-low.c (linux_store_registers): Avoid the copying sequence
7127 when no data has been retrieved by ptrace.
7128
7129 2012-05-22 Will Deacon <will.deacon@arm.com>
7130
7131 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7132 Include asm/ptrace.h.
7133 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7134 already defined.
7135
7136 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7137
7138 * linux-low.c (linux_store_registers): Don't re-retrieve data
7139 with ptrace that has already been obtained from /proc. Always
7140 copy any data retrieved with ptrace to the buffer supplied.
7141
7142 2012-05-11 Yao Qi <yao@codesourcery.com>
7143 Pedro Alves <palves@redhat.com>
7144
7145 * linux-low.c (enum stopping_threads_kind): New.
7146 (stopping_threads): Change type to `enum stopping_threads_kind'.
7147 (handle_extended_wait): If stopping and suspending threads, leave
7148 the new_lwp suspended too.
7149 (linux_wait_for_event): Adjust.
7150 (stop_all_lwps): Set `stopping_threads' to
7151 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7152 whether we're suspending threads or just stopping them. Assert no
7153 recursion happens.
7154
7155 2012-04-29 Yao Qi <yao@codesourcery.com>
7156
7157 * server.h: Move some code to ...
7158 * gdbthread.h: ... here. New.
7159 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7160 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7161 (nto-low.o, win32-low.o): Likewise.
7162 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7163 * regcache.c, remote-utils.c, server.c: Likewise.
7164 * target.c, tracepoint.c, win32-low.c: Likewise.
7165
7166 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7167
7168 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7169 (PTRACE_ARG4_TYPE): Likewise.
7170 (PTRACE_XFER_TYPE): Likewise.
7171 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7172 ptrace to PTRACE_ARG3_TYPE.
7173 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7174 (PTRACE_ARG4_TYPE): Likewise.
7175 (PTRACE_XFER_TYPE): Likewise.
7176 (linux_detach_one_lwp): Cast fourth argument of
7177 ptrace to long then PTRACE_ARG4_TYPE.
7178 (regsets_fetch_inferior_registers): Cast third argument of
7179 ptrace to long then PTRACE_ARG3_TYPE.
7180 (regsets_store_inferior_registers): Likewise.
7181
7182 2012-04-20 Pedro Alves <palves@redhat.com>
7183
7184 * configure: Regenerate.
7185
7186 2012-04-19 Pedro Alves <palves@redhat.com>
7187
7188 * Makefile.in (GNULIB_BUILDDIR): New.
7189 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7190 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7191 (all, install-only, uninstall, clean-info, all-lib, clean): No
7192 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7193 (maintainer-clean realclean distclean): Use subdir_do.
7194 (subdir_do): New.
7195 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7196 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7197 * acinclude.m4: Include acx_configure_dir.m4.
7198 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7199 calls. Call AC_PROG_RANLIB. Configure gnulib using
7200 ACX_CONFIGURE_DIR.
7201 (GNULIB): New.
7202 (GNULIB_STDINT_H): Adjust.
7203 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7204 * gdbreplay.c: Include build-gnulib/config.h.
7205 * server.h: Likewise.
7206 * aclocal.m4: Regenerate.
7207 * config.in: Regenerate.
7208 * configure: Regenerate.
7209
7210 2012-04-19 Pedro Alves <palves@redhat.com>
7211
7212 * Makefile.in (LIBGNU, INCGNU): Adjust.
7213 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7214 (all, install-only, uninstall, clean-info, all-lib, clean)
7215 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7216 * configure.ac: Adjust AC_OUTPUT output.
7217 * aclocal.m4: Regenerate.
7218 * configure: Regenerate.
7219
7220 2012-04-19 Pedro Alves <palves@redhat.com>
7221
7222 * Makefile.in (generated_files): New.
7223 (server_h): Remove the explicit dependency on config.h, and depend
7224 on $generated_files.
7225
7226 2012-04-19 Pedro Alves <palves@redhat.com>
7227
7228 * Makefile.in (INCGNU): Add -Ignulib.
7229
7230 2012-04-19 Pedro Alves <palves@redhat.com>
7231
7232 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7233 (INCGNU): ... this, and spell out -I here.
7234 (GNULIB_LIB): Rename to ...
7235 (LIBGNU): ... this.
7236 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7237
7238 2012-04-19 Pedro Alves <palves@redhat.com>
7239
7240 * config.in: Regenerate.
7241
7242 2012-04-19 Pedro Alves <palves@redhat.com>
7243
7244 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7245 * server.h (memmem): Remove declaration.
7246 * config.in: Regenerate.
7247 * configure: Regenerate.
7248
7249 2012-04-19 Yao Qi <yao@codesourcery.com>
7250
7251 * Makefile.in (SFILES): Add common/vec.c.
7252 (OBS): Add vec.o.
7253 (vec.o): New rule.
7254
7255 2012-04-19 Yao Qi <yao@codesourcery.com>
7256
7257 * remote-utils.c (prepare_resume_reply): Replace with macro
7258 target_core_of_thread.
7259 * server.c (handle_qxfer_threads_proper): Likewise.
7260 * target.h (traget_core_of_thread): New macro.
7261
7262 2012-04-18 Pedro Alves <palves@redhat.com>
7263
7264 * aclocal.m4: Regenerate.
7265 * configure: Regenerate.
7266
7267 2012-04-16 Yao Qi <yao@codesourcery.com>
7268
7269 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7270 duplicated on address.
7271
7272 2012-04-16 Yao Qi <yao@codesourcery.com>
7273
7274 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7275 (struct tracepoint_action_ops) <send>: New field.
7276 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7277 (agent_expr_send, x_tracepoint_action_send): New.
7278 (l_tracepoint_action_send): New.
7279 (cmd_qtdp): Download and install tracepoint
7280 according to `use_agent'.
7281 (run_inferior_command): Add one more parameter `len'.
7282 Update callers.
7283 (tracepoint_send_agent): New.
7284 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7285
7286 2012-04-16 Yao Qi <yao@codesourcery.com>
7287
7288 * tracepoint.c (download_tracepoints): Moved to ...
7289 (cmd_qtstart): ... here.
7290
7291 2012-04-14 Yao Qi <yao@codesourcery.com>
7292
7293 * tracepoint.c: Include inttypes.h.
7294 (struct collect_memory_action): Use sized types.
7295 (struct tracepoint): Likewise.
7296 (cmd_qtdp, stop_tracing): Update print specifiers.
7297 (cmd_qtp, response_tracepoint): Likewise.
7298 (collect_data_at_tracepoint): Likewise.
7299 (collect_data_at_step): Likewise.
7300
7301 2012-04-14 Yao Qi <yao@codesourcery.com>
7302
7303 Import gnulib module inttypes.
7304 * aclocal.m4, config.in, configure: Regenerated.
7305
7306 2012-04-14 Yao Qi <yao@codesourcery.com>
7307
7308 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7309 Makefile and config.status at last.
7310
7311 2012-04-13 Yao Qi <yao@codesourcery.com>
7312
7313 * tracepoint.c: Include stdint.h unconditionally.
7314
7315 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7316
7317 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7318 on BFD_HAVE_SYS_PROCFS_TYPE.
7319 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7320 * configure: Regenerate.
7321 * config.in: Likewise.
7322
7323 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7324
7325 * Makefile.in (clean): Also remove x32.c x32-linux.c
7326 x32-avx.c x32-avx-linux.c.
7327 (x32.o): New target.
7328 (x32.c): Likewise.
7329 (x32-linux.o): Likewise.
7330 (x32-linux.c): Likewise.
7331 (x32-avx.o): Likewise.
7332 (x32-avx.c): Likewise.
7333 (x32-avx-linux.o): Likewise.
7334 (x32-avx-linux.c): Likewise.
7335
7336 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7337 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7338 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7339 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7340 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7341 i386/x32-avx-linux.xml.
7342
7343 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7344 (init_registers_x32_avx_linux): Likwise.
7345 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7346 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7347
7348 2012-04-13 Pedro Alves <palves@redhat.com>
7349
7350 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7351 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7352 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7353 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7354 the sub-make.
7355
7356 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7357
7358 * linux-x86-low.c (compat_x32_clock_t): New.
7359 (compat_x32_siginfo_t): Likewise.
7360 (compat_x32_siginfo_from_siginfo): Likewise.
7361 (siginfo_from_compat_x32_siginfo): Likewise.
7362 (linux_is_elf64): Likewise.
7363 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7364 and siginfo_from_compat_x32_siginfo for x32.
7365 (x86_arch_setup): Set linux_is_elf64.
7366
7367 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7368
7369 PR gdb/13969
7370 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7371 e_machine field.
7372 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7373 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7374 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7375 compatible with process.
7376
7377 2012-04-12 Yao Qi <yao@codesourcery.com>
7378
7379 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7380 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7381 (install-only, install-info, clean): Handle sub dir gnulib.
7382 (all-lib, am--refresh): New targets.
7383 (memmem.o): Remove target.
7384 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7385 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7386 (AC_REPLACE_FUNCS): Remove memmem.
7387 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7388 (AC_OUTPUT): Generate Makefile in gnulib/.
7389 * aclocal.m4, config.in, configure: Regenerated.
7390
7391 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7392
7393 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7394
7395 2012-04-05 Pedro Alves <palves@redhat.com>
7396
7397 -Werror=strict-aliasing
7398
7399 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7400 pointer.
7401
7402 2012-04-04 Pedro Alves <palves@redhat.com>
7403
7404 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7405 (sparc_store_gregset_from_stack, sparc_store_gregset)
7406 (sparc_breakpoint_at): Fix formatting.
7407
7408 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7409
7410 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7411 are available.
7412 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7413 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7414 * config.in: Regenerate.
7415 * configure: Likewise.
7416
7417 2012-03-29 Pedro Alves <palves@redhat.com>
7418
7419 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7420 Correct ptrace arguments.
7421
7422 2012-03-28 Pedro Alves <palves@redhat.com>
7423
7424 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7425 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7426 (IA64_FR1_REGNUM): New defines.
7427 (ia64_fetch_register): New.
7428 (the_low_target): Install it.
7429 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7430 field.
7431 * linux-low.c (linux_fetch_registers): Try the
7432 the_low_target.fetch_register hook first.
7433
7434 * linux-arm-low.c (the_low_target): Adjust.
7435 * linux-bfin-low.c (the_low_target): Adjust.
7436 * linux-cris-low.c (the_low_target): Adjust.
7437 * linux-crisv32-low.c (the_low_target): Adjust.
7438 * linux-m32r-low.c (the_low_target): Adjust.
7439 * linux-m68k-low.c (the_low_target): Adjust.
7440 * linux-mips-low.c (the_low_target): Adjust.
7441 * linux-ppc-low.c (the_low_target): Adjust.
7442 * linux-s390-low.c (the_low_target): Adjust.
7443 * linux-sh-low.c (the_low_target): Adjust.
7444 * linux-sparc-low.c (the_low_target): Adjust.
7445 * linux-tic6x-low.c (the_low_target): Adjust.
7446 * linux-x86-low.c (the_low_target): Adjust.
7447 * linux-xtensa-low.c (the_low_target): Adjust.
7448
7449 2012-03-26 Pedro Alves <palves@redhat.com>
7450
7451 * server.c (handle_qxfer_libraries): Don't bail early if
7452 the_target->qxfer_libraries_svr4 is not NULL.
7453
7454 2012-03-26 Pedro Alves <palves@redhat.com>
7455
7456 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7457
7458 2012-03-23 Pedro Alves <palves@redhat.com>
7459
7460 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7461 "library-list-svr4" element's start tag when the the DSO list is
7462 empty.
7463
7464 2012-03-23 Pedro Alves <palves@redhat.com>
7465
7466 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7467 a variable whose type size is the same as the inferior's pointer
7468 size.
7469
7470 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7471
7472 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7473 struct siginfo.
7474 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7475 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7476 * linux-low.h: Include <signal.h>.
7477 (struct siginfo): Remove forward declaration.
7478 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7479 struct siginfo.
7480
7481 2012-03-21 Mike Frysinger <vapier@gentoo.org>
7482
7483 * .gitignore: Ignore more files.
7484
7485 2012-03-19 Pedro Alves <palves@redhat.com>
7486 Jan Kratochvil <jan.kratochvil@redhat.com>
7487
7488 * server.c (cont_thread, general_thread): Add describing comments.
7489 (start_inferior): Clear `cont_thread'.
7490 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7491 of a process.
7492
7493 2012-03-15 Yao Qi <yao@codesourcery.com>
7494
7495 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7496 handling to ...
7497 (cmd_qtdp): ... here.
7498
7499 2012-03-15 Yao Qi <yao@codesourcery.com>
7500
7501 * tracepoint.c (struct tracepoint_action_ops): New.
7502 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7503 (m_tracepoint_action_download): New.
7504 (r_tracepoint_action_download): New.
7505 (x_tracepoint_action_download): New.
7506 (l_tracepoint_action_download): New.
7507 (add_tracepoint_action): Install `action->ops' according type.
7508 (download_tracepoint_1): Move code `download' function pointer
7509 of various tracepoint_action_ops.
7510
7511 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7512
7513 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7514 linux_ptrace_attach_warnings.
7515
7516 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7517
7518 * Makefile.in (linux-ptrace.o): New.
7519 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7520 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7521 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7522 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7523 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7524 of these targets.
7525 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7526
7527 2012-03-08 Yao Qi <yao@codesourcery.com>
7528 Pedro Alves <palves@redhat.com>
7529
7530 Fix PR server/13392.
7531 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7532 offset of JMP insn.
7533 * tracepoint.c (remove_tracepoint): New.
7534 (cmd_qtdp): Call remove_tracepoint when failed to install.
7535
7536 2012-03-07 Pedro Alves <palves@redhat.com>
7537
7538 * linux-low.c (get_detach_signal): New.
7539 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7540 Pass on pending signals to PTRACE_DETACH. Check the result of the
7541 ptrace call.
7542 * server.c (program_signals, program_signals_p): New.
7543 (handle_general_set): Handle QProgramSignals.
7544 * server.h (program_signals, program_signals_p): Declare.
7545
7546 2012-03-05 Pedro Alves <palves@redhat.com>
7547 Jan Kratochvil <jan.kratochvil@redhat.com>
7548
7549 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7550 New comment why.
7551
7552 2012-03-03 Yao Qi <yao@codesourcery.com>
7553
7554 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7555 agent_look_up_symbols.
7556
7557 2012-03-03 Yao Qi <yao@codesourcery.com>
7558
7559 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7560 (linux-x86-low.o): Likewise.
7561 * server.h: Remove in_process_agent_loaded.
7562 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7563 common/agent.c.
7564 Update callers.
7565
7566 2012-03-03 Yao Qi <yao@codesourcery.com>
7567
7568 * tracepoint.c (gdb_agent_capability): New global.
7569 (in_process_agent_loaded_ust): Renamed to
7570 `in_process_agent_supports_ust'.
7571 Update callers.
7572 (in_process_agent_supports_ust): Call agent_capability_check.
7573 (clear_installed_tracepoints): Assert that agent supports
7574 agent.
7575
7576 2012-03-03 Yao Qi <yao@codesourcery.com>
7577
7578 * linux-low.c (linux_supports_agent): New.
7579 (linux_target_ops): Initialize field `supports_agent' with
7580 linux_supports_agent.
7581 * target.h (struct target_ops) <supports_agent>: New.
7582 (target_supports_agent): New macro.
7583 * server.c (handle_general_set): Handle packet 'QAgent'.
7584 (handle_query): Send `QAgent+'.
7585 * Makefile.in (server.o): Depends on agent.h.
7586
7587 2012-03-03 Yao Qi <yao@codesourcery.com>
7588
7589 * Makefile.in (OBS): Add agent.o.
7590 Add new rule for agent.o.
7591 Track dependence of tracepoint.c on agent.h.
7592 * tracepoint.c (run_inferior_command_1):
7593 (run_inferior_command): Call agent_run_command.
7594 (gdb_ust_connect_sync_socket): Deleted. Move it to
7595 common/agent.c.
7596 (resume_thread, stop_thread): Likewise.
7597 (gdb_ust_socket_init): Renamed to ...
7598 (gdb_agent_socket_init): ... New.
7599 (gdb_ust_thread): Renamed to ...
7600 (gdb_agent_helper_thread): ... New.
7601 (gdb_ust_init): Move some code to ...
7602 (gdb_agent_init): ... here. New.
7603 [HAVE_UST]: Call gdb_ust_init.
7604 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7605 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7606 * config.in, configure: Regenerated.
7607
7608 2012-03-02 Pedro Alves <palves@redhat.com>
7609
7610 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7611 * linux-low.c (struct simple_pid_list): New.
7612 (stopped_pids): New a struct simple_pid_list pointer.
7613 (add_to_pid_list, pull_pid_from_list): New.
7614 (handle_extended_wait): Don't assume the first signal new children
7615 report is SIGSTOP. Adjust call to pull_pid_from_list.
7616 (linux_wait_for_lwp): Adjust.
7617
7618 2012-03-02 Yao Qi <yao@codesourcery.com>
7619
7620 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7621 debug log.
7622
7623 2012-03-02 Yao Qi <yao@codesourcery.com>
7624
7625 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7626 `stop_pc' and `tpoint'. Update caller.
7627
7628 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7629
7630 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7631 * linux-low.c (use_linux_regsets): New macro.
7632 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7633 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7634 (linux_register_in_regsets): New function.
7635 (usr_fetch_inferior_registers): Skip registers covered by
7636 regsets.
7637 (usr_store_inferior_registers): Likewise.
7638 (usr_fetch_inferior_registers): New macro.
7639 (usr_store_inferior_registers): Likewise.
7640 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7641 (linux_store_registers): Likewise.
7642 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7643 prototype.
7644 (init_registers_mips64_dsp_linux): Likewise.
7645 (init_registers_mips_linux): New macro.
7646 (init_registers_mips_dsp_linux): Likewise.
7647 (mips_dsp_num_regs): Likewise.
7648 (DSP_BASE, DSP_CONTROL): New fallback macros.
7649 (mips_base_regs): New macro.
7650 (mips_regmap): Use it. Fix the size.
7651 (mips_dsp_regmap): New variable.
7652 (mips_dsp_regset_bitmap): Likewise.
7653 (mips_arch_setup): New function.
7654 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7655 than mips_regmap.
7656 (mips_cannot_store_register): Likewise.
7657 (the_low_target): Update .arch_setup, .num_regs and .regmap
7658 initializers. Add .regset_bitmap initializer.
7659 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7660 initializer.
7661 * linux-bfin-low.c (the_low_target): Likewise.
7662 * linux-cris-low.c (the_low_target): Likewise.
7663 * linux-crisv32-low.c (the_low_target): Likewise.
7664 * linux-ia64-low.c (the_low_target): Likewise.
7665 * linux-m32r-low.c (the_low_target): Likewise.
7666 * linux-m68k-low.c (the_low_target): Likewise.
7667 * linux-ppc-low.c (the_low_target): Likewise.
7668 * linux-s390-low.c (the_low_target): Likewise.
7669 * linux-sh-low.c (the_low_target): Likewise.
7670 * linux-sparc-low.c (the_low_target): Likewise.
7671 * linux-tic6x-low.c (the_low_target): Likewise.
7672 * linux-x86-low.c (the_low_target): Likewise.
7673 * linux-xtensa-low.c (the_low_target): Likewise.
7674 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7675 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7676 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7677 srv_xmlfiles.
7678 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7679 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7680
7681 2012-02-29 Yao Qi <yao@codesourcery.com>
7682 Pedro Alves <palves@redhat.com>
7683
7684 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7685 `step_over_finished' is true.
7686
7687 2012-02-27 Pedro Alves <palves@redhat.com>
7688
7689 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7690 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7691
7692 2012-02-27 Pedro Alves <palves@redhat.com>
7693
7694 PR server/9684
7695 * linux-low.c (pid_is_stopped): New.
7696 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7697
7698 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
7699
7700 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7701 of conditions.
7702
7703 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7704
7705 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7706
7707 2012-02-24 Luis Machado <lgustavo@codesourcery>
7708
7709 * server.c (handle_query): Advertise support for target-side
7710 breakpoint condition evaluation.
7711 (process_point_options): New function.
7712 (process_serial_event): When inserting a breakpoint, check for
7713 a target-side condition that should be evaluated.
7714
7715 * mem-break.c: Include regcache.h and ax.h.
7716 (point_cond_list_t): New data structure.
7717 (breakpoint) <cond_list>: New field.
7718 (find_gdb_breakpoint_at): Make non-static.
7719 (delete_gdb_breakpoint_at): Clear any target-side
7720 conditions.
7721 (clear_gdb_breakpoint_conditions): New function.
7722 (add_condition_to_breakpoint): Likewise.
7723 (add_breakpoint_condition): Likewise.
7724 (gdb_condition_true_at_breakpoint): Likewise.
7725 (gdb_breakpoint_here): Return result directly instead
7726 of going through a local variable.
7727
7728 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7729 (clear_gdb_breakpoint_conditions): Likewise.
7730 (add_breakpoint_condition): Likewise.
7731 (gdb_condition_true_at_breakpoint): Likewise.
7732
7733 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7734 (need_step_over_p): Take target-side breakpoint condition into
7735 consideration.
7736
7737 2012-02-24 Luis Machado <lgustavo@codesourcery>
7738
7739 * server.h: Include tracepoint.h.
7740 (agent_mem_read, agent_get_trace_state_variable_value,
7741 agent_set_trace_state_variable_value,
7742 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7743 get_set_tsv_func_addr): New prototypes.
7744
7745 * ax.h: New include file.
7746 * ax.c: New source file.
7747
7748 * tracepoint.c: Include ax.h.
7749 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7750 agent_expr, eval_result_type): Move to ax.h.
7751 (parse_agent_expr): Rename to ...
7752 (gdb_parse_agent_expr): ... this, make it non-static and move
7753 to ax.h.
7754 (unparse_agent_expr) Rename to ...
7755 (gdb_unparse_agent_expr): ... this, make it non-static and move
7756 to ax.h.
7757 (eval_agent_expr): Rename to ...
7758 (eval_tracepoint_agent_expr): ... this.
7759 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7760 forward declarations.
7761 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7762 (agent_get_trace_state_variable_value): New function.
7763 (agent_set_trace_state_variable_value): New function.
7764 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7765 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7766 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7767 (condition_true_at_tracepoint): Likewise.
7768 (parse_agent_expr): Rename to ...
7769 (gdb_parse_agent_expr): ... this and move to ax.c.
7770 (unparse_agent_expr): Rename to ...
7771 (gdb_unparse_agent_expr): ... this and move to ax.c.
7772 (gdb_agent_op_name): Move to ax.c.
7773 (eval_agent_expr): Rename to ...
7774 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7775 and move to ax.c.
7776 (eval_tracepoint_agent_expr): New function.
7777 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
7778 non-static.
7779 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7780 ax.c.
7781 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7782 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7783 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7784 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7785 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7786 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7787 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7788 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7789 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7790 (compile_bytecodes): Remove forward declaration.
7791 (is_goto_target): Move to ax.c.
7792 (compile_bytecodes): Move to ax.c and call
7793 agent_get_trace_state_variable_value (...) and
7794 agent_set_trace_state_variable_value (...).
7795
7796 * Makefile.in: Update ax.c and IPA dependencies.
7797
7798 2012-02-24 Pedro Alves <palves@redhat.com>
7799
7800 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7801 (cmd_bigqtbuffer_circular): ... this. Only handle
7802 'QTBuffer:circular:'.
7803 (handle_tracepoint_general_set): Adjust.
7804
7805 2012-02-16 Yao Qi <yao@codesourcery.com>
7806
7807 * inferiors.c: Move code to ...
7808 * dll.c: .... here. New.
7809 * server.h: Declare clear_dlls.
7810 * Makefile.in (SFILES): Add dll.c.
7811 (OBS): Add dll.o
7812 (dll.o): New rule.
7813
7814 2012-02-11 Yao Qi <yao@codesourcery.com>
7815
7816 * server.c: (handle_monitor_command): Add a new parameter
7817 `own_buf'.
7818 (handle_query): Update caller.
7819
7820 2012-02-09 Joel Brobecker <brobecker@adacore.com>
7821
7822 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7823 * configure, config.in: Regenerate.
7824 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7825 is not defined.
7826
7827 2012-02-02 Pedro Alves <palves@redhat.com>
7828
7829 Try SIGKILL first, then PTRACE_KILL.
7830 * linux-low.c (linux_kill_one_lwp): New.
7831 (linux_kill_one_lwp): Rename to ...
7832 (kill_one_lwp_callback): ... this. Use the new
7833 linux_kill_one_lwp.
7834
7835 2012-02-02 Pedro Alves <palves@redhat.com>
7836
7837 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7838 inferior.
7839
7840 2012-01-27 Pedro Alves <palves@redhat.com>
7841
7842 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7843 (elf_64_file_p): Make static.
7844 (linux_pid_exe_is_elf_64_file): New.
7845 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7846 Delete declarations.
7847 (linux_pid_exe_is_elf_64_file): Declare.
7848 * linux-x86-low.c (x86_arch_setup): Use
7849 linux_pid_exe_is_elf_64_file.
7850
7851 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7852
7853 * linux-low.c (linux_wait_for_event_1): Rename to ...
7854 (linux_wait_for_event): ... here and merge it with former
7855 linux_wait_for_event - new variable wait_ptid, use it.
7856 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7857
7858 2012-01-23 Pedro Alves <palves@redhat.com>
7859
7860 * server.c (main): Avoid yet another case of infinite loop while
7861 detaching/killing after a longjmp.
7862
7863 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7864
7865 Code cleanup.
7866 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7867
7868 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7869
7870 * hostio.c (handle_readlink): New function.
7871 (handle_vFile): Call it to handle "vFile:readlink" packets.
7872
7873 2012-01-20 Pedro Alves <palves@redhat.com>
7874 Ulrich Weigand <ulrich.weigand@linaro.org>
7875
7876 * server.c (handle_v_requests): Only support vAttach and vRun to
7877 start multiple processes when in extended protocol mode.
7878
7879 2012-01-17 Pedro Alves <palves@redhat.com>
7880
7881 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7882 memalign plus mprotect to allocate the scratch buffer.
7883
7884 2012-01-13 Pedro Alves <palves@redhat.com>
7885
7886 * server.c (attach_inferior): Clear `cont_thread'.
7887
7888 2012-01-13 Pedro Alves <palves@redhat.com>
7889
7890 * server.c (main): Avoid infinite loop while detaching/killing
7891 after a longjmp.
7892
7893 2012-01-09 Doug Evans <dje@google.com>
7894
7895 * server.c (start_inferior): Set last_ptid in --wrapper case.
7896
7897 2012-01-06 Yao Qi <yao@codesourcery.com>
7898
7899 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7900 defined.
7901 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7902
7903 2012-01-04 Yao Qi <yao@codesourcery.com>
7904
7905 * tracepoint.c (cmd_qtdp): Print debug message
7906 for static tracepoint.
7907
7908 2012-01-04 Yao Qi <yao@codesourcery.com>
7909
7910 * tracepoint.c (trace_vdebug): Differentiate debug message
7911 between gdbserver and IPA.
7912
7913 2012-01-03 Yao Qi <yao@codesourcery.com>
7914
7915 * tracepoint.c (tracepoint_was_hit): Don't collect for
7916 static tracepoint.
7917
7918 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7919
7920 * terminal.h: Reformat copyright header.
7921
7922 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7923
7924 * server.c (gdbserver_version): Update copyright year.
7925 * gdbreplay.c (gdbreplay_version): Likewise.
7926
7927 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7928
7929 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7930
7931 Revert:
7932 2011-12-18 Hui Zhu <teawater@gmail.com>
7933 * linux-low.c (linux_create_inferior): Save return value to ret.
7934
7935 2011-12-18 Hui Zhu <teawater@gmail.com>
7936
7937 * linux-low.c (linux_create_inferior): Save return value to ret.
7938
7939 2011-12-16 Doug Evans <dje@google.com>
7940
7941 * linux-low.c (linux_create_inferior): If stdio connection,
7942 redirect stdin from /dev/null, stdout to stderr.
7943 * remote-utils.c (remote_is_stdio): New static global.
7944 (remote_connection_is_stdio): New function.
7945 (remote_prepare): Handle stdio connection.
7946 (remote_open): Ditto.
7947 (remote_close): Don't close stdin for stdio connections.
7948 (read_prim,write_prim): New functions. Replace all calls to
7949 read/write to these.
7950 * server.c (main): Watch for "-" argument. Move call to
7951 remote_prepare before start_inferior.
7952 * server.h (STDIO_CONNECTION_NAME): New macro.
7953 (remote_connection_is_stdio): Declare.
7954
7955 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7956 in debugging output.
7957
7958 2011-12-15 Yao Qi <yao@codesourcery.com>
7959
7960 * tracepoint.c: Include sys/syscall.h.
7961 (gdb_ust_thread): Remove preprocessor conditional.
7962
7963 2011-12-14 Pedro Alves <pedro@codesourcery.com>
7964
7965 * linux-low.c (linux_detach_one_lwp): Call
7966 the_low_target.prepare_to_resume before detaching.
7967
7968 2011-12-14 Yao Qi <yao@codesourcery.com>
7969
7970 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7971 of write.
7972
7973 2011-12-14 Yao Qi <yao@codesourcery.com>
7974
7975 * i386-low.c (i386_low_stopped_data_address): Initialize local
7976 variable `control'.
7977
7978 2011-12-13 Pedro Alves <pedro@codesourcery.com>
7979
7980 PR remote/13492
7981
7982 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7983 DR_CONTROL unless necessary. Extend comments.
7984 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7985 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7986
7987 2011-12-13 Yao Qi <yao@codesourcery.com>
7988
7989 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7990 macros.
7991 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7992
7993 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7994
7995 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7996 Print new debug message for such case.
7997
7998 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7999
8000 Fix overlapping memcpy.
8001 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8002 the read_inferior_memory transfer.
8003 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8004 write_inferior_memory transfer.
8005 (set_fast_tracepoint_jump): New variable buf. Use it for the
8006 read_inferior_memory and write_inferior_memory transfers.
8007 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8008 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8009 Use it for the write_inferior_memory transfer.
8010 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8011 buffers.
8012
8013 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8014
8015 * linux-low.c (fetch_register, store_register): Make code
8016 consistent, fix formatting.
8017
8018 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8019
8020 * linux-low.c (usr_store_inferior_registers): Factor out code
8021 to handle individual registers into...
8022 (store_register): ... this new function.
8023
8024 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8025
8026 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8027 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8028 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8029 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8030 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8031 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8032 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8033 (srv_xmlfiles): Add new XML files.
8034
8035 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8036 and <sys/uio.h>.
8037 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8038 (init_registers_s390_linux32v1): Add prototype.
8039 (init_registers_s390_linux32v2): Likewise.
8040 (init_registers_s390_linux64v1): Likewise.
8041 (init_registers_s390_linux64v2): Likewise.
8042 (init_registers_s390x_linux64v1): Likewise.
8043 (init_registers_s390x_linux64v2): Likewise.
8044 (s390_num_regs): Increment to 52.
8045 (s390_regmap): Add orig_r2 register.
8046 (s390_num_regs_3264): Increment to 68.
8047 (s390_regmap_3264): Add orig_r2 register.
8048 (s390_collect_ptrace_register): Handle orig_r2 register.
8049 (s390_supply_ptrace_register): Likewise.
8050 (s390_fill_last_break): New function.
8051 (s390_store_last_break): Likewise.
8052 (s390_fill_system_call): New function.
8053 (s390_store_system_call): Likewise.
8054 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8055 register sets.
8056 (s390_check_regset): New function.
8057 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8058 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8059 Update target_regsets for available register sets.
8060
8061 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8062 Jan Kratochvil <jan.kratochvil@redhat.com>
8063
8064 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8065 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8066 New.
8067 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8068 * linux-low.h (struct process_info_private): New member r_debug.
8069 * server.c (handle_qxfer_libraries): Call
8070 the_target->qxfer_libraries_svr4.
8071 (handle_qxfer_libraries_svr4): New function.
8072 (qxfer_packets): New entry "libraries-svr4".
8073 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8074 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8075 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8076 PACKET_qXfer_libraries_svr4.
8077
8078 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8079
8080 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8081 PSW address/mask between 8-byte and 16-byte formats.
8082 (s390_supply_ptrace_register): Likewise.
8083 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8084 basic addressing mode bit.
8085
8086 2011-11-24 Stan Shebs <stan@codesourcery.com>
8087
8088 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8089
8090 2011-11-17 Stan Shebs <stan@codesourcery.com>
8091
8092 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8093 (tracing_start_time): New global.
8094 (tracing_stop_time): New global.
8095 (tracing_user_name): New global.
8096 (tracing_notes): New global.
8097 (tracing_stop_note): New global.
8098 (cmd_qtstart): Set traceframe_usage, start_time.
8099 (stop_tracing): Set stop_time.
8100 (cmd_qtstatus): Report additional status.
8101 (cmd_qtp): New function.
8102 (handle_tracepoint_query): Call it.
8103 (cmd_qtnotes): New function.
8104 (handle_tracepoint_general_set): Call it.
8105 (get_timestamp): Rename from tsv_get_timestamp.
8106
8107 2011-11-14 Stan Shebs <stan@codesourcery.com>
8108 Kwok Cheung Yeung <kcy@codesourcery.com>
8109
8110 * linux-x86-low.c (small_jump_insn): New.
8111 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8112 trampoline and error message, build a trampoline and issue a small
8113 jump instruction to it.
8114 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8115 trampoline and error message.
8116 (x86_get_min_fast_tracepoint_insn_len): New.
8117 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8118 * linux-low.h (struct linux_target_ops): Add arguments to
8119 install_fast_tracepoint_jump_pad operation, add new operation.
8120 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8121 arguments.
8122 (linux_get_min_fast_tracepoint_insn_len): New function.
8123 (linux_target_op): Add new operation.
8124 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8125 (gdb_trampoline_buffer_end): Ditto.
8126 (gdb_trampoline_buffer_error): Ditto.
8127 (struct ipa_sym_addresses): Add fields for new IPA variables.
8128 (symbol_list): Add entries for new IPA variables.
8129 (struct tracepoint): Add fields to hold the address range of the
8130 trampoline used by the tracepoint.
8131 (trampoline_buffer_head): New static variable.
8132 (trampoline_buffer_tail): Ditto.
8133 (claim_trampoline_space): New function.
8134 (have_fast_tracepoint_trampoline_buffer): New function.
8135 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8136 structure.
8137 (install_fast_tracepoint): Ditto, also add error buffer argument.
8138 (cmd_qtminftpilen): New function.
8139 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8140 (fast_tracepoint_from_trampoline_address): New function.
8141 (fast_tracepoint_collecting): Handle trampoline as part of jump
8142 pad space.
8143 (set_trampoline_buffer_space): New function.
8144 (initialize_tracepoint): Initialize new IPA variables.
8145 * target.h (struct target_ops): Add arguments to
8146 install_fast_tracepoint_jump_pad operation, add new
8147 get_min_fast_tracepoint_insn_len operation.
8148 (target_get_min_fast_tracepoint_insn_len): New.
8149 (install_fast_tracepoint_jump_pad): Add arguments.
8150 * server.h (IPA_BUFSIZ): Define.
8151 * linux-i386-ipa.c: Include extra header files.
8152 (initialize_fast_tracepoint_trampoline_buffer): New function.
8153 (initialize_low_tracepoint): Call it.
8154 * server.h (set_trampoline_buffer_space): Declare.
8155 (claim_trampoline_space): Ditto.
8156 (have_fast_tracepoint_trampoline_buffer): Ditto.
8157
8158 2011-11-14 Yao Qi <yao@codesourcery.com>
8159
8160 * server.c (handle_query): Handle InstallInTrace for qSupported.
8161 * tracepoint.c (add_tracepoint): Sort list.
8162 (install_tracepoint, download_tracepoint): New.
8163 (cmd_qtdp): Call them to install and download tracepoints.
8164 (sort_tracepoints): Removed.
8165 (cmd_qtstart): Update.
8166
8167 2011-11-14 Yao Qi <yao@codesourcery.com>
8168
8169 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8170 * mem-break.h: Declare.
8171 * tracepoint.c (cmd_qtstart): Move some code to ...
8172 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8173 New.
8174 (download_tracepoints): Move some code to ...
8175 (download_tracepoint_1): ... here. New.
8176
8177 2011-11-08 Yao Qi <yao@codesourcery.com>
8178
8179 * remote-utils.c (relocate_instruction): A comment fix.
8180
8181 2011-11-07 Joel Brobecker <brobecker@adacore.com>
8182
8183 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8184 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8185 dr_status_mirror and dr_control_mirror from debug_reg_state.
8186 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8187 (i386_initial_stuff): Remove use of deleted globals.
8188 (i386_get_thread_context, i386_set_thread_context,
8189 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8190 from debug_reg_state.
8191
8192 2011-11-05 Yao Qi <yao@codesourcery.com>
8193
8194 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8195 address as TPOINT's.
8196
8197 2011-11-02 Stan Shebs <stan@codesourcery.com>
8198
8199 * tracepoint.c (agent_mem_read_string): New function.
8200 (eval_agent_expr): Call it for tracenz.
8201 * server.c (handle_query): Report support for tracenz.
8202
8203 2011-11-02 Yao Qi <yao@codesourcery.com>
8204
8205 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8206
8207 2011-11-02 Yao Qi <yao@codesourcery.com>
8208
8209 * target.h: Fix a typo in comment.
8210
8211 2011-10-31 Pedro Alves <pedro@codesourcery.com>
8212
8213 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8214 clobber the breakpoints' shadows with fast tracepoint jumps.
8215 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8216 * target.c (write_inferior_memory): Also pass MYADDR down to
8217 check_mem_write.
8218
8219 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8220
8221 * configure.ac: Check support for personality routine.
8222 * configure: Regenerate.
8223 * config.in: Likewise.
8224 * linux-low.c: Include <sys/personality.h>.
8225 Define ADDR_NO_RANDOMIZE if necessary.
8226 (linux_create_inferior): Disable address space randomization when
8227 forking inferior, if requested.
8228 (linux_supports_disable_randomization): New function.
8229 (linux_target_ops): Install it.
8230 * server.h (disable_randomization): Declare.
8231 * server.c (disable_randomization): New global variable.
8232 (handle_general_set): Handle QDisableRandomization.
8233 (handle_query): Likewise for qSupported.
8234 (main): Support --disable-randomization and --no-disable-randomization
8235 command line arguments.
8236 * target.h (struct target_ops): Add supports_disable_randomization.
8237 (target_supports_disable_randomization): New macro.
8238
8239 2011-09-29 Mike Frysinger <vapier@gentoo.org>
8240
8241 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8242 ifdef check.
8243 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8244 [!PT_GETDSBT] (target_loadmap): New definition.
8245 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8246 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8247 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8248 and PT_GETDSBT to LINUX_LOADMAP.
8249 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8250 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8251
8252 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8253
8254 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8255 (arm_linux_hwbp_cap): New static variable.
8256 (arm_linux_get_hwbp_cap): Replace by ...
8257 (arm_linux_init_hwbp_cap): ... this new function.
8258 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8259 (arm_linux_get_hw_watchpoint_count): Likewise.
8260 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8261 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8262 (arm_prepare_to_resume): Use perror_with_name instead of error.
8263
8264 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8265
8266 * linux-arm-low.c: Include <signal.h>.
8267 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8268 (struct arm_linux_hwbp_cap): New data type.
8269 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8270 (struct arm_linux_hw_breakpoint): New data type.
8271 (MAX_BPTS, MAX_WPTS): Define.
8272 (struct arch_process_info, struct arch_lwp_info): New data types.
8273 (arm_linux_get_hwbp_cap): New function.
8274 (arm_linux_get_hw_breakpoint_count): Likewise.
8275 (arm_linux_get_hw_watchpoint_count): Likewise.
8276 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8277 (arm_hwbp_control_initialize): Likewise.
8278 (arm_hwbp_control_is_enabled): Likewise.
8279 (arm_hwbp_control_is_initialized): Likewise.
8280 (arm_hwbp_control_disable): Likewise.
8281 (arm_linux_hw_breakpoint_equal): Likewise.
8282 (arm_linux_hw_point_initialize): Likewise.
8283 (struct update_registers_data): New data structure.
8284 (update_registers_callback: New function.
8285 (arm_insert_point): Likewise.
8286 (arm_remove_point): Likewise.
8287 (arm_stopped_by_watchpoint): Likewise.
8288 (arm_stopped_data_address): Likewise.
8289 (arm_new_process): Likewise.
8290 (arm_new_thread): Likewise.
8291 (arm_prepare_to_resume): Likewise.
8292 (the_low_target): Register arm_insert_point, arm_remove_point,
8293 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8294 arm_new_thread, and arm_prepare_to_resume.
8295
8296 2011-09-15 Stan Shebs <stan@codesourcery.com>
8297
8298 * server.h (struct emit_ops): Add compare-goto fields.
8299 * tracepoint.c (gdb_agent_op_sizes): New table.
8300 (emit_eq_goto): New function.
8301 (emit_ne_goto): New function.
8302 (emit_lt_goto): New function.
8303 (emit_le_goto): New function.
8304 (emit_gt_goto): New function.
8305 (emit_ge_goto): New function.
8306 (is_goto_target): New function.
8307 (compile_bytecodes): Recognize special cases of compare-goto
8308 combinations and call specialized emitters for them.
8309 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8310 (amd64_emit_ne_goto): New function.
8311 (amd64_emit_lt_goto): New function.
8312 (amd64_emit_le_goto): New function.
8313 (amd64_emit_gt_goto): New function.
8314 (amd64_emit_ge_goto): New function.
8315 (amd64_emit_ops): Add the new functions.
8316 (i386_emit_eq_goto): New function.
8317 (i386_emit_ne_goto): New function.
8318 (i386_emit_lt_goto): New function.
8319 (i386_emit_le_goto): New function.
8320 (i386_emit_gt_goto): New function.
8321 (i386_emit_ge_goto): New function.
8322 (i386_emit_ops): Add the new functions.
8323
8324 2011-09-08 Stan Shebs <stan@codesourcery.com>
8325
8326 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8327 (i386_emit_epilogue): Restore %ebx.
8328
8329 2011-08-31 Jie Zhang <jzhang918@gmail.com>
8330
8331 * server.c (step_thread): Remove definition.
8332 (process_serial_event): Don't handle Hs.
8333 * server.h (step_thread): Remove declaration.
8334 * target.c (set_desired_inferior): Remove use of step_thread.
8335
8336 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8337
8338 * linux-low.c: Include linux-procfs.h.
8339 (linux_attach_lwp_1): Update comments.
8340 (linux_attach): Scan for existing threads when attaching to a
8341 process that is the tgid.
8342 * Makefile.in: Update dependencies.
8343
8344 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8345
8346 * configure.srv: Add linux-procfs.o dependencies.
8347
8348 2011-08-14 Yao Qi <yao@codesourcery.com>
8349
8350 * target.h (struct target_ops): Fix indent.
8351 * win32-low.c (win32_target_ops): Fix comment.
8352
8353 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
8354 Yao Qi <yao@codesourcery.com>
8355
8356 * Makefile.in (clean): Remove tic6x-*.c files.
8357 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8358 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8359 (tic6x-c64xp-linux.c): Likewise.
8360 * configure.srv: Add support for tic6x-*-uclinux.
8361 * linux-tic6x-low.c: New.
8362 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8363
8364 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
8365 Yao Qi <yao@codesourcery.com>
8366
8367 * target.h (struct target_ops): Add read_loadmap.
8368 * linux-low.c (struct target_loadseg): New type.
8369 (struct target_loadmap): New type.
8370 (linux_read_loadmap): New function.
8371 (linux_target_ops): Add linux_read_loadmap.
8372 * server.c (handle_query): Support qXfer:fdpic:read packet.
8373 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8374 to NULL.
8375
8376 2011-08-05 Eli Zaretskii <eliz@gnu.org>
8377
8378 * win32-low.c: Include <stdint.h>.
8379
8380 2011-07-22 Pedro Alves <pedro@codesourcery.com>
8381
8382 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8383 to the inferior here.
8384 (i386_remove_aligned_watchpoint): Ditto.
8385 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8386 fit part of the watchpoint in the debug registers.
8387 (i386_update_inferior_debug_regs): New.
8388 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8389 registers, and only update the inferior on success.
8390 (i386_low_remove_watchpoint): Ditto.
8391
8392 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8393
8394 * linux-low.c (compare_ints, unique, list_threads, show_process,
8395 linux_core_of_thread): Delete.
8396 (linux_target_ops): Change linux_core_of_thread to
8397 linux_common_core_of_thread.
8398 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8399 * utils.c (malloc_failure): Change type of argument.
8400 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8401 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8402 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8403 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8404 (IPA_OBJS): Add common-utils-ipa.o.
8405 (ptid_h, linux_osdata_h): New macros.
8406 (server_h): Add common/common-utils.h, common/xml-utils.h,
8407 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8408 common/ptid.h.
8409 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8410 ptid.o, buffer.o): New rules.
8411 (linux-low.o): Add common/linux-osdata.h as a dependency.
8412 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8413 * configure.ac: Add AC_HEADER_DIRENT check.
8414 * config.in: Regenerate.
8415 * configure: Regenerate.
8416 * remote-utils.c (xml_escape_text): Delete.
8417 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8418 buffer_xml_printf): Move to common/buffer.c.
8419 * server.c (main): Remove call to initialize_inferiors.
8420 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8421 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8422 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8423 internal_error, gdb_assert, gdb_assert_fail): Delete.
8424 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8425 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8426 common/buffer.h.
8427 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8428 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8429 initialize_inferiors): Delete.
8430
8431 2011-07-20 Pedro Alves <pedro@codesourcery.com>
8432
8433 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8434 symbol error.
8435
8436 2011-05-31 Pedro Alves <pedro@codesourcery.com>
8437
8438 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8439 assertion.
8440 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8441
8442 2011-05-26 Yao Qi <yao@codesourcery.com>
8443
8444 * Makefile.in (thread-db.o): Track dependence to
8445 common/gdb_thread_db.h.
8446 * thread-db.c: include gdb_thread_db.h from right place.
8447
8448 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8449
8450 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8451 __FILE__ and __LINE__ to internal_error.
8452
8453 2011-05-13 Doug Evans <dje@google.com>
8454
8455 * thread-db.c (try_thread_db_load_from_sdir): New function.
8456 (try_thread_db_load_from_dir): New function.
8457 (thread_db_load_search): Handle $sdir, ignore $pdir.
8458 Remove trying of system directories if search of
8459 libthread-db-search-path fails, that is now done via $sdir.
8460
8461 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8462
8463 * server.c (handle_query): Add EnableDisableTracepoints to the list
8464 of supported features.
8465 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
8466 tracepoints.
8467 (cmd_qtenable_disable): New.
8468 (cmd_qtstart): Install tracepoints even if disabled.
8469 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8470 receiving a QTEnable or QTDisable packet.
8471 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8472 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8473 tracepoints.
8474 (gdb_probe): Skip data collection if static tracepoint is disabled.
8475
8476 2011-05-10 Doug Evans <dje@google.com>
8477
8478 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8479
8480 2011-05-04 Doug Evans <dje@google.com>
8481
8482 * linux-low.c (linux_join): Skip process lookup.
8483 * spu-low.c (spu_join): Ditto.
8484 * server.c (join_inferiors_callback): Delete.
8485 (process_serial_event): For 'D' packet (detach) call join_inferior
8486 directly.
8487
8488 2011-05-04 Joseph Myers <joseph@codesourcery.com>
8489
8490 * README: Don't mention xscale*-*-linux*.
8491 * configure.srv (xscale*-*-linux*): Don't handle target.
8492
8493 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8494
8495 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8496 casting pointers.
8497 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8498 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8499 (i386_emit_void_call_2): Likewise.
8500
8501 2011-04-26 Yao Qi <yao@codesourcery.com>
8502
8503 * linux-low.c: Move common macros to linux-ptrace.h.
8504 Include linux-ptrace.h.
8505 * Makefile.in (linux_ptrace_h): New.
8506 (linux-low.o): Depends on linux-ptrace.h.
8507
8508 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8509
8510 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8511 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8512 (remote_prepare): New function with most of the TCP code from ...
8513 (remote_open): ... here. Detect PORT here unconditionally. Move also
8514 setting transport_is_reliable.
8515 * server.c (run_once): New variable.
8516 (gdbserver_usage): Document it.
8517 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8518 the first run if RUN_ONCE.
8519 * server.h (run_once, remote_prepare): New declarations.
8520
8521 2011-04-19 Tom Tromey <tromey@redhat.com>
8522
8523 * win32-low.c (handle_load_dll): Remove duplicate "the".
8524
8525 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8526
8527 Remove support for old Cygwin 1.5 versions.
8528 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8529 function to avoid warning.
8530 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8531 warning.
8532
8533 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8534
8535 * gdbserver/server.h (Macro _): Define it if not available.
8536
8537 2011-03-14 Michael Snyder <msnyder@vmware.com>
8538
8539 * hostio.c (handle_close): Remove unnecessary null test.
8540
8541 2011-03-10 Joel Brobecker <brobecker@adacore.com>
8542
8543 * Makefile.in (maintainer-clean realclean distclean): Remove
8544 "make ... subdir_do" command.
8545
8546 2011-03-10 Michael Snyder <msnyder@vmware.com>
8547
8548 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8549
8550 * server.c (handle_v_run): Free alloced buffer on early return.
8551
8552 2011-03-09 Yao Qi <yao@codesourcery.com>
8553
8554 Revert:
8555 2011-03-04 Yao Qi <yao@codesourcery.com>
8556
8557 * Makefile.in: Remove GNU make feature --directory.
8558
8559 2011-03-05 Yao Qi <yao@codesourcery.com>
8560
8561 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8562 (subdir_do): New make target. Copied from gdb/Makefile.
8563 (maintainer-clean, realclean, distclean, clean): Call corresponding
8564 make targets in common/Makefile.
8565
8566 2011-02-11 Yao Qi <yao@codesourcery.com>
8567
8568 * configure.ac: Call AC_PROG_RANLIB.
8569 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8570 * configure: Regenerate.
8571
8572 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8573
8574 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8575
8576 2011-03-06 Yao Qi <yao@codesourcery.com>
8577
8578 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8579
8580 2011-03-05 Yao Qi <yao@codesourcery.com>
8581
8582 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8583 (subdir_do): New make target. Copied from gdb/Makefile.
8584 (maintainer-clean, realclean, distclean, clean): Call corresponding
8585 make targets in common/Makefile.
8586
8587 2011-03-04 Yao Qi <yao@codesourcery.com>
8588
8589 * Makefile.in: Remove GNU make feature --directory.
8590
8591 2011-03-04 Michael Snyder <msnyder@vmware.com>
8592
8593 * server.c (queue_stop_reply): Call xmalloc not malloc.
8594
8595 2011-03-02 Michael Snyder <msnyder@vmware.com>
8596
8597 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8598
8599 2011-02-28 Michael Snyder <msnyder@vmware.com>
8600
8601 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8602 (cmd_qtframe): Ditto.
8603 (cmd_qtbuffer): Ditto.
8604 (cmd_bigqtbuffer): Ditto.
8605
8606 * utils.c (decimal2str): Initialize 'width' to nine, then
8607 don't mess with it.
8608
8609 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8610
8611 * hostio.c (require_data): Free *data, not data.
8612
8613 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8614
8615 * hostio.c (require_data): Use free, not xfree.
8616
8617 2011-02-27 Michael Snyder <msnyder@vmware.com>
8618
8619 * server.c (handle_query): Discard unused value.
8620
8621 * hostio.c (require_data): Free malloc memory before returning
8622 error.
8623
8624 2011-02-26 Michael Snyder <msnyder@vmware.com>
8625
8626 * linux-low.c (list_threads): Call closedir for dirent.
8627
8628 2011-02-27 Michael Snyder <msnyder@vmware.com>
8629
8630 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8631 a case statement falls through.
8632
8633 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8634
8635 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8636 in comparison.
8637
8638 2011-02-26 Michael Snyder <msnyder@vmware.com>
8639
8640 * utils.c (decimal2str): Eliminate dead code and dead param.
8641 (pulongest): Drop dead param from call to decimal2str.
8642 (plongest): Ditto.
8643
8644 2011-02-24 Joel Brobecker <brobecker@adacore.com>
8645
8646 Revert the following patch (not approved yet):
8647 2011-02-21 Hui Zhu <teawater@gmail.com>
8648 * tracepoint.c (tp_printf): New function.
8649 (eval_agent_expr): Handle gdb_agent_op_printf.
8650
8651 2011-02-21 Hui Zhu <teawater@gmail.com>
8652
8653 * tracepoint.c (tp_printf): New function.
8654 (eval_agent_expr): Handle gdb_agent_op_printf.
8655
8656 2011-02-18 Tom Tromey <tromey@redhat.com>
8657
8658 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8659 (tracepoint.o): Likewise.
8660 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8661 (gdb_agent_op_names): Likewise.
8662
8663 2011-02-18 Tom Tromey <tromey@redhat.com>
8664
8665 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8666 gdb_agent_op_rot>: New constants.
8667 (gdb_agent_op_names): Add pick and roll.
8668 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8669 cases.
8670
8671 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8672
8673 * aclocal.m4: Regenerated with aclocal-1.11.1.
8674
8675 2011-02-14 Pedro Alves <pedro@codesourcery.com>
8676
8677 * server.c (handle_qxfer_traceframe_info): New.
8678 (qxfer_packets): Register "traceframe-info".
8679 (handle_query): Report support for qXfer:traceframe-info:read+.
8680 * tracepoint.c (match_blocktype): New.
8681 (traceframe_find_block_type): Rename to ...
8682 (traceframe_walk_blocks): ... this. Add callback filter argument,
8683 and use it.
8684 (traceframe_find_block_type): New, reimplemented on top of
8685 traceframe_walk_blocks.
8686 (build_traceframe_info_xml): New.
8687 (traceframe_read_info): New.
8688 * server.h (traceframe_read_info): Declare.
8689
8690 2011-02-11 Yao Qi <yao@codesourcery.com>
8691
8692 * configure.ac: Call AC_PROG_RANLIB.
8693 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8694 * configure: Regenerate.
8695
8696 2011-02-07 Pedro Alves <pedro@codesourcery.com>
8697
8698 * server.c (gdb_read_memory): Change return semantics to allow
8699 partial transfers.
8700 (handle_search_memory_1): Adjust.
8701 (process_serial_event) <'m' packet>: Handle partial transfers.
8702 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8703
8704 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8705
8706 * regcache.c (init_register_cache): Initialize
8707 regcache->register_status.
8708 (free_register_cache): Release regcache->register_status.
8709 (regcache_cpy): Copy register_status.
8710 (registers_to_string): Print 'x's for unavailable registers.
8711 (supply_register): Mark the register's status valid or
8712 unavailable, depending on whether a buffer was passed in or not.
8713 (supply_register_zeroed): New.
8714 (supply_regblock): Mark the registers' status valid or
8715 unavailable, depending on whether a buffer was passed in or not.
8716 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8717 (struct regcache): New `register_status' field.
8718 (supply_register_zeroed): Declare.
8719 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8720 supply_register_zeroed, rather than passing a NULL buffer to
8721 supply_register.
8722 * tracepoint.c (fetch_traceframe_registers): Update comment.
8723
8724 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8725
8726 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8727 buffer explicit.
8728
8729 2011-01-25 Pedro Alves <pedro@codesourcery.com>
8730
8731 * server.h (decode_xfer_write): Change prototype.
8732 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8733 and don't extract the annex here.
8734 * server.c (decode_xfer_read): Remove `annex' parameter,
8735 and don't extract the annex here.
8736 (decode_xfer): New.
8737 (struct qxfer): New.
8738 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8739 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8740 (handle_qxfer_statictrace): New functions, abstracted out from
8741 handle_query, and made to use the struct qxfer interface.
8742 (handle_threads_qxfer_proper): Rename to ...
8743 (handle_qxfer_threads_proper): ... this.
8744 (handle_threads_qxfer): Rename to ...
8745 (handle_qxfer_threads): ... this. Adjust.
8746 (qxfer_packets): New array.
8747 (handle_qxfer): New function.
8748 (handle_query): Use handle_qxfer.
8749
8750 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8751
8752 * gdbreplay.c: Shorten lines of >= 80 columns.
8753 * linux-low.c: Ditto.
8754 * linux-ppc-low.c: Ditto.
8755 * linux-s390-low.c: Ditto.
8756 * linux-sparc-low.c: Ditto.
8757 * linux-x86-low.c: Ditto.
8758 * linux-xtensa-low.c: Ditto.
8759 * mem-break.c: Ditto.
8760 * nto-low.c: Ditto.
8761 * regcache.h: Ditto.
8762 * remote-utils.c: Ditto.
8763 * server.c: Ditto.
8764 * server.h: Ditto.
8765 * thread-db.c: Ditto.
8766 * tracepoint.c: Ditto.
8767 * utils.c: Ditto.
8768 * win32-low.h: Ditto.
8769
8770 2011-01-05 Joel Brobecker <brobecker@adacore.com>
8771
8772 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8773 update.
8774
8775 2011-01-01 Joel Brobecker <brobecker@adacore.com>
8776
8777 * server.c (gdbserver_version): Update copyright year in version
8778 output.
8779 * gdbreplay.c (gdbreplay_version): Ditto.
8780
8781 2010-12-29 Jie Zhang <jie.zhang@analog.com>
8782
8783 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8784 * linux-bfin-low.c: New file.
8785 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8786 PT_DATA_ADDR for BFIN targets.
8787 * Makefile.in (SFILES): Add linux-bfin-low.c.
8788 (clean): Remove reg-bfin.c.
8789 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8790 * README: Mention supported Blackfin targets.
8791
8792 2010-12-23 Mike Frysinger <vapier@gentoo.org>
8793
8794 * .gitignore: New file.
8795
8796 2010-11-16 Mike Frysinger <vapier@gentoo.org>
8797
8798 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8799
8800 2010-10-22 Jie Zhang <jie@codesourcery.com>
8801
8802 * Makefile.in: Add FLAGS_TO_PASS variable.
8803 (install): Remove dependency of install-only and recursively
8804 invoke make for install-only.
8805
8806 2010-10-04 Doug Evans <dje@google.com>
8807
8808 * Makefile.in (uninstall): Use $(DESTDIR).
8809
8810 2010-09-24 Pedro Alves <pedro@codesourcery.com>
8811
8812 PR gdb/11842
8813
8814 * linux-x86-low.c (compat_siginfo_from_siginfo)
8815 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8816 si_code is < 0. Check for si_code == SI_TIMER before checking for
8817 si_code < 0.
8818
8819 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8820
8821 * lynx-i386-low.c: New file.
8822 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8823
8824 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8825
8826 * lynx-low.c (ptrace_request_to_str): Remove handling for
8827 request values that have been removed in LynxOS 5.x.
8828
8829 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8830
8831 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8832 <ptrace.h>
8833
8834 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8835
8836 * configure.ac: Add --enable-inprocess-agent option.
8837 * configure: Rebuilt.
8838
8839 2010-09-06 Yao Qi <yao@codesourcery.com>
8840
8841 * linux-low.c (linux_kill): Remove unused variable.
8842 (linux_stabilize_threads): Likewise.
8843 * server.c (start_inferior): Likewise.
8844 (queue_stop_reply_callback): Likewise.
8845 * tracepoint.c (do_action_at_tracepoint): Likewise.
8846
8847 2010-09-06 Yao Qi <yao@codesourcery.com>
8848
8849 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8850 on return.
8851
8852 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8853
8854 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8855
8856 2010-09-06 Pedro Alves <pedro@codesourcery.com>
8857
8858 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8859 "$(IPA_DEPFILES)".
8860
8861 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8862
8863 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8864 gdbserver/lynx-ppc-low.c: New files.
8865 * Makefile.in (lynx_low_h): New variable.
8866 (lynx-low.o, lynx-ppc-low.o): New rules.
8867 * configure.ac: On LynxOS, link with -lnetinet.
8868 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8869 * configure: regenerate.
8870
8871 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8872
8873 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8874 * configure.ac: Add check for vasprintf and vsnprintf.
8875 * configure, config.in: Regenerate.
8876 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8877
8878 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8879
8880 * gdbreplay.c: Move include of alloca.h up, next to include of
8881 malloc.h.
8882 * server.h: Add include of malloc.h.
8883 * mem-break.c: Remove include of malloc.h.
8884 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8885
8886 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8887
8888 * Makefile.in (memmem.o): Build with -Wno-error.
8889
8890 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8891
8892 * utils.c (xsnprintf): Make non-static.
8893 * server.h: Add xsnprintf declaration.
8894 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8895 replace calls to snprintf by calls to xsnprintf throughout.
8896
8897 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8898
8899 * configure.ac: Add configure check for alloca.
8900 * configure, config.in: Regenerate.
8901 * server.h: Include alloca.h if it exists.
8902 * gdbreplay.c: Include alloca.h if it exists.
8903
8904 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8905
8906 * linux-low.c (__SIGRTMIN): Define if not already defined.
8907 (linux_create_inferior): Check for __ANDROID__ rather than
8908 __SIGRTMIN.
8909 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8910 are already deferred.
8911 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8912 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8913 stopped and already has a pending signal to report.
8914 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8915 a pending signal to report or is moving out of a jump pad.
8916 (linux_init_signals): Check for __ANDROID__ rather than
8917 __SIGRTMIN.
8918
8919 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8920
8921 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8922 debug_threads check. Avoid a linear search when not doing debug
8923 output.
8924
8925 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8926
8927 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8928 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8929 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8930 (process_event): Change local fd's type to gdb_fildes_t.
8931 (create_file_handler): Adjust prototype.
8932 (delete_file_handler): Adjust prototype.
8933 (handle_file_event): Adjust prototype. Use pfildes.
8934 (create_file_event): Adjsut prototype.
8935 * remote-utils.c (remote_desc, listen_desc): Change type to
8936 gdb_fildes_t.
8937 * server.h: New gdb_fildes_t typedef.
8938 [USE_WIN32API]: Include winsock2.h.
8939 (delete_file_handler, add_file_handler): Adjust prototypes.
8940 (pfildes): Declare.
8941 * utils.c (pfildes): New.
8942
8943 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8944
8945 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8946 * configure: Regenerate.
8947
8948 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8949
8950 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8951 (linux_done_accessing_memory): ... this.
8952 (linux_target_ops): Adjust.
8953 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8954 * nto-low.c (nto_target_ops): Adjust comment.
8955 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8956 * spu-low.c (spu_target_ops): Adjust comment.
8957 * target.h (target_ops): Rename unprepare_to_access_memory field
8958 to done_accessing_memory.
8959 (unprepare_to_access_memory): Rename to ...
8960 (done_accessing_memory): ... this.
8961
8962 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8963
8964 * linux-low.c (linux_prepare_to_access_memory): New.
8965 (linux_unprepare_to_access_memory): New.
8966 (linux_target_ops): Install them.
8967 * server.c (read_memory): Rename to ...
8968 (gdb_read_memory): ... this. Use
8969 prepare_to_access_memory/prepare_to_access_memory.
8970 (write_memory): Rename to ...
8971 (gdb_write_memory): ... this. Use
8972 prepare_to_access_memory/prepare_to_access_memory.
8973 (handle_search_memory_1): Adjust.
8974 (process_serial_event): Adjust.
8975 * target.h (struct target_ops): New fields
8976 prepare_to_access_memory and unprepare_to_access_memory.
8977 (prepare_to_access_memory, unprepare_to_access_memory): New.
8978 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8979 prepare_to_access_memory/prepare_to_access_memory.
8980 * nto-low.c (nto_target_ops): Adjust.
8981 * spu-low.c (spu_target_ops): Adjust.
8982 * win32-low.c (win32_target_ops): Adjust.
8983
8984 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8985
8986 * Makefile.in (WARN_CFLAGS): Get it from configure.
8987 (WERROR_CFLAGS): New.
8988 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8989 * configure.ac: Introduce --enable-werror, which adds -Werror to
8990 the compiler command line. Enabled by default. Disable with
8991 --disable-werror. Add -Wdeclaration-after-statement
8992 Wpointer-arith and -Wformat-nonliteral to warning flags.
8993 * configure: Regenerate.
8994
8995 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8996
8997 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8998
8999 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9000
9001 * gdbreplay.c (remote_error): New.
9002 (gdbchar): New.
9003 (expect): Use gdbchar. Check for error reading from GDB.
9004 Clarify sync error output.
9005 (play): Check for errors writing to GDB.
9006 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9007 * remote-utils.c (getpkt): Check for errors writing to the remote
9008 descriptor.
9009
9010 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9011
9012 * linux-low.c (linux_wait_1): Move non-debugging code out of
9013 `debug_threads' control.
9014
9015 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9016
9017 * linux-low.c (linux_wait_1): Don't set last_status here.
9018 * server.c (push_event, queue_stop_reply_callback): Assert we're
9019 not pushing a TARGET_WAITKIND_IGNORE event.
9020 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9021 (myresume, handle_target_event): Set the thread's last_resume_kind
9022 and last_status from the target returned status.
9023
9024 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9025
9026 PR threads/10729
9027
9028 * linux-x86-low.c (update_debug_registers_callback): New.
9029 (i386_dr_low_set_addr): Use it.
9030 (i386_dr_low_get_addr): New.
9031 (i386_dr_low_set_control): Use update_debug_registers_callback.
9032 (i386_dr_low_get_control): New.
9033 (i386_dr_low_get_status): Adjust.
9034 * linux-low.c (linux_stop_lwp): New.
9035 * linux-low.h (linux_stop_lwp): Declare.
9036
9037 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9038 argument instead of a i386_debug_reg_state.
9039 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9040 a i386_debug_reg_state.
9041 (i386_insert_aligned_watchpoint): Adjust.
9042 (i386_remove_aligned_watchpoint): Adjust.
9043 (i386_low_stopped_data_address): Read the debug registers from the
9044 inferior instead of from the mirrors.
9045 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9046 (i386_dr_low_get_addr): Declare.
9047 (i386_dr_low_get_control): Declare.
9048 (i386_dr_low_get_status): Change prototype.
9049
9050 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9051 (i386_dr_low_get_addr): New.
9052 (i386_dr_low_get_control): New.
9053 (i386_dr_low_get_status): Adjust prototype. Return
9054 dr_status_mirror.
9055 (i386_initial_stuff): Clear dr_status_mirror and
9056 dr_control_mirror.
9057 (i386_get_thread_context): Adjust.
9058 (i386_set_thread_context): Adjust.
9059 (i386_thread_added): Adjust.
9060
9061 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9062
9063 * linux-low.h (linux_thread_area): Delete declaration.
9064
9065 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9066
9067 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9068 after its termination.
9069
9070 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9071
9072 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9073 (gdb_wants_all_stopped): Delete.
9074 (linux_wait_1): Don't call them.
9075 * server.c (handle_v_cont): Tag all threads as want-stopped.
9076 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9077 stopped as "client-wants-stopped".
9078
9079 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9080
9081 * Makefile.in (signals_h): New.
9082 (server_h): Depend on it.
9083 (server.o): Don't depend on $(signals_def).
9084 (signals.o): Depend on $(signals_def).
9085
9086 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9087
9088 * Makefile.in (signals_def): New.
9089 (server_h): Append include/gdb/signals.h and signals_def.
9090 (server.o): Append signals_def.
9091
9092 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9093
9094 * server.c (handle_target_event): Use target_signal_to_host for
9095 resume_info.sig initialization.
9096 * target.h (struct thread_resume) <sig>: New comment.
9097
9098 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9099
9100 * server.c (handle_query): strcpy() the returned string from paddress()
9101 instead of sprintf().
9102 * utils.c (paddress): Return phex_nz().
9103
9104 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9105
9106 * server.c (handle_v_cont): Call mourn_inferior if process
9107 just exited.
9108 (myresume): Likewise.
9109
9110 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9111
9112 Static tracepoints, and integration with UST.
9113
9114 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9115 * mem-break.c (uninsert_all_breakpoints)
9116 (reinsert_all_breakpoints): New.
9117 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9118 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9119 (gdb_agent_ust_loaded, helper_thread_id)
9120 (gdb_agent_helper_thread_id): New macros.
9121 (struct ipa_sym_addresses): Add addr_ust_loaded,
9122 addr_helper_thread_id, addr_cmd_buf.
9123 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9124 (in_process_agent_loaded_ust): New.
9125 (write_e_ust_not_loaded): New.
9126 (maybe_write_ipa_ust_not_loaded): New.
9127 (struct collect_static_trace_data_action): New.
9128 (enum tracepoint_type) <static_tracepoint>: New.
9129 (struct tracepoint) <handle>: Mention static tracepoints.
9130 (struct static_tracepoint_ctx): New.
9131 (CMD_BUF_SIZE): New.
9132 (add_tracepoint_action): Handle static tracepoint actions.
9133 (unprobe_marker_at): New.
9134 (clear_installed_tracepoints): Handle static tracepoints.
9135 (cmd_qtdp): Handle static tracepoints.
9136 (probe_marker_at): New.
9137 (cmd_qtstart): Handle static tracepoints.
9138 (response_tracepoint): Handle static tracepoints.
9139 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9140 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9141 (get_context_regcache): Handle static tracepoints.
9142 (do_action_at_tracepoint): Handle static tracepoint actions.
9143 (traceframe_find_block_type): Handle static trace data blocks.
9144 (traceframe_read_sdata): New.
9145 (download_tracepoints): Download static tracepoint actions.
9146 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9147 (GDB_PROBE_NAME): New.
9148 (ust_ops): New.
9149 (GET_UST_SYM): New.
9150 (USTF): New.
9151 (dlsym_ust): New.
9152 (ust_marker_to_static_tracepoint): New.
9153 (gdb_probe): New.
9154 (collect_ust_data_at_tracepoint): New.
9155 (gdb_ust_probe): New.
9156 (UNIX_PATH_MAX, SOCK_DIR): New.
9157 (gdb_ust_connect_sync_socket): New.
9158 (resume_thread, stop_thread): New.
9159 (run_inferior_command): New.
9160 (init_named_socket): New.
9161 (gdb_ust_socket_init): New.
9162 (cstr_to_hexstr): New.
9163 (next_st): New.
9164 (first_marker, next_marker): New.
9165 (response_ust_marker): New.
9166 (cmd_qtfstm, cmd_qtsstm): New.
9167 (unprobe_marker_at, probe_marker_at): New.
9168 (cmd_qtstmat, gdb_ust_thread): New.
9169 (gdb_ust_init): New.
9170 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9171 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9172 (ST_REGENTRY): New.
9173 (x86_64_st_collect_regmap): New.
9174 (X86_64_NUM_ST_COLLECT_GREGS): New.
9175 (AMD64_RIP_REGNUM): New.
9176 (supply_static_tracepoint_registers): New.
9177 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9178 (ST_REGENTRY): New.
9179 (i386_st_collect_regmap): New.
9180 (i386_NUM_ST_COLLECT_GREGS): New.
9181 (supply_static_tracepoint_registers): New.
9182 * server.c (handle_query): Handle qXfer:statictrace:read.
9183 <qSupported>: Report support for StaticTracepoints, and
9184 qXfer:statictrace:read features.
9185 * server.h (traceframe_read_sdata)
9186 (supply_static_tracepoint_registers): Declare.
9187 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9188 (unpack_varlen_hex): Include in IPA build.
9189 * Makefile.in (ustlibs, ustinc): New.
9190 (IPA_OBJS): Add remote-utils-ipa.o.
9191 ($(IPA_LIB)): Link -ldl and -lpthread.
9192 (UST_CFLAGS): New.
9193 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9194 * config.in, configure: Regenerate.
9195
9196 2010-06-20 Ian Lance Taylor <iant@google.com>
9197 Pedro Alves <pedro@codesourcery.com>
9198
9199 * linux-x86-low.c (always_true): Delete.
9200 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9201 trying to fool the compiler with always_true.
9202
9203 2010-06-20 Pedro Alves <pedro@codesourcery.com>
9204
9205 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9206 conditions in gdbserver.
9207
9208 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9209
9210 * spu-low.c (spu_read_memory): Wrap around local store limit.
9211 (spu_write_memory): Likewise.
9212
9213 2010-06-15 Pedro Alves <pedro@codesourcery.com>
9214
9215 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9216 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9217 LONGEST uses.
9218 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9219 uses.
9220 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9221 uses with LONGEST uses.
9222
9223 2010-06-14 Stan Shebs <stan@codesourcery.com>
9224 Pedro Alves <pedro@codesourcery.com>
9225
9226 Bytecode compiler.
9227
9228 * linux-x86-low.c: Include limits.h.
9229 (add_insns): New.
9230 (always_true): New.
9231 (EMIT_ASM): New.
9232 (EMIT_ASM32): New.
9233 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9234 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9235 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9236 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9237 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9238 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9239 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9240 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9241 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9242 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9243 (amd64_emit_void_call_2): New.
9244 (amd64_emit_ops): New.
9245 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9246 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9247 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9248 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9249 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9250 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9251 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9252 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9253 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9254 (i386_emit_stack_adjust, i386_emit_int_call_1)
9255 (i386_emit_void_call_2): New.
9256 (i386_emit_ops): New.
9257 (x86_emit_ops): New.
9258 (the_low_target): Install x86_emit_ops.
9259 * server.h (struct emit_ops): New.
9260 (get_raw_reg_func_addr): Declare.
9261 (current_insn_ptr, emit_error): Declare.
9262 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9263 (set_trace_state_variable_value): New defines.
9264 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9265 addr_get_trace_state_variable_value and
9266 addr_set_trace_state_variable_value.
9267 (symbol_list): New fields for get_raw_reg,
9268 get_trace_state_variable_value and set_trace_state_variable_value.
9269 (condfn): New typedef.
9270 (struct tracepoint): New field `compiled_cond'.
9271 (do_action_at_tracepoint): Clear compiled_cond.
9272 (get_trace_state_variable_value, set_trace_state_variable_value):
9273 Export in the IPA.
9274 (condition_true_at_tracepoint): If there's a compiled condition,
9275 run that.
9276 (current_insn_ptr, emit_error): New globals.
9277 (struct bytecode_address): New.
9278 (get_raw_reg_func_addr): New.
9279 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9280 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9281 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9282 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9283 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9284 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9285 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9286 (compile_tracepoint_condition, compile_bytecodes): New.
9287 * target.h (emit_ops): Forward declare.
9288 (struct target_ops): New field emit_ops.
9289 (target_emit_ops): New.
9290 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9291 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9292 * linux-low.c (linux_emit_ops): New.
9293 (linux_target_ops): Install it.
9294 * linux-low.h (struct linux_target_ops): New field emit_ops.
9295
9296 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9297
9298 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9299 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9300
9301 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9302 Stan Shebs <stan@codesourcery.com>
9303
9304 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9305 (all): Depend on $(extra_libraries).
9306 (install-only): Install the IPA.
9307 (IPA_OBJS, IPA_LIB): New.
9308 (clean): Remove the IPA lib.
9309 (IPAGENT_CFLAGS): New.
9310 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9311 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9312 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9313 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9314 * configure.ac: Check for atomic builtins support in the compiler.
9315 (IPA_DEPFILES, extra_libraries): Define.
9316 * configure.srv (ipa_obj): Add description.
9317 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9318 (i[34567]86-*-linux*): Set ipa_obj.
9319 (x86_64-*-linux*): Set ipa_obj.
9320 * linux-low.c (stabilizing_threads): New.
9321 (supports_fast_tracepoints): New.
9322 (linux_detach): Stabilize threads before detaching.
9323 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9324 the lwp is either not stabilizing, or is moving out of a jump pad.
9325 (linux_fast_tracepoint_collecting): New.
9326 (maybe_move_out_of_jump_pad): New.
9327 (enqueue_one_deferred_signal): New.
9328 (dequeue_one_deferred_signal): New.
9329 (linux_wait_for_event_1): If moving out of a jump pad, defer
9330 pending signals to later.
9331 (linux_stabilize_threads): New.
9332 (linux_wait_1): Check if threads need moving out of jump pads, and
9333 do it if so.
9334 (stuck_in_jump_pad_callback): New.
9335 (move_out_of_jump_pad_callback): New.
9336 (lwp_running): New.
9337 (linux_resume_one_lwp): Handle moving out of jump pads.
9338 (linux_set_resume_request): Dequeue deferred signals.
9339 (need_step_over_p): Also step over fast tracepoint jumps.
9340 (start_step_over): Also uninsert fast tracepoint jumps.
9341 (finish_step_over): Also reinsert fast tracepoint jumps.
9342 (linux_install_fast_tracepoint_jump): New.
9343 (linux_target_ops): Install linux_stabilize_threads and
9344 linux_install_fast_tracepoint_jump_pad.
9345 * linux-low.h (linux_target_ops) <get_thread_area,
9346 install_fast_tracepoint_jump_pad>: New fields.
9347 (struct lwp_info) <collecting_fast_tracepoint,
9348 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9349 (linux_get_thread_area): Declare.
9350 * linux-x86-low.c (jump_insn): New.
9351 (x86_get_thread_area): New.
9352 (append_insns): New.
9353 (push_opcode): New.
9354 (amd64_install_fast_tracepoint_jump_pad): New.
9355 (i386_install_fast_tracepoint_jump_pad): New.
9356 (x86_install_fast_tracepoint_jump_pad): New.
9357 (the_low_target): Install x86_get_thread_area and
9358 x86_install_fast_tracepoint_jump_pad.
9359 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9360 (struct fast_tracepoint_jump): New.
9361 (fast_tracepoint_jump_insn): New.
9362 (fast_tracepoint_jump_shadow): New.
9363 (find_fast_tracepoint_jump_at): New.
9364 (fast_tracepoint_jump_here): New.
9365 (delete_fast_tracepoint_jump): New.
9366 (set_fast_tracepoint_jump): New.
9367 (uninsert_fast_tracepoint_jumps_at): New.
9368 (reinsert_fast_tracepoint_jumps_at): New.
9369 (set_breakpoint_at): Use write_inferior_memory.
9370 (uninsert_raw_breakpoint): Use write_inferior_memory.
9371 (check_mem_read): Mask out fast tracepoint jumps.
9372 (check_mem_write): Mask out fast tracepoint jumps.
9373 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9374 (set_fast_tracepoint_jump): Declare.
9375 (delete_fast_tracepoint_jump)
9376 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9377 (reinsert_fast_tracepoint_jumps_at): Declare.
9378 * regcache.c: Don't compile many functions when building the
9379 in-process agent library.
9380 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9381 the register buffer in the heap.
9382 (free_register_cache): If the register buffer isn't owned by the
9383 regcache, don't free it.
9384 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9385 pre-existing register caches.
9386 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9387 type.
9388 (convert_ascii_to_int): : Constify `from' parameter type.
9389 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9390 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9391 the needed buffer in-place.
9392 (relocate_instruction): New.
9393 * server.c (handle_query) <qSymbols>: If the target supports
9394 tracepoints, give it a chance of looking up symbols. Report
9395 support for fast tracepoints.
9396 (handle_status): Stabilize threads.
9397 (process_serial_event): Adjust.
9398 * server.h (struct fast_tracepoint_jump): Forward declare.
9399 (struct process_info) <fast_tracepoint_jumps>: New field.
9400 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9401 (decode_X_packet, decode_M_packet): Adjust.
9402 (relocate_instruction): Declare.
9403 (in_process_agent_loaded): Declare.
9404 (tracepoint_look_up_symbols): Declare.
9405 (struct fast_tpoint_collect_status): Declare.
9406 (fast_tracepoint_collecting): Declare.
9407 (force_unlock_trace_buffer): Declare.
9408 (handle_tracepoint_bkpts): Declare.
9409 (initialize_low_tracepoint)
9410 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9411 * target.h (struct target_ops) <stabilize_threads,
9412 install_fast_tracepoint_jump_pad>: New fields.
9413 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9414 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9415 [HAVE_STDINT_H]: Include stdint.h.
9416 (trace_debug_1): Rename to ...
9417 (trace_vdebug): ... this.
9418 (trace_debug): Rename to ...
9419 (trace_debug_1): ... this. Add `level' parameter.
9420 (trace_debug): New.
9421 (ATTR_USED, ATTR_NOINLINE): New.
9422 (IP_AGENT_EXPORT): New.
9423 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9424 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9425 (about_to_request_buffer_space, trace_buffer_is_full)
9426 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9427 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9428 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9429 (traceframe_write_count, traceframes_created)
9430 (trace_state_variables)
9431 New renaming defines.
9432 (struct ipa_sym_addresses): New.
9433 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9434 (symbol_list): New.
9435 (ipa_sym_addrs): New.
9436 (all_tracepoint_symbols_looked_up): New.
9437 (in_process_agent_loaded): New.
9438 (write_e_ipa_not_loaded): New.
9439 (maybe_write_ipa_not_loaded): New.
9440 (tracepoint_look_up_symbols): New.
9441 (debug_threads) [IN_PROCESS_AGENT]: New.
9442 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9443 (UNKNOWN_SIDE_EFFECTS): New.
9444 (stop_tracing): New.
9445 (flush_trace_buffer): New.
9446 (stop_tracing_bkpt): New.
9447 (flush_trace_buffer_bkpt): New.
9448 (read_inferior_integer): New.
9449 (read_inferior_uinteger): New.
9450 (read_inferior_data_pointer): New.
9451 (write_inferior_data_pointer): New.
9452 (write_inferior_integer): New.
9453 (write_inferior_uinteger): New.
9454 (struct collect_static_trace_data_action): Delete.
9455 (enum tracepoint_type): New.
9456 (struct tracepoint) <type>: New field `type'.
9457 <actions_str, step_actions, step_actions_str>: Only include in
9458 GDBserver.
9459 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9460 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9461 (tracepoints): Use IP_AGENT_EXPORT.
9462 (last_tracepoint): Don't include in the IPA.
9463 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9464 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9465 (alloced_trace_state_variables): New.
9466 (trace_state_variables): Use IP_AGENT_EXPORT.
9467 (traceframe_t): Delete unused variable.
9468 (circular_trace_buffer): Don't include in the IPA.
9469 (trace_buffer_start): Delete.
9470 (struct trace_buffer_control): New.
9471 (trace_buffer_free): Delete.
9472 (struct ipa_trace_buffer_control): New.
9473 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9474 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9475 New.
9476 (trace_buffer_ctrl): New.
9477 (TRACE_BUFFER_CTRL_CURR): New.
9478 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9479 Reimplement as macros.
9480 (trace_buffer_wrap): Delete.
9481 (traceframe_write_count, traceframe_read_count)
9482 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9483 (struct tracepoint_hit_ctx) <type>: New field.
9484 (struct fast_tracepoint_ctx): New.
9485 (memory_barrier): New.
9486 (cmpxchg): New.
9487 (record_tracepoint_error): Update atomically in the IPA.
9488 (clear_inferior_trace_buffer): New.
9489 (about_to_request_buffer_space): New.
9490 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9491 updating the same buffer.
9492 (add_tracepoint): Default the tracepoint's type to trap
9493 tracepoint, and orig_size to -1.
9494 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9495 internal variables.
9496 (create_trace_state_variable): New parameter `gdb'. Handle it.
9497 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9498 (cmd_qtdp): Handle fast tracepoints.
9499 (cmd_qtdv): Adjust.
9500 (max_jump_pad_size): New.
9501 (gdb_jump_pad_head): New.
9502 (get_jump_space_head): New.
9503 (claim_jump_space): New.
9504 (sort_tracepoints): New.
9505 (MAX_JUMP_SIZE): New.
9506 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9507 IPA.
9508 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9509 support. Upload fast traceframes, and delete internal IPA
9510 breakpoints.
9511 (stop_tracing_handler): New.
9512 (flush_trace_buffer_handler): New.
9513 (cmd_qtstop): Upload fast tracepoints.
9514 (response_tracepoint): Handle fast tracepoints.
9515 (tracepoint_finished_step): Upload fast traceframes. Set the
9516 tracepoint hit context's tracepoint type.
9517 (handle_tracepoint_bkpts): New.
9518 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9519 type. Add comment about fast tracepoints.
9520 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9521 non-existing action_str field.
9522 (get_context_regcache): Handle fast tracepoints.
9523 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9524 to the regcache.
9525 (fast_tracepoint_from_jump_pad_address): New.
9526 (fast_tracepoint_from_ipa_tpoint_address): New.
9527 (collecting_t): New.
9528 (force_unlock_trace_buffer): New.
9529 (fast_tracepoint_collecting): New.
9530 (collecting): New.
9531 (gdb_collect): New.
9532 (write_inferior_data_ptr): New.
9533 (target_tp_heap): New.
9534 (target_malloc): New.
9535 (download_agent_expr): New.
9536 (UALIGN): New.
9537 (download_tracepoints): New.
9538 (download_trace_state_variables): New.
9539 (upload_fast_traceframes): New.
9540 (IPA_FIRST_TRACEFRAME): New.
9541 (IPA_NEXT_TRACEFRAME_1): New.
9542 (IPA_NEXT_TRACEFRAME): New.
9543 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9544 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9545 (gdb_jump_pad_buffer_end): New.
9546 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9547 (initialize_tracepoint): Adjust.
9548 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9549 buffer. Initialize the low module.
9550 * utils.c (PREFIX, TOOLNAME): New.
9551 (malloc_failure): Use PREFIX.
9552 (error): In the IPA, an error causes an exit.
9553 (fatal, warning): Use PREFIX.
9554 (internal_error): Use TOOLNAME.
9555 (NUMCELLS): Increase to 10.
9556 * configure, config.in: Regenerate.
9557
9558 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9559
9560 * server.c (handle_query) <qSupported>: Do two passes over the
9561 qSupported string to avoid nesting strtok.
9562
9563 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9564
9565 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9566 (CDEPS): New.
9567 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9568 -Wl,--dynamic-list.
9569 * configure: Regenerate.
9570 * proc-service.list: New.
9571
9572 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9573
9574 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9575 New comment.
9576
9577 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9578
9579 * gdbreplay.c (remote_open): Check error return from socket() call by
9580 its equality to -1 not by it being negative.
9581 * remote-utils.c (remote_open): Likewise.
9582
9583 2010-05-23 Pedro Alves <pedro@codesourcery.com>
9584
9585 * config.h: Regenerate.
9586
9587 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9588
9589 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9590 doesn't provide PTRACE_GET_THREAD_AREA.
9591
9592 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9593
9594 * linux-m68k-low.c: Include <asm/ptrace.h>
9595 (ps_get_thread_area): Implement.
9596
9597 2010-05-03 Doug Evans <dje@google.com>
9598
9599 * event-loop.c (struct callback_event): New struct.
9600 (callback_list): New global.
9601 (append_callback_event, delete_callback_event): New functions.
9602 (process_callback): New function.
9603 (start_event_loop): Call it.
9604 * remote-utils.c (NOT_SCHEDULED): Define.
9605 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9606 moved out of readchar.
9607 (readchar): Rewrite. Call reschedule before returning.
9608 (reset_readchar): New function.
9609 (remote_close): Call it.
9610 (process_remaining, reschedule): New functions.
9611 * server.h (callback_handler_func): New typedef.
9612 (append_callback_event, delete_callback_event): Declare.
9613
9614 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9615
9616 * proc-service.c (ps_pglobal_lookup): Use
9617 thread_db_look_up_one_symbol.
9618 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9619 parameter. Use it instead of all_symbols_looked_up.
9620 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9621 field.
9622 (all_symbols_looked_up): Don't declare.
9623 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9624 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9625 field.
9626 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9627 Set all_symbols_looked_up here.
9628 (thread_db_look_up_one_symbol): New.
9629 (thread_db_get_tls_address): Adjust.
9630 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9631 thread_db object on the heap, and tentatively set it in the
9632 process structure.
9633 (thread_db_init): Don't set all_symbols_looked_up here.
9634 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9635
9636 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9637
9638 * linux-low.c (linux_kill, linux_detach): Adjust.
9639 (status_pending_p_callback): Remove redundant statement. Check
9640 for !TARGET_WAITIKIND_IGNORE, instead of
9641 TARGET_WAITKIND_STOPPED.
9642 (handle_tracepoints): Make sure LWP is locked. Adjust.
9643 (linux_wait_for_event_1): Adjust.
9644 (linux_cancel_breakpoints): New.
9645 (unsuspend_one_lwp): New.
9646 (unsuspend_all_lwps): New.
9647 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9648 (send_sigstop_callback): Change return type to int, add new
9649 `except' parameter and handle it.
9650 (suspend_and_send_sigstop_callback): New.
9651 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9652 pass them down. If SUSPEND, also increment the lwp's suspend
9653 count.
9654 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9655 (need_step_over_p): Don't consider suspended LWPs.
9656 (start_step_over): Adjust.
9657 (proceed_one_lwp): Change return type to int, add new `except'
9658 parameter and handle it.
9659 (unsuspend_and_proceed_one_lwp): New.
9660 (proceed_all_lwps): Use find_inferior instead of
9661 for_each_inferior.
9662 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9663 also decrement the suspend count of LWPs. Pass `except' down,
9664 instead of hacking its suspend count.
9665 (linux_pause_all): Add `freeze' parameter. Adjust.
9666 (linux_unpause_all): New.
9667 (linux_target_ops): Install linux_unpause_all.
9668 * server.c (handle_status): Adjust.
9669 * target.h (struct target_ops): New fields `unpause_all' and
9670 `cancel_breakpoints'. Add new parameter to `pause_all'.
9671 (pause_all): Add new `freeze' parameter.
9672 (unpause_all): New.
9673 (cancel_breakpoints): New.
9674 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9675 cancel breakpoints.
9676 (cmd_qtstart): Pause threads.
9677 (stop_tracing): Pause threads, and cancel breakpoints.
9678 * win32-low.c (win32_target_ops): Adjust.
9679
9680 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9681
9682 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9683 the inferior right away from here...
9684 (linux_wait_1): ... to here, and adjust to check the thread's
9685 last_resume_kind instead of the lwp's step or stop_expected flags.
9686
9687 2010-05-02 Pedro Alves <pedro@codesourcery.com>
9688
9689 * README: Use consistent `GDB' and `GDBserver' spellings.
9690
9691 2010-05-02 Pedro Alves <pedro@codesourcery.com>
9692
9693 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9694 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9695 (linux_detach_one_lwp): Assume the lwp is stopped.
9696 (any_thread_of): Delete.
9697 (linux_detach): Stop all lwps here. Don't blindly delete all
9698 breakpoints.
9699 (delete_lwp_callback): New.
9700 (linux_mourn): Delete all lwps of the process that is gone.
9701 (linux_wait_1): Don't delete the last lwp of the process here.
9702 * mem-break.h (mark_breakpoints_out): Declare.
9703 * mem-break.c (mark_breakpoints_out): New.
9704 (free_all_breakpoints): Use it.
9705 * server.c (handle_target_event): If the process is gone, mark
9706 breakpoints out.
9707 * thread-db.c (struct thread_db) <create_bp>: New field.
9708 (thread_db_enable_reporting): Fix prototype. Store a thread event
9709 breakpoint reference in the thread_db struct.
9710 (thread_db_load_search): Clear the thread_db object.
9711 (try_thread_db_load_1): Ditto.
9712 (switch_to_process): New.
9713 (disable_thread_event_reporting): Use it.
9714 (remove_thread_event_breakpoints): New.
9715 (thread_db_detach, thread_db_mourn): Use it.
9716
9717 2010-05-01 Pedro Alves <pedro@codesourcery.com>
9718
9719 * linux-low.c (linux_enable_event_reporting): New.
9720 (linux_wait_for_event_1, handle_extended_wait): Use it.
9721
9722 2010-04-30 Pedro Alves <pedro@codesourcery.com>
9723
9724 * linux-low.c (linux_kill_one_lwp, linux_kill)
9725 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9726 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9727 SIGSTOP even if the LWP is stopped.
9728 (send_sigstop_callback): New.
9729 (stop_all_lwps): Use send_sigstop_callback instead.
9730 (linux_resume_one_thread): Adjust.
9731 (proceed_one_lwp): Still proceed an LWP that the client has
9732 requested to stop, if we haven't reported it as stopped yet. Make
9733 sure that LWPs the client want stopped, have a pending SIGSTOP.
9734
9735 2010-04-26 Doug Evans <dje@google.com>
9736
9737 * server.c (handle_general_set): Make static.
9738
9739 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9740 Print received char after testing for error/eof instead of before.
9741 (input_interrupt): Tweak comment.
9742
9743 2010-04-23 Doug Evans <dje@google.com>
9744
9745 * server.c (start_inferior): Print inferior argv if --debug.
9746
9747 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9748
9749 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9750 * nto-x86-low.c: Include server.h
9751
9752 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9753
9754 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9755 be consistent with other sources of this directory.
9756 (init_registers_amd64): Correct name of source file of this function
9757 in the comment.
9758
9759 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9760
9761 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9762 64-bit executables.
9763
9764 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9765
9766 * win32-i386-low.c: Add 64-bit support.
9767 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9768 (init_registers_amd64): Declare.
9769 (mappings): Add 64-bit version of array.
9770 (init_windows_x86): New function.
9771 (the_low_target): Change init_arch field to init_windows_x86.
9772
9773 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9774
9775 * win32-low.c: Adapt to support also 64-bit architecture.
9776 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9777 (get_image_name): Use SIZE_T type for local variable `done'.
9778 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9779 (toolhelp_get_dll_name): Idem.
9780 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9781 Use uintptr_t typecast to avoid warning.
9782 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9783 (handle_exception): Use phex_nz to avoid warning.
9784 (win32_wait): Remove unused local variable `process'.
9785
9786 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9787
9788 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9789 `amd64-avx.o'.
9790
9791 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9792
9793 * configure.ac: Use `ws2_32' library for srv_mingw.
9794 * configure: Regenerate.
9795 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9796 * remote-utils.c: Likewise.
9797
9798 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9799
9800 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9801 if __x86_64__ is defined.
9802
9803 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9804
9805 * configure: Regenerate.
9806
9807 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9808
9809 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9810 * target.h (target_ops): New get_tib_address field.
9811 * win32-low.h (win32_thread_info): Add thread_local_base field.
9812 * win32-low.c (child_add_thread): Add tlb argument.
9813 Set thread_local_base field to TLB.
9814 (get_child_debug_event): Adapt to child_add_thread change.
9815 (win32_get_tib_address): New function.
9816 (win32_target_ops): Set get_tib_address field to
9817 win32_get_tib_address.
9818 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9819
9820 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9821
9822 * linux-low.c (linux_mourn): Also remove the process.
9823 * server.c (handle_target_event): Don't remove the process here.
9824 * nto-low.c (nto_mourn): New.
9825 (nto_target_ops): Install it.
9826 * spu-low.c (spu_mourn): New.
9827 (spu_target_ops): Install it.
9828 * win32-low.c (win32_mourn): New.
9829 (win32_target_ops): Install it.
9830
9831 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9832
9833 * server.h (buffer_xml_printf): Remove redundant `;'.
9834
9835 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9836
9837 * regcache.c (set_register_cache): Invalidate regcaches before
9838 changing the register cache layout.
9839 (regcache_invalidate_one): Allow a NULL regcache.
9840 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9841 regcaches before changing the register cache layout or the target
9842 regsets.
9843
9844 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9845
9846 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9847 variable warning on Linux/x86-64.
9848
9849 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9850
9851 GDBserver disconnected tracing support.
9852
9853 * linux-low.c (linux_remove_process): Delete.
9854 (add_lwp): Don't set last_resume_kind here.
9855 (linux_kill): Use `mourn'.
9856 (linux_detach): Use `thread_db_detach', and `mourn'.
9857 (linux_mourn): New.
9858 (linux_attach_lwp_1): Adjust comment.
9859 (linux_attach): last_resume_kind moved the thread_info; adjust.
9860 (status_pending_p_callback): Adjust.
9861 (linux_wait_for_event_1): Adjust.
9862 (count_events_callback, select_singlestep_lwp_callback)
9863 (select_event_lwp_callback, cancel_breakpoints_callback)
9864 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9865 (proceed_one_lwp): Adjust.
9866 (linux_async): Add debug output.
9867 (linux_thread_stopped): New.
9868 (linux_pause_all): New.
9869 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9870 linux_pause_all.
9871 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9872 (thread_db_free): Delete declaration.
9873 (thread_db_detach, thread_db_mourn): Declare.
9874 * thread-db.c (thread_db_init): Use thread_db_mourn.
9875 (thread_db_free): Delete, split in two.
9876 (disable_thread_event_reporting): New.
9877 (thread_db_detach): New.
9878 (thread_db_mourn): New.
9879
9880 * server.h (struct thread_info) <last_resume_kind>: New field.
9881 <attached>: Add comment.
9882 <gdb_detached>: New field.
9883 (handler_func): Change return type to int.
9884 (handle_serial_event, handle_target_event): Ditto.
9885 (gdb_connected): Declare.
9886 (tracing): Delete.
9887 (disconnected_tracing): Declare.
9888 (stop_tracing): Declare.
9889
9890 * server.c (handle_query) <qSupported>: Report support for
9891 disconnected tracing.
9892 (queue_stop_reply_callback): Account for running threads.
9893 (gdb_wants_thread_stopped): New.
9894 (gdb_wants_all_threads_stopped): New.
9895 (gdb_reattached_process): New.
9896 (handle_status): Clear the `gdb_detached' flag of all processes.
9897 In all-stop, stop all threads.
9898 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9899 (process_serial_event): If the remote connection breaks, or if an
9900 exit was forced with "monitor exit", force an event loop exit.
9901 Handle disconnected tracing on detach.
9902 (handle_serial_event): Adjust.
9903 (handle_target_event): If GDB isn't connected, forward events back
9904 to the inferior, unless the last process exited, in which case,
9905 exit gdbserver. Adjust interface.
9906
9907 * remote-utils.c (remote_open): Don't block in accept. Instead
9908 register an event loop source on the listen socket file
9909 descriptor. Refactor bits into ...
9910 (listen_desc): ... this new global.
9911 (gdb_connected): ... this new function.
9912 (enable_async_notification): ... this new function.
9913 (handle_accept_event): ... this new function.
9914 (remote_close): Clear remote_desc.
9915
9916 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9917
9918 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9919 New fields.
9920 (mourn_inferior): Define.
9921 (target_process_qsupported): Avoid the dangling else problem.
9922 (thread_stopped): Define.
9923 (pause_all): Define.
9924 (target_waitstatus_to_string): Declare.
9925 * target.c (target_waitstatus_to_string): New.
9926
9927 * tracepoint.c (tracing): Make extern.
9928 (disconnected_tracing): New.
9929 (stop_tracing): Make extern. Handle tracing stops due to GDB
9930 disconnecting.
9931 (cmd_qtdisconnected): New.
9932 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9933 (handle_tracepoint_general_set): Handle QTDisconnected.
9934
9935 * event-loop.c (event_handler_func): Change return type to int.
9936 (process_event): Bail out if the event handler wants the event
9937 loop to stop.
9938 (handle_file_event): Ditto.
9939 (start_event_loop): Bail out if the event handler wants the event
9940 loop to stop.
9941
9942 * nto-low.c (nto_target_ops): Adjust.
9943 * spu-low.c (spu_wait): Don't remove the process here.
9944 (spu_target_ops): Adjust.
9945 * win32-low.c (win32_wait): Don't remove the process here.
9946 (win32_target_ops): Adjust.
9947
9948 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9949
9950 * regcache.c (realloc_register_cache): Invalidate inferior's
9951 regcache before recreating it.
9952
9953 2010-04-09 Pedro Alves <pedro@codesourcery.com>
9954
9955 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9956
9957 2010-04-09 Stan Shebs <stan@codesourcery.com>
9958 Pedro Alves <pedro@codesourcery.com>
9959
9960 * server.h (LONGEST): New.
9961 (struct thread_info) <while_stepping>: New field.
9962 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9963 Declare.
9964 (initialize_tracepoint, handle_tracepoint_general_set)
9965 (handle_tracepoint_query, tracepoint_finished_step)
9966 (tracepoint_was_hit, release_while_stepping_state_list):
9967 (current_traceframe): Declare.
9968 * server.c (handle_general_set): Handle tracepoint packets.
9969 (read_memory): New.
9970 (write_memory): New.
9971 (handle_search_memory_1): Use read_memory.
9972 (handle_query): Report support for conditional tracepoints, trace
9973 state variables, and tracepoint sources. Handle tracepoint
9974 queries.
9975 (main): Initialize the tracepoints module.
9976 (process_serial_event): Handle traceframe reads/writes.
9977
9978 * linux-low.c (handle_tracepoints): New.
9979 (linux_wait_1): Call it.
9980 (linux_resume_one_lwp): Handle while-stepping.
9981 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9982 (linux_target_ops): Install them.
9983 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9984 New field.
9985 * linux-x86-low.c (x86_supports_tracepoints): New.
9986 (the_low_target). Install it.
9987
9988 * mem-break.h (delete_breakpoint): Declare.
9989 * mem-break.c (delete_breakpoint): Make external.
9990
9991 * target.h (struct target_ops): Add `supports_tracepoints',
9992 `read_pc', and `write_pc' fields.
9993 (target_supports_tracepoints): Define.
9994 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9995 (phex_nz): New.
9996
9997 * regcache.h (struct regcache) <registers_owned>: New field.
9998 (init_register_cache, regcache_cpy): Declare.
9999 (regcache_read_pc, regcache_write_pc): Declare.
10000 (register_cache_size): Declare.
10001 (supply_regblock): Declare.
10002 * regcache.c (init_register_cache): New.
10003 (new_register_cache): Use it.
10004 (regcache_cpy): New.
10005 (register_cache_size): New.
10006 (supply_regblock): New.
10007 (regcache_read_pc, regcache_write_pc): New.
10008
10009 * tracepoint.c: New.
10010
10011 * Makefile.in (OBS): Add tracepoint.o.
10012 (tracepoint.o): New rule.
10013
10014 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10015
10016 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10017 (i386-mmx.o): New.
10018 (i386-mmx.c): Likewise.
10019 (i386-mmx-linux.o): Likewise.
10020 (i386-mmx-linux.c): Likewise.
10021
10022 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10023 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10024 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10025 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10026
10027 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10028 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10029 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10030
10031 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10032
10033 * Makefile.in (clean): Updated.
10034 (i386-avx.o): New.
10035 (i386-avx.c): Likewise.
10036 (i386-avx-linux.o): Likewise.
10037 (i386-avx-linux.c): Likewise.
10038 (amd64-avx.o): Likewise.
10039 (amd64-avx.c): Likewise.
10040 (amd64-avx-linux.o): Likewise.
10041 (amd64-avx-linux.c): Likewise.
10042
10043 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10044 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10045 (srv_amd64_regobj): Add amd64-avx.o.
10046 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10047 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10048 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10049 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10050 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10051 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10052 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10053
10054 * i387-fp.c: Include "i386-xstate.h".
10055 (i387_xsave): New.
10056 (i387_cache_to_xsave): Likewise.
10057 (i387_xsave_to_cache): Likewise.
10058 (x86_xcr0): Likewise.
10059
10060 * i387-fp.h (i387_cache_to_xsave): Likewise.
10061 (i387_xsave_to_cache): Likewise.
10062 (x86_xcr0): Likewise.
10063
10064 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10065 * linux-crisv32-low.c (target_regsets): Likewise.
10066 * linux-m68k-low.c (target_regsets): Likewise.
10067 * linux-mips-low.c (target_regsets): Likewise.
10068 * linux-ppc-low.c (target_regsets): Likewise.
10069 * linux-s390-low.c (target_regsets): Likewise.
10070 * linux-sh-low.c (target_regsets): Likewise.
10071 * linux-sparc-low.c (target_regsets): Likewise.
10072 * linux-xtensa-low.c (target_regsets): Likewise.
10073
10074 * linux-low.c: Include <sys/uio.h>.
10075 (regsets_fetch_inferior_registers): Support nt_type.
10076 (regsets_store_inferior_registers): Likewise.
10077 (linux_process_qsupported): New.
10078 (linux_target_ops): Add linux_process_qsupported.
10079
10080 * linux-low.h (regset_info): Add nt_type.
10081 (linux_target_ops): Add process_qsupported.
10082
10083 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10084 and <sys/uio.h>.
10085 (init_registers_i386_avx_linux): New.
10086 (init_registers_amd64_avx_linux): Likewise.
10087 (xmltarget_i386_linux_no_xml): Likewise.
10088 (xmltarget_amd64_linux_no_xml): Likewise.
10089 (PTRACE_GETREGSET): Likewise.
10090 (PTRACE_SETREGSET): Likewise.
10091 (x86_fill_xstateregset): Likewise.
10092 (x86_store_xstateregset): Likewise.
10093 (use_xml): Likewise.
10094 (x86_linux_update_xmltarget): Likewise.
10095 (x86_linux_process_qsupported): Likewise.
10096 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10097 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10098 init_registers_i386_linux here. Call
10099 x86_linux_update_xmltarget.
10100 (the_low_target): Add x86_linux_process_qsupported.
10101
10102 * server.c (handle_query): Call target_process_qsupported.
10103
10104 * target.h (target_ops): Add process_qsupported.
10105 (target_process_qsupported): New.
10106
10107 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10108
10109 * inferiors.c (add_thread): Set last_status kind to
10110 TARGET_WAITKIND_IGNORE.
10111 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10112 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10113 (linux_wait_1): Move `thread' local definition to block that uses
10114 it. Don't NULL initialize `event_child'.
10115 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10116 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10117 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10118
10119 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10120
10121 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10122 an extended waitstatus, or by a watchpoint.
10123 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10124 thread was stepping or has been stopped by a watchpoint.
10125
10126 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10127
10128 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10129 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10130 of another, then delete the previous, and validate all
10131 breakpoints.
10132 (validate_inserted_breakpoint): New.
10133 (delete_disabled_breakpoints): New.
10134 (validate_breakpoints): New.
10135 (check_mem_read): Validate breakpoints before trusting their
10136 shadow. Delete disabled breakpoints.
10137 (check_mem_write): Validate breakpoints before trusting they
10138 should be inserted. Delete disabled breakpoints.
10139 * mem-break.h (validate_breakpoints):
10140 * server.c (handle_query): Validate breakpoints when we see a
10141 qSymbol query.
10142
10143 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10144
10145 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10146 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10147 if we could tell there's a GDB breakpoint at stop_pc.
10148 (need_step_over_p): Don't do a step over if we find a GDB
10149 breakpoint at the resume PC.
10150
10151 * mem-break.c (struct raw_breakpoint): New.
10152 (enum bkpt_type): New type `gdb_breakpoint'.
10153 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10154 fields. New field `raw'.
10155 (find_raw_breakpoint_at): New.
10156 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10157 breakpoint instead.
10158 (set_breakpoint_at): Adjust.
10159 (delete_raw_breakpoint): New.
10160 (release_breakpoint): New.
10161 (delete_breakpoint): Rename to...
10162 (delete_breakpoint_1): ... this. Add proc parameter. Use
10163 release_breakpoint. Return ENOENT.
10164 (delete_breakpoint): Reimplement.
10165 (find_breakpoint_at): Delete.
10166 (find_gdb_breakpoint_at): New.
10167 (delete_breakpoint_at): Delete.
10168 (set_gdb_breakpoint_at): New.
10169 (delete_gdb_breakpoint_at): New.
10170 (gdb_breakpoint_here): New.
10171 (set_reinsert_breakpoint): Use release_breakpoint.
10172 (uninsert_breakpoint): Rename to ...
10173 (uninsert_raw_breakpoint): ... this.
10174 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10175 (reinsert_raw_breakpoint): Change parameter type to
10176 raw_breakpoint.
10177 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10178 instead.
10179 (check_breakpoints): Adjust. Use release_breakpoint.
10180 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10181 (breakpoint_inserted_here): Ditto.
10182 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10183 Don't trust the breakpoint's shadow if it is not inserted.
10184 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10185 (delete_all_breakpoints): Adjust.
10186 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10187 use delete_breakpoint_1.
10188
10189 * mem-break.h (breakpoints_supported): Delete declaration.
10190 (set_gdb_breakpoint_at): Declare.
10191 (gdb_breakpoint_here): Declare.
10192 (delete_breakpoint_at): Delete.
10193 (delete_gdb_breakpoint_at): Declare.
10194
10195 * server.h (struct raw_breakpoint): Forward declare.
10196 (struct process_info): New field `raw_breakpoints'.
10197
10198 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10199 breakpoints.
10200
10201 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10202
10203 * linux-low.c (status_pending_p_callback): Fix comment.
10204 (linux_wait_for_event_1): Move most of the internal breakpoint
10205 handling from here...
10206 (linux_wait_1): ... to here.
10207 (count_events_callback): New.
10208 (select_singlestep_lwp_callback): New.
10209 (select_event_lwp_callback): New.
10210 (cancel_breakpoints_callback): New.
10211 (select_event_lwp): New.
10212 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10213 priority to all LWPs that have had events that should be reported
10214 to the client. Cancel breakpoints when about to reporting the
10215 event to the client, not while stopping lwps. No longer cancel
10216 finished single-steps here.
10217 (cancel_finished_single_step): Delete.
10218 (cancel_finished_single_steps): Delete.
10219
10220 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10221
10222 * mem-break.c (enum bkpt_type): New.
10223 (struct breakpoint): New field `type'.
10224 (set_breakpoint_at): Change return type to struct breakpoint
10225 pointer. Set type to `other_breakpoint' by default.
10226 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10227 in the breakpoint list.
10228 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10229 (reinsert_breakpoint): Rename to ...
10230 (reinsert_raw_breakpoint): ... this.
10231 (reinsert_breakpoints_at): Adjust.
10232 * mem-break.h (struct breakpoint): Declare.
10233 (set_breakpoint_at): Change return type to struct breakpoint
10234 pointer.
10235
10236 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10237
10238 * server.c (handle_query): Assign, not compare.
10239
10240 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10241
10242 Teach linux gdbserver to step-over-breakpoints.
10243
10244 * linux-low.c (can_hardware_single_step): New.
10245 (supports_breakpoints): New.
10246 (handle_extended_wait): If stopping threads, read the stop pc of
10247 the new cloned LWP.
10248 (get_pc): New.
10249 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10250 low target doesn't support retrieving the PC.
10251 (add_lwp): Set last_resume_kind to resume_continue.
10252 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10253 (linux_attach): Don't clear stop_expected. Set the lwp's
10254 last_resume_kind to resume_stop.
10255 (linux_detach_one_lwp): Don't check for removed breakpoints.
10256 (check_removed_breakpoint): Delete.
10257 (status_pending_p): Rename to ...
10258 (status_pending_p_callback): ... this. Don't check for removed
10259 breakpoints. Don't consider threads that are stopped from GDB's
10260 perspective.
10261 (linux_wait_for_lwp): Always read the stop_pc here.
10262 (cancel_breakpoint): New.
10263 (step_over_bkpt): New global.
10264 (linux_wait_for_event_1): Implement stepping over breakpoints.
10265 (gdb_wants_lwp_stopped): New.
10266 (gdb_wants_all_stopped): New.
10267 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10268 single-step traps here. Store the thread's last reported target
10269 wait status.
10270 (send_sigstop): Don't clear stop_expected. Always set it,
10271 instead.
10272 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10273 (cancel_finished_single_step): New.
10274 (cancel_finished_single_steps): New.
10275 (wait_for_sigstop): Don't cancel finished single-step traps here.
10276 (linux_resume_one_lwp): Don't check for removed breakpoints.
10277 Don't set `step' on non-hardware step archs.
10278 (linux_set_resume_request): Ignore resume_stop requests if already
10279 stopping or stopped. Set the lwp's last_resume_kind.
10280 (resume_status_pending_p): Don't check for removed breakpoints.
10281 (need_step_over_p): New.
10282 (start_step_over): New.
10283 (finish_step_over): New.
10284 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10285 requests. Clear the thread's last reported target waitstatus.
10286 Don't use the `suspended' flag. Don't consider pending breakpoints.
10287 (linux_resume): Start a step-over if necessary.
10288 (proceed_one_lwp): New.
10289 (proceed_all_lwps): New.
10290 (unstop_all_lwps): New.
10291 * linux-low.h (struct lwp_info): Rewrite comment for the
10292 `suspended' flag. Add the `stop_pc' field. Delete the
10293 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10294 Add `'last_resume_kind' and `need_step_over' fields.
10295 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10296 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10297 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10298 (set_raw_breakpoint_at): New.
10299 (set_breakpoint_at): Rewrite to use it.
10300 (reinsert_breakpoint_handler): Delete.
10301 (set_reinsert_breakpoint): New.
10302 (reinsert_breakpoint_by_bp): Delete.
10303 (delete_reinsert_breakpoints): New.
10304 (uninsert_breakpoint): Rewrite.
10305 (uninsert_breakpoints_at): New.
10306 (reinsert_breakpoint): Rewrite.
10307 (reinsert_breakpoints_at): New.
10308 (check_breakpoints): Rewrite.
10309 (breakpoint_here): New.
10310 (breakpoint_inserted_here): New.
10311 (check_mem_read): Adjust.
10312 * mem-break.h (breakpoints_supported, breakpoint_here)
10313 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10314 (reinsert_breakpoint_by_bp): Delete declaration.
10315 (delete_reinsert_breakpoints): Declare.
10316 (reinsert_breakpoint): Delete declaration.
10317 (reinsert_breakpoints_at): Declare.
10318 (uninsert_breakpoint): Delete declaration.
10319 (uninsert_breakpoints_at): Declare.
10320 (check_breakpoints): Adjust prototype.
10321 * server.h: Adjust include order.
10322 (struct thread_info): Declare here. Add a `last_status' field.
10323
10324 2010-03-23 Michael Snyder <msnyder@vmware.com>
10325
10326 * server.c (crc32): New function.
10327 (handle_query): Add handling for 'qCRC:' request.
10328
10329 2010-03-23 Pedro Alves <pedro@codesourcery.com>
10330
10331 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10332 lwp had been stopped by a watchpoint.
10333
10334 2010-03-16 Pedro Alves <pedro@codesourcery.com>
10335
10336 * server.h (internal_error): Declare.
10337 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10338 * utils.c (internal_error): New function.
10339
10340 2010-03-15 Andreas Schwab <schwab@redhat.com>
10341
10342 * configure.srv: Fix typo setting srv_regobj.
10343
10344 2010-03-15 Pedro Alves <pedro@codesourcery.com>
10345
10346 * linux-low.c (fetch_register): Avoid passing a non string literal
10347 format to `error'.
10348 (usr_store_inferior_registers): Ditto.
10349
10350 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10351
10352 * linux-low.c (linux_write_memory): Bail out early if peeking
10353 memory failed.
10354
10355 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10356
10357 * linux-low.h (struct lwp_info): New fields
10358 `stopped_by_watchpoint' and `stopped_data_address'.
10359 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10360 here, and cache them in the lwp object.
10361 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10362 directly.
10363 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10364 field.
10365 (linux_stopped_by_watchpoint): Rewrite.
10366 (linux_stopped_data_address): Rewrite.
10367
10368 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
10369
10370 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10371 switching the current inferior, not before.
10372
10373 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10374
10375 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10376 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10377 i386-linux.c and amd64-linux.c.
10378 (reg-i386.o): Removed.
10379 (reg-i386.c): Likewise.
10380 (reg-i386-linux.o): Likewise.
10381 (reg-i386-linux.c): Likewise.
10382 (reg-x86-64.o): Likewise.
10383 (reg-x86-64.c): Likewise.
10384 (reg-x86-64-linux.o): Likewise.
10385 (reg-x86-64-linux.c): Likewise.
10386 (i386.o): New.
10387 (i386.c): Likewise.
10388 (i386-linux.o): Likewise.
10389 (i386-linux.c): Likewise.
10390 (amd64.o): Likewise.
10391 (amd64.c): Likewise.
10392 (amd64-linux.o): Likewise.
10393 (amd64-linux.c): Likewise.
10394
10395 * configure.srv (srv_i386_regobj): New.
10396 (srv_i386_linux_regobj): Likewise.
10397 (srv_amd64_regobj): Likewise.
10398 (srv_amd64_linux_regobj): Likewise.
10399 (srv_i386_32bit_xmlfiles): Likewise.
10400 (srv_i386_64bit_xmlfiles): Likewise.
10401 (srv_i386_xmlfiles): Likewise.
10402 (srv_amd64_xmlfiles): Likewise.
10403 (srv_i386_linux_xmlfiles): Likewise.
10404 (srv_amd64_linux_xmlfiles): Likewise.
10405 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10406 srv_xmlfiles to $srv_i386_xmlfiles.
10407 (i[34567]86-*-mingw32ce*): Likewise.
10408 (i[34567]86-*-mingw*): Likewise.
10409 (i[34567]86-*-nto*): Likewise.
10410 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10411 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10412 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10413 (x86_64-*-linux*): Likewise.
10414
10415 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10416 (init_registers_amd64_linux): New.
10417 (x86_arch_setup): Replace init_registers_x86_64_linux with
10418 init_registers_amd64_linux.
10419
10420 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10421
10422 * configure.ac: Check for libdl. If it is not available link against
10423 static libthread_db.
10424 * configure: Regenerate.
10425
10426 2010-02-22 Pedro Alves <pedro@codesourcery.com>
10427
10428 PR9605
10429
10430 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10431 handing a read watchpoint.
10432 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10433
10434 2010-02-12 Doug Evans <dje@google.com>
10435
10436 * linux-low.c (linux_supports_tracefork_flag): Document.
10437 (linux_look_up_symbols): Add comment.
10438
10439 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10440
10441 * regcache.c (supply_register): Clear regcache if buf is NULL.
10442
10443 2010-02-02 Nicolas Roche <roche@sourceware.org>
10444 Joel Brobecker <brobecker@adacore.com>
10445
10446 * inferiors.c (find_inferior): Add function documentation.
10447 (unloaded_dll): Handle the case where the unloaded dll has not
10448 been previously registered in the dll list.
10449
10450 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10451
10452 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10453 (thumb2_breakpoint): New.
10454 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10455
10456 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10457
10458 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10459 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10460 breakpoints.
10461
10462 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10463
10464 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10465
10466 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10467
10468 * linux-s390-low.c (s390_collect_ptrace_register)
10469 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10470
10471 2010-01-21 Doug Evans <dje@google.com>
10472
10473 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10474 (PTRACE_ARG4_TYPE): New macro.
10475 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10476 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10477 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10478 (usr_store_inferior_registers): Ditto.
10479 (linux_read_memory, linux_write_memory): Ditto.
10480 (linux_test_for_tracefork): Ditto.
10481
10482 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10483 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10484
10485 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10486
10487 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10488 target.
10489
10490 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10491
10492 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10493 prototype to take a regcache. Adjust.
10494
10495 2010-01-20 Pedro Alves <pedro@codesourcery.com>
10496
10497 * regcache.h (struct thread_info): Forward declare.
10498 (struct regcache): New.
10499 (new_register_cache): Adjust prototype.
10500 (get_thread_regcache): Declare.
10501 (free_register_cache): Adjust prototype.
10502 (registers_to_string, registers_from_string): Ditto.
10503 (supply_register, supply_register_by_name, collect_register)
10504 (collect_register_as_string, collect_register_by_name): Ditto.
10505 * regcache.c (struct inferior_regcache_data): Delete.
10506 (get_regcache): Rename to ...
10507 (get_thread_regcache): ... this. Adjust. Switch inferior before
10508 fetching registers.
10509 (regcache_invalidate_one): Adjust.
10510 (regcache_invalidate): Fix prototype.
10511 (new_register_cache): Return the new register cache.
10512 (free_register_cache): Change prototype.
10513 (realloc_register_cache): Adjust.
10514 (registers_to_string): Change prototype to take a regcache. Adjust.
10515 (registers_from_string): Ditto.
10516 (register_data): Ditto.
10517 (supply_register): Ditto.
10518 (supply_register_by_name): Ditto.
10519 (collect_register): Ditto.
10520 (collect_register_as_string): Ditto.
10521 (collect_register_by_name): Ditto.
10522 * server.c (process_serial_event): Adjust.
10523 * linux-low.h (regset_fill_func, regset_store_func): Change
10524 prototype.
10525 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10526 Change prototype.
10527 * linux-low.c (get_stop_pc): Adjust.
10528 (check_removed_breakpoint): Adjust.
10529 (linux_wait_for_event): Adjust.
10530 (linux_resume_one_lwp): Adjust.
10531 (fetch_register): Add regcache parameter. Adjust.
10532 (usr_store_inferior_registers): Ditto.
10533 (regsets_fetch_inferior_registers): Ditto.
10534 (regsets_store_inferior_registers): Ditto.
10535 (linux_fetch_registers, linux_store_registers): Ditto.
10536 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10537 regcache. Adjust.
10538 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10539 Ditto.
10540 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10541 prototype to take a regcache.
10542 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10543 * remote-utils.c (convert_ascii_to_int, outreg)
10544 (prepare_resume_reply): Change prototype to take a regcache.
10545 Adjust.
10546 * target.h (struct target_ops) <fetch_registers, store_registers>:
10547 Change prototype to take a regcache.
10548 (fetch_inferior_registers, store_inferior_registers): Change
10549 prototype to take a regcache. Adjust.
10550 * proc-service.c (ps_lgetregs): Adjust.
10551 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10552 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10553 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10554 take a regcache. Adjust.
10555 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10556 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10557 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10558 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10559 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10560 (cris_cannot_fetch_register):
10561 (cris_breakpoint_at): Change prototype to take a regcache.
10562 Adjust.
10563 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10564 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10565 to take a regcache. Adjust.
10566 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10567 Adjust.
10568 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10569 take a regcache. Adjust.
10570 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10571 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10572 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10573 * linux-mips-low.c (mips_get_pc):
10574 (mips_set_pc): Change prototype to take a regcache. Adjust.
10575 (mips_reinsert_addr): Adjust.
10576 (mips_collect_register): Change prototype to take a regcache.
10577 Adjust.
10578 (mips_supply_register):
10579 (mips_collect_register_32bit, mips_supply_register_32bit)
10580 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10581 (mips_store_fpregset): Ditto.
10582 * linux-ppc-low.c (ppc_supply_ptrace_register)
10583 (ppc_supply_ptrace_register): Ditto.
10584 (parse_spufs_run): Adjust.
10585 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10586 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10587 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10588 take a regcache. Adjust.
10589 * linux-s390-low.c (s390_collect_ptrace_register)
10590 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10591 (s390_set_pc): Change prototype to take a regcache. Adjust.
10592 (s390_arch_setup): Adjust.
10593 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10594 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10595 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10596 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10597 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10598 regcache. Adjust.
10599 (sparc_breakpoint_at): Adjust.
10600 * linux-xtensa-low.c (xtensa_fill_gregset):
10601 (xtensa_store_gregset):
10602 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10603 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10604 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10605 prototype to take a regcache. Adjust.
10606 * win32-arm-low.c (arm_fetch_inferior_register)
10607 (arm_store_inferior_register): Change prototype to take a
10608 regcache. Adjust.
10609 * win32-i386-low.c (i386_fetch_inferior_register)
10610 (i386_store_inferior_register): Change prototype to take a
10611 regcache. Adjust.
10612 * win32-low.c (child_fetch_inferior_registers)
10613 (child_store_inferior_registers): Change prototype to take a
10614 regcache. Adjust.
10615 (win32_wait): Adjust.
10616 (win32_fetch_inferior_registers): Change prototype to take a
10617 regcache. Adjust.
10618 (win32_store_inferior_registers): Adjust.
10619 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10620 store_inferior_register>: Change prototype to take a regcache.
10621
10622 2010-01-20 Doug Evans <dje@google.com>
10623
10624 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10625 #ifdef.
10626 (linux_wait_for_event1, linux_init_signals): Ditto.
10627 (W_STOPCODE): Provide definition if missing.
10628
10629 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10630
10631 * linux-low.c (linux_core_of_thread): New.
10632 (compare_ints, show_process, list_threads): New.
10633 (linux_qxfer_osdata): Report threads and cores.
10634 (linux_target_op): Register linux_core_of_thread.
10635 * remote-utils.c (prepare_resume_reply): Report the core.
10636 (buffer_xml_printf): Support %d specifier.
10637 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10638 New.
10639 (handle_query): Handle qXfer:threads. Announce availability
10640 thereof.
10641 * target.h (struct target_ops): New field core_of_thread.
10642
10643 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10644
10645 * Makefile.in (clean): Remove new generated files.
10646 (reg-s390.o, reg-s390.c): Remove rules.
10647 (reg-s390x.o, reg-s390x.c): Likewise.
10648 (s390-linux32.o, s390-linux32.c): Add rules.
10649 (s390-linux64.o, s390-linux64.c): Likewise.
10650 (s390x-linux64.o, s390x-linux64.c): Likewise.
10651 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10652 * linux-s390-low.c: Include <elf.h>.
10653 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10654 (init_registers_s390): Remove prototype.
10655 (init_registers_s390x): Likewise.
10656 (init_registers_s390_linux32): Add prototype.
10657 (init_registers_s390_linux64): Likewise.
10658 (init_registers_s390x_linux64): Likewise.
10659 (s390_num_regs_3264): New define.
10660 (s390_regmap_3264): New global variable.
10661 (s390_cannot_fetch_register): Remove obsolete check.
10662 (s390_cannot_store_register): Likewise.
10663 (s390_collect_ptrace_register): Handle upper/lower register halves.
10664 (s390_supply_ptrace_register): Likewise.
10665 (s390_fill_gregset): Update to register number changes.
10666 (s390_get_hwcap): New routine.
10667 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10668 Install appropriate regmap and register set.
10669
10670 2010-01-01 Joel Brobecker <brobecker@adacore.com>
10671
10672 * server.c (gdbserver_version): Update copyright year to 2010.
10673 * gdbreplay.c (gdbreplay_version): Likewise.
10674
10675 2009-12-28 Doug Evans <dje@google.com>
10676
10677 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10678 elf/external.h. Include <elf.h> instead but only if necessary.
10679
10680 2009-12-28 Pedro Alves <pedro@codesourcery.com>
10681
10682 * linux-low.c (linux_remove_process): Remove `detaching'
10683 parameter. Don't release/detach from thread_db here.
10684 (linux_kill): Release/detach from thread_db here, ...
10685 (linux_detach): ... and here, before actually detaching.
10686 (linux_wait_1): ... and here, when a process exits.
10687 * thread-db.c (any_thread_of): New.
10688 (thread_db_free): Switch the current inferior to a thread of the
10689 passed in process.
10690
10691 2009-12-21 Doug Evans <dje@google.com>
10692
10693 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10694
10695 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10696 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10697 warning ifndef __NR_tkill. Move setting of errno there too.
10698 Delete unnecessary resetting of errno after syscall.
10699 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10700
10701 * configure.ac: Check for dladdr.
10702 * config.in: Regenerate.
10703 * configure: Regenerate.
10704 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10705 (try_thread_db_load): Update.
10706
10707 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10708
10709 2009-12-18 Doug Evans <dje@google.com>
10710
10711 * event-loop.c: Include unistd.h if it exists.
10712
10713 * linux-low.c (my_waitpid): Move definition away from being in
10714 between linux_tracefork_child/linux_test_for_tracefork.
10715
10716 * gdb_proc_service.h (psaddr_t): Fix type.
10717 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10718 signature to match glibc.
10719
10720 2009-12-16 Doug Evans <dje@google.com>
10721
10722 * linux-low.c (linux_read_memory): Fix argument to read.
10723
10724 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10725
10726 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10727 events, don't leave current_inferior pointing at null.
10728
10729 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10730
10731 * win32-low.c (LOG): Delete.
10732 (OUTMSG): Output to stderr.
10733 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10734 on compile time LOG macro.
10735 (win32_wait): Fix debug output.
10736
10737 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10738
10739 * win32-low.c (win32_add_one_solib): If the dll name is
10740 "ntdll.dll", prepend the system directory to the dll path.
10741
10742 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10743
10744 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10745
10746 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
10747 Vladimir Prus <vladimir@codesourcery.com>
10748
10749 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10750 * configure.ac: Check for __mcoldfire__ and set
10751 gdb_cv_m68k_is_coldfire.
10752 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10753 reg-cf.o and reg-m68k.o.
10754 * configure: Regenerated.
10755
10756 2009-11-16 Pedro Alves <pedro@codesourcery.com>
10757
10758 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10759 Pass it to thread_db_free.
10760 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10761 proper `detaching' argument to linux_remove_process.
10762 * linux-low.h (thread_db_free): Add `detaching' parameter.
10763 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10764 to thread_db_free.
10765 (thread_db_free): Add `detaching' parameter. Only
10766 call td_ta_clear_event if detaching from process.
10767
10768 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10769
10770 * thread-db.c (thread_db_free): Fix typo.
10771
10772 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10773
10774 PR gdb/10838
10775 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10776
10777 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10778
10779 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10780 with an i686 compiler.
10781 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10782 needed.
10783 * configure: Rebuilt.
10784
10785 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10786
10787 PR gdb/10783
10788
10789 * server.c (handle_search_memory_1): Correct read_addr initialization
10790 in loop for searching subsequent chunks.
10791
10792 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10793
10794 * configure.ac: New --with-libthread-db option.
10795 * thread-db.c: Allow direct dependence on libthread_db.
10796 (thread_db_free): Adjust.
10797 * config.in: Regenerate.
10798 * configure: Likewise.
10799
10800 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10801
10802 PR gdb/10757
10803 * thread-db.c (attach_thread): New function.
10804 (maybe_attach_thread): Return success/failure.
10805 (find_new_threads_callback): Adjust.
10806 (thread_db_find_new_threads): Loop until no new threads.
10807
10808 2009-10-13 Pedro Alves <pedro@codesourcery.com>
10809
10810 * proc-service.c (ps_lgetregs): Formatting.
10811
10812 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10813
10814 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10815 * configure.ac: Adjust.
10816 * linux-low.h (struct process_info_private): Move members to struct
10817 thread_db.
10818 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10819 * linux-low.c (linux_remove_process): Adjust.
10820 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10821 * server.c (handle_query): Move code ...
10822 (handle_monitor_command): ... here. New function.
10823 * target.h (struct target_ops): New member.
10824 * thread-db.c (struct thread_db): New.
10825 (libthread_db_search_path): New variable.
10826 (thread_db_create_event, thread_db_enable_reporting)
10827 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10828 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10829 (try_thread_db_load_1, dladdr_to_soname): New functions.
10830 (try_thread_db_load, thread_db_load_search): New functions.
10831 (thread_db_init): Search for libthread_db.
10832 (thread_db_free): New function.
10833 (thread_db_handle_monitor_command): Likewise.
10834 * config.in: Regenerate.
10835 * configure: Regenerate.
10836
10837 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10838
10839 * spu-low.c (spu_kill): Wait for inferior to terminate.
10840 Call clear_inferiors.
10841 (spu_detach): Call clear_inferiors.
10842
10843 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10844
10845 * aclocal.m4: Regenerate.
10846 * config.in: Likewise.
10847 * configure: Likewise.
10848
10849 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10850
10851 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10852 (parse_spufs_run): New function.
10853 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10854 (ppc_breakpoint_at): Handle SPU breakpoints.
10855
10856 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10857
10858 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10859 (SPUFS_MAGIC): Define.
10860 (spu_enumerate_spu_ids): New function.
10861 (linux_qxfer_spu): New function.
10862 (linux_target_ops): Install linux_qxfer_spu.
10863
10864 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10865
10866 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10867 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10868 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10869 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10870 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10871 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10872 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10873 (init_registers_powerpc_cell32l): Add prototype.
10874 (init_registers_powerpc_cell64l): Likewise.
10875 (ppc_arch_setup): Detect Cell/B.E. architecture.
10876
10877 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10878
10879 * Makefile.in (datarootdir): New variable.
10880
10881 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10882
10883 * linux-low.c (linux_write_memory): Update debugging output.
10884 * Makefile.in (clean): Add new descriptions.
10885 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10886 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10887 * configure.srv: Add new files for arm*-*-linux*.
10888 * linux-arm-low.c: Add new declarations.
10889 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10890 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10891 (HWCAP_VFPv3D16): New.
10892 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10893 instead of __IWMMXT__.
10894 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10895 (arm_arch_setup): New.
10896 (target_regsets): Remove #ifdef. Add VFP regset.
10897 (the_low_target): Use arm_arch_setup.
10898
10899 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10900
10901 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10902 the main thread again.
10903
10904 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10905
10906 Adding Neutrino gdbserver.
10907 * configure: Regenerated.
10908 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10909 * configure.srv (i[34567]86-*-nto*): New target.
10910 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10911 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10912 (nto_comctrl) [__QNX__]: New function.
10913 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10914
10915 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
10916
10917 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10918 srv_tgtobj.
10919
10920 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10921 Pedro Alves <pedro@codesourcery.com>
10922
10923 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10924 don't support CONTEXT_EXTENDED_REGISTERS.
10925 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10926 (the_low_target): Install them.
10927 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10928 failing with ERROR_PIPE_NOT_CONNECTED.
10929
10930 2009-06-30 Doug Evans <dje@google.com>
10931 Pierre Muller <muller@ics.u-strasbg.fr>
10932
10933 Add h/w watchpoint support to x86-linux, win32-i386.
10934 * Makefile.in (SFILES): Add i386-low.c
10935 (i386_low_h): Define.
10936 (i386-low.o): Add dependencies.
10937 (linux-x86-low.o): Add i386-low.h dependency.
10938 (win32-i386-low.o): Ditto.
10939 * i386-low.c: New file.
10940 * i386-low.h: New file.
10941 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10942 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10943 * linux-low.c (linux_add_process): Initialize arch_private.
10944 (linux_remove_process): Free arch_private.
10945 (add_lwp): Initialize arch_private.
10946 (delete_lwp): Free arch_private.
10947 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10948 provided.
10949 * linux-low.h (process_info_private): New member arch_private.
10950 (lwp_info): New member arch_private.
10951 (linux_target_ops): New members new_process, new_thread,
10952 prepare_to_resume.
10953 (ptid_of): New macro.
10954 * linux-x86-low.c: Include stddef.h, i386-low.h.
10955 (arch_process_info): New struct.
10956 (arch_lwp_info): New struct.
10957 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10958 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10959 (i386_dr_low_get_status): New function.
10960 (x86_insert_point, x86_remove_point): New functions.
10961 (x86_stopped_by_watchpoint): New function.
10962 (x86_stopped_data_address): New function.
10963 (x86_linux_new_process, x86_linux_new_thread): New functions.
10964 (x86_linux_prepare_to_resume): New function.
10965 (the_low_target): Add entries for insert_point, remove_point,
10966 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10967 prepare_to_resume.
10968 * server.c (debug_hw_points): New global.
10969 (monitor_show_help): Document set debug-hw-points.
10970 (handle_query): Process "set debug-hw-points".
10971 * server.h (debug_hw_points): Declare.
10972 (paddress): Declare.
10973 * utils.c (NUMCELLS, CELLSIZE): New macros.
10974 (get_sell, xsnprintf, paddress): New functions.
10975 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10976 remove_point, stopped_by_watchpoint, stopped_data_address.
10977 * win32-i386-low.c: Include i386-low.h.
10978 (debug_reg_state): Replaces dr.
10979 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10980 (i386_dr_low_get_status): New function.
10981 (i386_insert_point, i386_remove_point): New functions.
10982 (i386_stopped_by_watchpoint): New function.
10983 (i386_stopped_data_address): New function.
10984 (i386_initial_stuff): Update.
10985 (get_thread_context,set_thread_context,i386_thread_added): Update.
10986 (the_low_target): Add entries for insert_point,
10987 remove_point, stopped_by_watchpoint, stopped_data_address.
10988 * win32-low.c (win32_insert_watchpoint): New function.
10989 (win32_remove_watchpoint): New function.
10990 (win32_stopped_by_watchpoint): New function.
10991 (win32_stopped_data_address): New function.
10992 (win32_target_ops): Add entries for insert_watchpoint,
10993 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10994 * win32-low.h (win32_target_ops): New members insert_point,
10995 remove_point, stopped_by_watchpoint, stopped_data_address.
10996
10997 2009-06-25 Pedro Alves <pedro@codesourcery.com>
10998
10999 * server.c (process_serial_event): Re-return unsupported, not
11000 error, if the type isn't recognized. Re-allow supporting only
11001 insert or remove packets. Also call require_running for
11002 breakpoints. Add missing break statement to default case. Tidy.
11003 * target.h (struct target_ops): Rename insert_watchpoint to
11004 insert_point, and remove_watchpoint to remove_point.
11005
11006 * linux-low.h (struct linux_target_ops): Likewise.
11007 * linux-low.c (linux_insert_watchpoint): Rename to ...
11008 (linux_insert_point): ... this. Adjust.
11009 (linux_remove_watchpoint): Rename to ...
11010 (linux_remove_point): ... this. Adjust.
11011 (linux_target_ops): Adjust.
11012 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11013 (cris_insert_point): ... this.
11014 (cris_remove_watchpoint): Rename to ...
11015 (cris_remove_point): ... this.
11016 (the_low_target): Adjust.
11017
11018 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11019
11020 * server.c (handle_v_kill): Pass signal_pid to
11021 kill_inferior if multi_process is zero.
11022
11023 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11024
11025 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11026 * target.h (target_ops): Comment for *_watchpoint to make it clear
11027 the functions can get types '0' and '1'.
11028
11029 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11030
11031 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11032 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11033 * regcache.c (get_regcache): Likewise.
11034 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11035 * win32-low.c (child_fetch_inferior_registers): Remove check for
11036 regno 0.
11037
11038 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11039 Pedro Alves <pedro@codesourcery.com>
11040
11041 * target.h (struct target_ops) <supports_multi_process>: New
11042 callback.
11043 (target_supports_multi_process): New.
11044 * server.c (handle_query): Even if GDB reports support, only
11045 enable multi-process if the target also supports it. Report
11046 multi-process support only if the target backend supports it.
11047 * linux-low.c (linux_supports_multi_process): New function.
11048 (linux_target_ops): Install it as target_supports_multi_process
11049 callback.
11050
11051 2009-05-24 Doug Evans <dje@google.com>
11052
11053 Global renaming of find_thread_pid to find_thread_ptid.
11054 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11055 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11056 All callers updated.
11057
11058 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11059 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11060 directly.
11061
11062 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11063 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11064 (linux_resume_one_lwp): Ditto.
11065
11066 2009-05-23 Doug Evans <dje@google.com>
11067
11068 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11069 from struct inferior_list_entry * to struct lwp_info *.
11070 All callers updated.
11071
11072 2009-05-13 Doug Evans <dje@google.com>
11073
11074 * linux-x86-low.c: Don't include assert.h.
11075 (x86_siginfo_fixup): Use fatal, not assert.
11076 (x86_arch_setup): Fix comment.
11077
11078 2009-05-12 Doug Evans <dje@google.com>
11079
11080 Biarch support for i386/amd64 gdbserver.
11081 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11082 Add linux-x86-low.c.
11083 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11084 (linux-x86-low.o): Add.
11085 * linux-x86-64-low.c: Delete.
11086 * linux-i386-low.c: Delete.
11087 * linux-x86-low.c: New file.
11088 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11089 linux-x86-low.o.
11090 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11091 linux-x86-low.o.
11092 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11093 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11094 (linux_child_pid_to_exec_file): New function.
11095 (elf_64_header_p, elf_64_file_p): New functions.
11096 (siginfo_fixup): New function.
11097 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11098 give target a chance to convert layout.
11099 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11100 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11101
11102 2009-05-07 Doug Evans <dje@google.com>
11103
11104 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11105 (regsets_store_inferior_registers): Ditto.
11106
11107 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11108
11109 PR server/10048
11110
11111 * linux-low.c (must_set_ptrace_flags): Delete.
11112 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11113 of the global.
11114 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11115 `lwp->must_set_ptrace_flags' instead.
11116 (linux_wait_for_event_1): Set ptrace options here.
11117 (linux_wait_1): ... not here.
11118
11119 2009-04-30 Doug Evans <dje@google.com>
11120
11121 * inferiors.c (started_inferior_callback): New function.
11122 (attached_inferior_callback): New function.
11123 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11124 * server.c (print_started_pid, print_attached_pid): New functions.
11125 (detach_or_kill_for_exit): New function.
11126 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11127 * server.h (have_started_inferiors_p): Declare.
11128 (have_attached_inferiors_p): Declare.
11129
11130 * inferiors.c (remove_process): Fix memory leak, free process.
11131 * linux-low.c (linux_remove_process): New function.
11132 (linux_kill): Call it instead of remove_process.
11133 (linux_detach, linux_wait_1): Ditto.
11134
11135 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11136
11137 * configure.srv: Add x86 Windows CE target.
11138
11139 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11140
11141 * inferiors.c (get_thread_process): Make global.
11142 * server.h (get_thread_process): Add prototype.
11143 * thread-db.c (find_one_thread): Use get_thread_process
11144 instead of current_process.
11145 (thread_db_get_tls_address): Do not crash if called when
11146 thread layer is not yet initialized.
11147
11148 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11149
11150 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11151 * spu-low.c (current_tid): Rename to ...
11152 (current_ptid): ... this.
11153 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11154 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11155 ptid_get_lwp (current_ptid) instead of current_tid.
11156 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11157 instead of current_tid. Use find_process_pid to verify pid
11158 argument is valid. Pass proper argument to remove_process.
11159 (spu_thread_alive): Compare current_ptid instead of current_tid.
11160 (spu_resume): Likewise.
11161
11162 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11163
11164 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11165 variable.
11166
11167 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11168
11169 Implement the multiprocess extensions, and add linux multiprocess
11170 support.
11171
11172 * server.h (ULONGEST): Declare.
11173 (struct ptid, ptid_t): New.
11174 (minus_one_ptid, null_ptid): Declare.
11175 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11176 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11177 (struct inferior_list_entry): Change `id' type from unsigned from
11178 to ptid_t.
11179 (struct sym_cache, struct breakpoint, struct
11180 process_info_private): Forward declare.
11181 (struct process_info): Declare.
11182 (current_process): Declare.
11183 (all_processes): Declare.
11184 (initialize_inferiors): Declare.
11185 (add_thread): Adjust to use ptid_t.
11186 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11187 (add_process, remove_process, find_thread_pid): Declare.
11188 (find_inferior_id): Adjust to use ptid_t.
11189 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11190 (multi_process): Declare.
11191 (push_event): Adjust to use ptid_t.
11192 (read_ptid, write_ptid): Declare.
11193 (prepare_resume_reply): Adjust to use ptid_t.
11194 (clear_symbol_cache): Declare.
11195 * inferiors.c (all_processes): New.
11196 (null_ptid, minus_one_ptid): New.
11197 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11198 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11199 (add_thread): Change unsigned long to ptid. Remove gdb_id
11200 parameter. Adjust.
11201 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11202 (gdb_id_to_thread): Rename to ...
11203 (find_thread_pid): ... this. Change unsigned long to ptid.
11204 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11205 (loaded_dll, pull_pid_from_list): Adjust.
11206 (add_process, remove_process, find_process_pid)
11207 (get_thread_process, current_process, initialize_inferiors): New.
11208 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11209 (struct target_waitstatus) <related_pid>: Ditto.
11210 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11211 return type to int.
11212 (struct target_ops) <join>: Add `pid' argument.
11213 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11214 (struct target_ops) <wait>: Add `ptid' field. Change return type
11215 to ptid.
11216 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11217 (mywait): Add `ptid' argument. Change return type to ptid_t.
11218 (target_pid_to_str): Declare.
11219 * target.c (set_desired_inferior): Adjust to use ptids.
11220 (mywait): Add new `ptid' argument. Adjust.
11221 (target_pid_to_str): New.
11222 * mem-break.h (free_all_breakpoints): Declare.
11223 * mem-break.c (breakpoints): Delelete.
11224 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11225 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11226 to use per-process breakpoint list.
11227 (free_all_breakpoints): New.
11228 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11229 (symbol_cache, all_symbols_looked_up): Delete.
11230 (hexchars): New.
11231 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11232 read_ptid): New.
11233 (prepare_resume_reply): Change ptid argument's type from unsigned
11234 long to ptid_t. Adjust. Implement W;process and X;process.
11235 (free_sym_cache, clear_symbol_cache): New.
11236 (look_up_one_symbol): Adjust to per-process symbol cache. *
11237 * server.c (cont_thread, general_thread, step_thread): Change type
11238 to ptid_t.
11239 (attached): Delete.
11240 (multi_process): New.
11241 (last_ptid): Change type to ptid_t.
11242 (struct vstop_notif) <ptid>: Change type to ptid_t.
11243 (queue_stop_reply, push_event): Change `ptid' argument's type to
11244 ptid_t.
11245 (discard_queued_stop_replies): Add `pid' argument.
11246 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11247 changes. Don't reference the `attached' global.
11248 (attach_inferior): Adjust to mywait interface changes.
11249 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11250 features. Handle and report "multiprocess+". Handle
11251 "qAttached:PID".
11252 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11253 changes.
11254 (handle_v_kill): New.
11255 (handle_v_stopped): Adjust to use target_pid_to_str.
11256 (handle_v_requests): Allow multiple attaches and runs when
11257 multiprocess extensions are in effect. Handle "vKill".
11258 (myresume): Adjust to use ptids.
11259 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11260 (handle_status): Adjust to discard_queued_stop_replies interface
11261 change.
11262 (first_thread_of, kill_inferior_callback)
11263 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11264 (main): Call initialize_inferiors. Adjust to use ptids, killing
11265 and detaching from all inferiors. Handle multiprocess packet
11266 variants.
11267 * linux-low.h: Include gdb_proc_service.h.
11268 (struct process_info_private): New.
11269 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11270 <lwpid_of>: Use ptid_get_lwp.
11271 (get_lwp_thread): Adjust.
11272 (struct lwp_info): Add `dead' member.
11273 (find_lwp_pid): Declare.
11274 * linux-low.c (thread_db_active): Delete.
11275 (new_inferior): Adjust comment.
11276 (inferior_pid): Delete.
11277 (linux_add_process): New.
11278 (handle_extended_wait): Adjust.
11279 (add_lwp): Change unsigned long to ptid.
11280 (linux_create_inferior): Add process to processes table. Adjust
11281 to use ptids. Don't set new_inferior here.
11282 (linux_attach_lwp): Rename to ...
11283 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11284 it. Adjust to use ptids.
11285 (linux_attach_lwp): New.
11286 (linux_attach): Add process to processes table. Don't set
11287 new_inferior here.
11288 (struct counter): New.
11289 (second_thread_of_pid_p, last_thread_of_process_p): New.
11290 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11291 multiple processes.
11292 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11293 processes. Remove process from process table.
11294 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11295 to multiple processes.
11296 (any_thread_of): New.
11297 (linux_detach): Add `pid' argument, and handle it. Remove process
11298 from processes table.
11299 (linux_join): Add `pid' argument. Handle it.
11300 (linux_thread_alive): Change unsighed long argument to ptid_t.
11301 Consider dead lwps as not being alive.
11302 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11303 threads we're not interested in.
11304 (same_lwp, find_lwp_pid): New.
11305 (linux_wait_for_lwp): Change `pid' argument's type from int to
11306 ptid_t. Adjust.
11307 (linux_wait_for_event): Rename to ...
11308 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11309 from int to ptid_t. Adjust.
11310 (linux_wait_for_event): New.
11311 (linux_wait_1): Add `ptid' argument. Change return type to
11312 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11313 that exit from the process table.
11314 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11315 Adjust.
11316 (mark_lwp_dead): New.
11317 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11318 stopping all threads, mark its main lwp as dead.
11319 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11320 ptids.
11321 (fetch_register, usr_store_inferior_registers)
11322 (regsets_fetch_inferior_registers)
11323 (regsets_store_inferior_registers, linux_read_memory)
11324 (linux_write_memory): Inline `inferior_pid'.
11325 (linux_look_up_symbols): Adjust to use per-process
11326 `thread_db_active'.
11327 (linux_request_interrupt): Adjust to use ptids.
11328 (linux_read_auxv): Inline `inferior_pid'.
11329 (initialize_low): Don't reference thread_db_active.
11330 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11331 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11332 (ps_getpid): Return the pid of the current inferior.
11333 * thread-db.c (proc_handle, thread_agent): Delete.
11334 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11335 per-process data.
11336 (find_one_thread): Change argument type to ptid_t. Adjust to
11337 per-process data.
11338 (maybe_attach_thread): Adjust to per-process data and ptids.
11339 (thread_db_find_new_threads): Ditto.
11340 (thread_db_init): Ditto.
11341 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11342 processes table. Adjust to use ptids.
11343 (spu_kill, spu_detach): Adjust interface. Remove process from
11344 processes table.
11345 (spu_join, spu_thread_alive): Adjust interface.
11346 (spu_wait): Adjust interface. Remove process from processes
11347 table. Adjust to use ptids.
11348 * win32-low.c (current_inferior_tid): Delete.
11349 (current_inferior_ptid): New.
11350 (debug_event_ptid): New.
11351 (thread_rec): Take a ptid. Adjust.
11352 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11353 (child_delete_thread): Ditto.
11354 (do_initial_child_stuff): Add `attached' argument. Add process to
11355 processes table.
11356 (child_fetch_inferior_registers, child_store_inferior_registers):
11357 Adjust.
11358 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11359 (win32_attach): Pass 1 to do_initial_child_stuff.
11360 (win32_kill): Adjust interface. Remove process from processes
11361 table.
11362 (win32_detach): Ditto.
11363 (win32_join): Adjust interface.
11364 (win32_thread_alive): Take a ptid.
11365 (win32_resume): Adjust to use ptids.
11366 (get_child_debug_event): Ditto.
11367 (win32_wait): Adjust interface. Remove exiting process from
11368 processes table.
11369
11370 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11371
11372 Non-stop mode support.
11373
11374 * server.h (non_stop): Declare.
11375 (gdb_client_data, handler_func): Declare.
11376 (delete_file_handler, add_file_handler, start_event_loop):
11377 Declare.
11378 (handle_serial_event, handle_target_event, push_event)
11379 (putpkt_notif): Declare.
11380 * target.h (enum resume_kind): New.
11381 (struct thread_resume): Replace `step' field by `kind' field.
11382 (TARGET_WNOHANG): Define.
11383 (struct target_ops) <wait>: Add `options' argument.
11384 <supports_non_stop, async, start_non_stop>: New fields.
11385 (target_supports_non_stop, target_async): New.
11386 (start_non_stop): Declare.
11387 (mywait): Add `options' argument.
11388 * target.c (mywait): Add `options' argument. Print child exit
11389 notifications here.
11390 (start_non_stop): New.
11391 * server.c (non_stop, own_buf, mem_buf): New globals.
11392 (struct vstop_notif): New.
11393 (notif_queue): New global.
11394 (queue_stop_reply, push_event, discard_queued_stop_replies)
11395 (send_next_stop_reply): New.
11396 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11397 interface changes.
11398 (attach_inferior): In non-stop mode, don't wait for the target
11399 here.
11400 (handle_general_set): Handle QNonStop.
11401 (handle_query): When handling qC, return the current general
11402 thread, instead of the first thread of the list.
11403 (handle_query): If the backend supports non-stop mode, include
11404 QNonStop+ in the qSupported query response.
11405 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11406 and non-stop mode.
11407 (handle_v_attach, handle_v_run): Handle non-stop mode.
11408 (handle_v_stopped): New.
11409 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11410 (myresume): Adjust to use resume_kind. Handle non-stop.
11411 (queue_stop_reply_callback): New.
11412 (handle_status): Handle non-stop mode.
11413 (main): Clear non_stop flag on reconnection. Use the event-loop.
11414 Refactor serial protocol handling from here ...
11415 (process_serial_event): ... to this new function. When GDB
11416 selects any thread, select one here. In non-stop mode, wait until
11417 GDB acks all pending events before exiting.
11418 (handle_serial_event, handle_target_event): New.
11419 * remote-utils.c (remote_open): Install remote_desc in the event
11420 loop.
11421 (remote_close): Remove remote_desc from the event loop.
11422 (putpkt_binary): Rename to...
11423 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11424 (putpkt_binary): New as wrapper around putpkt_binary_1.
11425 (putpkt_notif): New.
11426 (prepare_resume_reply): In non-stop mode, don't change the
11427 general_thread.
11428 * event-loop.c: New.
11429 * Makefile.in (OBJ): Add event-loop.o.
11430 (event-loop.o): New rule.
11431
11432 * linux-low.h (pid_of): Moved here.
11433 (lwpid_of): New.
11434 (get_lwp_thread): Use lwpid_of.
11435 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11436 * linux-low.c (pid_of): Delete.
11437 (inferior_pid): Use lwpid_of.
11438 (linux_event_pipe): New.
11439 (target_is_async_p): New.
11440 (delete_lwp): New.
11441 (handle_extended_wait): Use lwpid_of.
11442 (add_lwp): Don't set lwpid field.
11443 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11444 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11445 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11446 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11447 first. Adjust to linux_wait_for_event interface changes. Use
11448 lwpid_of.
11449 (linux_detach): Don't delete the main lwp here.
11450 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11451 (status_pending_p): Don't consider explicitly suspended lwps.
11452 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11453 pointer. Add OPTIONS argument. Change return type to int. Use
11454 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11455 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11456 pointer. Add status pointer argument. Return a pid instead of a
11457 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11458 changes. In non-stop mode, don't switch to a random thread.
11459 (linux_wait): Rename to...
11460 (linux_wait_1): ... this. Add target_options argument, and handle
11461 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11462 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11463 clean exit and signal exit code. Don't stop all threads in
11464 non-stop mode. In all-stop mode, only stop all threads when
11465 reporting a stop to GDB. Handle explicit thread stop requests.
11466 (async_file_flush, async_file_mark): New.
11467 (linux_wait): New.
11468 (send_sigstop): Use lwpid_of.
11469 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11470 interface changes. In non-stop mode, don't switch to a random
11471 thread.
11472 (linux_resume_one_lwp): Use lwpid_of.
11473 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11474 (linux_resume_one_thread): ... this. Handle resume_stop. In
11475 non-stop mode, don't look for pending flag in all threads.
11476 (resume_status_pending_p): Don't consider explicitly suspended
11477 threads.
11478 (my_waitpid): Reimplement. Emulate __WALL.
11479 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11480 Use lwpid_of.
11481 (sigchld_handler, linux_supports_non_stop, linux_async)
11482 (linux_start_non_stop): New.
11483 (linux_target_ops): Register linux_supports_non_stop, linux_async
11484 and linux_start_non_stop.
11485 (initialize_low): Install SIGCHLD handler.
11486 * thread-db.c (thread_db_create_event, find_one_thread)
11487 (thread_db_get_tls_address): Use lwpid_of.
11488 * win32-low.c (win32_detach): Adjust to use resume_kind.
11489 (win32_wait): Add `options' argument.
11490 * spu-low.c (spu_resume): Adjust to use resume_kind.
11491 (spu_wait): Add `options' argument.
11492
11493 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11494
11495 Decouple target code from remote protocol.
11496
11497 * target.h (enum target_waitkind): New.
11498 (struct target_waitstatus): New.
11499 (struct target_ops) <wait>: Return an unsigned long. Take a
11500 target_waitstatus pointer instead of a char pointer.
11501 (mywait): Likewise.
11502 * target.c (mywait): Change prototype to return an unsigned long.
11503 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11504 * server.h (thread_from_wait, old_thread_from_wait): Delete
11505 declarations.
11506 (prepare_resume_reply): Change prototype to take a
11507 target_waitstatus.
11508 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11509 (last_status, last_ptid): New.
11510 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11511 pid instead of a signal.
11512 (attach_inferior): Remove "status" and "signal" parameters.
11513 Adjust.
11514 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11515 not as an address.
11516 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11517 (handle_v_requests, myresume): Remove "status" and "signal"
11518 parameters. Adjust.
11519 (handle_status): New.
11520 (main): Delete local `status'. Adjust.
11521 * remote-utils.c: Include target.h.
11522 (prepare_resume_reply): Change prototype to take a
11523 target_waitstatus. Adjust.
11524
11525 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11526 interface.
11527 * spu-low.c (spu_wait): Adjust.
11528 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11529 Delete.
11530 (win32_wait): Adjust.
11531
11532 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11533
11534 * target.h (struct thread_resume): Delete leave_stopped member.
11535 (struct target_ops): Add a `n' argument to the `resume' callback.
11536 * server.c (start_inferior): Adjust.
11537 (handle_v_cont, myresume): Adjust.
11538 * linux-low.c (check_removed_breakpoint): Adjust to resume
11539 interface change, and to removed leave_stopped field.
11540 (resume_ptr): Delete.
11541 (struct thread_resume_array): New.
11542 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11543 resume interface change.
11544 (linux_continue_one_thread, linux_queue_one_thread)
11545 (resume_status_pending_p): Check if the resume field is NULL
11546 instead of checking the leave_stopped member.
11547 (linux_resume): Adjust to the target resume interface change.
11548 * spu-low.c (spu_resume): Adjust to the target resume interface
11549 change.
11550 * win32-low.c (win32_detach, win32_resume): Ditto.
11551
11552 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11553
11554 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11555 flag.
11556 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11557 pending.
11558 (linux_continue_one_thread): Only preserve the stepping flag if
11559 there's a pending breakpoint.
11560
11561 2009-03-31 Pedro Alves <pedro@codesourcery.com>
11562
11563 * server.c (main): After the inferior having exited, call
11564 remote_close before exiting gdbserver.
11565
11566 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11567
11568 Fix size of FPSCR in Power 7 processors.
11569 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11570 (PPC_FEATURE_HAS_DFP): New #define.
11571 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11572 size of the FPSCR.
11573
11574 2009-03-23 Pedro Alves <pedro@codesourcery.com>
11575
11576 * server.c (handle_query) Whitespace and formatting.
11577
11578 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11579
11580 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11581 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11582 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11583 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11584 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11585 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11586 Makefile.in, configure.ac: Fix whitespace throughout.
11587 * configure: Regenerate.
11588
11589 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11590
11591 * inferiors.c (find_inferior): Make it safe for the callback
11592 function to delete the currently iterated inferior.
11593
11594 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11595
11596 * Makefile.in (linuw_low_h): Move higher.
11597 (thread-db.o): Depend on $(linux_low_h).
11598
11599 2009-03-17 Pedro Alves <pedro@codesourcery.com>
11600
11601 Rename "process" to "lwp" throughout.
11602
11603 * linux-low.c (all_processes): Rename to...
11604 (all_lwps): ... this.
11605 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11606 (add_process): Rename to ...
11607 (add_lwp): ... this. Adjust.
11608 (linux_create_inferior): Adjust.
11609 (linux_attach_lwp): Adjust.
11610 (linux_attach): Adjust.
11611 (linux_kill_one_process): Rename to ...
11612 (linux_kill_one_lwp): ... this. Adjust.
11613 (linux_kill): Adjust.
11614 (linux_detach_one_process): Rename to ...
11615 (linux_detach_one_lwp): ... this. Adjust.
11616 (linux_detach): Adjust.
11617 (check_removed_breakpoint): Adjust.
11618 (status_pending_p): Adjust.
11619 (linux_wait_for_process): Rename to ...
11620 (linux_wait_for_lwp): ... this. Adjust.
11621 (linux_wait_for_event): Adjust.
11622 (send_sigstop): Adjust.
11623 (wait_for_sigstop): Adjust.
11624 (stop_all_processes): Rename to ...
11625 (stop_all_lwps): ... this.
11626 (linux_resume_one_process): Rename to ...
11627 (linux_resume_one_lwp): ... this. Adjust.
11628 (linux_set_resume_request, linux_continue_one_thread)
11629 (linux_queue_one_thread, resume_status_pending_p)
11630 (usr_store_inferior_registers, regsets_store_inferior_registers)
11631 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11632 Adjust.
11633 * linux-low.h (get_process): Rename to ...
11634 (get_lwp): ... this. Adjust.
11635 (get_thread_process): Rename to ...
11636 (get_thread_lwp): ... this. Adjust.
11637 (get_process_thread): Rename to ...
11638 (get_lwp_thread): ... this. Adjust.
11639 (struct process_info): Rename to ...
11640 (struct lwp_info): ... this.
11641 (all_processes): Rename to ...
11642 (all_lwps): ... this.
11643 * proc-service.c (ps_lgetregs): Adjust.
11644 * thread-db.c (thread_db_create_event, find_one_thread)
11645 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11646
11647 2009-03-14 Pedro Alves <pedro@codesourcery.com>
11648
11649 * server.c (handle_query): Handle "qAttached".
11650
11651 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11652
11653 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11654 GPLv3, update license URL.
11655
11656 2009-03-01 Doug Evans <dje@google.com>
11657
11658 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
11659 (server_h): Add gdb_signals.h.
11660 (signals.o): Update.
11661 * server.h (target_signal_from_host,target_signal_to_host_p)
11662 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11663
11664 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11665
11666 * remote-utils.c (getpkt): Also generate remote-debug
11667 information if noack_mode is set.
11668
11669 2009-02-06 Pedro Alves <pedro@codesourcery.com>
11670
11671 * server.c (handle_query): Report qXfer:siginfo:read and
11672 qXfer:siginfo:write as supported and handle them.
11673 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11674 * linux-low.c (linux_xfer_siginfo): New.
11675 (linux_target_ops): Set it.
11676
11677 2009-01-26 Pedro Alves <pedro@codesourcery.com>
11678
11679 * server.c (gdbserver_usage): Mention --remote-debug.
11680 (main): Accept '--remote-debug' switch.
11681
11682 2009-01-18 Doug Evans <dje@google.com>
11683
11684 * regcache.c (new_register_cache): No need to check result of xcalloc.
11685 * server.c (handle_search_memory): Back out calls to xmalloc,
11686 result is checked and error is returned to user upon failure.
11687 (handle_query): Ditto. Add more checks for result of malloc.
11688 (handle_v_cont): Check result of malloc, report error back to
11689 user upon failure.
11690 (handle_v_run): Ditto. Call freeargv.
11691 * server.h (freeargv): Declare.
11692 * utils.c (freeargv): New fn.
11693
11694 2009-01-15 Doug Evans <dje@google.com>
11695
11696 * gdbreplay.c (perror_with_name): Make arg const char *.
11697 * server.h (target_signal_to_name): Make return type const char *.
11698 * thread-db.c (thread_db_err_str): Make return type const char *.
11699 * utils.c (perror_with_name): Make arg const char *.
11700
11701 2009-01-14 Pedro Alves <pedro@codesourcery.com>
11702
11703 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11704 when handling a EXIT_PROCESS_DEBUG_EVENT.
11705
11706 2009-01-06 Joel Brobecker <brobecker@adacore.com>
11707
11708 * gdbreplay.c (gdbreplay_version): Update copyright year.
11709 * server.c (gdbserver_version): Likewise.
11710
11711 2009-01-05 Doug Evans <dje@google.com>
11712
11713 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
11714 (handle_extended_wait): Improve comment.
11715
11716 2008-12-13 Doug Evans <dje@google.com>
11717
11718 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11719 * server.h (ATTR_MALLOC): New macro.
11720 (xmalloc,xcalloc,xstrdup): Declare.
11721 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11722 * inferiors.c: Ditto.
11723 * linux-low.c: Ditto.
11724 * mem-break.c: Ditto.
11725 * regcache.c: Ditto.
11726 * remote-utils.c: Ditto.
11727 * server.c: Ditto.
11728 * target.c: Ditto.
11729 * win32-low.c: Ditto.
11730
11731 2008-12-12 Doug Evans <dje@google.com>
11732
11733 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11734 in debugging printf.
11735
11736 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11737
11738 2008-12-09 Doug Evans <dje@google.com>
11739
11740 * linux-low.h (struct process_info): Delete member tid, unused.
11741 * thread-db.c (find_one_thread): Update.
11742 (maybe_attach_thread): Update.
11743
11744 2008-12-02 Pedro Alves <pedro@codesourcery.com>
11745
11746 * target.h (struct target_ops): Add qxfer_osdata member.
11747 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11748 and dirent.h.
11749 (linux_qxfer_osdata): New functions.
11750 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11751 callback.
11752 * server.c (handle_query): Handle "qXfer:osdata:read:".
11753 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11754 (buffer_xml_printf): New functions.
11755 * server.h (struct buffer): New.
11756 (buffer_grow_str, buffer_grow_str0): New macros.
11757 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11758 (buffer_xml_printf): Declare.
11759
11760 2008-11-24 Doug Evans <dje@google.com>
11761
11762 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11763
11764 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11765
11766 * server.c (handle_v_run): Always use the supplied argument list.
11767
11768 2008-11-19 Bob Wilson <bob.wilson@acm.org>
11769
11770 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11771 (xtensa_regmap_table): Add entry for scompare1.
11772
11773 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11774
11775 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11776 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11777 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11778 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11779 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11780 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11781 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11782 XML target descriptions.
11783 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11784 when inferior is running on an ISA 2.05 or later processor. Add
11785 special case to return offset for full 64-bit slot of FPSCR when
11786 in 32-bits.
11787
11788 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11789
11790 * Makefile.in (SFILES, clean): Added sparc64 files.
11791 (reg-sparc64.o, reg-sparc64.c): New.
11792 * configure.srv (sparc*-*-linux*): New configuration.
11793 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11794 syscall arguments for SPARC.
11795 (regsets_store_inferior_registers): Likewise.
11796 * linux-sparc-low.c: New file.
11797
11798 2008-10-21 Doug Evans <dje@google.com>
11799
11800 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11801 (READLINE_DIR,READLINE_DEP): Delete.
11802 (INTERNAL_CFLAGS): Update.
11803 (LINTFLAGS): Update.
11804
11805 2008-10-10 Pedro Alves <pedro@codesourcery.com>
11806
11807 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11808 whole argv from the last run, not just argv[0].
11809
11810 2008-09-08 Pedro Alves <pedro@codesourcery.com>
11811
11812 * regcache.c (new_register_cache): Return NULL if the register
11813 cache size isn't known yet.
11814 (free_register_cache): Avoid dereferencing a NULL regcache.
11815
11816 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11817
11818 * configure.srv: Merge MIPS and MIPS64.
11819
11820 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11821
11822 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11823
11824 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
11825
11826 * Makefile.in: Add required vsx dependencies.
11827
11828 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11829 Declare init_registers_powerpc_vsx32l.
11830 Declare init_registers_powerpc_vsx64l.
11831 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11832 (ppc_arch_setup): Check for VSX in hwcap.
11833 (ppc_fill_vsxregset): New function.
11834 (ppc_store_vsxregset): New function.
11835 Add new VSX entry in regset_info target_regsets.
11836
11837 * configure.srv: Add new VSX dependencies.
11838
11839 2008-08-12 Pedro Alves <pedro@codesourcery.com>
11840
11841 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11842 (remote_open): Set or clear transport_is_reliable.
11843 (putpkt_binary): Don't expect acks in noack mode.
11844 (getpkt): Don't send ack/nac in noack mode.
11845 * server.c (handle_general_set): Handle QStartNoAckMode.
11846 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11847 qSupported.
11848 (main): Reset noack_mode on every connection.
11849 * server.h (noack_mode): Declare.
11850
11851 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11852
11853 * Makefile.in (GDBREPLAY_OBS): New variable.
11854 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11855
11856 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11857 Daniel Jacobowitz <dan@codesourcery.com>
11858
11859 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11860 (usr_store_inferior_registers): Likewise.
11861 (regsets_store_inferior_registers): Likewise.
11862
11863 2008-07-31 Rolf Jansen <rj@surtec.com>
11864 Pedro Alves <pedro@codesourcery.com>
11865
11866 * configure.ac: Check for memmem declaration.
11867 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11868 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11869 (disable_packet_qfThreadInfo): Unconditionally compile.
11870 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11871 * configure, config.in: Regenerate.
11872
11873 2008-07-28 Doug Kwan <dougkwan@google.com>
11874
11875 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11876 (linux_write_memory): Remove declaration of errno.
11877
11878 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11879
11880 * linux-low.c (handle_extended_wait): Do not use "status"
11881 variable uninitialized.
11882
11883 2008-07-07 Pedro Alves <pedro@codesourcery.com>
11884
11885 * server.c (handle_v_attach): Inhibit reporting dll changes.
11886
11887 2008-06-27 Pedro Alves <pedro@codesourcery.com>
11888
11889 * remote-utils.c (prepare_resume_reply): If requested, don't
11890 output "thread:TID" in the T stop reply.
11891
11892 * server.c (disable_packet_vCont, disable_packet_Tthread)
11893 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11894 (handle_query): If requested, disable support for qC, qfThreadInfo
11895 and qsThreadInfo.
11896 (handle_v_requests): If requested, disable support for vCont.
11897 (gdbserver_show_disableable): New.
11898 (main): Handle --disable-packet and --disable-packet=LIST.
11899
11900 * server.h (disable_packet_vCont, disable_packet_Tthread)
11901 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11902
11903 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11904
11905 * server.c (gdbserver_usage): Mention --version.
11906
11907 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11908
11909 * Makefile.in (gdbreplay.o): New rule.
11910
11911 2008-06-06 Joseph Myers <joseph@codesourcery.com>
11912
11913 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11914 message, not gdbserver.
11915
11916 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
11917 Nathan Sidwell <nathan@codesourcery.com>
11918 Joseph Myers <joseph@codesourcery.com>
11919
11920 * acinclude.m4: Include ../../config/acx.m4.
11921 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11922 * configure, config.in: Regenerate.
11923 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11924 * server.c (gdbserver_version): Print PKGVERSION.
11925 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11926 (main): Adjust gdbserver_usage calls.
11927 * gdbreplay.c (version, host_name): Add declarations.
11928 (gdbreplay_version, gdbreplay_usage): New.
11929 (main): Accept --version and --help options.
11930
11931 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11932
11933 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11934 (arm_breakpoint_at): Handle Thumb.
11935 (the_low_target): Add comment.
11936
11937 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11938
11939 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11940
11941 2008-05-09 Doug Evans <dje@google.com>
11942
11943 * server.h (decode_search_memory_packet): Declare.
11944 * remote-utils.c (decode_search_memory_packet): New fn.
11945 * server.c (handle_search_memory_1): New fn.
11946 (handle_search_memory): New fn.
11947 (handle_query): Process qSearch:memory packets.
11948
11949 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11950
11951 * regcache.c (registers_length): Remove.
11952 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11953 full register packet.
11954 * regcache.h (registers_length): Remove prototype.
11955 * server.h (PBUFSIZ): Define to 16384.
11956
11957 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11958
11959 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11960 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11961 powerpc-64l.o, and powerpc-altivec64l.o.
11962 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11963 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11964 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11965 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11966 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11967 to srv_xmlfiles.
11968
11969 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11970 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11971 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11972 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11973 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11974 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11975 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11976 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11977 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11978 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11979 (clean): Update.
11980
11981 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11982 (init_registers_powerpc_32l): ... this new prototype.
11983 (init_registers_powerpc_32): Remove, replace by ...
11984 (init_registers_powerpc_altivec32l): ... this new prototype.
11985 (init_registers_powerpc_e500): Remove, replace by ...
11986 (init_registers_powerpc_e500l): ... this new prototype.
11987 (init_registers_ppc64): Remove, replace by ...
11988 (init_registers_powerpc_64l): ... this new prototype.
11989 (init_registers_powerpc_64): Remove, replace by ...
11990 (init_registers_powerpc_altivec64l): ... this new prototype.
11991 (ppc_num_regs): Set to 73.
11992 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11993 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11994 (ppc_cannot_store_register): Handle orig_r3 and trap.
11995 (ppc_arch_setup): Update init_registers_... calls.
11996 (ppc_fill_gregset): Handle orig_r3 and trap.
11997
11998 * inferiors.c (clear_inferiors): Reset current_inferior.
11999
12000 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12001
12002 * acinclude.m4: Add override.m4.
12003 * configure: Regenerate.
12004
12005 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12006
12007 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12008 initial call to init_register_ppc64.
12009
12010 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12011
12012 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12013 single powerpc*-*-linux* case.
12014 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12015
12016 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12017
12018 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12019 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12020 from reg_xmlfiles.
12021 * linux-ppc-low.c: Include <elf.h>.
12022 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12023 (ppc_hwcap): New global variable.
12024 (ppc_regmap): Remove __SPE__ #ifdef sections.
12025 (ppc_regmap_e500): New global variable.
12026 (ppc_cannot_store_register): Update __SPE__ special case.
12027 (ppc_get_hwcap): New function.
12028 (ppc_arch_setup): Use it to determine whether inferior supports
12029 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12030 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12031 Do not access registers if target does not support AltiVec.
12032 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12033 Do not access registers if target does not support SPE.
12034 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12035
12036 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12037
12038 * linux-low.c (disabled_regsets, num_regsets): New.
12039 (use_regsets_p): Delete.
12040 (linux_wait_for_process): Clear disabled_regsets.
12041 (regsets_fetch_inferior_registers): Check and set it.
12042 (regsets_store_inferior_registers): Likewise.
12043 (linux_fetch_registers, linux_store_registers): Do not use
12044 use_regsets_p.
12045 (initialize_low): Allocate disabled_regsets.
12046
12047 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12048
12049 * Makefile.in (LIBOBJS): New.
12050 (OBS): Use LIBOBJS.
12051 (memmem.o): New rule.
12052 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12053 * configure: Regenerated.
12054
12055 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12056
12057 * server.c (handle_query): Never return "unsupported" for
12058 qXfer:features:read queries.
12059
12060 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12061
12062 * server.c (get_features_xml): Fix inverted condition.
12063 (handle_query): Always support qXfer:feature:read.
12064
12065 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12066
12067 * server.c (wrapper_argv): New.
12068 (start_inferior): Handle wrapper_argv. If set, expect an extra
12069 trap.
12070 (gdbserver_usage): Document --wrapper.
12071 (main): Parse --wrapper.
12072
12073 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12074
12075 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12076 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12077 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12078 (ppc_set_pc): Likewise.
12079 (ppc_arch_setup): New function.
12080 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12081 of collect_register.
12082 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12083
12084 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12085
12086 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12087 instead of linux-ppc64-low.o.
12088 * linux-ppc64-low.c: Remove file.
12089 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12090 (linux-ppc64-low.o): Remove rule.
12091
12092 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12093 (init_registers_powerpc_64): Likewise.
12094 (ppc_regmap): Conditionally define depending on __powerpc64__.
12095 (ppc_cannot_store_register): Do not special-case "fpscr" when
12096 compiled on __powerpc64__.
12097 (ppc_collect_ptrace_register): New function.
12098 (ppc_supply_ptrace_register): New function.
12099 (ppc_breakpoint): Change type to "unsigned int".
12100 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12101 (the_low_target): Conditionally provide initializers for the
12102 arch_setup member depending on __powerpc64__. Install
12103 collect_ptrace_register and supply_ptrace_register members.
12104
12105 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12106
12107 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12108 * server.c (gdbserver_xmltarget): Define.
12109 (get_features_xml): Use it to replace "target.xml" and arch_string.
12110
12111 * configure.srv: Remove srv_xmltarget. Add XML files that were
12112 mentioned there to srv_xmlfiles instead. Remove conditional tests
12113 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12114 srv_xmlfiles and srv_regobj to include all possible choices.
12115 * configure.ac (srv_xmltarget): Remove.
12116 (srv_xmlfiles): Do not add "target.xml".
12117 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12118 checks for supplementary target information.
12119 * configure: Regenerate.
12120 * Makefile.in (XML_TARGET): Remove.
12121 (target.xml): Remove rule.
12122 (clean): Do not clean up target.xml.
12123 (.PRECIOUS): Do not mention target.xml.
12124
12125 * target.h (struct target_ops): Remove arch_string member.
12126 * linux-low.c (linux_arch_string): Remove.
12127 (linux_target_ops): Remove arch_string initializer.
12128 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12129 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12130 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12131 * spu-low.c (spu_arch_string): Remove.
12132 (spu_target_ops): Remove arch_string initializer.
12133 * win32-low.c (win32_arch_string): Remove.
12134 (win32_target_ops): Remove arch_string initializer.
12135 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12136 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12137 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12138
12139 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12140
12141 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12142 by collect_ptrace_register and supply_ptrace_register hooks.
12143 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12144 instead of checking for the_low_target.left_pad_xfer.
12145 (usr_store_inferior_registers): Use collect_ptrace_register callback
12146 instead of checking for the_low_target.left_pad_xfer.
12147
12148 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12149 (s390_supply_ptrace_register): Likewise.
12150 (s390_fill_gregset): Call s390_collect_ptrace_register.
12151 (the_low_target): Update.
12152
12153 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12154 (ppc_supply_ptrace_register): Likewise.
12155 (the_low_target): Update.
12156
12157 * linux-i386-low.c (the_low_target): Update.
12158 * linux-x86-64-low.c (the_low_target): Update.
12159
12160 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12161
12162 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12163 reg-s390.o and reg-s390x.o.
12164
12165 * linux-low.c (new_inferior): New global variable.
12166 (linux_create_inferior, linux_attach): Set it.
12167 (linux_wait_for_process): Call the_low_target.arch_setup after the
12168 target has stopped for the first time.
12169 (initialize_low): Do not call the_low_target.arch_setup.
12170
12171 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12172 (s390_set_pc): Likewise.
12173 (s390_arch_setup): New function.
12174 (the_low_target): Use s390_arch_setup as arch_setup routine.
12175
12176 * regcache.c (realloc_register_cache): New function.
12177 (set_register_cache): Call it for each existing regcache.
12178
12179 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12180
12181 * server.h (init_registers): Remove prototype.
12182
12183 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12184 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12185 instead of init_registers ().
12186 * linux-arm-low.c (init_registers_arm): Add prototype.
12187 (init_registers_arm_with_iwmmxt): Likewise.
12188 (the_low_target): Add initializer for arch_setup field.
12189 * linux-cris-low.c (init_registers_cris): Add prototype.
12190 (the_low_target): Add initializer for arch_setup field.
12191 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12192 (the_low_target): Add initializer for arch_setup field.
12193 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12194 (the_low_target): Add initializer for arch_setup field.
12195 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12196 (the_low_target): Add initializer for arch_setup field.
12197 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12198 (the_low_target): Add initializer for arch_setup field.
12199 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12200 (the_low_target): Add initializer for arch_setup field.
12201 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12202 (init_registers_mips64_linux): Likewise.
12203 (the_low_target): Add initializer for arch_setup field.
12204 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12205 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12206 (the_low_target): Add initializer for arch_setup field.
12207 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12208 (init_registers_powerpc_64): Likewise.
12209 (the_low_target): Add initializer for arch_setup field.
12210 * linux-s390-low.c (init_registers_s390): Add prototype.
12211 (init_registers_s390x): Likewise.
12212 (the_low_target): Add initializer for arch_setup field.
12213 * linux-sh-low.c (init_registers_sh): Add prototype.
12214 (the_low_target): Add initializer for arch_setup field.
12215 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12216 (the_low_target): Add initializer for arch_setup field.
12217 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12218 (the_low_target): Add initializer for arch_setup field.
12219
12220 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12221 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12222 instead of init_registers ().
12223 * win32-arm-low.c (init_registers_arm): Add prototype.
12224 (the_low_target): Add initializer for arch_setup field.
12225 * win32-i386-low.c (init_registers_i386): Add prototype.
12226 (the_low_target): Add initializer for arch_setup field.
12227
12228 * spu-low.c (init_registers_spu): Add prototype.
12229 (initialize_low): Call initialie_registers_spu () instead of
12230 initialize_registers ().
12231
12232 2008-02-19 Pedro Alves <pedro@codesourcery.com>
12233
12234 * server.c (handle_v_requests): When handling the vRun and vAttach
12235 packets, if already debugging a process, don't kill it. Return an
12236 error instead.
12237
12238 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12239
12240 * server.c (handle_query): Correct length check.
12241
12242 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12243
12244 * win32-low.c (do_initial_child_stuff): Add process handle
12245 parameter. Set current_process_handle and current_process_id from the
12246 parameters. Clear globals.
12247 (win32_create_inferior): Don't set current_process_handle and
12248 current_process_id here. Instead pass them on the call to
12249 do_initial_child_stuff.
12250 (win32_attach): Likewise.
12251 (win32_clear_inferiors): New.
12252 (win32_kill): Don't close the current process handle or the
12253 current thread handle here. Instead call win32_clear_inferiors.
12254 (win32_detach): Don't open a new handle to the process. Call
12255 win32_clear_inferiors.
12256 (win32_join): Don't rely on current_process_handle; open a new
12257 handle using the process id.
12258 (win32_wait): Call win32_clear_inferiors when the inferior process
12259 has exited.
12260
12261 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12262
12263 * server.c (monitor_show_help): Add "exit".
12264
12265 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12266
12267 * Makefile.in (SFILES): Add linux-xtensa-low.c.
12268 (clean): Add reg-xtensa.c.
12269 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12270 * configure.srv (xtensa*-*-linux*) New target.
12271 * linux-xtensa-low.c: New.
12272 * xtensa-xtregs.c: New.
12273
12274 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12275
12276 * hostio.c: Don't include errno.h.
12277 (errno_to_fileio_errno): Move to hostio-errno.
12278 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12279 error number outputting to the target->hostio_last_error callback.
12280 (hostio_packet_error): Use FILEIO_EINVAL directly.
12281 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12282 calls to hostio_error.
12283 * hostio-errno.c: New.
12284 * server.h (hostio_last_error_from_errno): Declare.
12285 * target.h (target_ops): Add hostio_last_error member.
12286 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12287 as hostio_last_error handler.
12288 * spu-low.c (spu_target_ops): Likewise.
12289 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12290 (wince_hostio_last_error): New functions.
12291 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12292 as hostio_last_error handler.
12293 (win32_target_ops) [!_WIN32_WCE]: Register
12294 hostio_last_error_from_errno as hostio_last_error handler.
12295 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12296 (hostio-errno.o): New rule.
12297 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12298 * configure.srv (srv_hostio_err_objs): New variable. Default to
12299 hostio-errno.o.
12300 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12301 * configure: Regenerate.
12302
12303 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12304
12305 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12306 (linux_kill, linux_detach): Clean up the process list.
12307 * remote-utils.c (remote_open): Improve port number parsing.
12308 (putpkt_binary, input_interrupt): Only send interrupts if the target
12309 is running.
12310 * server.c (extended_protocol): Make static.
12311 (attached): Define earlier.
12312 (exit_requested, response_needed, program_argv): New variables.
12313 (target_running): New.
12314 (start_inferior): Clear attached here.
12315 (attach_inferior): Set attached here.
12316 (require_running): Define.
12317 (handle_query): Use require_running and target_running. Implement
12318 "monitor exit".
12319 (handle_v_attach, handle_v_run): New.
12320 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12321 (gdbserver_usage): Update.
12322 (main): Redo argument parsing. Handle --debug and --multi. Handle
12323 --attach along with other options or after the port. Save
12324 program_argv. Support no initial program. Resynchronize
12325 communication with GDB after an error. Handle "monitor exit".
12326 Use require_running and target_running. Always allow the extended
12327 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12328 restart in extended mode.
12329 * README: Refer to the GDB manual. Update --attach usage.
12330
12331 2007-12-20 Andreas Schwab <schwab@suse.de>
12332
12333 * linux-low.c (STACK_SIZE): Define.
12334 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12335 (linux_test_for_tracefork): Likewise.
12336
12337 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12338
12339 * linux-low.c (linux_wait_for_event): Update messages. Do not
12340 reinsert auto-delete breakpoints.
12341 * mem-break.c (struct breakpoint): Change return type of handler to
12342 int.
12343 (set_breakpoint_at): Update handler type.
12344 (reinsert_breakpoint_handler): Return 1 instead of calling
12345 delete_breakpoint.
12346 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12347 setting a new one.
12348 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12349 * mem-break.h (set_breakpoint_at): Update handler type.
12350 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12351 * win32-low.c (auto_delete_breakpoint): New.
12352 (get_child_debug_event): Use it.
12353
12354 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12355
12356 * configure.ac: Check for pread and pwrite.
12357 * hostio.c (handle_pread): Fall back to lseek and read.
12358 (handle_pwrite): Fall back to lseek and write.
12359 * config.in, configure: Regenerated.
12360
12361 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12362
12363 * server.c (myresume): Add own_buf argument.
12364 (main): Update calls.
12365
12366 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12367
12368 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12369 * remote-utils.c (remote_open): Do not call disable_async_io.
12370 (block_async_io): Delete.
12371 (unblock_async_io): Make static.
12372 (initialize_async_io): New.
12373 * server.c (handle_v_cont): Handle async I/O here.
12374 (myresume): Likewise. Move other common resume tasks here...
12375 (main): ... from here. Call initialize_async_io. Disable async
12376 I/O before the main loop.
12377 * server.h (initialize_async_io): Declare.
12378 (block_async_io, unblock_async_io): Delete prototypes.
12379 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12380
12381 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12382
12383 * remote-utils.c (readchar): Allow binary data in received messages.
12384
12385 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12386
12387 * win32-low.c (attaching): New global.
12388 (win32_create_inferior): Clear the `attaching' global.
12389 (win32_attach): Set the `attaching' global.
12390 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12391 attaching. Only set a breakpoint at the entry point if not
12392 attaching.
12393
12394 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12395
12396 * server.c (main): Don't report dll events on the initial
12397 connection on attaches.
12398
12399 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12400
12401 * server.c (main): Relax numerical bases supported for the pid of
12402 the --attach command line argument.
12403
12404 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12405
12406 * win32-low.c (win32_attach): Call OpenProcess before
12407 DebugActiveProcess, not after. Add last error output to error
12408 call.
12409
12410 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12411
12412 * win32-low.c (win32_get_thread_context)
12413 (win32_set_thread_context): New functions.
12414 (thread_rec): Use win32_get_thread_context.
12415 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12416 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12417 field.
12418
12419 2007-12-03 Leo Zayas
12420 Pedro Alves <pedro_alves@portugalmail.pt>
12421
12422 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12423 global variables.
12424 (child_add_thread): Minor cleanup.
12425 (child_continue): Resume artificially suspended threads before
12426 calling ContinueDebugEvent.
12427 (suspend_one_thread): New.
12428 (fake_breakpoint_event): New.
12429 (get_child_debug_event): Change return type to int. Check here if
12430 gdb sent an interrupt request. If a soft interrupt was requested,
12431 fake a breakpoint event. Return 0 if there is no event to handle,
12432 and 1 otherwise.
12433 (win32_wait): Don't check here if gdb sent an interrupt request.
12434 Ensure there is a valid event to handle.
12435 (win32_request_interrupt): Add soft interruption method as last
12436 resort.
12437
12438 2007-12-03 Leo Zayas
12439 Pedro Alves <pedro_alves@portugalmail.pt>
12440
12441 * win32-low.h (win32_thread_info): Add descriptions to the
12442 structure members. Replace `suspend_count' counter by a
12443 `suspended' flag.
12444 * win32-low.c (thread_rec): Update condition of when to get the
12445 context from the inferior. Rely on ContextFlags being set if it
12446 has already been retrieved. Only suspend the inferior thread if
12447 we haven't already. Warn if that fails.
12448 (continue_one_thread): s/suspend_count/suspended/. Only call
12449 ResumeThread once. Warn if that fails.
12450
12451 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12452
12453 * win32-low.c (win32_wait): Don't read from the inferior when it
12454 has already exited.
12455
12456 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12457
12458 * Makefile.in (win32_low_h): New variable.
12459 (win32-low.o): Add dependency on $(win32_low_h).
12460 (win32-arm-low.o, win32-i386-low.o): New rules.
12461
12462 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12463
12464 * hostio.c: Correct copyright year.
12465
12466 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12467
12468 * Makefile.in (OBS): Add hostio.o.
12469 (hostio.o): New rule.
12470 * server.h (handle_vFile): Declare.
12471 * hostio.c: New file.
12472 * server.c (handle_v_requests): Take packet_len and new_packet_len
12473 for binary packets. Call handle_vFile.
12474 (main): Update call to handle_v_requests.
12475
12476 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12477
12478 * linux-low.c: Include <sched.h>.
12479
12480 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12481
12482 * linux-low.c (linux_tracefork_grandchild): New.
12483 (linux_tracefork_child): Use clone.
12484 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12485
12486 2007-10-31 Joel Brobecker <brobecker@adacore.com>
12487
12488 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12489
12490 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12491
12492 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12493
12494 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12495
12496 * inferiors.c (change_inferior_id): Delete.
12497 (add_pid_to_list, pull_pid_from_list): New.
12498 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12499 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12500 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12501 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12502 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12503 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12504 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12505 (using_threads): Always set to 1.
12506 (handle_extended_wait): New.
12507 (add_process): Do not set TID.
12508 (linux_create_inferior): Set must_set_ptrace_flags.
12509 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12510 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12511 (linux_thread_alive): Rename TID argument to LWPID.
12512 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12513 (linux_wait_for_event): Do not use TID or check using_threads. Update
12514 call to dead_thread_notify. Call handle_extended_wait.
12515 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12516 (send_sigstop): Delete sigstop_sent.
12517 (wait_for_sigstop): Avoid TID.
12518 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12519 (linux_test_for_tracefork): New.
12520 (linux_lookup_signals): Use thread_db_active and
12521 linux_supports_tracefork_flag.
12522 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12523 * linux-low.h (get_process_thread): Avoid TID.
12524 (struct process_ifo): Move thread_known and tid to the end. Remove
12525 sigstop_sent.
12526 (linux_attach_lwp, thread_db_init): Update prototypes.
12527 * server.h (change_inferior_id): Delete prototype.
12528 (add_pid_to_list, pull_pid_from_list): New prototypes.
12529 * thread-db.c (thread_db_use_events): New.
12530 (find_first_thread): Rename to...
12531 (find_one_thread): ...this. Update callers and messages. Do not
12532 call fatal. Check thread_db_use_events. Do not call
12533 change_inferior_id or new_thread_notify.
12534 (maybe_attach_thread): Update. Do not call new_thread_notify.
12535 (thread_db_init): Set thread_db_use_events. Check use_events.
12536 * utils.c (fatal, warning): Correct message prefix.
12537
12538 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12539
12540 * Makefile.in (clean): Remove new files.
12541 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12542 (powerpc-64.o, powerpc-64.c): New rules.
12543 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12544 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12545 with SPE.
12546 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12547 SPE targets.
12548 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12549 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12550 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12551 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12552 (target_regsets): Add AltiVec and SPE register sets.
12553 * configure.ac: Check for AltiVec and SPE.
12554 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12555 (ppc_fill_vrregset, ppc_store_vrregset): New.
12556 (target_regsets): Add AltiVec register set.
12557 * configure: Regenerated.
12558
12559 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12560
12561 * linux-low.c (O_LARGEFILE): Define.
12562 (linux_read_memory): Use /proc/PID/mem.
12563 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12564 * configure, config.in: Regenerated.
12565
12566 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12567
12568 * linux-low.c (linux_wait_for_event): Do not pass signals while
12569 single-stepping.
12570
12571 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12572
12573 * win32-low.c (create_process): New.
12574 (win32_create_inferior): Use create_process instead of
12575 CreateProcess. If create_process failed retry appending an ".exe"
12576 suffix. Store the GetLastError result immediatelly after
12577 create_process calls and use it on the call to error.
12578
12579 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12580
12581 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12582
12583 2007-08-23 Joel Brobecker <brobecker@adacore.com>
12584
12585 * configure.ac: Switch license to GPLv3.
12586
12587 2007-08-01 Michael Snyder <msnyder@access-company.com>
12588
12589 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12590
12591 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12592
12593 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12594 typedef.
12595 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12596 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12597 CloseToolhelp32Snapshot.
12598 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12599 CloseToolhelp32Snapshot.
12600
12601 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
12602
12603 * server.c (main): Check for inferior exit before main loop.
12604
12605 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12606
12607 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12608 instead of on tmp_desc.
12609
12610 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12611 Daniel Jacobowitz <dan@codesourcery.com>
12612
12613 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12614 (add_thread): Minor cleanups.
12615 (clear_inferiors): Move lower in the file. Clear the DLL
12616 list.
12617 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12618 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12619 (xml_escape_text): New.
12620 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12621 for qSupported.
12622 (handle_v_cont): Report errors.
12623 (gdbserver_version): Update.
12624 (main): Correct size of own_buf. Do not report initial DLL events.
12625 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12626 (unloaded_dll, xml_escape_text): New.
12627 * win32-low.c (enum target_waitkind): Update comments.
12628 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12629 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12630 (win32_EnumProcessModules, win32_GetModuleInformation)
12631 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12632 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12633 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12634 (win32_Module32First, win32_Module32Next, load_toolhelp)
12635 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12636 (get_child_debug_event): Handle DLL events.
12637 (win32_wait): Likewise.
12638
12639 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12640
12641 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12642 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12643
12644 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12645
12646 * win32-low.c (handle_output_debug_string): Ignore event if not
12647 waiting.
12648
12649 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12650
12651 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12652
12653 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12654
12655 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12656
12657 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12658
12659 * inferiors.c (change_inferior_id): Add comment.
12660 * linux-low.c (check_removed_breakpoint): Add an early
12661 prototype. Improve debug output.
12662 (linux_attach): Doc update.
12663 (linux_detach_one_process, linux_detach): Clean up before releasing
12664 each process.
12665 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12666 * linux-low.h (struct process_info): Doc improvement.
12667 * mem-break.c (delete_all_breakpoints): New.
12668 * mem-break.h (delete_all_breakpoints): New prototype.
12669 * thread-db.c (find_first_thread): New.
12670 (thread_db_create_event): Call it instead of
12671 thread_db_find_new_threads. Clean up unused variables.
12672 (maybe_attach_thread): Remove first thread handling.
12673 (thread_db_find_new_threads): Use find_first_thread.
12674 (thread_db_get_tls_address): Likewise.
12675
12676 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12677
12678 * thread-db.c (thread_db_find_new_threads): Add prototype.
12679 (thread_db_create_event): Check for the main thread before adding
12680 a new thread.
12681 (maybe_attach_thread): Only enable event reporting if TID == 0.
12682 (thread_db_get_tls_address): Check for new threads.
12683
12684 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12685
12686 * linux-low.c (linux_create_inferior): Try execv before execvp.
12687 * spu-low.c (spu_create_inferior): Likewise.
12688
12689 2007-06-13 Mike Frysinger <vapier@gentoo.org>
12690
12691 * linux-low.c (linux_create_inferior): Change execv to execvp.
12692 * spu-low.c (spu_create_inferior): Likewies.
12693
12694 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12695
12696 * Makefile.in (clean): Clean new files instead of deleted ones.
12697 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12698 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12699 rules.
12700 * configure.srv: Specify XML files and new regformats for MIPS and
12701 MIPS64 GNU/Linux.
12702 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12703 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12704 an entry for the restart register.
12705 (mips_cannot_fetch_register, mips_cannot_store_register)
12706 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12707 register names to match the XML descriptions.
12708 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12709 restart register instead of $0.
12710
12711 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12712 Markus Deuling <deuling@de.ibm.com>
12713
12714 * remote-utils.c (decode_xfer_write): New function.
12715 * server.h (decode_xfer_write): Add prototype.
12716 * server.c (handle_query): Add PACKET_LEN argument. Support
12717 qXfer:spu:read and qXfer:spu:write packets.
12718 (main): Pass packet_len to handle_query.
12719 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12720 * target.h (target_ops): Add qxfer_spu.
12721
12722 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12723
12724 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12725 accessing non-seekable spufs files.
12726
12727 2007-05-16 Markus Deuling <deuling@de.ibm.com>
12728
12729 * server.c (handle_query): Add reply for qC packet.
12730
12731 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12732 Leo Zayas <lerele@champenstudios@com>
12733
12734 * server.h (check_remote_input_interrupt_request): New function.
12735 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12736 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12737 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12738 (check_remote_input_interrupt_request): New function.
12739 * server.h (check_remote_input_interrupt_request): Declare.
12740 * win32-low.c (winapi_DebugBreakProcess,
12741 winapi_GenerateConsoleCtrlEvent): New typedefs.
12742 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12743 to 250 ms.
12744 (win32_wait): Check for remote interrupt request
12745 with check_remote_input_interrupt_request.
12746 (win32_request_interrupt): New function.
12747 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12748
12749 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12750
12751 * win32-low.c (debug_registers_changed,
12752 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12753 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12754 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12755 (thread_rec): Get context using the low target.
12756 (child_add_thread): Call thread_added on the low target,
12757 which does the same thing.
12758 (regptr): Delete.
12759 (do_initial_child_stuff): Remove debug registers references.
12760 Set context using the low target. Resume threads after
12761 setting the contexts.
12762 (child_continue): Remove dead variable. Remove debug
12763 registers references.
12764 (child_fetch_inferior_registers): Go through the low target.
12765 (do_child_store_inferior_registers): Remove.
12766 (child_store_inferior_registers): Go through the low target.
12767 (win32_resume): Remove debug registers references.
12768 Set context using the low target.
12769 (handle_exception): Change return type to void. Don't record
12770 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12771 first chance exception.
12772 (get_child_debug_event): Change return type to void. Remove
12773 goto loop. Always return after waiting for debug event.
12774 (win32_wait): Convert to switch statement. Handle spurious
12775 events.
12776
12777 * win32-i386-low.c (debug_registers_changed,
12778 debug_registers_used): New.
12779 (initial_stuff): Rename to ...
12780 (i386_initial_stuff): ... this. Clear debug registers
12781 state variables.
12782 (store_debug_registers): Delete.
12783 (i386_get_thread_context): New.
12784 (load_debug_registers): Delete.
12785 (i386_set_thread_context): New.
12786 (i386_thread_added): New.
12787 (single_step): Rename to ...
12788 (i386_single_step): ... this.
12789 (do_fetch_inferior_registers): Rename to ...
12790 (i386_fetch_inferior_register): ... this.
12791 (i386_store_inferior_register): New.
12792 (the_low_target): Adapt to new interface.
12793
12794 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12795 (arm_get_thread_context): New.
12796 (arm_set_thread_context): New.
12797 (regptr): New.
12798 (do_fetch_inferior_registers): Rename to ...
12799 (arm_fetch_inferior_register): ... this.
12800 (arm_store_inferior_register): New.
12801 (arm_wince_breakpoint): Reimplement as unsigned long.
12802 (arm_wince_breakpoint_len): Define.
12803 (the_low_target): Adapt to new interface.
12804
12805 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12806 load_debug_registers. Add get_thread_context, set_thread_context,
12807 thread_added and store_inferior_register. Rename
12808 fetch_inferior_registers to fetch_inferior_register.
12809 (regptr): Remove declaration.
12810
12811 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12812
12813 * linux-low.c (linux_detach): Change return type to int. Return 0.
12814 * spu-low.c (spu_detach): Likewise.
12815
12816 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12817
12818 * target.h (target_ops): Change return type of detach to int.
12819 Add join.
12820 (join_inferior): New.
12821 * server.c (main): Don't skip detach support on mingw32.
12822 If the inferior doesn't support detaching return error.
12823 Call join_inferior instead of using waitpid.
12824 * linux-low.c (linux_join): New.
12825 (linux_target_op): Add linux_join.
12826 * spu-low.c (spu_join): New.
12827 (spu_target_ops): Add spu_join.
12828 * win32-low.c (win32_detach): Adapt to new interface.
12829 Reopen current_process_handle before detaching. Issue a child
12830 resume before detaching.
12831 (win32_join): New.
12832 (win32_target_op): Add win32_join.
12833
12834 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12835
12836 * win32-low.c (win32-attach): Fix return value.
12837 * target.h (target_ops): Describe ATTACH return values.
12838
12839 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12840
12841 * win32-low.c (GETPROCADDRESS): Define.
12842 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12843 (winapi_DebugSetProcessKillOnExit): Likewise.
12844 (win32_create_inferior): Force usage of ansi CreateProcessA.
12845 (win32_attach): Use GETPROCADDRESS.
12846 (win32_detach): Likewise.
12847
12848 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12849
12850 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12851
12852 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12853
12854 * win32-low.c: Commit leftover changes from 2007-03-29.
12855
12856 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12857
12858 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12859 fields short instead of int. Add explicit padding.
12860 (i387_cache_to_fsave): Remove unnecessary casts.
12861 (i387_fsave_to_cache): Doc fix.
12862 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12863
12864 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12865
12866 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12867 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12868
12869 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12870
12871 * configure.srv (arm*-*-mingw32ce*): Move near the other
12872 arm targets.
12873
12874 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12875
12876 * configure.ac: Add errno checking.
12877 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12878 sys/file.h and malloc.h.
12879 (AC_CHECK_DECLS): Add perror.
12880 (srv_mingwce): Handle.
12881 * configure.srv (i[34567]86-*-cygwin*): Add
12882 win32-i386-low.o to srv_tgtobj.
12883 (i[34567]86-*-mingw*): Likewise.
12884 (arm*-*-mingw32ce*): Add case.
12885 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12886 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12887 [__MINGW32CE__] (strerror): New function.
12888 [__MINGW32CE__] (errno): Define to GetLastError.
12889 [__MINGW32CE__] (COUNTOF): New macro.
12890 (remote_open): Remove extra close call.
12891 * mem-break.c (delete_breakpoint_at): New function.
12892 * mem-break.h (delete_breakpoint_at): Declare.
12893 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12894 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12895 [USE_WIN32API] (read, write): Add char* casts.
12896 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12897 * server.h: Include wincecompat.h on Windows CE.
12898 [HAVE_ERRNO_H]: Check.
12899 (perror): Declare if not declared.
12900 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12901 (perror_with_name): Remove errno declaration.
12902 * wincecompat.h: New.
12903 * wincecompat.c: New.
12904 * win32-low.h: New.
12905 * win32-arm-low.c: New.
12906 * win32-i386-low.c: New.
12907 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12908 (OUTMSG2): Make it safe.
12909 (_T): New macro.
12910 (COUNTOF): New macro.
12911 (NUM_REGS): Get it from the low target.
12912 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12913 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12914 (thread_rec): Let low target handle debug registers.
12915 (child_add_thread): Likewise.
12916 (child_init_thread_list): Likewise.
12917 (continue_one_thread): Likewise.
12918 (regptr): New.
12919 (do_child_fetch_inferior_registers): Move to ...
12920 * win32-i386-low.c: ... here, and rename to ...
12921 (do_fetch_inferior_registers): ... this.
12922 * win32-low.c (child_fetch_inferior_registers):
12923 Go through the low target.
12924 (do_child_store_inferior_registers): Use regptr.
12925 (strwinerror): New function.
12926 (win32_create_inferior): Handle Windows CE.
12927 Use strwinerror instead of strerror on Windows error
12928 codes. Add program to the error output.
12929 Don't close the main thread handle on Windows CE.
12930 (win32_attach): Use coredll.dll on Windows CE.
12931 (win32_kill): Close current process and current
12932 thread handles.
12933 (win32_detach): Use coredll.dll on Windows CE.
12934 (win32_resume): Let low target handle debug registers, and
12935 step request.
12936 (handle_exception): Add/Remove initial breakpoint. Avoid
12937 non-existant WSTOPSIG on Windows CE.
12938 (win32_read_inferior_memory): Cast to remove warning.
12939 (win32_arch_string): Go through the low target.
12940 (initialize_low): Call set_breakpoint_data with the low
12941 target's breakpoint.
12942 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12943 FOP_REGNUM, mappings): Move to ...
12944 * win32-i386-low.c: ... here.
12945 * win32-low.c (win32_thread_info): Move to ...
12946 * win32-low.h: ... here.
12947 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12948 win32-arm-low.c and wincecompat.c.
12949 (all:): Add $EXEEXT.
12950 (install-only:): Likewise.
12951 (gdbserver:): Likewise.
12952 (gdbreplay:): Likewise.
12953 * config.in: Regenerate.
12954 * configure: Regenerate.
12955
12956 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12957
12958 * win32-low.c: Rename typedef thread_info to
12959 win32_thread_info throughout.
12960
12961 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12962
12963 * win32-i386-low.c: Rename to ...
12964 * win32-low.c: ... this.
12965 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12966 * Makefile.in: Likewise.
12967
12968 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12969
12970 * remote-utils.c (monitor_output): Constify msg parameter.
12971 * server.h (monitor_output): Likewise.
12972 * win32-i386-low.c (handle_output_debug_string): New.
12973 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12974 handle_output_debug_string.
12975 (get_child_debug_event): Likewise.
12976
12977 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12978
12979 * server.c (main): Correct strtoul check.
12980
12981 2007-03-27 Jon Ringle <jon@ringle.org>
12982
12983 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12984
12985 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12986
12987 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12988
12989 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12990
12991 * terminal.h: Check HAVE_SGTTY_H.
12992
12993 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
12994
12995 * remote-utils.c (remote_open): Print out the assigned port number.
12996
12997 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12998
12999 * remote-utils.c (monitor_output): New function.
13000 * server.c (debug_threads): Define here.
13001 (monitor_show_help): New function.
13002 (handle_query): Handle qRcmd.
13003 (main): Do not handle 'd' packet.
13004 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13005 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13006 of debug_threads.
13007
13008 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13009
13010 * Makefile.in (EXEEXT): New.
13011 (clean): Use $(EXEEXT).
13012
13013 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13014
13015 * target.h (target_ops): Rename send_signal to request_interrupt,
13016 and remove enum target_signal parameter.
13017 * linux-low.c (linux_request_interrupt): Rename from
13018 linux_send_signal, and always send SIGINT.
13019 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13020 and always send SIGINT.
13021 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13022 of send_signal.
13023 (input_interrupt): Likewise.
13024
13025 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13026
13027 * server.c (get_features_xml): Check if target implemented
13028 arch_string.
13029 * win32-i386-low.c (win32_arch_string): New.
13030 (win32_target_ops): Add win32_arch_string as arch_string member.
13031
13032 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13033
13034 * spu-low.c (spu_arch_string): New.
13035 (spu_target_ops): Add spu_arch_string.
13036
13037 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13038
13039 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13040 * configure.ac: Do not check for terminal.h.
13041 * configure, config.in: Regenerated.
13042
13043 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13044
13045 * Makefile.in (OBS): Add $(XML_BUILTIN).
13046 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13047 (clean): Update.
13048 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13049 (arm-with-iwmmxt.c): New.
13050 * config.in, configure: Regenerate.
13051 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13052 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13053 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13054 (arm*-*-linux*): Add iWMMXt and regset support.
13055 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13056 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13057 (arm_store_wmmxregset, target_regsets): New.
13058 * server.c (get_features_xml): Take annex argument. Check builtin
13059 XML documents.
13060 (handle_query): Handle multiple annexes.
13061
13062 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13063
13064 * remote-utils.c [USE_WIN32API] (read, write): Define.
13065 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13066 write.
13067
13068 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13069
13070 * linux-i386-low.c (the_low_target): Set arch_string.
13071 * linux-x86-64-low.c (the_low_target): Likewise.
13072 * linux-low.c (linux_arch_string): New.
13073 (linux_target_ops): Add it.
13074 * linux-low.h (struct linux_target_ops): Add arch_string.
13075 * server.c (write_qxfer_response): Use const void * for DATA.
13076 (get_features_xml): New.
13077 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13078 * target.h (struct target_ops): Add arch_string method.
13079
13080 2007-01-03 Denis Pilat <denis.pilat@st.com>
13081 Daniel Jacobowitz <dan@codesourcery.com>
13082
13083 * linux-low.c (linux_kill): Handle being called with no threads.
13084 * win32-i386-low.c (win32_kill): Likewise.
13085 (get_child_debug_event): Clear current_process_handle.
13086
13087 2006-12-30 Denis PILAT <denis.pilat@st.com>
13088 Daniel Jacobowitz <dan@codesourcery.com>
13089
13090 * remote-utils.c (remote_open): Check the type of specified
13091 serial port devices before opening them.
13092 * server.c (main): Kill the inferior if an error occurs during
13093 the first remote_open.
13094
13095 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13096
13097 * README: Update supported targets.
13098
13099 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13100
13101 * Makefile.in (clean): Remove reg-mips64.c.
13102 (reg-mips64.c, reg-mips64.o): New rules.
13103 * configure.srv: Handle mips64. Include regset support for mips.
13104 * linux-mips-low.c (union mips_register): New.
13105 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13106 (mips_breakpoint, mips_breakpoint_at): Use int.
13107 (mips_collect_register, mips_supply_register)
13108 (mips_collect_register_32bit, mips_supply_register_32bit)
13109 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13110 (mips_store_fpregset, target_regsets): New.
13111 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13112
13113 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13114
13115 * configure.srv: Add target "spu*-*-*".
13116 * Makefile.in (clean): Remove reg-spu.c.
13117 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13118 * spu-low.c: New file.
13119
13120 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13121
13122 * configure.ac: Correct td_thr_tls_get_addr test.
13123 * configure: Regenerated.
13124
13125 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13126
13127 * linux-low.c (linux_wait_for_event): Reformat. Use the
13128 pass_signals array.
13129 * remote-utils.c (decode_address_to_semicolon): New.
13130 * server.c (pass_signals, handle_general_set): New.
13131 (handle_query): Mention QPassSignals for qSupported.
13132 (main): Call handle_general_set.
13133 * server.h (pass_signals, decode_address_to_semicolon): New.
13134
13135 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13136
13137 * server.c (handle_query): Correct error handling for read_auxv.
13138
13139 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13140
13141 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13142 and srv_linux_thread_db to yes.
13143 * linux-s390-low.c (s390_fill_gregset): New function.
13144 (target_regsets): Define data structure.
13145
13146 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13147
13148 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13149 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13150 * config.in, configure: Regenerated.
13151 * inferiors.c (gdb_id_to_thread): New function.
13152 (gdb_id_to_thread_id): Use it.
13153 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13154 * linux-low.h (struct process_info): Add th member.
13155 (thread_db_get_tls_address): New prototype.
13156 * remote-utils.c (decode_address): Make non-static.
13157 * server.c (handle_query): Handle qGetTLSAddr.
13158 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13159 * target.h (struct target_ops): Add get_tls_address.
13160 * thread-db.c (maybe_attach_thread): Save the thread handle.
13161 (thread_db_get_tls_address): New.
13162
13163 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13164
13165 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13166 (linux_resume_one_process): Take a siginfo_t *. Update all
13167 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13168 (struct pending_signals): Add a siginfo_t.
13169 (linux_wait_for_process): Always set last_status.
13170 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13171 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13172 * linux-low.h (struct process_info): Add last_status.
13173
13174 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13175
13176 * remote-utils.c (try_rle): New function.
13177 (putpkt_binary): Use it.
13178
13179 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13180
13181 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13182 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13183 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13184 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13185 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13186 point registers.
13187
13188 2006-08-08 Richard Sandiford <richard@codesourcery.com>
13189
13190 * server.c (terminal_fd): New variable.
13191 (old_foreground_pgrp): Likewise.
13192 (restore_old_foreground_pgrp): New function.
13193 (start_inferior): Record the terminal file descriptor in terminal_fd
13194 and its original foreground group in old_foreground_pgrp. Register
13195 restore_old_foreground_pgrp with atexit().
13196
13197 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13198
13199 * server.c (handle_query): Correct qPart to qXfer.
13200
13201 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13202
13203 * configure.ac: Check for more headers which are missing on
13204 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13205 * configure.srv: Add Cygwin and mingw32.
13206 * remote-utils.c: Don't include headers unconditionally which
13207 are missing on mingw32. Include <winsock.h> for mingw32.
13208 (remote_open): Adjust for mingw32 support. Flush
13209 standard error after writing to it.
13210 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13211 (unblock_async_io, enable_async_io, disable_async_io)
13212 (readchar, getpkt): Update for Winsock support.
13213 (prepare_resume_reply): Expect a protocol signal number.
13214 * server.c: Disable <sys/wait.h> on mingw32.
13215 (start_inferior): Adjust for mingw32 support. Flush
13216 standard error after writing to it.
13217 (attach_inferior): Likewise. Use protocol signal
13218 numbers.
13219 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13220 and names.
13221 * win32-i386-low.c: New file.
13222 * Makefile.in (XM_CLIBS): Set.
13223 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13224 (win32-i386-low.o): New dependency rule.
13225 * linux-low.c (linux_wait): Use target signal numbers.
13226 * target.h (struct target_ops): Doc fix.
13227 * server.h (target_signal_to_name): New prototype.
13228 * gdbreplay.c: Don't include headers unconditionally which
13229 are missing on mingw32. Include <winsock.h> for mingw32.
13230 (remote_close, remote_open): Adjust for Winsock support.
13231 * configure, config.in: Regenerated.
13232
13233 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13234
13235 * server.c (decode_xfer_read, write_qxfer_response): New.
13236 (handle_query): Take a packet length argument. Handle
13237 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13238 the qSupported response.
13239 (main): Update call to handle_query.
13240
13241 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13242
13243 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13244 (putpkt_binary): Renamed from putpkt and adjusted for binary
13245 data.
13246 (putpkt): New wrapper for putpkt_binary.
13247 (readchar): Don't mask off the high bit.
13248 (decode_X_packet): New function.
13249 * server.c (main): Call putpkt_binary if a handler sets the packet
13250 length. Save the length of the incoming packet. Handle 'X'.
13251 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13252
13253 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13254
13255 * server.c (handle_query): Handle qSupported.
13256
13257 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13258
13259 * remote-utils.c (all_symbols_looked_up): New variable.
13260 (look_up_one_symbol): Check it.
13261 * server.h (look_up_one_symbol): New declaration.
13262 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13263
13264 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13265
13266 * Makefile.in (linux-arm-low.o): Update dependencies.
13267 * linux-arm-low.c: Include "gdb_proc_service.h".
13268 (PTRACE_GET_THREAD_AREA): Define.
13269 (ps_get_thread_area): New function.
13270
13271 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13272
13273 * configure.srv (m68k*-*-uclinux*): New target.
13274 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13275 (linux_resume_one_process): Remove extraneous cast.
13276 (linux_read_offsets): New.
13277 (linux_target_op): Add linux_read_offsets on mmuless systems.
13278 * server.c (handle_query): Add qOffsets logic.
13279 * target.h (struct target_ops): Add read_offsets.
13280
13281 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13282
13283 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13284 (PTRACE_GET_THREAD_AREA): Define.
13285 (ps_get_thread_area): New function.
13286 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13287 (linux-x86-64-low.o): Update.
13288
13289 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13290
13291 * configure.ac: Remove checks for prfpregset_t.
13292 * gdb_proc_service.h: New file.
13293 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13294 new "gdb_proc_service.h".
13295 * proc-service.c: Likewise.
13296 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13297 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13298 * Makefile.in (gdb_proc_service_h): Updated.
13299 * configure, config.in: Regenerated.
13300
13301 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13302
13303 * remote-utils.c (prepare_resume_reply): Move declaration
13304 of gdb_id_from_wait to the top of the block.
13305
13306 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13307
13308 * linux-low.c (regsets_store_inferior_registers): Read the regset
13309 from the target before filling it.
13310
13311 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13312
13313 * server.c (attach_inferior): Return SIGTRAP for a successful
13314 attach.
13315
13316 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13317
13318 * Makefile.in (OBS): Add version.o.
13319 (STAGESTUFF): Delete.
13320 (version.o): Add dependencies.
13321 (version.c): Replace rule.
13322 (clean): Remove version.c.
13323 * server.c (gdbserver_version): New.
13324 (gdbserver_usage): Use printf.
13325 (main): Handle --version and --help.
13326 * server.h (version, host_name): Add declarations.
13327
13328 2005-12-23 Eli Zaretskii <eliz@gnu.org>
13329
13330 * linux-arm-low.c:
13331 * linux-arm-low.c:
13332 * inferiors.c:
13333 * i387-fp.h:
13334 * i387-fp.c:
13335 * gdbreplay.c:
13336 * regcache.c:
13337 * proc-service.c:
13338 * mem-break.h:
13339 * mem-break.c:
13340 * linux-x86-64-low.c:
13341 * linux-sh-low.c:
13342 * linux-s390-low.c:
13343 * linux-ppc64-low.c:
13344 * linux-ppc-low.c:
13345 * linux-mips-low.c:
13346 * linux-m68k-low.c:
13347 * linux-m32r-low.c:
13348 * linux-low.h:
13349 * linux-low.c:
13350 * linux-ia64-low.c:
13351 * linux-i386-low.c:
13352 * linux-crisv32-low.c:
13353 * thread-db.c:
13354 * terminal.h:
13355 * target.h:
13356 * target.c:
13357 * server.h:
13358 * server.c:
13359 * remote-utils.c:
13360 * regcache.h:
13361 * utils.c:
13362 * Makefile.in:
13363 * configure.ac:
13364 * gdbserver.1: Add (C) after Copyright. Update the FSF
13365 address.
13366
13367 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13368
13369 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13370 (arm_breakpoint_at): Recognize both breakpoints.
13371 (the_low_target): Use the correct breakpoint instruction.
13372
13373 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13374
13375 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13376 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13377 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13378 (the_low_target): Update.
13379
13380 2005-10-25 Andreas Schwab <schwab@suse.de>
13381
13382 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13383
13384 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13385 (ia64_num_regs): Reduce to 462.
13386
13387 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13388
13389 * acinclude.m4: Correct quoting.
13390 * aclocal.m4: Regenerated.
13391
13392 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13393 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13394 (thread_db_init): Call thread_db_err_str.
13395 * configure.ac: Check for TD_VERSION.
13396 * config.in, configure: Regenerated.
13397
13398 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13399
13400 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13401
13402 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13403
13404 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13405 is not available. Define HAVE_PTRACE_GETREGS if it is.
13406 * config.in, configure: Regenerated.
13407 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13408 * linux-i386-low.c, linux-m68k-low.c: Update to use
13409 HAVE_PTRACE_GETREGS.
13410 * linux-low.c (regsets_fetch_inferior_registers)
13411 (regsets_store_inferior_registers): Only return 0 if we processed
13412 GENERAL_REGS.
13413 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13414 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13415
13416 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13417
13418 * inferiors.c (struct thread_info): Add gdb_id.
13419 (add_thread): Add gdb_id argument.
13420 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13421 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13422 calls to add_thread.
13423 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13424 * server.c (handle_query): Use thread_to_gdb_id.
13425 (handle_v_cont, main): Use gdb_id_to_thread_id.
13426 * server.h (add_thread): Update prototype.
13427 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13428 prototypes.
13429
13430 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13431
13432 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13433 left-padded registers.
13434 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13435 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13436
13437 2005-07-01 Steve Ellcey <sje@cup.hp.com>
13438
13439 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13440 * configure: Regenerate.
13441 * config.in: Regenerate.
13442 * server.h (NEED_DECLARATION_STRERROR):
13443 Replace with !HAVE_DECL_STRERROR.
13444
13445 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13446
13447 * linux-low.c (linux_wait, linux_send_signal): Don't test
13448 an unsigned long variable for > 0 if it could be MAX_ULONG.
13449 * server.c (myresume): Likewise.
13450 * target.c (set_desired_inferior): Likewise.
13451
13452 2005-06-13 Mark Kettenis <kettenis@gnu.org>
13453
13454 * configure.ac: Simplify and improve check for socklen_t.
13455 * configure, config.in: Regenerate.
13456
13457 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13458
13459 * acconfig.h: Remove.
13460 * configure.ac: Add a test for socklen_t. Use three-argument
13461 AC_DEFINE throughout.
13462 * config.in: Regenerated using autoheader 2.59.
13463 * configure: Regenerated.
13464
13465 * gdbreplay.c (socklen_t): Provide a default.
13466 (remote_open): Use socklen_t.
13467 * remote-utils.c (socklen_t): Provide a default.
13468 (remote_open): Use socklen_t.
13469 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13470 unsigned char.
13471
13472 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13473 char for buffers.
13474 * linux-low.c (linux_read_memory, linux_write_memory)
13475 (linux_read_auxv): Likewise.
13476 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13477 (check_mem_write): Likewise.
13478 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13479 Likewise.
13480 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13481 (registers_from_string, register_data): Likewise.
13482 * server.c (handle_query, main): Likewise.
13483 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13484 (decode_M_packet): Likewise.
13485 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13486 * target.h (struct target_ops): Update read_memory, write_memory,
13487 and read_auxv.
13488 (read_inferior_memory, write_inferior_memory): Update.
13489 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13490 to unsigned char *.
13491 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13492 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13493 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13494 linux-s390-low.c, linux-sh-low.c: Update for changes in
13495 read_inferior_memory and the_low_target->breakpoint.
13496
13497 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13498
13499 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13500 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13501 * configure.srv: Add powerpc64-*-linux*.
13502 * linux-ppc64-low.c: New file.
13503
13504 2005-05-23 Orjan Friberg <orjanf@axis.com>
13505
13506 * linux-cris-low.c: New file with support for CRIS.
13507 * linux-crisv32-low.c: Ditto for CRISv32.
13508 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13509 (clean): Add reg-cris.c and reg-crisv32.c.
13510 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
13511 reg-crisv32.o, and reg-crisv32.c to make rules.
13512 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13513 recognized targets.
13514
13515 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13516
13517 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13518 of sizeof (PTRACE_XFER_TYPE).
13519 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13520
13521 2005-05-12 Orjan Friberg <orjanf@axis.com>
13522
13523 * target.h (struct target_ops): Add insert_watchpoint,
13524 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13525 pointers for hardware watchpoint support.
13526 * linux-low.h (struct linux_target_ops): Ditto.
13527 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13528 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13529 to linux_target_ops.
13530 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13531 reply packet.
13532 * server.c (main): Recognize 'Z' and 'z' packets.
13533
13534 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13535
13536 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13537 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13538 (the_low_target): Add new members.
13539
13540 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13541
13542 * proc-service.c (ps_lgetregs): Search all_processes instead of
13543 all_threads.
13544
13545 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13546
13547 * server.c (start_inferior): Change return type to int.
13548 (attach_inferior): Change sigptr to int *.
13549 (handle_v_cont, handle_v_requests): Change signal to int *.
13550 (main): Change signal to int.
13551
13552 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
13553
13554 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13555 * configure.srv: Add m32r*-*-linux*.
13556 * linux-m32r-low.c: New file.
13557
13558 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13559
13560 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13561
13562 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13563
13564 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13565 Take unsigned long arguments for PIDs.
13566 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13567 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13568 (wait_for_sigstop, linux_resume_one_process)
13569 (regsets_fetch_inferior_registers, linux_send_signal)
13570 (linux_read_auxv): Likewise. Update the types of variables holding
13571 PIDs. Update format string specifiers.
13572 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13573 * remote-utils.c (prepare_resume_reply): Likewise.
13574 * server.c (cont_thread, general_thread, step_thread)
13575 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13576 unsigned long.
13577 (handle_query): Update format specifiers.
13578 (handle_v_cont, main): Use strtoul for thread IDs.
13579 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13580 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13581 (general_thread, step_thread, thread_from_wait)
13582 (old_thread_from_wait): Update.
13583 * target.h (struct thread_resume): Use unsigned long for THREAD.
13584 (struct target_ops): Use unsigned long for arguments to attach and
13585 thread_alive.
13586
13587 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13588
13589 * acinclude.m4: Include bfd/bfd.m4 directly.
13590 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13591 <agriffis@toolchain.org>.
13592 * aclocal.m4, configure: Regenerated.
13593
13594 2005-01-07 Andrew Cagney <cagney@gnu.org>
13595
13596 * configure.ac: Rename configure.in, require autoconf 2.59.
13597 * configure: Re-generate.
13598
13599 2004-12-08 Daniel Jacobowitz <dan@debian.org>
13600
13601 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13602 LIBS when finished.
13603 * aclocal.m4: Regenerated.
13604 * configure: Regenerated.
13605
13606 2004-11-21 Andreas Schwab <schwab@suse.de>
13607
13608 * linux-m68k-low.c (m68k_num_gregs): Define.
13609 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13610 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13611 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13612 (m68k_breakpoint_at): New. Add to the_low_target.
13613
13614 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13615 srv_linux_thread_db to yes.
13616
13617 2004-10-20 Joel Brobecker <brobecker@gnat.com>
13618
13619 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13620 (ARCH_SET_FS): Likewise.
13621 (ARCH_GET_FS): Likewise.
13622 (ARCH_GET_GS): Likewise.
13623
13624 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13625
13626 * linux-i386-low.c (ps_get_thread_area): New.
13627 * linux-x86-64-low.c (ps_get_thread_area): New.
13628 * linux-low.c: Include <sys/syscall.h>.
13629 (linux_kill_one_process): Don't kill the first thread here.
13630 (linux_kill): Kill the first thread here.
13631 (kill_lwp): New function.
13632 (send_sigstop, linux_send_signal): Use it.
13633 * proc-service.c: Clean up #ifdefs.
13634 (fpregset_info): Delete.
13635 (ps_lgetregs): Update and enable implementation.
13636 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13637 implementations.
13638 * remote-utils.c (struct sym_cache, symbol_cache): New.
13639 (input_interrupt): Print a clearer message.
13640 (async_io_enabled): New variable.
13641 (enable_async_io, disable_async_io): Use it. Update comments.
13642 (look_up_one_symbol): Use the symbol cache.
13643 * thread-db.c (thread_db_look_up_symbols): New function.
13644 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13645
13646 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13647
13648 * configure.in: Test for -rdynamic.
13649 * configure: Regenerated.
13650 * Makefile (INTERNAL_LDFLAGS): New.
13651 (gdbserver, gdbreplay): Use it.
13652
13653 2004-09-02 Andrew Cagney <cagney@gnu.org>
13654
13655 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13656
13657 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
13658
13659 * linux-low.c (linux_wait): Clear all_processes list also.
13660
13661 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13662
13663 * linux-low.c: Include <errno.h>. Remove extern declaration of
13664 errno.
13665
13666 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13667
13668 * gdbreplay.c, server.h, utils.c: Update copyright years.
13669
13670 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13671
13672 * server.c (main): Print child status or termination signal from
13673 variable 'signal', not 'sig'.
13674
13675 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13676
13677 * linux-low.c (linux_read_memory): Change return type to
13678 int. Check for and return error from ptrace().
13679 * target.c (read_inferior_memory): Change return type to int. Pass
13680 back return status from the_target->read_memory().
13681 * target.h (struct target_ops): Adapt *read_memory() prototype.
13682 Update comment.
13683 (read_inferior_memory): Adapt prototype.
13684 * server.c (main): Return an error packet if
13685 read_inferior_memory() returns an error.
13686
13687 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
13688
13689 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13690 Unify with other clean targets.
13691
13692 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13693
13694 * server.c (handle_v_cont): Call set_desired_inferior.
13695
13696 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13697
13698 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13699
13700 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13701
13702 * linux-low.c (linux_wait): Unblock async I/O.
13703 (linux_resume): Block and enable async I/O.
13704 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13705 * server.h (block_async_io, unblock_async_io): Add prototypes.
13706
13707 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13708
13709 * remote-utils.c (remote_open): Print a status notice after
13710 opening a TCP port.
13711 * server.c (attach_inferior): Print a status notice after
13712 attaching.
13713
13714 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13715
13716 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13717
13718 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
13719
13720 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13721 error packet.
13722 * server.c, target.h: Update copyright years.
13723
13724 2004-02-25 Roland McGrath <roland@redhat.com>
13725
13726 * target.h (struct target_ops): New member `read_auxv'.
13727 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13728 * linux-low.c (linux_read_auxv): New function.
13729 (linux_target_ops): Initialize `read_auxv' member to that.
13730
13731 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13732
13733 Committed by Jim Blandy <jimb@redhat.com>.
13734
13735 * linux-s390-low.c (s390_num_regs): Update.
13736 (s390_regmap): Remove control registers. Use __s390x__ predefine
13737 instead of GPR_SIZE to distiguish s390 and s390x targets.
13738
13739 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
13740
13741 * linux-low.c: Update copyright year.
13742 (check_removed_breakpoint): Clear pending_is_breakpoint.
13743 (linux_set_resume_request, linux_queue_one_thread)
13744 (resume_status_pending_p): New functions.
13745 (linux_continue_one_thread): Use process->resume.
13746 (linux_resume): Only resume threads if there are no pending events.
13747 * linux-low.h (struct process_info): Add resume request
13748 pointer.
13749
13750 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
13751
13752 * regcache.c (new_register_cache): Clear the allocated register
13753 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13754
13755 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
13756
13757 * linux-low.c (linux_resume): Take a struct thread_resume *
13758 argument.
13759 (linux_wait): Update call.
13760 (resume_ptr): New static variable.
13761 (linux_continue_one_thread): Renamed from
13762 linux_continue_one_process. Use resume_ptr.
13763 (linux_resume): Use linux_continue_one_thread.
13764 * server.c (handle_v_cont, handle_v_requests): New functions.
13765 (myresume): New function.
13766 (main): Handle 'v' case.
13767 * target.h (struct thread_resume): New type.
13768 (struct target_ops): Change argument of "resume" to struct
13769 thread_resume *.
13770 (myresume): Delete macro.
13771
13772 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13773
13774 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13775 (uninstall): Support DESTDIR.
13776
13777 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13778
13779 * configure.srv: Add xscale*linux copy of arm*linux entry.
13780
13781 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
13782
13783 * linux-arm-low.c (arm_reinsert_addr): New function.
13784 (the_low_target): Add arm_reinsert_addr.
13785
13786 2003-07-08 Mark Kettenis <kettenis@gnu.org>
13787
13788 * mem-break.c: Remove whitespace at end of file.
13789
13790 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
13791
13792 * configure.in: Check whether we need to prototype strerror.
13793 * server.h: Optionally prototype strerror.
13794 * gdbreplay.c (perror_with_name): Use strerror.
13795 * linux-low.c (linux_attach_lwp): Use strerror.
13796 * utils.c (perror_with_name): Use strerror.
13797 * config.in, configure: Regenerated.
13798
13799 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
13800
13801 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13802 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13803
13804 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
13805
13806 * Makefile.in (SFILES): Update.
13807 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13808 low-sun3.c: Remove files.
13809
13810 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
13811
13812 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13813 (linux_detach_one_process, linux_detach): New functions.
13814 (linux_target_ops): Add linux_detach.
13815 * server.c (main): Handle 'D' packet.
13816 * target.h (struct target_ops): Add "detach" member.
13817 (detach_inferior): Define.
13818
13819 2003-06-13 Mark Kettenis <kettenis@gnu.org>
13820
13821 From Kelley Cook <kelleycook@wideopenwest.com>:
13822 * configure.srv: Accept i[34567]86 variants.
13823
13824 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
13825
13826 * linux-low.c (linux_wait_for_event): Correct comment typos.
13827 (linux_resume_one_process): Call check_removed_breakpoint.
13828 (linux_send_signal): New function.
13829 (linux_target_ops): Add linux_send_signal.
13830 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13831 of kill.
13832 * target.h (struct target_ops): Add send_signal.
13833
13834 2003-05-29 Jim Blandy <jimb@redhat.com>
13835
13836 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13837 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13838 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13839 away part of the register's value.
13840
13841 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
13842
13843 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13844 (linux_wait_for_event, linux_init_signals): Likewise.
13845
13846 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
13847
13848 * configure.in: Check for stdlib.h.
13849 * configure: Regenerated.
13850 * config.in: Regenerated.
13851
13852 2003-01-04 Andreas Schwab <schwab@suse.de>
13853
13854 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13855
13856 2003-01-02 Andrew Cagney <ac131313@redhat.com>
13857
13858 * Makefile.in: Remove obsolete code.
13859
13860 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
13861
13862 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13863 defined(PT_FPR0_HI).
13864
13865 2002-11-17 Stuart Hughes <seh@zee2.com>
13866
13867 * linux-arm-low.c (arm_num_regs): Increase.
13868 (arm_regmap): Include status register.
13869
13870 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
13871
13872 * linux-low.c (register_addr): Remove incorrect -1 check.
13873
13874 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
13875
13876 * linux-low.c (linux_create_inferior): Call setpgid. Return
13877 the new PID.
13878 (unstopped_p, linux_signal_pid): Remove.
13879 (linux_target_ops): Remove linux_signal_pid.
13880 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13881 global instead of target method.
13882 * target.h (struct target_ops): Remove signal_pid. Update comment
13883 for create_inferior.
13884 * server.c (signal_pid): New variable.
13885 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
13886 gdbserver. Set the child to be the foreground process group.
13887 (attach_inferior): Set signal_pid.
13888
13889 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
13890
13891 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13892
13893 2002-08-20 Jim Blandy <jimb@redhat.com>
13894
13895 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13896 default for this.
13897
13898 2002-08-01 Andrew Cagney <cagney@redhat.com>
13899
13900 * Makefile.in: Make chill references obsolete.
13901
13902 2002-07-24 Kevin Buettner <kevinb@redhat.com>
13903
13904 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13905 * configure: Regenerate.
13906 * config.in: Regenerate.
13907
13908 2002-07-09 David O'Brien <obrien@FreeBSD.org>
13909
13910 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13911 (perror_with_name, remote_close, remote_open, expect, play): Static.
13912
13913 2002-07-04 Michal Ludvig <mludvig@suse.cz>
13914
13915 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
13916 byte offsets instead of an array of indexes.
13917 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13918
13919 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
13920
13921 * regcache.c: Add comment.
13922
13923 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
13924
13925 * thread-db.c: New file.
13926 * proc-service.c: New file.
13927 * acinclude.m4: New file.
13928 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13929 proc-service.o, and thread-db.o.
13930 (linux-low.o): Add USE_THREAD_DB.
13931 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13932 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13933 * aclocal.m4: Regenerated.
13934 * config.in: Regenerated.
13935 * configure: Regenerated.
13936 * configure.in: Check for proc_service.h, sys/procfs.h,
13937 thread_db.h, and linux/elf.h headrs.
13938 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13939 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13940 Check for -lthread_db and thread support.
13941 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13942 PowerPC, and SuperH.
13943 * i387-fp.c: Constify arguments.
13944 * i387-fp.h: Likewise.
13945 * inferiors.c: (struct thread_info): Renamed from
13946 `struct inferior_info'. Remove PID member. Use generic inferior
13947 list header. All uses updated.
13948 (inferiors, signal_pid): Removed.
13949 (all_threads): New variable.
13950 (get_thread): Define.
13951 (add_inferior_to_list): New function.
13952 (for_each_inferior): New function.
13953 (change_inferior_id): New function.
13954 (add_inferior): Removed.
13955 (remove_inferior): New function.
13956 (add_thread): New function.
13957 (free_one_thread): New function.
13958 (remove_thread): New function.
13959 (clear_inferiors): Use for_each_inferior and free_one_thread.
13960 (find_inferior): New function.
13961 (find_inferior_id): New function.
13962 (inferior_target_data): Update argument type.
13963 (set_inferior_target_data): Likewise.
13964 (inferior_regcache_data): Likewise.
13965 (set_inferior_regcache_data): Likewise.
13966 * linux-low.c (linux_bp_reinsert): Remove.
13967 (all_processes, stopping_threads, using_thrads)
13968 (struct pending_signals, debug_threads, pid_of): New.
13969 (inferior_pid): Replace with macro.
13970 (struct inferior_linux_data): Remove.
13971 (get_stop_pc, add_process): New functions.
13972 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13973 Use add_process and add_thread.
13974 (linux_attach_lwp): New function, based on old linux_attach. Use
13975 add_process and add_thread. Set stop_expected for new threads.
13976 (linux_attach): New function.
13977 (linux_kill_one_process): New function.
13978 (linux_kill): Kill all LWPs.
13979 (linux_thread_alive): Use find_inferior_id.
13980 (check_removed_breakpoints, status_pending_p): New functions.
13981 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13982 Update. Use WNOHANG. Wait for cloned processes also. Update process
13983 struct for the found process.
13984 (linux_wait_for_event): New function.
13985 (linux_wait): Use it. Support LWPs.
13986 (send_sigstop, wait_for_sigstop, stop_all_processes)
13987 (linux_resume_one_process, linux_continue_one_process): New functions.
13988 (linux_resume): Support LWPs.
13989 (REGISTER_RAW_SIZE): Remove.
13990 (fetch_register): Use register_size instead. Call supply_register.
13991 (usr_store_inferior_registers): Likewise. Call collect_register.
13992 Fix recursive case.
13993 (regsets_fetch_inferior_registers): Improve error message.
13994 (regsets_store_inferior_registers): Add debugging.
13995 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13996 (unstopped_p, linux_signal_pid): New functions.
13997 (linux_target_ops): Add linux_signal_pid.
13998 (linux_init_signals): New function.
13999 (initialize_low): Call it. Initialize using_threads.
14000 * regcache.c (inferior_regcache_data): Add valid
14001 flag.
14002 (get_regcache): Fetch registers lazily. Add fetch argument
14003 and update all callers.
14004 (regcache_invalidate_one, regcache_invalidate): New
14005 functions.
14006 (new_register_cache): Renamed from create_register_cache.
14007 Return the new regcache.
14008 (free_register_cache): Change argument to a void *.
14009 (registers_to_string, registers_from_string): Call get_regcache
14010 with fetch flag set.
14011 (register_data): Make static. Pass fetch flag to get_regcache.
14012 (supply_register): Call get_regcache with fetch flag clear.
14013 (collect_register): Call get_regcache with fetch flag set.
14014 (collect_register_as_string): New function.
14015 * regcache.h: Update.
14016 * remote-utils.c (putpkt): Flush after debug output and use
14017 stderr.
14018 Handle input interrupts while waiting for an ACK.
14019 (input_interrupt): Use signal_pid method.
14020 (getpkt): Flush after debug output and use stderr.
14021 (outreg): Use collect_register_as_string.
14022 (new_thread_notify, dead_thread_notify): New functions.
14023 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14024 and general_thread.
14025 (look_up_one_symbol): Flush after debug output.
14026 * server.c (step_thread, server_waiting): New variables.
14027 (start_inferior): Don't use signal_pid. Update call to mywait.
14028 (attach_inferior): Update call to mywait.
14029 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14030 (main): Don't fetch/store registers explicitly. Use
14031 set_desired_inferior. Support proposed ``Hs'' packet. Update
14032 calls to mywait.
14033 * server.h: Update.
14034 (struct inferior_list, struct_inferior_list_entry): New.
14035 * target.c (set_desired_inferior): New.
14036 (write_inferior_memory): Constify.
14037 (mywait): New function.
14038 * target.h: Update.
14039 (struct target_ops): New signal_pid method.
14040 (mywait): Removed macro, added prototype.
14041
14042 * linux-low.h (regset_func): Removed.
14043 (regset_fill_func, regset_store_func): New.
14044 (enum regset_type): New.
14045 (struct regset_info): Add type field. Use new operation types.
14046 (struct linux_target_ops): stop_pc renamed to get_pc.
14047 Add decr_pc_after_break and breakpoint_at.
14048 (get_process, get_thread_proess, get_process_thread)
14049 (strut process_info, all_processes, linux_attach_lwp)
14050 (thread_db_init): New.
14051
14052 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14053 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14054 (the_low_target): Add new members.
14055 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14056 (i386_store_fpxregset): Constify.
14057 (target_regsets): Add new kind identifier.
14058 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14059 (i386_set_pc): Add debugging.
14060 (i386_breakpoint_at): New function.
14061 (the_low_target): Add new members.
14062 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14063 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14064 (mips_breakpoint_at): New.
14065 (the_low_target): Add new members.
14066 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14067 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14068 (the_low_target): Add new members.
14069 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14070 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14071 (the_low_target): Add new members.
14072 * linux-x86-64-low.c (target_regsets): Add new kind
14073 identifier.
14074
14075 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14076
14077 From Martin Pool <mbp@samba.org>:
14078 * server.c (gdbserver_usage): New function.
14079 (main): Call it.
14080
14081 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14082
14083 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14084 stop_at -> stop_pc.
14085
14086 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14087
14088 * Makefile.in: Remove obsolete code.
14089
14090 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14091
14092 * linux-low.c (regsets_fetch_inferior_registers),
14093 (regsets_store_inferior_registers): Removed cast to int from
14094 ptrace() calls.
14095 * regcache.h: Added declaration of struct inferior_info.
14096
14097 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14098
14099 * inferiors.c (struct inferior_info): Add regcache_data.
14100 (add_inferior): Call create_register_cache.
14101 (clear_inferiors): Call free_register_cache.
14102 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14103 * regcache.c (struct inferior_regcache_data): New.
14104 (registers): Remove.
14105 (get_regcache): New function.
14106 (create_register_cache, free_register_cache): New functions.
14107 (set_register_cache): Don't initialize the register cache here.
14108 (registers_to_string, registers_from_string, register_data): Call
14109 get_regcache.
14110 * regcache.h: Add prototypes.
14111 * server.h: Likewise.
14112
14113 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14114
14115 * mem-break.c: New file.
14116 * mem-break.h: New file.
14117 * Makefile.in: Add mem-break.o rule; update server.h
14118 dependencies.
14119 * inferiors.c (struct inferior_info): Add target_data
14120 member.
14121 (clear_inferiors): Free target_data member if set.
14122 (inferior_target_data, set_inferior_target_data): New functions.
14123 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14124 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14125 * linux-low.c (linux_bp_reinsert): New variable.
14126 (struct inferior_linux_data): New.
14127 (linux_create_inferior): Use set_inferior_target_data.
14128 (linux_attach): Likewise. Call add_inferior.
14129 (linux_wait_for_one_inferior): New function.
14130 (linux_wait): Call it.
14131 (linux_write_memory): Add const.
14132 (initialize_low): Call set_breakpoint_data.
14133 * linux-low.h (struct linux_target_ops): Add breakpoint
14134 handling members.
14135 * server.c (attach_inferior): Remove extra add_inferior
14136 call.
14137 * server.h: Include mem-break.h. Update inferior.c
14138 prototypes.
14139 * target.c (read_inferior_memory)
14140 (write_inferior_memory): New functions.
14141 * target.h (read_inferior_memory)
14142 (write_inferior_memory): Change macros to prototypes.
14143 (struct target_ops): Update comments. Add const to write_memory
14144 definition.
14145
14146 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14147
14148 * linux-low.c (usr_store_inferior_registers): Support
14149 registers which are allowed to fail to store.
14150 * linux-low.h (linux_target_ops): Likewise.
14151 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14152 (ppc_cannot_store_register): FPSCR may not be storable.
14153
14154 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14155
14156 * server.h: Include <string.h> if HAVE_STRING_H.
14157 * ChangeLog: Correct paths in last ChangeLog entry.
14158
14159 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14160
14161 * linux-low.h: Remove obsolete prototypes.
14162 (struct linux_target_ops): New.
14163 (extern the_low_target): New.
14164 * linux-low.c (num_regs, regmap): Remove declarations.
14165 (register_addr): Use the_low_target explicitly.
14166 (fetch_register): Likewise.
14167 (usr_fetch_inferior_registers): Likewise.
14168 (usr_store_inferior_registers): Likewise.
14169 * linux-arm-low.c (num_regs): Remove.
14170 (arm_num_regs): Define.
14171 (arm_regmap): Renamed from regmap, made static.
14172 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14173 made static.
14174 (arm_cannot_store_register): Renamed from cannot_store_register,
14175 made static.
14176 (the_low_target): New.
14177 * linux-i386-low.c (num_regs): Remove.
14178 (i386_num_regs): Define.
14179 (i386_regmap): Renamed from regmap, made static.
14180 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14181 made static.
14182 (i386_cannot_store_register): Renamed from cannot_store_register,
14183 made static.
14184 (the_low_target): New.
14185 * linux-ia64-low.c (num_regs): Remove.
14186 (ia64_num_regs): Define.
14187 (ia64_regmap): Renamed from regmap, made static.
14188 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14189 made static.
14190 (ia64_cannot_store_register): Renamed from cannot_store_register,
14191 made static.
14192 (the_low_target): New.
14193 * linux-m68k-low.c (num_regs): Remove.
14194 (m68k_num_regs): Define.
14195 (m68k_regmap): Renamed from regmap, made static.
14196 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14197 made static.
14198 (m68k_cannot_store_register): Renamed from cannot_store_register,
14199 made static.
14200 (the_low_target): New.
14201 * linux-mips-low.c (num_regs): Remove.
14202 (mips_num_regs): Define.
14203 (mips_regmap): Renamed from regmap, made static.
14204 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14205 made static.
14206 (mips_cannot_store_register): Renamed from cannot_store_register,
14207 made static.
14208 (the_low_target): New.
14209 * linux-ppc-low.c (num_regs): Remove.
14210 (ppc_num_regs): Define.
14211 (ppc_regmap): Renamed from regmap, made static.
14212 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14213 made static.
14214 (ppc_cannot_store_register): Renamed from cannot_store_register,
14215 made static.
14216 (the_low_target): New.
14217 * linux-s390-low.c (num_regs): Remove.
14218 (s390_num_regs): Define.
14219 (s390_regmap): Renamed from regmap, made static.
14220 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14221 made static.
14222 (s390_cannot_store_register): Renamed from cannot_store_register,
14223 made static.
14224 (the_low_target): New.
14225 * linux-sh-low.c (num_regs): Remove.
14226 (sh_num_regs): Define.
14227 (sh_regmap): Renamed from regmap, made static.
14228 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14229 made static.
14230 (sh_cannot_store_register): Renamed from cannot_store_register,
14231 made static.
14232 (the_low_target): New.
14233 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14234 (the_low_target): New.
14235
14236 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14237
14238 * Makefile.in: Add stamp-h target.
14239 * configure.in: Create stamp-h.
14240 * configure: Regenerated.
14241
14242 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14243
14244 * inferiors.c: New file.
14245 * target.c: New file.
14246 * target.h: New file.
14247 * Makefile.in: Add target.o and inferiors.o. Update
14248 dependencies.
14249 * linux-low.c (inferior_pid): New static variable,
14250 moved from server.c.
14251 (linux_create_inferior): Renamed from create_inferior.
14252 Call add_inferior. Return 0 on success instead of a PID.
14253 (linux_attach): Renamed from myattach.
14254 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14255 (linux_thread_alive): Renamed from mythread_alive.
14256 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14257 child dies.
14258 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14259 (regsets_store_inferior_registers): Correct error message.
14260 Add missing ``return 0''.
14261 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14262 (linux_store_registers): Renamed from store_inferior_registers.
14263 (linux_read_memory): Renamed from read_inferior_memory.
14264 (linux_write_memory): Renamed from write_inferior_memory.
14265 (linux_target_ops): New structure.
14266 (initialize_low): Call set_target_ops ().
14267 * remote-utils.c (unhexify): New function.
14268 (hexify): New function.
14269 (input_interrupt): Send signals to ``signal_pid''.
14270 * server.c (inferior_pid): Remove.
14271 (start_inferior): Update create_inferior call.
14272 (attach_inferior): Call add_inferior.
14273 (handle_query): New function.
14274 (main): Call handle_query for `q' packets.
14275 * server.h: Include "target.h". Remove obsolete prototypes.
14276 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14277
14278 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14279
14280 * Makefile.in: Add WARN_CFLAGS. Update configury
14281 dependencies.
14282 * configure.in: Check for <string.h>
14283 * configure: Regenerate.
14284 * config.in: Regenerate.
14285 * gdbreplay.c: Include needed system headers.
14286 (remote_open): Remove strchr prototype.
14287 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14288 * regcache.c (supply_register): Change buf argument to const void *.
14289 (supply_register_by_name): Likewise.
14290 (collect_register): Change buf argument to void *.
14291 (collect_register_by_name): Likewise.
14292 * regcache.h: Add missing prototypes.
14293 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14294 * server.c (handle_query): New function.
14295 (attached): New static variable, moved out of main.
14296 (main): Quiet longjmp clobber warnings.
14297 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14298 * utils.c (error): Remove NORETURN.
14299 (fatal): Likewise.
This page took 0.339914 seconds and 5 git commands to generate.