Deliver signal in hardware single step
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2016-04-22  Yao Qi  <yao.qi@linaro.org>
2
3         * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4         signal when stepping over breakpoint with software single
5         step.
6
7 2016-04-21  Pedro Alves  <palves@redhat.com>
8
9         * linux-s390-low.c (s390_collect_ptrace_register)
10         (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
11         add casts.
12         (s390_check_regset): Use void * instead of gdb_byte *.
13
14 2016-04-20  Pedro Alves  <palves@redhat.com>
15
16         * configure: Renegerate.
17
18 2016-04-20  Yao Qi  <yao.qi@linaro.org>
19
20         * linux-aarch32-low.c: Include "arch/arm-linux.h".
21         (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
22         number 16.
23         (arm_store_gregset): Likewise.
24
25 2016-04-16  Walfred Tedeschi  <walfred.tedeschi@intel.com>
26
27         * Makefile.in (clean): Add removal for i386-avx-mpx.c,
28         i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
29         (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
30         (amd64-avx-mpx-linux.c): New rules.
31         (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
32         * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
33         (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
34         (srv_amd64_regobj): Add amd64-avx-mpx.o.
35         (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
36         (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
37         (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
38         (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
39         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
40         (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
41         (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
42         * linux-x86-low.c (x86_linux_read_description): Add case for
43         X86_XSTATE_AVX_MPX_MASK.
44         (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
45         (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
46         init_registers_i386_avx_mpx_linux.
47         * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
48         (initialize_low_tracepoint): Call
49         init_registers_i386_avx_mpx_linux.
50         * linux-amd64-ipa.c (get_ipa_tdesc):  Add case for avx_mpx.
51         (initialize_low_tracepoint): Call
52         init_registers_amd64_avx_mpx_linux.
53         * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
54         (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
55         (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
56         declarations.
57
58 2016-04-18  Pedro Alves  <palves@redhat.com>
59
60         * configure: Regenerate.
61
62 2016-04-13  Antoine Tremblay  <antoine.tremblay@ericsson.com>
63
64         * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
65         (aarch64_emit_sub): Likewise.
66
67 2016-04-12  Pedro Alves  <palves@redhat.com>
68
69         * utils.c (prepare_to_throw_exception): Delete.
70
71 2016-04-05  Simon Marchi  <simon.marchi@ericsson.com>
72
73         * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
74
75 2016-04-05  Marcin Kościelnicki  <koriakin@0x04.net>
76
77         * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
78
79 2016-04-03  Marcin Kościelnicki  <koriakin@0x04.net>
80
81         * linux-aarch64-ipa.c: Add <elf.h> include.
82         * linux-ppc-ipa.c: Add <elf.h> include.
83         * linux-s390-ipa.c: Add <elf.h> include.
84
85 2016-03-31  Marcin Kościelnicki  <koriakin@0x04.net>
86
87         * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
88         (get_raw_reg_ptr): Likewise.
89         (get_trace_state_variable_value_ptr): Likewise.
90         (set_trace_state_variable_value_ptr): Likewise.
91         (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
92         char *.
93
94 2016-03-31  Wei-cheng Wang  <cole945@gmail.com>
95             Marcin Kościelnicki  <koriakin@0x04.net>
96
97         PR/17221
98         * linux-ppc-low.c (emit_insns): New function.
99         (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
100         (ppc_emit_prologue): New function.
101         (ppc_emit_epilogue): New function.
102         (ppc_emit_add): New function.
103         (ppc_emit_sub): New function.
104         (ppc_emit_mul): New function.
105         (ppc_emit_lsh): New function.
106         (ppc_emit_rsh_signed): New function.
107         (ppc_emit_rsh_unsigned): New function.
108         (ppc_emit_ext): New function.
109         (ppc_emit_zero_ext): New function.
110         (ppc_emit_log_not): New function.
111         (ppc_emit_bit_and): New function.
112         (ppc_emit_bit_or): New function.
113         (ppc_emit_bit_xor): New function.
114         (ppc_emit_bit_not): New function.
115         (ppc_emit_equal): New function.
116         (ppc_emit_less_signed): New function.
117         (ppc_emit_less_unsigned): New function.
118         (ppc_emit_ref): New function.
119         (ppc_emit_const): New function.
120         (ppc_emit_reg): New function.
121         (ppc_emit_pop): New function.
122         (ppc_emit_stack_flush): New function.
123         (ppc_emit_swap): New function.
124         (ppc_emit_stack_adjust): New function.
125         (ppc_emit_call): New function.
126         (ppc_emit_int_call_1): New function.
127         (ppc_emit_void_call_2): New function.
128         (ppc_emit_if_goto): New function.
129         (ppc_emit_goto): New function.
130         (ppc_emit_eq_goto): New function.
131         (ppc_emit_ne_goto): New function.
132         (ppc_emit_lt_goto): New function.
133         (ppc_emit_le_goto): New function.
134         (ppc_emit_gt_goto): New function.
135         (ppc_emit_ge_goto): New function.
136         (ppc_write_goto_address): New function.
137         (ppc_emit_ops_impl): New static variable.
138         (ppc64v1_emit_prologue): New function.
139         (ppc64v2_emit_prologue): New function.
140         (ppc64_emit_epilogue): New function.
141         (ppc64_emit_add): New function.
142         (ppc64_emit_sub): New function.
143         (ppc64_emit_mul): New function.
144         (ppc64_emit_lsh): New function.
145         (ppc64_emit_rsh_signed): New function.
146         (ppc64_emit_rsh_unsigned): New function.
147         (ppc64_emit_ext): New function.
148         (ppc64_emit_zero_ext): New function.
149         (ppc64_emit_log_not): New function.
150         (ppc64_emit_bit_and): New function.
151         (ppc64_emit_bit_or): New function.
152         (ppc64_emit_bit_xor): New function.
153         (ppc64_emit_bit_not): New function.
154         (ppc64_emit_equal): New function.
155         (ppc64_emit_less_signed): New function.
156         (ppc64_emit_less_unsigned): New function.
157         (ppc64_emit_ref): New function.
158         (ppc64_emit_const): New function.
159         (ppc64v1_emit_reg): New function.
160         (ppc64v2_emit_reg): New function.
161         (ppc64_emit_pop): New function.
162         (ppc64_emit_stack_flush): New function.
163         (ppc64_emit_swap): New function.
164         (ppc64v1_emit_call): New function.
165         (ppc64v2_emit_call): New function.
166         (ppc64v1_emit_int_call_1): New function.
167         (ppc64v2_emit_int_call_1): New function.
168         (ppc64v1_emit_void_call_2): New function.
169         (ppc64v2_emit_void_call_2): New function.
170         (ppc64_emit_if_goto): New function.
171         (ppc64_emit_eq_goto): New function.
172         (ppc64_emit_ne_goto): New function.
173         (ppc64_emit_lt_goto): New function.
174         (ppc64_emit_le_goto): New function.
175         (ppc64_emit_gt_goto): New function.
176         (ppc64_emit_ge_goto): New function.
177         (ppc64v1_emit_ops_impl): New static variable.
178         (ppc64v2_emit_ops_impl): New static variable.
179         (ppc_emit_ops): New function.
180         (linux_low_target): Wire in ppc_emit_ops.
181
182 2016-03-31  Wei-cheng Wang  <cole945@gmail.com>
183             Marcin Kościelnicki  <koriakin@0x04.net>
184
185         PR/17221
186         * Makefile.in: Add powerpc-*-ipa.o
187         * configure.srv: Add ipa_obj for powerpc*-linux.
188         * linux-ppc-ipa.c: New file.
189         * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
190         includes.
191         (PPC_FIELD): New macro.
192         (PPC_SEXT): New macro.
193         (PPC_OP6): New macro.
194         (PPC_BO): New macro.
195         (PPC_LI): New macro.
196         (PPC_BD): New macro.
197         (init_registers_*): Move prototype to linux-ppc-tdesc.h.
198         (tdesc_*): Move declaration to linux-ppc-tdesc.h.
199         (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
200         (ppc_get_thread_area): New function.
201         (is_elfv2_inferior): New function.
202         (gen_ds_form): New function.
203         (GEN_STD): New macro.
204         (GEN_STDU): New macro.
205         (GEN_LD): New macro.
206         (GEN_LDU): New macro.
207         (gen_d_form): New function.
208         (GEN_ADDI): New macro.
209         (GEN_ADDIS): New macro.
210         (GEN_LI): New macro.
211         (GEN_LIS): New macro.
212         (GEN_ORI): New macro.
213         (GEN_ORIS): New macro.
214         (GEN_LWZ): New macro.
215         (GEN_STW): New macro.
216         (GEN_STWU): New macro.
217         (gen_xfx_form): New function.
218         (GEN_MFSPR): New macro.
219         (GEN_MTSPR): New macro.
220         (GEN_MFCR): New macro.
221         (GEN_MTCR): New macro.
222         (GEN_SYNC): New macro.
223         (GEN_LWSYNC): New macro.
224         (gen_x_form): New function.
225         (GEN_OR): New macro.
226         (GEN_MR): New macro.
227         (GEN_LWARX): New macro.
228         (GEN_STWCX): New macro.
229         (GEN_CMPW): New macro.
230         (gen_md_form): New function.
231         (GEN_RLDICL): New macro.
232         (GEN_RLDICR): New macro.
233         (gen_i_form): New function.
234         (GEN_B): New macro.
235         (GEN_BL): New macro.
236         (gen_b_form): New function.
237         (GEN_BNE): New macro.
238         (GEN_LOAD): New macro.
239         (GEN_STORE): New macro.
240         (gen_limm): New function.
241         (gen_atomic_xchg): New function.
242         (gen_call): New function.
243         (ppc_relocate_instruction): New function.
244         (ppc_install_fast_tracepoint_jump_pad): New function.
245         (ppc_get_min_fast_tracepoint_insn_len): New function.
246         (ppc_get_ipa_tdesc_idx): New function.
247         (the_low_target): Wire in the new functions.
248         (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
249         tdescs.
250         * linux-ppc-tdesc.h: New file.
251
252 2016-03-31  Marcin Kościelnicki  <koriakin@0x04.net>
253
254         * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
255         (alloc_jump_pad_buffer): New function.
256         * linux-amd64-ipa.c: Add <sys/mman.h> include.
257         (alloc_jump_pad_buffer): New function.
258         * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
259         * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
260         (alloc_jump_pad_buffer): New function.
261         * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
262         (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
263         * tracepoint.h (alloc_jump_pad_buffer): New prototype.
264         (getauxval) [!HAVE_GETAUXVAL]: New prototype.
265
266 2016-03-30  Marcin Kościelnicki  <koriakin@0x04.net>
267
268         * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
269         * linux-amd64-ipa.c: Likewise.
270         * linux-i386-ipa.c: Likewise.
271         * linux-s390-ipa.c: Likewise.
272         * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
273         ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
274         set_trace_state_variable_value_ptr.
275         (struct ipa_sym_addresses): Likewise.
276         (symbol_list): Likewise.
277         (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
278         accessing gdb_collect directly.
279         (gdb_collect_ptr_type): New typedef.
280         (get_raw_reg_ptr_type): New typedef.
281         (get_trace_state_variable_value_ptr_type): New typedef.
282         (set_trace_state_variable_value_ptr_type): New typedef.
283         (gdb_collect_ptr): New global.
284         (get_raw_reg_ptr): New global.
285         (get_trace_state_variable_value_ptr): New global.
286         (set_trace_state_variable_value_ptr): New global.
287         (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
288         accessing get_raw_reg directly.
289         (get_get_tsv_func_addr): Likewise for
290         get_trace_state_variable_value_ptr.
291         (get_set_tsv_func_addr): Likewise for
292         set_trace_state_variable_value_ptr.
293         * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
294
295 2016-03-30  Simon Marchi  <simon.marchi@ericsson.com>
296
297         * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
298
299 2016-03-30  Marcin Kościelnicki  <koriakin@0x04.net>
300
301         * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
302         packets.
303         (relocate_instruction): Remove own_buf.
304         * server.c (own_buf): Make global.
305         (handle_v_requests): Make global.
306         * server.h (own_buf): New declaration.
307         (handle_v_requests): New prototype.
308
309 2016-03-29  Marcin Kościelnicki  <koriakin@0x04.net>
310
311         PR 18377
312         * linux-s390-low.c (add_insns): New function.
313         (s390_emit_prologue): New function.
314         (s390_emit_epilogue): New function.
315         (s390_emit_add): New function.
316         (s390_emit_sub): New function.
317         (s390_emit_mul): New function.
318         (s390_emit_lsh): New function.
319         (s390_emit_rsh_signed): New function.
320         (s390_emit_rsh_unsigned): New function.
321         (s390_emit_ext): New function.
322         (s390_emit_log_not): New function.
323         (s390_emit_bit_and): New function.
324         (s390_emit_bit_or): New function.
325         (s390_emit_bit_xor): New function.
326         (s390_emit_bit_not): New function.
327         (s390_emit_equal): New function.
328         (s390_emit_less_signed): New function.
329         (s390_emit_less_unsigned): New function.
330         (s390_emit_ref): New function.
331         (s390_emit_if_goto): New function.
332         (s390_emit_goto): New function.
333         (s390_write_goto_address): New function.
334         (s390_emit_litpool): New function.
335         (s390_emit_const): New function.
336         (s390_emit_call): New function.
337         (s390_emit_reg): New function.
338         (s390_emit_pop): New function.
339         (s390_emit_stack_flush): New function.
340         (s390_emit_zero_ext): New function.
341         (s390_emit_swap): New function.
342         (s390_emit_stack_adjust): New function.
343         (s390_emit_set_r2): New function.
344         (s390_emit_int_call_1): New function.
345         (s390_emit_void_call_2): New function.
346         (s390_emit_eq_goto): New function.
347         (s390_emit_ne_goto): New function.
348         (s390_emit_lt_goto): New function.
349         (s390_emit_le_goto): New function.
350         (s390_emit_gt_goto): New function.
351         (s390_emit_ge_goto): New function.
352         (s390x_emit_prologue): New function.
353         (s390x_emit_epilogue): New function.
354         (s390x_emit_add): New function.
355         (s390x_emit_sub): New function.
356         (s390x_emit_mul): New function.
357         (s390x_emit_lsh): New function.
358         (s390x_emit_rsh_signed): New function.
359         (s390x_emit_rsh_unsigned): New function.
360         (s390x_emit_ext): New function.
361         (s390x_emit_log_not): New function.
362         (s390x_emit_bit_and): New function.
363         (s390x_emit_bit_or): New function.
364         (s390x_emit_bit_xor): New function.
365         (s390x_emit_bit_not): New function.
366         (s390x_emit_equal): New function.
367         (s390x_emit_less_signed): New function.
368         (s390x_emit_less_unsigned): New function.
369         (s390x_emit_ref): New function.
370         (s390x_emit_if_goto): New function.
371         (s390x_emit_const): New function.
372         (s390x_emit_call): New function.
373         (s390x_emit_reg): New function.
374         (s390x_emit_pop): New function.
375         (s390x_emit_stack_flush): New function.
376         (s390x_emit_zero_ext): New function.
377         (s390x_emit_swap): New function.
378         (s390x_emit_stack_adjust): New function.
379         (s390x_emit_int_call_1): New function.
380         (s390x_emit_void_call_2): New function.
381         (s390x_emit_eq_goto): New function.
382         (s390x_emit_ne_goto): New function.
383         (s390x_emit_lt_goto): New function.
384         (s390x_emit_le_goto): New function.
385         (s390x_emit_gt_goto): New function.
386         (s390x_emit_ge_goto): New function.
387         (s390_emit_ops): New function.
388         (struct linux_target_ops): Fill in emit_ops hook.
389
390 2016-03-29  Marcin Kościelnicki  <koriakin@0x04.net>
391
392         PR 18377
393         * Makefile.in: Add s390 IPA files.
394         * configure.srv: Build IPA for s390.
395         * linux-s390-ipa.c: New file.
396         * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
397         (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
398         (tdesc_s390_linux32): Likewise.
399         (init_registers_s390_linux32v1): Likewise.
400         (tdesc_s390_linux32v1): Likewise.
401         (init_registers_s390_linux32v2): Likewise.
402         (tdesc_s390_linux32v2): Likewise.
403         (init_registers_s390_linux64): Likewise.
404         (tdesc_s390_linux64): Likewise.
405         (init_registers_s390_linux64v1): Likewise.
406         (tdesc_s390_linux64v1): Likewise.
407         (init_registers_s390_linux64v2): Likewise.
408         (tdesc_s390_linux64v2): Likewise.
409         (init_registers_s390_te_linux64): Likewise.
410         (tdesc_s390_te_linux64): Likewise.
411         (init_registers_s390_vx_linux64): Likewise.
412         (tdesc_s390_vx_linux64): Likewise.
413         (init_registers_s390_tevx_linux64): Likewise.
414         (tdesc_s390_tevx_linux64): Likewise.
415         (init_registers_s390x_linux64): Likewise.
416         (tdesc_s390x_linux64): Likewise.
417         (init_registers_s390x_linux64v1): Likewise.
418         (tdesc_s390x_linux64v1): Likewise.
419         (init_registers_s390x_linux64v2): Likewise.
420         (tdesc_s390x_linux64v2): Likewise.
421         (init_registers_s390x_te_linux64): Likewise.
422         (tdesc_s390x_te_linux64): Likewise.
423         (init_registers_s390x_vx_linux64): Likewise.
424         (tdesc_s390x_vx_linux64): Likewise.
425         (init_registers_s390x_tevx_linux64): Likewise.
426         (tdesc_s390x_tevx_linux64): Likewise.
427         (have_hwcap_s390_vx): New static variable.
428         (s390_arch_setup): Fill have_hwcap_s390_vx.
429         (s390_get_thread_area): New function.
430         (s390_ft_entry_gpr_esa): New const.
431         (s390_ft_entry_gpr_zarch): New const.
432         (s390_ft_entry_misc): New const.
433         (s390_ft_entry_fr): New const.
434         (s390_ft_entry_vr): New const.
435         (s390_ft_main_31): New const.
436         (s390_ft_main_64): New const.
437         (s390_ft_exit_fr): New const.
438         (s390_ft_exit_vr): New const.
439         (s390_ft_exit_misc): New const.
440         (s390_ft_exit_gpr_esa): New const.
441         (s390_ft_exit_gpr_zarch): New const.
442         (append_insns): New function.
443         (s390_relocate_instruction): New function.
444         (s390_install_fast_tracepoint_jump_pad): New function.
445         (s390_get_min_fast_tracepoint_insn_len): New function.
446         (s390_get_ipa_tdesc_idx): New function.
447         (struct linux_target_ops): Wire in the above functions.
448         (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
449         * linux-s390-tdesc.h: New file.
450
451 2016-03-29  Marcin Kościelnicki  <koriakin@0x04.net>
452
453         * linux-s390-low.c (s390_supports_tracepoints): New function.
454         (struct linux_target_ops): Fill supports_tracepoints hook.
455
456 2016-03-18  Yao Qi  <yao.qi@linaro.org>
457
458         * linux-low.c (lwp_signal_can_be_delivered): New function.
459         (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
460
461 2016-03-18  Yao Qi  <yao.qi@linaro.org>
462
463         * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
464         0 if signal is enqueued.  Remove 'signal' from one debugging
465         message.  Move one debugging message to some lines below.
466         Remove code setting 'signal' to 0.
467
468 2016-03-18  Yao Qi  <yao.qi@linaro.org>
469
470         * linux-low.c (linux_low_filter_event): Remove redundant
471         WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
472
473 2016-03-09  Marcin Kościelnicki  <koriakin@0x04.net>
474
475         * linux-ppc-low.c (ppc_supports_tracepoints): New function.
476         (struct linux_target_ops): Wire in the above.
477
478 2016-03-03  Yao Qi  <yao.qi@linaro.org>
479
480         * linux-low.c: Update comments to start_step_over.
481
482 2016-03-03  Yao Qi  <yao.qi@linaro.org>
483
484         PR server/19736
485         * linux-low.c (handle_extended_wait): Set child suspended
486         if event_lwp->bp_reinsert isn't zero.
487
488 2016-03-02  Yao Qi  <yao.qi@linaro.org>
489
490         * linux-low.c (linux_resume_one_lwp_throw): Replace code with
491         enqueue_pending_signal.
492
493 2016-03-02  Marcin Kościelnicki  <koriakin@0x04.net>
494
495         * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
496         is actually loaded.
497
498 2016-02-25  Marcin Kościelnicki  <koriakin@0x04.net>
499
500         * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
501         (s390_regmap_3264) [!__s390x__]: New global.
502         (s390_collect_ptrace_register): Skip map entries containing -1.
503         (s390_supply_ptrace_register): Ditto.
504         (s390_fill_gprs_high): New function.
505         (s390_store_gprs_high): New function.
506         (s390_regsets): Add NT_S390_HIGH_GPRS.
507         (s390_get_hwcap): Enable on 31-bit.
508         (have_hwcap_s390_high_gprs): Enable on 31-bit.
509         (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
510         Detect NT_S390_HIGH_GPRS.
511         (s390_usrregs_info_3264): Enable on 31-bit.
512         (s390_regs_info): Enable regs_info_3264 on 31-bit.
513         (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
514
515 2016-02-25  Marcin Kościelnicki  <koriakin@0x04.net>
516
517         PR gdb/13808
518         * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
519         * configure.srv: Ditto.
520         * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
521         (initialize_low_tracepoint): Remove ipa_tdesc assignment.
522         * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
523         (init_registers_amd64_linux): Remove prototype.
524         (tdesc_amd64_linux): Remove declaration.
525         (get_ipa_tdesc): New function.
526         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
527         initialize remaining tdescs.
528         * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
529         (init_registers_i386_linux): Remove prototype.
530         (tdesc_i386_linux): Remove declaration.
531         (get_ipa_tdesc): New function.
532         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
533         initialize remaining tdescs.
534         * linux-low.c (linux_get_ipa_tdesc_idx): New function.
535         (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
536         * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
537         * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
538         (x86_get_ipa_tdesc_idx): New function.
539         (the_low_target): Wire in x86_get_ipa_tdesc_idx.
540         * linux-x86-tdesc.h: New file.
541         * target.h (struct target_ops): Add get_ipa_tdesc_idx.
542         (target_get_ipa_tdesc_idx): New macro.
543         * tracepoint.c (ipa_tdesc_idx): New macro.
544         (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
545         (symbol_list): Add ipa_tdesc_idx.
546         (cmd_qtstart): Write ipa_tdesc_idx in the target.
547         (ipa_tdesc): Remove.
548         (ipa_tdesc_idx): New variable.
549         (get_context_regcache): Use get_ipa_tdesc.
550         (gdb_collect): Ditto.
551         (gdb_probe): Ditto.
552         * tracepoint.h (get_ipa_tdesc): New prototype.
553         (ipa_tdesc): Remove.
554
555 2016-02-24  Pedro Alves  <palves@redhat.com>
556
557         * linux-low.c (check_stopped_by_breakpoint): Rename to ...
558         (save_stop_reason): ... this.  Use GDB_ARCH_IS_TRAP_HWBKPT and
559         handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
560         Factor out common code between the USE_SIGTRAP_SIGINFO and
561         !USE_SIGTRAP_SIGINFO blocks.
562         (linux_low_filter_event): Call save_stop_reason instead of
563         check_stopped_by_breakpoint and check_stopped_by_watchpoint.
564         Update comments.
565         (linux_wait_1): Update comments.
566
567 2016-02-24  Wei-cheng Wang  <cole945@gmail.com>
568
569         * linux-ppc-low.c (ppc_supports_z_point_type): New function:
570         (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
571         (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
572         ppc_insert_point, ppc_remove_point.
573
574 2016-02-17  Marcin Kościelnicki  <koriakin@0x04.net>
575
576         * linux-s390-low.c (s390_supports_z_point_type): New function.
577         (struct linux_target_ops): Wire s390_supports_z_point_type in.
578
579 2016-02-16  Yao Qi  <yao.qi@linaro.org>
580
581         * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
582         PC.  Get pc from regcache_read_pc.
583
584 2016-02-12  Yao Qi  <yao.qi@linaro.org>
585
586         * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
587         or linux_get_pc_32bit.
588         (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
589
590 2016-02-12  Yao Qi  <yao.qi@linaro.org>
591
592         * linux-arm-low.c (get_next_pcs_ops): Initialize it with
593         arm_linux_get_next_pcs_fixup.
594
595 2016-02-12  Marcin Kościelnicki  <koriakin@0x04.net>
596
597         * tracepoint.c (x_tracepoint_action_download): Change
598         write_inferior_data_ptr to write_inferior_data_pointer.
599         (cmd_qtstart): Likewise.
600         (write_inferior_data_ptr): Remove.
601         (download_agent_expr): Change write_inferior_data_ptr to
602         write_inferior_data_pointer.
603         (download_tracepoint_1): Likewise.
604         (download_tracepoint): Likewise.
605         (download_trace_state_variables): Likewise.
606
607 2016-02-11  Wei-cheng Wang  <cole945@gmail.com>
608             Marcin Kościelnicki  <koriakin@0x04.net>
609
610         * tracepoint.c (struct tracepoint_action_ops): Remove.
611         (struct tracepoint_action): Remove ops.
612         (m_tracepoint_action_download, r_tracepoint_action_download)
613         (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
614         size and offset accordingly.
615         (m_tracepoint_action_ops, r_tracepoint_action_ops)
616         (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
617         (tracepoint_action_send, tracepoint_action_download): New functions.
618         Helpers for trace action handlers.
619         (add_tracepoint_action): Remove setup actions ops.
620         (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
621
622 2016-02-10  Yao Qi  <yao.qi@linaro.org>
623
624         * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
625
626 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
627
628         * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
629         to AC_OUTPUT.
630         * configure: Regenerate.
631
632 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
633
634         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
635         void * to gdb_byte *.
636         * linux-low.c (siginfo_fixup): Likewise.
637         (linux_xfer_siginfo): Likewise.
638         * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
639         Likewise.
640         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
641
642 2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
643
644         * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
645         to srv_tgtobj.
646         (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
647         to srv_tgtobj.
648         * linux-x86-low.c [__x86_64__]: Include
649         "nat/amd64-linux-siginfo.h".
650         (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
651         (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
652         (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
653         (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
654         (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
655         (cpt_si_fd, si_timerid, si_overrun): Move from
656         nat/amd64-linux-siginfo.c.
657         * Makefile.in (amd64-linux-siginfo.o:): New rule.
658
659 2016-01-28  Simon Marchi  <simon.marchi@ericsson.com>
660
661         * server.c (skip_to_semicolon):  Remove.
662         (process_point_options): Use strchrnul instead of
663         skip_to_semicolon.
664
665 2016-01-26  Yao Qi  <yao.qi@linaro.org>
666
667         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
668         * linux-low.c (install_software_single_step_breakpoints): Don't
669         call regcache_read_pc.
670         * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
671         argument pc.
672
673 2016-01-26  Yao Qi  <yao.qi@linaro.org>
674
675         * linux-low.c (install_software_single_step_breakpoints): Call
676         regcache_read_pc instead of get_pc.
677
678 2016-01-26  Yao Qi  <yao.qi@linaro.org>
679
680         * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
681         (unblock_async_io): Rename to ...
682         (block_unblock_async_io): ... it.  New function.
683         (enable_async_io): Don't install SIGIO handler.  Unblock it
684         instead.
685         (disable_async_io): Don't ignore SIGIO.  Block it instead.
686         (initialize_async_io): Install SIGIO handler.  Don't call
687         unblock_async_io.
688
689 2016-01-26  Yao Qi  <yao.qi@linaro.org>
690
691         * remote-utils.c (getpkt): If the buffer isn't empty, and the
692         first character is '\003', call *the_target->request_interrupt.
693
694 2016-01-25  Yao Qi  <yao.qi@linaro.org>
695
696         * remote-utils.c (new_thread_notify): Remove.
697         (dead_thread_notify): Likewise.
698         * remote-utils.h (new_thread_notify): Remove declaration.
699         (dead_thread_notify): Likewise.
700
701 2016-01-23  Marcin Kościelnicki  <koriakin@0x04.net>
702
703         * gdb.trace/pending.exp: Fix expected message on continue.
704
705 2016-01-22  Marcin Kościelnicki  <koriakin@0x04.net>
706
707         * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
708         it works properly on big-endian machines where sizeof (CORE_ADDR)
709         != sizeof (void *).
710
711 2016-01-21  Pedro Alves  <palves@redhat.com>
712
713         * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
714         (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
715         * configure: Regenerate.
716
717 2016-01-21  Yao Qi  <yao.qi@linaro.org>
718
719         * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
720         is_thumb and set it according to CPSR saved on the stack.
721         (get_next_pcs_syscall_next_pc): Pass is_thumb to
722         arm_sigreturn_next_pc.
723
724 2016-01-18  Yao Qi  <yao.qi@linaro.org>
725
726         * linux-low.c (linux_set_pc_64bit): New function.
727         (linux_get_pc_64bit): New function.
728         * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
729         Declare.
730         * linux-sparc-low.c (debug_threads): Remove declaration.
731         (sparc_get_pc): Remove.
732         (the_low_target): Use linux_get_pc_64bit instead of
733         sparc_get_pc.
734         * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
735         (the_low_target): Use linux_get_pc_64bit and
736         linux_set_pc_64bit.
737
738 2016-01-18  Yao Qi  <yao.qi@linaro.org>
739
740         * linux-arm-low.c (debug_threads): Remove declaration.
741         (arm_get_pc, arm_set_pc): Remove.
742         (the_low_target): Use linux_get_pc_32bit and
743         linux_set_pc_32bit.
744         * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
745         (the_low_target): Use linux_get_pc_32bit and
746         linux_set_pc_32bit.
747         * linux-cris-low.c (debug_threads): Remove declaration.
748         (cris_get_pc, cris_set_pc,): Remove.
749         (the_low_target): Use linux_get_pc_32bit and
750         linux_set_pc_32bit.
751         * linux-crisv32-low.c (debug_threads): Remove declaration.
752         (cris_get_pc, cris_set_pc): Remove.
753         (the_low_target): Use linux_get_pc_32bit and
754         linux_set_pc_32bit.
755         * linux-low.c: Include inttypes.h.
756         (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
757         * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
758         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
759         (the_low_target): Use linux_get_pc_32bit and
760         linux_set_pc_32bit.
761         * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
762         (the_low_target): Use linux_get_pc_32bit and
763         linux_set_pc_32bit.
764         * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
765         (the_low_target): Use linux_get_pc_32bit and
766         linux_set_pc_32bit.
767         * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
768         (the_low_target): Use linux_get_pc_32bit and
769         linux_set_pc_32bit.
770         * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
771         (the_low_target): Use linux_get_pc_32bit and
772         linux_set_pc_32bit.
773
774 2016-01-18  Gary Benson  <gbenson@redhat.com>
775
776         * configure.ac (AC_FUNC_FORK): New check.
777         * config.in: Regenerate.
778         * configure: Likewise.
779
780 2016-01-14  Yao Qi  <yao.qi@linaro.org>
781
782         * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
783         * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
784         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
785         arm_get_next_pcs_ctor.
786
787 2016-01-12  Josh Stone  <jistone@redhat.com>
788             Philippe Waroquiers  <philippe.waroquiers@skynet.be>
789
790         * inferiors.h: Include "gdb_vecs.h".
791         (struct process_info): Add syscalls_to_catch.
792         * inferiors.c (remove_process): Free syscalls_to_catch.
793         * remote-utils.c (prepare_resume_reply): Report syscall_entry and
794         syscall_return stops.
795         * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
796         * server.c (handle_general_set): Handle QCatchSyscalls.
797         (handle_query): Report support for QCatchSyscalls.
798         * target.h (struct target_ops): Add supports_catch_syscall.
799         (target_supports_catch_syscall): New macro.
800         * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
801         (struct lwp_info): Add syscall_state.
802         * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
803         Maintain syscall_state and syscalls_to_catch across exec.
804         (get_syscall_trapinfo): New function, proxy to the_low_target.
805         (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
806         (linux_low_filter_event): Toggle syscall_state entry/return for
807         syscall traps, and set it ignored for all others.
808         (gdb_catching_syscalls_p): New function.
809         (gdb_catch_this_syscall_p): New function.
810         (linux_wait_1): Handle SYSCALL_SIGTRAP.
811         (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
812         (linux_supports_catch_syscall): New function.
813         (linux_target_ops): Install it.
814         * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
815         (the_low_target): Install it.
816
817 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
818
819         * acinclude.m4: Include new ../warning.m4 file.
820         * configure: Regenerated.
821         * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
822
823 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
824
825         * ax.c (is_goto_target): Mark static.
826         * linux-low.c (register_addr): Likewise.
827         (linux_fetch_registers, linux_store_registers): Likewise.
828         * mem-break.c (any_persistent_commands): Fix old prototype.
829         (add_commands_to_breakpoint): Mark static.
830         * regcache.c (find_register_by_name): Delete unused func.
831         * remote-utils.c (hex_or_minus_one): Mark static.
832         * server.c (monitor_show_help): Mark static.
833         (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
834         handle_v_requests): Likewise.
835
836 2016-01-12  Pedro Alves  <palves@redhat.com>
837
838         Remove use of the registered trademark symbol throughout.
839
840 2016-01-08  Yao Qi  <yao.qi@linaro.org>
841
842         * remote-utils.c (getpkt): If c is '\003', call target hook
843         request_interrupt.
844
845 2016-01-06  Yao Qi  <yao.qi@linaro.org>
846
847         * linux-aarch32-low.h (arm_abi_breakpoint): Move to
848         linux-aarch32-low.c.
849         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
850         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
851         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
852         (thumb2_breakpoint): Declare.
853         * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
854         linux-aarch32-low.h.
855         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
856         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
857         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
858
859 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
860
861         * gdbreplay.c (gdbreplay_version): Change copyright year in
862         version message.
863         * server.c (gdbserver_version): Likewise.
864
865 2015-12-28  Patrick Palka  <patrick@parcs.ath.cx>
866
867         * server.c (crc32_table): Delete.
868         (crc32): Use libiberty's xcrc32 function.
869
870 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
871
872         * lynx-low.c (lynx_delete_thread_callback): New function.
873         (lynx_mourn): Properly delete our process and all of its
874         threads.  Remove call to clear_inferiors.
875
876 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
877
878         * target.c (thread_search_callback): Add check that
879         the thread_stopped target callback is not NULL before
880         calling it.
881
882 2015-12-21  Yao Qi  <yao.qi@linaro.org>
883
884         * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
885         arm breakpoint.
886
887 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
888
889         * server.c (handle_query): Call target_supports_software_single_step.
890
891 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
892
893         * linux-low.c (single_step): New function.
894         (linux_resume_one_lwp_throw): Call single_step.
895         (start_step_over): Likewise.
896
897 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
898
899         * Makefile.in (SFILES): Append arch/arm-linux.c,
900         arch/arm-get-next-pcs.c.
901         (arm-linux.o): New rule.
902         (arm-get-next-pcs.o): New rule.
903         * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
904         arm-linux.o.
905         * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro.  Moved
906         to linux-aarch32-low.c.
907         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
908         (arm_breakpoint_len, thumb_breakpoint): Likewise.
909         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
910         (thumb2_breakpoint_len): Likewise.
911         (arm_is_thumb_mode): Make non-static.
912         * linux-aarch32-low.h (arm_abi_breakpoint): New macro.  Moved
913         from linux-aarch32-low.c.
914         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
915         (arm_breakpoint_len, thumb_breakpoint): Likewise.
916         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
917         (thumb2_breakpoint_len): Likewise.
918         (arm_is_thumb_mode): New declaration.
919         * linux-arm-low.c: Include arch/arm-linux.h
920         aarch/arm-get-next-pcs.h, sys/syscall.h.
921         (get_next_pcs_ops): New struct.
922         (get_next_pcs_addr_bits_remove): New function.
923         (get_next_pcs_is_thumb): New function.
924         (get_next_pcs_read_memory_unsigned_integer): Likewise.
925         (arm_sigreturn_next_pc): Likewise.
926         (get_next_pcs_syscall_next_pc): Likewise.
927         (arm_gdbserver_get_next_pcs): Likewise.
928         (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
929         Initialize.
930         * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
931         * server.h: Include gdb_vecs.h.
932
933 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
934
935         * Makefile.in (SFILES): Append common/common-regcache.c.
936         (OBS): Append common-regcache.o.
937         (common-regcache.o): New rule.
938         * regcache.c (init_register_cache): Initialize cache to
939         REG_UNAVAILABLE.
940         (regcache_raw_read_unsigned): New function.
941         * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
942         register_status enum.
943
944 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
945
946         * linux-aarch64-low.c (the_low_targets): Rename
947         breakpoint_reinsert_addr to get_next_pcs.
948         * linux-arm-low.c (the_low_targets): Likewise.
949         * linux-bfin-low.c (the_low_targets): Likewise.
950         * linux-cris-low.c (the_low_targets): Likewise.
951         * linux-crisv32-low.c (the_low_targets): Likewise.
952         * linux-low.c (can_software_single_step): Likewise.
953         (install_software_single_step_breakpoints): New function.
954         (start_step_over): Use install_software_single_step_breakpoints.
955         * linux-low.h: New CORE_ADDR vector.
956         (struct linux_target_ops) Rename breakpoint_reinsert_addr to
957         get_next_pcs.
958         * linux-mips-low.c (the_low_targets): Likewise.
959         * linux-nios2-low.c (the_low_targets): Likewise.
960         * linux-sparc-low.c (the_low_targets): Likewise.
961
962 2015-12-17  Pedro Alves  <palves@redhat.com>
963
964         * linux-low.c (linux_kill_one_lwp): Remove references to
965         LinuxThreads.
966         (kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
967         to 'kill'.
968         (linux_init_signals): Delete.
969         (initialize_low): Adjust.
970         * thread-db.c (thread_db_init): Remove LinuxThreads reference.
971
972 2015-12-16  Pedro Alves  <palves@redhat.com>
973
974         * configure.ac (compiler warning flags): When testing a
975         -Wno-foo option, check whether -Wfoo works instead.
976         * configure: Regenerate.
977
978 2015-12-11  Don Breazeal  <donb@codesourcery.com>
979
980         * server.c (process_serial_event): Don't exit from gdbserver
981         in remote mode if there are still active inferiors.
982
983 2015-12-11  Yao Qi  <yao.qi@linaro.org>
984
985         * linux-aarch64-low.c (aarch64_breakpoint_at): Call
986         arm_breakpoint_at if the process is 32-bit.
987
988 2015-12-11  Yao Qi  <yao.qi@linaro.org>
989
990         * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
991         arm breakpoint.
992
993 2015-12-07  Yao Qi  <yao.qi@linaro.org>
994
995         * configure.srv: Append arm.o to srv_tgtobj for
996         aarch64*-*-linux* target.
997         * linux-aarch32-low.c (arm_abi_breakpoint): New macro.  Moved
998         from linux-arm-low.c.
999         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1000         (arm_breakpoint_len, thumb_breakpoint): Likewise.
1001         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1002         (thumb2_breakpoint_len): Likewise.
1003         (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1004         (arm_breakpoint_kinds): Likewise.
1005         (arm_breakpoint_kind_from_pc): Likewise.
1006         (arm_sw_breakpoint_from_kind): Likewise.
1007         (arm_breakpoint_kind_from_current_state): Likewise.
1008         * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1009         (arm_sw_breakpoint_from_kind): Declare.
1010         (arm_breakpoint_kind_from_current_state): Declare.
1011         (arm_breakpoint_at): Declare.
1012         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1013         arm_sw_breakpoint_from_kind if process is 32-bit.
1014         (aarch64_breakpoint_kind_from_pc): New function.
1015         (aarch64_breakpoint_kind_from_current_state): New function.
1016         (the_low_target): Initialize fields breakpoint_kind_from_pc
1017         and breakpoint_kind_from_current_state.
1018         * linux-arm-low.c (arm_breakpoint_kinds): Move to
1019         linux-aarch32-low.c.
1020         (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1021         (arm_breakpoint, arm_breakpoint_len): Likewise.
1022         (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1023         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1024         (arm_is_thumb_mode): Likewise.
1025         (arm_breakpoint_at): Likewise.
1026         (arm_breakpoint_kind_from_pc): Likewise.
1027         (arm_sw_breakpoint_from_kind): Likewise.
1028         (arm_breakpoint_kind_from_current_state): Likewise.
1029
1030         Revert:
1031         2015-08-04  Yao Qi  <yao.qi@linaro.org>
1032
1033         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1034         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1035         * server.c (extended_protocol): Remove "static".
1036         * server.h (extended_protocol): Declare it.
1037
1038 2015-12-04  Josh Stone  <jistone@redhat.com>
1039
1040         * target.h (struct target_ops) <arch_setup>: Rename to ...
1041         (struct target_ops) <post_create_inferior>: ... this.
1042         (target_arch_setup): Rename to ...
1043         (target_post_create_inferior): ... this, calling post_create_inferior.
1044         * server.c (start_inferior): Update target_arch_setup calls to
1045         target_post_create_inferior.
1046         * linux-low.c (linux_low_ptrace_options): Forward declare.
1047         (linux_arch_setup): Update its comment for general use.
1048         (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1049         (struct linux_target_ops): Use linux_post_create_inferior.
1050         * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1051         to post_create_inferior.
1052         * nto-low.c (struct nto_target_ops): Likewise.
1053         * spu-low.c (struct spu_target_ops): Likewise.
1054         * win32-low.c (struct win32_target_ops): Likewise.
1055
1056 2015-12-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1057
1058         * linux-arm-low.c: Remove duplicate arch/arm.h include.
1059
1060 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1061
1062         * linux-arm-low.c (arm_reinsert_addr): Remove function.
1063         (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1064         * linux-cris-low.c (cris_reinsert_addr> Remove function.
1065         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1066         * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1067         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1068         * linux-mips-low.c (mips_reinsert_addr): Remove function.
1069         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1070         * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1071         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1072         * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1073         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1074
1075 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1076
1077         * linux-low.c (linux_look_up_symbols): Don't call
1078         linux_supports_traceclone.
1079         * linux-low.h (thread_db_init): Remove use_events argument.
1080         * thread-db.c (thread_db_use_event): Remove global variable.
1081         (struct thread_db) <td_thr_event_enable_p>: Remove field.
1082         (struct thread_db) <td_create_bp>: Remove field.
1083         (thread_db_create_event): Remove function.
1084         (thread_db_enable_reporting): Likewise.
1085         (find_one_thread): Don't check for thread_db_use_events.
1086         (attach_thread): Likewise.
1087         (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1088         (try_thread_db_load_1): Don't check for thread_db_use_events.
1089         (thread_db_init): Remove use_events argument and thread events
1090         handling.
1091         (remove_thread_event_breakpoints): Remove function.
1092         (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1093
1094 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1095
1096         * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1097         New function.
1098         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1099         * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1100         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1101         * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1102         (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1103         Initialize.
1104         * linux-crisv32-low.c (cris_supports_hardware_single_step):
1105         New function.
1106         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1107         * linux-low.c (can_hardware_single_step): Use
1108         supports_hardware_single_step.
1109         (can_software_single_step): New function.
1110         (start_step_over): Call can_software_single_step.
1111         (linux_supports_hardware_single_step): New function.
1112         (struct target_ops) <supports_software_single_step>: Initialize.
1113         * linux-low.h (struct linux_target_ops)
1114         <supports_hardware_single_step>: Initialize.
1115         * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1116         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1117         * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1118         (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1119         * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1120         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1121         * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1122         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1123         * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1124         (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1125         Initialize.
1126         * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1127         (struct linux_target_ops) <tile_supports_hardware_single_step>:
1128         Initialize.
1129         * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1130         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1131         * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1132         New function.
1133         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1134         * target.h (struct target_ops): <supports_software_single_step>:
1135         New field.
1136         (target_supports_software_single_step): New macro.
1137
1138 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1139
1140         * linux-low.c (linux_wait_1): Fix pc advance condition.
1141         * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1142         * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1143
1144 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1145
1146         * linux-arm-low.c (arm_is_thumb_mode): New function.
1147         (arm_breakpoint_at): Use arm_is_thumb_mode.
1148         (arm_breakpoint_kind_from_current_state): New function.
1149         (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1150         Initialize.
1151         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1152         (linux_breakpoint_kind_from_current_state): New function.
1153         (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1154         * linux-low.h (struct linux_target_ops)
1155         <breakpoint_kind_from_current_state>: New field.
1156         * target.h (struct target_ops): Likewise.
1157         (target_breakpoint_kind_from_current_state): New macro.
1158
1159 2015-11-30  Pedro Alves  <palves@redhat.com>
1160
1161         * linux-low.c (linux_resume): Wake up the event loop before
1162         returning.
1163
1164 2015-11-30  Pedro Alves  <palves@redhat.com>
1165
1166         * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1167         check.
1168         (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1169         to -1.
1170         * target.c (struct thread_search): New structure.
1171         (thread_search_callback): New function.
1172         (prev_general_thread): New global.
1173         (prepare_to_access_memory, done_accessing_memory): New functions.
1174         * target.h (prepare_to_access_memory, done_accessing_memory):
1175         Replace macros with function declarations.
1176
1177 2015-11-30  Pedro Alves  <palves@redhat.com>
1178
1179         PR 14618
1180         * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1181         report TARGET_WAITKIND_NO_RESUMED.
1182         * remote-utils.c (prepare_resume_reply): Handle
1183         TARGET_WAITKIND_NO_RESUMED.
1184         * server.c (report_no_resumed): New global.
1185         (handle_query) <qSupported>: Handle "no-resumed+".  Report
1186         "no-resumed+" support.
1187         (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1188         return error if the client doesn't support no-resumed events.
1189         (push_stop_notification): New function.
1190         (handle_target_event): Use it.  Report TARGET_WAITKIND_NO_RESUMED
1191         events if the client supports them.
1192
1193 2015-11-30  Pedro Alves  <palves@redhat.com>
1194
1195         * linux-low.c (thread_still_has_status_pending_p): Don't check
1196         vCont;t here.
1197         (lwp_resumed): New function.
1198         (status_pending_p_callback): Return early if the LWP is not
1199         supposed to be resumed.
1200
1201 2015-11-30  Pedro Alves  <palves@redhat.com>
1202
1203         * linux-low.c (handle_extended_wait): Assert that the LWP's
1204         waitstatus is TARGET_WAITKIND_IGNORE.  If GDB wants to hear about
1205         thread create events, leave the new child's status pending.
1206         (linux_low_filter_event): If GDB wants to hear about thread exit
1207         events, leave the LWP marked dead and don't delete it.
1208         (linux_wait_for_event_filtered): Don't check for thread exit.
1209         (filter_exit_event): New function.
1210         (linux_wait_1): Use it, when returning an exit event.
1211         (linux_resume_one_lwp_throw): Assert that the LWP's
1212         waitstatus is TARGET_WAITKIND_IGNORE.
1213         * remote-utils.c (prepare_resume_reply): Handle
1214         TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1215         * server.c (report_thread_events): New global.
1216         (handle_general_set): Handle QThreadEvents.
1217         (handle_query) <qSupported>: Handle and report QThreadEvents+;
1218         (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1219         TARGET_WAITKIND_THREAD_EXITED.
1220         * server.h (report_thread_events): Declare.
1221
1222 2015-11-30  Pedro Alves  <palves@redhat.com>
1223
1224         * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1225         the thread's last_resume_kind was resume_stop.
1226
1227 2015-11-30  Pedro Alves  <palves@redhat.com>
1228
1229         * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1230         before returning.
1231
1232 2015-11-30  Pedro Alves  <palves@redhat.com>
1233
1234         * server.c (handle_v_requests): Handle vCtrlC.
1235
1236 2015-11-30  Pedro Alves  <palves@redhat.com>
1237
1238         * gdbthread.h (find_any_thread_of_pid): Declare.
1239         * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1240         functions.
1241         * server.c (handle_query): If current_thread is NULL, look for
1242         another thread of the selected process.
1243
1244 2015-11-26  Daniel Colascione  <dancol@dancol.org>
1245             Simon Marchi  <simon.marchi@ericsson.com>
1246
1247         * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1248         * server.c (handle_qxfer_threads_worker): Refactor to include thread
1249         name in reply.
1250         * target.h (struct target_ops) <thread_name>: New field.
1251         (target_thread_name): New macro.
1252
1253 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
1254
1255         * regcache.h (regcache_invalidate_pid): Add declaration.
1256         * regcache.c (regcache_invalidate_pid): New function, extracted
1257         from regcache_invalidate.
1258         (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1259         Add trivial documentation comment.
1260         * lynx-low.c: Use regcache_invalidate_pid instead of
1261         regcache_invalidate.
1262
1263 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
1264
1265         * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1266         and Elf64_auxv_t if the target is Android.
1267
1268 2015-11-22  Doug Evans  <xdje42@gmail.com>
1269
1270         * target.h: #include <sys/types.h>.
1271
1272 2015-11-19  Pedro Alves  <palves@redhat.com>
1273
1274         * linux-low.c (linux_process_qsupported): Change prototype.
1275         Adjust.
1276         * linux-low.h (struct linux_target_ops) <process_qsupported>:
1277         Change prototype.
1278         * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1279         and adjust to loop over all features.
1280         * server.c (handle_query) <qSupported>: Adjust to call
1281         target_process_qsupported once, passing it a vector of unprocessed
1282         features.
1283         * target.h (struct target_ops) <process_qsupported>: Change
1284         prototype.
1285         (target_process_qsupported): Adjust.
1286
1287 2015-11-19  Pedro Alves  <palves@redhat.com>
1288
1289         * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1290         mode.
1291         * configure: Regenerate.
1292
1293 2015-11-19  Pedro Alves  <palves@redhat.com>
1294
1295         * configure: Regenerate.
1296
1297 2015-11-19  Yao Qi  <yao.qi@linaro.org>
1298
1299         * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1300         type to uint32_t.
1301
1302 2015-11-19  Yao Qi  <yao.qi@linaro.org>
1303
1304         * linux-aarch64-low.c (enum aarch64_operand_type): New.
1305         (struct aarch64_operand): Move enum out.
1306
1307 2015-11-19  Yao Qi  <yao.qi@linaro.org>
1308
1309         * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1310         struct user_fpsimd_state *.
1311         (aarch64_store_fpregset): Likewise.
1312
1313 2015-11-19  Yao Qi  <yao.qi@linaro.org>
1314
1315         * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1316         struct user_pt_regs *.
1317         (aarch64_store_gregset): Likewise.
1318
1319 2015-11-18  Pedro Alves  <palves@redhat.com>
1320
1321         * Makefile.in (all_object_files): Add $IPA_OBJS.
1322
1323 2015-11-17  Pedro Alves  <palves@redhat.com>
1324
1325         * win32-low.c (win32_resume): Use gdb_signal_from_host,
1326         GDB_SIGNAL_0 and gdb_signal_to_string.
1327
1328 2015-11-17  Pedro Alves  <palves@redhat.com>
1329
1330         * win32-low.c (handle_output_debug_string): Remove parameter.
1331         (win32_kill): Remove our_status local and adjust call to
1332         handle_output_debug_string.
1333         (get_child_debug_event): Adjust call to
1334         handle_output_debug_string.
1335
1336 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1337
1338         * linux-mips-low.c (mips_fill_gregset): Add cast.
1339         (mips_store_gregset): Likewise.
1340         (mips_fill_fpregset): Likewise.
1341         (mips_store_fpregset): Likewise.
1342
1343 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1344
1345         * linux-mips-low.c (mips_add_watchpoint): Rename private to
1346         priv.
1347
1348 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1349
1350         * linux-mips-low.c (mips_linux_new_thread): Change type of
1351         watch_type to enum target_hw_bp_type.
1352
1353 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1354
1355                 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1356                 Change return type to arm_hwbp_type.
1357
1358 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1359
1360         * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1361         (arm_store_gregset): Likewise.
1362         * linux-arm-low.c (arm_get_hwcap): Likewise.
1363         (arm_read_description): Likewise.
1364
1365 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1366
1367         * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1368
1369 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1370
1371         * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1372         (ppc_fill_vsxregset): Likewise.
1373         (ppc_store_vsxregset): Likewise.
1374         (ppc_fill_vrregset): Likewise.
1375         (ppc_store_vrregset): Likewise.
1376         (ppc_fill_evrregset): Likewise.
1377         (ppc_store_evrregset): Likewise.
1378
1379 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1380
1381         * linux-ppc-low.c (ppc_usrregs_info): Remove
1382         forward-declaration.
1383         (ppc_arch_setup): Move lower in file.
1384
1385 2015-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1386
1387         * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1388         (ps_pdwrite): Likewise.
1389
1390 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1391
1392         * linux-arm-low.c (arm_new_thread): Move pointer dereference
1393         to after assert checks.
1394
1395 2015-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1396
1397         * proc-service.c (ps_pdread): Add/adjust casts.
1398         (ps_pdwrite): Add/adjust casts.
1399
1400 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
1401
1402         * server.c (handle_search_memory_1): Cast return value of
1403         memmem.
1404
1405 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
1406
1407         * server.c (write_qxfer_response): Change type of data to
1408         gdb_byte *.
1409
1410 2015-10-29  Pedro Alves  <palves@redhat.com>
1411
1412         * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1413
1414 2015-10-29  Pedro Alves  <palves@redhat.com>
1415
1416         * tracepoint.c (clear_installed_tracepoints): Add casts.
1417
1418 2015-10-29  Pedro Alves  <palves@redhat.com>
1419
1420         * server.c (handle_v_cont, process_serial_event): Add enum
1421         gdb_signal casts to signal parsing code.
1422
1423 2015-10-29  Pedro Alves  <palves@redhat.com>
1424
1425         * linux-low.h (NULL_REGSET): Define.
1426         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1427         * linux-arm-low.c (arm_regsets): Likewise.
1428         * linux-crisv32-low.c (cris_regsets): Likewise.
1429         * linux-m68k-low.c (m68k_regsets): Likewise.
1430         * linux-mips-low.c (mips_regsets): Likewise.
1431         * linux-nios2-low.c (nios2_regsets): Likewise.
1432         * linux-ppc-low.c (ppc_regsets): Likewise.
1433         * linux-s390-low.c (s390_regsets): Likewise.
1434         * linux-sh-low.c (sh_regsets): Likewise.
1435         * linux-sparc-low.c (sparc_regsets): Likewise.
1436         * linux-tic6x-low.c (tic6x_regsets): Likewise.
1437         * linux-tile-low.c (tile_regsets): Likewise.
1438         * linux-x86-low.c (x86_regsets): Likewise.
1439         * linux-xtensa-low.c (xtensa_regsets): Likewise.
1440
1441 2015-10-29  Pedro Alves  <palves@redhat.com>
1442
1443         * linux-low.h (NULL_REGSET): Define.
1444         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1445         * linux-arm-low.c (arm_regsets): Likewise.
1446         * linux-crisv32-low.c (cris_regsets): Likewise.
1447         * linux-m68k-low.c (m68k_regsets): Likewise.
1448         * linux-mips-low.c (mips_regsets): Likewise.
1449         * linux-nios2-low.c (nios2_regsets): Likewise.
1450         * linux-ppc-low.c (ppc_regsets): Likewise.
1451         * linux-s390-low.c (s390_regsets): Likewise.
1452         * linux-sh-low.c (sh_regsets): Likewise.
1453         * linux-sparc-low.c (sparc_regsets): Likewise.
1454         * linux-tic6x-low.c (tic6x_regsets): Likewise.
1455         * linux-tile-low.c (tile_regsets): Likewise.
1456         * linux-x86-low.c (x86_regsets): Likewise.
1457         * linux-xtensa-low.c (xtensa_regsets): Likewise.
1458
1459 2015-10-26  Doug Evans  <dje@google.com>
1460
1461         * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1462
1463 2015-10-26  Doug Evans  <dje@google.com>
1464
1465         * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1466
1467 2015-10-26  Doug Evans  <dje@google.com>
1468
1469         * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1470         for debug_printf.
1471         (attach_thread, find_new_threads_callback): Ditto.
1472
1473 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1474
1475         * mem-break.h (set_breakpoint_data): Remove.
1476
1477 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1478
1479         * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1480         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1481         (initialize_low): Remove set_breakpoint_data call.
1482         * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1483         (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1484         (initialize_low): Remove set_breakpoint_data call.
1485         * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1486         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1487         (initialize_low): Remove set_breakpoint_data call.
1488
1489 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1490
1491         * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1492         * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1493         * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1494         * target.h (target_breakpoint_kind_from_pc): New macro.
1495
1496 2015-10-22  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1497
1498         * linux-low.c (default_breakpoint_kind_from_pc): New function.
1499         (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1500         the default breakpoint kind.
1501
1502 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1503
1504         * linux-arm-low.c (arm_supports_z_point_type): Add software
1505         breakpoint support.
1506
1507 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1508
1509         * linux-arm-low.c: Refactor breakpoint definitions.
1510         (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1511         (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1512
1513 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1514
1515         * Makefile.in: Add arm.c/o.
1516         * configure.srv: Likewise.
1517         * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1518         (arm_breakpoint_kind_from_pc): New function.
1519         (arm_sw_breakpoint_from_kind): Return proper kind.
1520         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1521
1522 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1523
1524         * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1525         removal.
1526         * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1527         (struct raw_breakpoint) <size>: Remove.
1528         (struct raw_breakpoint) <kind>: Add.
1529         (bp_size): New function.
1530         (bp_opcode): Likewise.
1531         (find_raw_breakpoint_at): Adjust for kind.
1532         (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1533         (remove_memory_breakpoint): Adjust for kind call bp_size.
1534         (set_raw_breakpoint_at): Adjust for kind.
1535         (set_breakpoint): Likewise.
1536         (set_breakpoint_at): Call breakpoint_kind_from_pc.
1537         (delete_raw_breakpoint): Adjust for kind.
1538         (delete_breakpoint): Likewise.
1539         (find_gdb_breakpoint): Likewise.
1540         (set_gdb_breakpoint_1): Likewise.
1541         (set_gdb_breakpoint): Likewise.
1542         (delete_gdb_breakpoint_1): Likewise.
1543         (delete_gdb_breakpoint): Likewise.
1544         (uninsert_raw_breakpoint): Likewise.
1545         (reinsert_raw_breakpoint): Likewise.
1546         (set_breakpoint_data): Remove.
1547         (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1548         (check_mem_read): Adjust for kind call bp_size.
1549         (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1550         (clone_one_breakpoint): Adjust for kind.
1551         * mem-break.h (set_gdb_breakpoint): Likewise.
1552         (delete_gdb_breakpoint): Likewise.
1553         * server.c (process_serial_event): Likewise.
1554
1555 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1556
1557         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1558         (struct linux_target_ops) <breakpoint>: Remove.
1559         (struct linux_target_ops) <breakpoint_len>: Remove.
1560         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1561         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1562         * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1563         (arm_sw_breakpoint_from_kind): New function.
1564         * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1565         (struct linux_target_ops) <breakpoint>: Remove.
1566         (struct linux_target_ops) <breakpoint_len>: Remove.
1567         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1568         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1569         * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1570         (struct linux_target_ops) <breakpoint>: Remove.
1571         (struct linux_target_ops) <breakpoint_len>: Remove.
1572         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1573         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1574         * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1575         (struct linux_target_ops) <breakpoint>: Remove.
1576         (struct linux_target_ops) <breakpoint_len>: Remove.
1577         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1578         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1579         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1580         and sw_breakpoint_from_kind to increment the pc.
1581         (linux_breakpoint_kind_from_pc): New function.
1582         (linux_sw_breakpoint_from_kind): New function.
1583         (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1584         (initialize_low): Call breakpoint_kind_from_pc and
1585         sw_breakpoint_from_kind to replace breakpoint_data/len.
1586         * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1587         New field.
1588         (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1589         * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1590         (struct linux_target_ops) <breakpoint>: Remove.
1591         (struct linux_target_ops) <breakpoint_len>: Remove.
1592         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1593         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1594         * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1595         (struct linux_target_ops) <breakpoint>: Remove.
1596         (struct linux_target_ops) <breakpoint_len>: Remove.
1597         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1598         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1599         * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1600         (struct linux_target_ops) <breakpoint>: Remove.
1601         (struct linux_target_ops) <breakpoint_len>: Remove.
1602         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1603         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1604         * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1605         (struct linux_target_ops) <breakpoint>: Remove.
1606         (struct linux_target_ops) <breakpoint_len>: Remove.
1607         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1608         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1609         * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1610         (struct linux_target_ops) <breakpoint>: Remove.
1611         (struct linux_target_ops) <breakpoint_len>: Remove.
1612         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1613         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1614         * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1615         (struct linux_target_ops) <breakpoint>: Remove.
1616         (struct linux_target_ops) <breakpoint_len>: Remove.
1617         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1618         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1619         * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1620         (struct linux_target_ops) <breakpoint>: Remove.
1621         (struct linux_target_ops) <breakpoint_len>: Remove.
1622         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1623         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1624         * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1625         (struct linux_target_ops) <breakpoint>: Remove.
1626         (struct linux_target_ops) <breakpoint_len>: Remove.
1627         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1628         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1629         * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1630         (struct linux_target_ops) <breakpoint>: Remove.
1631         (struct linux_target_ops) <breakpoint_len>: Remove.
1632         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1633         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1634         * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1635         * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1636         (struct linux_target_ops) <breakpoint>: Remove.
1637         (struct linux_target_ops) <breakpoint_len>: Remove.
1638         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1639         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1640         * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1641         (struct linux_target_ops) <breakpoint>: Remove.
1642         (struct linux_target_ops) <breakpoint_len>: Remove.
1643         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1644         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1645
1646 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1647
1648         * linux-cris-low.c (cris_get_pc): Remove void arg.
1649
1650 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
1651
1652         * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1653         variable name.
1654
1655 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
1656
1657         * inferiors.c (thread_pid_matches_callback): New function.
1658         (find_thread_process): New function.
1659         (remove_thread): Reset current_thread.
1660         (remove_process): Assert threads have been removed first.
1661
1662 2015-10-15  Yao Qi  <yao.qi@linaro.org>
1663
1664         * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1665         if it is 3.
1666         (aarch64_remove_point): Likewise.
1667         * regcache.c (regcache_register_size): New function.
1668
1669 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1670
1671         * linux-aarch64-low.c: Update all callers as emit_load_store
1672         is renamed to aarch64_emit_load_store.
1673
1674 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1675
1676         * linux-aarch64-low.c: Update all callers of function renaming
1677         from emit_insn to aarch64_emit_insn.
1678
1679 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1680
1681         * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1682         arch/aarch64-insn.h.
1683         (struct aarch64_memory_operand): Likewise.
1684         (ENCODE): Likewise.
1685         (emit_insn): Move to arch/aarch64-insn.c.
1686         (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1687         (emit_load_store): Move to arch/aarch64-insn.c.
1688         (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1689         (can_encode_int32): Remove.
1690
1691 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1692
1693         * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1694         (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1695         (aarch64_relocate_instruction): Likewise.
1696         (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1697         (struct aarch64_insn_visitor): Likewise.
1698
1699 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1700
1701         * linux-aarch64-low.c (struct aarch64_insn_data): New.
1702         (struct aarch64_insn_visitor): New.
1703         (struct aarch64_insn_relocation_data): New.
1704         (aarch64_ftrace_insn_reloc_b): New function.
1705         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1706         (aarch64_ftrace_insn_reloc_cb): Likewise.
1707         (aarch64_ftrace_insn_reloc_tb): Likewise.
1708         (aarch64_ftrace_insn_reloc_adr): Likewise.
1709         (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1710         (aarch64_ftrace_insn_reloc_others): Likewise.
1711         (visitor): New.
1712         (aarch64_relocate_instruction): Use visitor.
1713
1714 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1715
1716         * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1717         int.  Add argument buf.
1718         (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1719         aarch64_relocate_instruction.
1720
1721 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1722
1723         * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1724         argument insn.  Remove local variable insn.  Don't call
1725         target_read_uint32.
1726         (aarch64_install_fast_tracepoint_jump_pad): Call
1727         target_read_uint32.
1728
1729 2015-09-30  Yao Qi  <yao.qi@linaro.org>
1730
1731         * linux-aarch64-low.c (emit_movk): Shorten a long line.
1732         (emit_load_store_pair): Likewise.
1733
1734 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
1735
1736         * dll.c (match_dll): Add cast(s).
1737         (unloaded_dll): Likewise.
1738         * linux-low.c (second_thread_of_pid_p): Likewise.
1739         (delete_lwp_callback): Likewise.
1740         (count_events_callback): Likewise.
1741         (select_event_lwp_callback): Likewise.
1742         (linux_set_resume_request): Likewise.
1743         * server.c (accumulate_file_name_length): Likewise.
1744         (emit_dll_description): Likewise.
1745         (handle_qxfer_threads_worker): Likewise.
1746         (visit_actioned_threads): Likewise.
1747         * thread-db.c (any_thread_of): Likewise.
1748         * tracepoint.c (same_process_p): Likewise.
1749         (match_blocktype): Likewise.
1750         (build_traceframe_info_xml): Likewise.
1751
1752 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
1753
1754         * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1755         assignment.
1756         (gdb_unparse_agent_expr): Likewise.
1757         * hostio.c (require_data): Likewise.
1758         (handle_pread): Likewise.
1759         * linux-low.c (disable_regset): Likewise.
1760         (fetch_register): Likewise.
1761         (store_register): Likewise.
1762         (get_dynamic): Likewise.
1763         (linux_qxfer_libraries_svr4): Likewise.
1764         * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1765         (set_fast_tracepoint_jump): Likewise.
1766         (uninsert_fast_tracepoint_jumps_at): Likewise.
1767         (reinsert_fast_tracepoint_jumps_at): Likewise.
1768         (validate_inserted_breakpoint): Likewise.
1769         (clone_agent_expr): Likewise.
1770         * regcache.c (init_register_cache): Likewise.
1771         * remote-utils.c (putpkt_binary_1): Likewise.
1772         (decode_M_packet): Likewise.
1773         (decode_X_packet): Likewise.
1774         (look_up_one_symbol): Likewise.
1775         (relocate_instruction): Likewise.
1776         (monitor_output): Likewise.
1777         * server.c (handle_search_memory): Likewise.
1778         (handle_qxfer_exec_file): Likewise.
1779         (handle_qxfer_libraries): Likewise.
1780         (handle_qxfer): Likewise.
1781         (handle_query): Likewise.
1782         (handle_v_cont): Likewise.
1783         (handle_v_run): Likewise.
1784         (captured_main): Likewise.
1785         * target.c (write_inferior_memory): Likewise.
1786         * thread-db.c (try_thread_db_load_from_dir): Likewise.
1787         * tracepoint.c (init_trace_buffer): Likewise.
1788         (add_tracepoint_action): Likewise.
1789         (add_traceframe): Likewise.
1790         (add_traceframe_block): Likewise.
1791         (cmd_qtdpsrc): Likewise.
1792         (cmd_qtdv): Likewise.
1793         (cmd_qtstatus): Likewise.
1794         (response_source): Likewise.
1795         (response_tsv): Likewise.
1796         (cmd_qtnotes): Likewise.
1797         (gdb_collect): Likewise.
1798         (initialize_tracepoint): Likewise.
1799
1800 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1801
1802         * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1803         (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1804         <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1805         <NOP>: New.
1806         (enum aarch64_condition_codes): New enum.
1807         (w0): New static global.
1808         (fp): Likewise.
1809         (lr): Likewise.
1810         (struct aarch64_memory_operand) <type>: New
1811         MEMORY_OPERAND_POSTINDEX type.
1812         (postindex_memory_operand): New helper function.
1813         (emit_ret): New function.
1814         (emit_load_store_pair): New function, factored out of emit_stp
1815         with support for MEMORY_OPERAND_POSTINDEX.
1816         (emit_stp): Rewrite using emit_load_store_pair.
1817         (emit_ldp): New function.
1818         (emit_load_store): Likewise.
1819         (emit_ldr): Mention post-index instruction in comment.
1820         (emit_ldrh): New function.
1821         (emit_ldrb): New function.
1822         (emit_ldrsw): Mention post-index instruction in comment.
1823         (emit_str): Likewise.
1824         (emit_subs): New function.
1825         (emit_cmp): Likewise.
1826         (emit_and): Likewise.
1827         (emit_orr): Likewise.
1828         (emit_orn): Likewise.
1829         (emit_eor): Likewise.
1830         (emit_mvn): Likewise.
1831         (emit_lslv): Likewise.
1832         (emit_lsrv): Likewise.
1833         (emit_asrv): Likewise.
1834         (emit_mul): Likewise.
1835         (emit_sbfm): Likewise.
1836         (emit_sbfx): Likewise.
1837         (emit_ubfm): Likewise.
1838         (emit_ubfx): Likewise.
1839         (emit_csinc): Likewise.
1840         (emit_cset): Likewise.
1841         (emit_nop): Likewise.
1842         (emit_ops_insns): New helper function.
1843         (emit_pop): Likewise.
1844         (emit_push): Likewise.
1845         (aarch64_emit_prologue): New function.
1846         (aarch64_emit_epilogue): Likewise.
1847         (aarch64_emit_add): Likewise.
1848         (aarch64_emit_sub): Likewise.
1849         (aarch64_emit_mul): Likewise.
1850         (aarch64_emit_lsh): Likewise.
1851         (aarch64_emit_rsh_signed): Likewise.
1852         (aarch64_emit_rsh_unsigned): Likewise.
1853         (aarch64_emit_ext): Likewise.
1854         (aarch64_emit_log_not): Likewise.
1855         (aarch64_emit_bit_and): Likewise.
1856         (aarch64_emit_bit_or): Likewise.
1857         (aarch64_emit_bit_xor): Likewise.
1858         (aarch64_emit_bit_not): Likewise.
1859         (aarch64_emit_equal): Likewise.
1860         (aarch64_emit_less_signed): Likewise.
1861         (aarch64_emit_less_unsigned): Likewise.
1862         (aarch64_emit_ref): Likewise.
1863         (aarch64_emit_if_goto): Likewise.
1864         (aarch64_emit_goto): Likewise.
1865         (aarch64_write_goto_address): Likewise.
1866         (aarch64_emit_const): Likewise.
1867         (aarch64_emit_call): Likewise.
1868         (aarch64_emit_reg): Likewise.
1869         (aarch64_emit_pop): Likewise.
1870         (aarch64_emit_stack_flush): Likewise.
1871         (aarch64_emit_zero_ext): Likewise.
1872         (aarch64_emit_swap): Likewise.
1873         (aarch64_emit_stack_adjust): Likewise.
1874         (aarch64_emit_int_call_1): Likewise.
1875         (aarch64_emit_void_call_2): Likewise.
1876         (aarch64_emit_eq_goto): Likewise.
1877         (aarch64_emit_ne_goto): Likewise.
1878         (aarch64_emit_lt_goto): Likewise.
1879         (aarch64_emit_le_goto): Likewise.
1880         (aarch64_emit_gt_goto): Likewise.
1881         (aarch64_emit_ge_got): Likewise.
1882         (aarch64_emit_ops_impl): New static global variable.
1883         (aarch64_emit_ops): New target function, return
1884         &aarch64_emit_ops_impl.
1885         (struct linux_target_ops): Install it.
1886
1887 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1888
1889         * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1890         * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1891         aarch64-ipa.o.
1892         * linux-aarch64-ipa.c: New file.
1893         * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1894         and endian.h.
1895         (aarch64_get_thread_area): New target method.
1896         (extract_signed_bitfield): New helper function.
1897         (aarch64_decode_ldr_literal): New function.
1898         (enum aarch64_opcodes): New enum.
1899         (struct aarch64_register): New struct.
1900         (struct aarch64_operand): New struct.
1901         (x0): New static global.
1902         (x1): Likewise.
1903         (x2): Likewise.
1904         (x3): Likewise.
1905         (x4): Likewise.
1906         (w2): Likewise.
1907         (ip0): Likewise.
1908         (sp): Likewise.
1909         (xzr): Likewise.
1910         (aarch64_register): New helper function.
1911         (register_operand): Likewise.
1912         (immediate_operand): Likewise.
1913         (struct aarch64_memory_operand): New struct.
1914         (offset_memory_operand): New helper function.
1915         (preindex_memory_operand): Likewise.
1916         (enum aarch64_system_control_registers): New enum.
1917         (ENCODE): New macro.
1918         (emit_insn): New helper function.
1919         (emit_b): New function.
1920         (emit_bcond): Likewise.
1921         (emit_cb): Likewise.
1922         (emit_tb): Likewise.
1923         (emit_blr): Likewise.
1924         (emit_stp): Likewise.
1925         (emit_ldp_q_offset): Likewise.
1926         (emit_stp_q_offset): Likewise.
1927         (emit_load_store): Likewise.
1928         (emit_ldr): Likewise.
1929         (emit_ldrsw): Likewise.
1930         (emit_str): Likewise.
1931         (emit_ldaxr): Likewise.
1932         (emit_stxr): Likewise.
1933         (emit_stlr): Likewise.
1934         (emit_data_processing_reg): Likewise.
1935         (emit_data_processing): Likewise.
1936         (emit_add): Likewise.
1937         (emit_sub): Likewise.
1938         (emit_mov): Likewise.
1939         (emit_movk): Likewise.
1940         (emit_mov_addr): Likewise.
1941         (emit_mrs): Likewise.
1942         (emit_msr): Likewise.
1943         (emit_sevl): Likewise.
1944         (emit_wfe): Likewise.
1945         (append_insns): Likewise.
1946         (can_encode_int32_in): New helper function.
1947         (aarch64_relocate_instruction): New function.
1948         (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1949         (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1950         (struct linux_target_ops): Install aarch64_get_thread_area,
1951         aarch64_install_fast_tracepoint_jump_pad and
1952         aarch64_get_min_fast_tracepoint_insn_len.
1953
1954 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1955
1956         * Makefile.in (aarch64-insn.o): New rule.
1957         * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1958
1959 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1960
1961         * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1962
1963 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1964
1965         * tracepoint.c (max_jump_pad_size): Remove.
1966
1967 2015-09-18  Yao Qi  <yao.qi@linaro.org>
1968
1969         * linux-aarch64-low.c: Don't include sys/uio.h.
1970         (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1971
1972 2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
1973
1974         * tracepoint.c (eval_result_type): Change prototype.
1975         (condition_true_at_tracepoint): Fix argument to compiled_cond.
1976
1977 2015-09-15  Pedro Alves  <palves@redhat.com>
1978
1979         * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1980         Check whether to report exec events instead of checking whether
1981         multiprocess is enabled.
1982
1983 2015-09-15  Pedro Alves  <palves@redhat.com>
1984
1985         PR remote/18965
1986         * remote-utils.c (prepare_resume_reply): Merge
1987         TARGET_WAITKIND_VFORK_DONE switch case with the
1988         TARGET_WAITKIND_FORKED case.
1989
1990 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1991
1992         * server.c (handle_query): Check string comparison using
1993         "else if" instead of "if".
1994
1995 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1996
1997         * server.c (vCont_supported): New global variable.
1998         (handle_query): Set vCont_supported to 1 if "vContSupported+"
1999         matches.  Append ";vContSupported+" to own_buf.
2000         (handle_v_requests): Append ";s;S" to own_buf if target supports
2001         hardware single step or vCont_supported is false.
2002         (capture_main): Set vCont_supported to zero.
2003
2004 2015-09-15  Yao Qi  <yao.qi@linaro.org>
2005
2006         * linux-low.c (linux_supports_conditional_breakpoints): Rename
2007         it to ...
2008         (linux_supports_hardware_single_step): ... New function.
2009         (linux_target_ops): Update.
2010         * lynx-low.c (lynx_target_ops): Set field
2011         supports_hardware_single_step to target_can_do_hardware_single_step.
2012         * nto-low.c (nto_target_ops): Likewise.
2013         * spu-low.c (spu_target_ops): Likewise.
2014         * win32-low.c (win32_target_ops): Likewise.
2015         * target.c (target_can_do_hardware_single_step): New function.
2016         * target.h (struct target_ops) <supports_conditional_breakpoints>:
2017         Remove.  <supports_hardware_single_step>: New field.
2018         (target_supports_conditional_breakpoints): Remove.
2019         (target_supports_hardware_single_step): New macro.
2020         (target_can_do_hardware_single_step): Declare.
2021         * server.c (handle_query): Use target_supports_hardware_single_step
2022         instead of target_supports_conditional_breakpoints.
2023
2024 2015-09-15  Yao Qi  <yao.qi@linaro.org>
2025
2026         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2027         function.
2028         (struct linux_target_ops the_low_target): Install
2029         aarch64_linux_siginfo_fixup.
2030
2031 2015-09-11  Don Breazeal  <donb@codesourcery.com>
2032             Luis Machado  <lgustavo@codesourcery.com>
2033
2034         * linux-low.c (linux_mourn): Static declaration.
2035         (linux_arch_setup): Move in front of
2036         handle_extended_wait.
2037         (linux_arch_setup_thread): New function.
2038         (handle_extended_wait): Handle exec events.  Call
2039         linux_arch_setup_thread.  Make event_lwp argument a
2040         pointer-to-a-pointer.
2041         (check_zombie_leaders): Do not check stopped threads.
2042         (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2043         (linux_low_filter_event): Add lwp and thread for exec'ing
2044         non-leader thread if leader thread has been deleted.
2045         Refactor code into linux_arch_setup_thread and call it.
2046         Pass child lwp pointer by reference to handle_extended_wait.
2047         (linux_wait_for_event_filtered): Update comment.
2048         (linux_wait_1): Prevent clobbering exec event status.
2049         (linux_supports_exec_events): New function.
2050         (linux_target_ops) <supports_exec_events>: Initialize new member.
2051         * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2052         new member.
2053         * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2054         * server.c (report_exec_events): New global variable.
2055         (handle_query): Handle qSupported query for exec-events feature.
2056         (captured_main): Initialize report_exec_events.
2057         * server.h (report_exec_events): Declare new global variable.
2058         * target.h (struct target_ops) <supports_exec_events>: New
2059         member.
2060         (target_supports_exec_events): New macro.
2061         * win32-low.c (win32_target_ops) <supports_exec_events>:
2062         Initialize new member.
2063
2064 2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
2065
2066         * linux-low.c (linux_low_enable_btrace): Remove.
2067         (linux_target_ops): Replace linux_low_enable_btrace with
2068         linux_enable_btrace.
2069
2070 2015-09-03  Yao Qi  <yao.qi@linaro.org>
2071
2072         * linux-aarch64-low.c (aarch64_insert_point): Call
2073         aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2074         returns true.
2075
2076 2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2077
2078         * linux-low.c (check_stopped_by_breakpoint): Use
2079         GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2080
2081 2015-08-27  Pedro Alves  <palves@redhat.com>
2082
2083         * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2084
2085 2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
2086
2087         * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2088         the XNEW-family equivalent.
2089         (compile_bytecodes): Likewise.
2090         * dll.c (loaded_dll): Likewise.
2091         * event-loop.c (append_callback_event): Likewise.
2092         (create_file_handler): Likewise.
2093         (create_file_event): Likewise.
2094         * hostio.c (handle_open): Likewise.
2095         * inferiors.c (add_thread): Likewise.
2096         (add_process): Likewise.
2097         * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2098         * linux-arm-low.c (arm_new_process): Likewise.
2099         (arm_new_thread): Likewise.
2100         * linux-low.c (add_to_pid_list): Likewise.
2101         (linux_add_process): Likewise.
2102         (handle_extended_wait): Likewise.
2103         (add_lwp): Likewise.
2104         (enqueue_one_deferred_signal): Likewise.
2105         (enqueue_pending_signal): Likewise.
2106         (linux_resume_one_lwp_throw): Likewise.
2107         (linux_resume_one_thread): Likewise.
2108         (linux_read_memory): Likewise.
2109         (linux_write_memory): Likewise.
2110         * linux-mips-low.c (mips_linux_new_process): Likewise.
2111         (mips_linux_new_thread): Likewise.
2112         (mips_add_watchpoint): Likewise.
2113         * linux-x86-low.c (initialize_low_arch): Likewise.
2114         * lynx-low.c (lynx_add_process): Likewise.
2115         * mem-break.c (set_raw_breakpoint_at): Likewise.
2116         (set_breakpoint): Likewise.
2117         (add_condition_to_breakpoint): Likewise.
2118         (add_commands_to_breakpoint): Likewise.
2119         (clone_agent_expr): Likewise.
2120         (clone_one_breakpoint): Likewise.
2121         * regcache.c (new_register_cache): Likewise.
2122         * remote-utils.c (look_up_one_symbol): Likewise.
2123         * server.c (queue_stop_reply): Likewise.
2124         (start_inferior): Likewise.
2125         (queue_stop_reply_callback): Likewise.
2126         (handle_target_event): Likewise.
2127         * spu-low.c (fetch_ppc_memory): Likewise.
2128         (store_ppc_memory): Likewise.
2129         * target.c (set_target_ops): Likewise.
2130         * thread-db.c (thread_db_load_search): Likewise.
2131         (try_thread_db_load_1): Likewise.
2132         * tracepoint.c (add_tracepoint): Likewise.
2133         (add_tracepoint_action): Likewise.
2134         (create_trace_state_variable): Likewise.
2135         (cmd_qtdpsrc): Likewise.
2136         (cmd_qtro): Likewise.
2137         (add_while_stepping_state): Likewise.
2138         * win32-low.c (child_add_thread): Likewise.
2139         (get_image_name): Likewise.
2140
2141 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2142
2143         * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2144
2145 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2146
2147         * Makefile.in (aarch64-linux.o): New rule.
2148         * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2149         srv_tgtobj.
2150         * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2151         (aarch64_init_debug_reg_state): Make it extern.
2152         (aarch64_linux_prepare_to_resume): Remove.
2153
2154 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2155
2156         * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2157         lwp_arch_private_info and ptid_of_lwp.
2158
2159 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2160
2161         * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2162         Find proc_info by find_process_pid.  All callers updated.
2163
2164 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2165
2166         * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2167         Remove.
2168         (debug_reg_change_callback): Remove.
2169         (aarch64_notify_debug_reg_change): Remove.
2170
2171 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2172
2173         * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2174         Call current_lwp_ptid.
2175
2176 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2177
2178         * linux-aarch64-low.c (debug_reg_change_callback): Use
2179         debug_printf.
2180
2181 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2182
2183         * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2184
2185 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2186
2187         * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2188
2189 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2190
2191         * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2192         the code.
2193
2194 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2195
2196         * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2197         Remove.
2198         (debug_reg_change_callback): Remove argument entry and add argument
2199         lwp.  Remove local variable thread.  Don't print thread id in the
2200         debugging output.  Don't check whether pid of thread equals to pid.
2201         (aarch64_notify_debug_reg_change): Don't set param.pid.  Call
2202         iterate_over_lwps instead find_inferior.
2203
2204 2015-08-24  Pedro Alves  <palves@redhat.com>
2205
2206         * inferiors.c (get_first_process): New function.
2207         * inferiors.h (get_first_process): New declaration.
2208         * remote-utils.c (read_ptid): Default to the first process in the
2209         list, instead of to the current thread's process.
2210
2211 2015-08-24  Pedro Alves  <palves@redhat.com>
2212
2213         * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2214         * event-loop.c: Likewise.
2215         * remote-utils.c: Likewise.
2216         * tracepoint.c: Likewise.
2217
2218 2015-08-24  Pedro Alves  <palves@redhat.com>
2219
2220         * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2221         ptid_get_lwp.
2222
2223 2015-08-21  Pedro Alves  <palves@redhat.com>
2224
2225         * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2226         instead of literal 1.
2227
2228 2015-08-21  Pedro Alves  <palves@redhat.com>
2229
2230         * tdesc.c (default_description): Explicitly zero-initialize.
2231
2232 2015-08-21  Pedro Alves  <palves@redhat.com>
2233
2234         PR gdb/18749
2235         * inferiors.c (remove_thread): Discard any pending stop reply for
2236         this thread.
2237         * server.c (remove_all_on_match_pid): Rename to ...
2238         (remove_all_on_match_ptid): ... this.  Work with a filter ptid
2239         instead of a pid.
2240         (discard_queued_stop_replies): Change parameter to a ptid.  Now
2241         extern.
2242         (handle_v_kill, kill_inferior_callback, captured_main)
2243         (process_serial_event): Adjust.
2244         * server.h (discard_queued_stop_replies): Declare.
2245
2246 2015-08-21  Pedro Alves  <palves@redhat.com>
2247
2248         * linux-low.c (wait_for_sigstop): Always switch to no thread
2249         selected if the previously current thread dies.
2250         * lynx-low.c (lynx_request_interrupt): Use the first thread's
2251         process instead of the current thread's.
2252         * remote-utils.c (input_interrupt): Don't check if there's no
2253         current thread.
2254         * server.c (gdb_read_memory, gdb_write_memory): If setting the
2255         current thread to the general thread fails, error out.
2256         (handle_qxfer_auxv, handle_qxfer_libraries)
2257         (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2258         (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2259         (handle_query): Check if there's a thread selected instead of
2260         checking whether there's any thread in the thread list.
2261         (handle_qxfer_threads, handle_qxfer_btrace)
2262         (handle_qxfer_btrace_conf): Don't error out early if there's no
2263         thread in the thread list.
2264         (handle_v_cont, myresume): Don't set the current thread to the
2265         continue thread.
2266         (process_serial_event) <Hg handling>: Also set thread_id if the
2267         previous general thread is still alive.
2268         (process_serial_event) <g/G handling>: If setting the current
2269         thread to the general thread fails, error out.
2270         * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2271         thread's lwp instead of the current thread's.
2272         * target.c (set_desired_thread): If the desired thread was not
2273         found, leave the current thread pointing to NULL.  Return an int
2274         (boolean) indicating success.
2275         * target.h (set_desired_thread): Change return type to int.
2276
2277 2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
2278
2279         * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2280         * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2281         #includes.
2282         (ps_get_thread_area): New function.
2283
2284 2015-08-19  Gary Benson  <gbenson@redhat.com>
2285
2286         * hostio.c (handle_pread): Do not attempt to read more data
2287         than hostio_reply_with_data can fit in a packet.
2288
2289 2015-08-18  Joel Brobecker  <brobecker@adacore.com>
2290
2291         * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2292
2293 2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
2294
2295         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2296
2297 2015-08-06  Pedro Alves  <palves@redhat.com>
2298
2299         * tracepoint.c (expr_eval_result): Now an int.
2300
2301 2015-08-06  Pedro Alves  <palves@redhat.com>
2302
2303         * gdbthread.h (struct regcache): Forward declare.
2304         (struct thread_info) <regcache_data>: Now a struct regcache
2305         pointer.
2306         * inferiors.c (inferior_regcache_data)
2307         (set_inferior_regcache_data): Now work with struct regcache
2308         pointers.
2309         * inferiors.h (struct regcache): Forward declare.
2310         (inferior_regcache_data, set_inferior_regcache_data): Now work
2311         with struct regcache pointers.
2312         * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2313         (free_register_cache_thread): Remove struct regcache pointer
2314         casts.
2315
2316 2015-08-06  Pedro Alves  <palves@redhat.com>
2317
2318         * server.c (captured_main): On error, print the exception message
2319         to stderr, and if run_once is set, throw a quit.
2320
2321 2015-08-06  Pedro Alves  <palves@redhat.com>
2322
2323         * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2324         the current thread.
2325
2326 2015-08-06  Pedro Alves  <palves@redhat.com>
2327
2328         * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2329         reading beyond the passed in buffer length.
2330
2331 2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
2332
2333         * tracepoint.c (symbol_list) <required>: Remove.
2334
2335 2015-08-06  Pedro Alves  <palves@redhat.com>
2336
2337         * linux-low.c (handle_extended_wait): Set the fork child's suspend
2338         count if stopping and suspending threads.
2339         (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2340         stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2341         (linux_detach): Complete an ongoing step-over.
2342         (lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
2343         throughout.
2344         (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2345         (linux_wait_1): If passing a signal to the inferior after
2346         finishing a step-over, unsuspend and re-resume all lwps.  If we
2347         see a single-step event but the thread should be continuing, don't
2348         pass the trap to gdb.
2349         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2350         internal_error instead of gdb_assert.
2351         (enqueue_pending_signal): New function.
2352         (check_ptrace_stopped_lwp_gone): Add debug output.
2353         (start_step_over): Use internal_error instead of gdb_assert.
2354         (complete_ongoing_step_over): New function.
2355         (linux_resume_one_thread): Don't resume a suspended thread.
2356         (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2357         it stepping.
2358
2359 2015-08-06  Pedro Alves  <palves@redhat.com>
2360
2361         * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2362         (linux_thread_alive): Use lwp_is_marked_dead.
2363         (extended_event_reported): Delete.
2364         (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2365         instead of extended_event_reported.
2366         (mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
2367         as well.
2368         (lwp_is_marked_dead): New function.
2369         (lwp_running): Use lwp_is_marked_dead.
2370         * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2371         comment.
2372
2373 2015-08-06  Pedro Alves  <palves@redhat.com>
2374
2375         * linux-low.c (linux_wait_1): Move fork event output out of the
2376         !report_to_gdb check.  Pass event_child->waitstatus to
2377         target_waitstatus_to_string instead of ourstatus.
2378
2379 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2380
2381         * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2382         if current_thread is 32 bit.
2383
2384 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2385
2386         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2387         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2388         * server.c (extended_protocol): Remove "static".
2389         * server.h (extended_protocol): Declare it.
2390
2391 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2392
2393         * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2394         both aarch64 and aarch32.
2395         (aarch64_set_pc): Likewise.
2396
2397 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2398
2399         * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2400         to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2401         arm-with-neon.xml to srv_xmlfiles.
2402         * linux-aarch64-low.c: Include linux-aarch32-low.h.
2403         (is_64bit_tdesc): New function.
2404         (aarch64_linux_read_description): New function.
2405         (aarch64_arch_setup): Call aarch64_linux_read_description.
2406         (regs_info): Rename to regs_info_aarch64.
2407         (aarch64_regs_info): Return right regs_info.
2408         (initialize_low_arch): Call initialize_low_arch_aarch32.
2409
2410 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2411
2412         * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2413         * linux-aarch32-low.c: New file.
2414         * linux-aarch32-low.h: New file.
2415         * linux-arm-low.c (arm_fill_gregset): Move it to
2416         linux-aarch32-low.c.
2417         (arm_store_gregset): Likewise.
2418         (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2419         (arm_store_vfpregset): Call arm_store_vfpregset_num.
2420         (arm_arch_setup): Check if PTRACE_GETREGSET works.
2421         (regs_info): Rename to regs_info_arm.
2422         (arm_regs_info): Return regs_info_aarch32 if
2423         have_ptrace_getregset is 1 and target description is
2424         arm_with_neon or arm_with_vfpv3.
2425         (initialize_low_arch): Don't call init_registers_arm_with_neon.
2426         Call initialize_low_arch_aarch32 instead.
2427
2428 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2429
2430         * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2431         * linux-low.c: ... here.
2432         * linux-low.h (have_ptrace_getregset): Declare it.
2433
2434 2015-08-04  Pedro Alves  <palves@redhat.com>
2435
2436         * thread-db.c (struct thread_db): Use new typedefs.
2437         (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2438         CHK calls.
2439         (disable_thread_event_reporting): Cast result of dlsym to
2440         destination function pointer type.
2441         (thread_db_mourn): Use td_ta_delete_ftype.
2442
2443 2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
2444
2445         * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2446         arch variant.
2447         (CDX_BREAKPOINT): Define for R2.
2448         (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2449         (the_low_target): Add comments.
2450
2451 2015-07-30  Yao Qi  <yao.qi@linaro.org>
2452
2453         * linux-arm-low.c (arm_hwcap): Remove it.
2454         (arm_read_description): New local variable arm_hwcap.  Don't
2455         set arm_hwcap to zero.
2456
2457 2015-07-30  Yao Qi  <yao.qi@linaro.org>
2458
2459         * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2460         Use regcache->tdesc instead.
2461         (arm_store_wmmxregset): Likewise.
2462         (arm_fill_vfpregset): Likewise.
2463         (arm_store_vfpregset): Likewise.
2464
2465 2015-07-30  Yao Qi  <yao.qi@linaro.org>
2466
2467         * linux-arm-low.c: Include arch/arm.h.
2468         (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2469         (arm_store_gregset): Likewise.
2470
2471 2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
2472
2473         * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2474         ptrace's 4th parameter.
2475
2476 2015-07-27  Yao Qi  <yao.qi@linaro.org>
2477
2478         * configure.srv (case aarch64*-*-linux*): Don't set
2479         srv_linux_usrregs.
2480
2481 2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
2482
2483         * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2484         sys/ptrace.h.
2485         * linux-arm-low.c: Likewise.
2486         * linux-cris-low.c: Likewise.
2487         * linux-crisv32-low.c: Likewise.
2488         * linux-low.c: Likewise.
2489         * linux-m68k-low.c: Likewise.
2490         * linux-mips-low.c: Likewise.
2491         * linux-nios2-low.c: Likewise.
2492         * linux-s390-low.c: Likewise.
2493         * linux-sparc-low.c: Likewise.
2494         * linux-tic6x-low.c: Likewise.
2495         * linux-tile-low.c: Likewise.
2496         * linux-x86-low.c: Likewise.
2497
2498 2015-07-24  Pedro Alves  <palves@redhat.com>
2499
2500         * config.in: Regenerate.
2501         * configure: Regenerate.
2502
2503 2015-07-24  Pedro Alves  <palves@redhat.com>
2504
2505         * acinclude.m4: Include ../ptrace.m4.
2506         * configure.ac: Call GDB_AC_PTRACE.
2507         * config.in, configure: Regenerate.
2508
2509 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2510
2511         * linux-low.c (linux_create_inferior): Remove setting to
2512         proc->priv->new_inferior.
2513         (linux_attach): Likewise.
2514         (linux_low_filter_event): Likewise.
2515         * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2516
2517 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2518
2519         * linux-low.c (linux_arch_setup): New function.
2520         (linux_low_filter_event): If proc->tdesc is NULL and
2521         proc->attached is true, call the_low_target.arch_setup.
2522         Otherwise, keep status pending, and return.
2523         (linux_resume_one_lwp_throw): Don't call get_pc if
2524         thread->while_stepping isn't NULL.  Don't call
2525         get_thread_regcache if proc->tdesc is NULL.
2526         (need_step_over_p): Return 0 if proc->tdesc is NULL.
2527         (linux_target_ops): Install arch_setup.
2528         * server.c (start_inferior): Call the_target->arch_setup.
2529         * target.h (struct target_ops) <arch_setup>: New field.
2530         (target_arch_setup): New marco.
2531         * lynx-low.c (lynx_target_ops): Update.
2532         * nto-low.c (nto_target_ops): Update.
2533         * spu-low.c (spu_target_ops): Update.
2534         * win32-low.c (win32_target_ops): Update.
2535
2536 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2537
2538         * linux-low.c (linux_add_process): Don't set
2539         proc->priv->new_inferior.
2540         (linux_create_inferior): Set proc->priv->new_inferior to 1.
2541         (linux_attach): Likewise.
2542
2543 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2544
2545         * server.c (start_inferior): Code refactor.
2546
2547 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2548
2549         * server.c (process_serial_event): Set general_thread.
2550
2551 2015-07-21  Yao Qi  <yao.qi@linaro.org>
2552
2553         * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2554         aarch64_linux_get_debug_reg_capacity.
2555
2556 2015-07-17  Yao Qi  <yao.qi@linaro.org>
2557
2558         * Makefile.in (aarch64-linux-hw-point.o): New rule.
2559         * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2560         * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2561         (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2562         (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2563         (AARCH64_HWP_ALIGNMENT): Likewise.
2564         (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2565         (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2566         (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2567         (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2568         (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2569         (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2570         (struct aarch64_debug_reg_state): Likewise.
2571         (struct arch_lwp_info): Likewise.
2572         (aarch64_align_watchpoint): Likewise.
2573         (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2574         (aarch64_watchpoint_length): Likewise.
2575         (aarch64_point_encode_ctrl_reg): Likewise
2576         (aarch64_point_is_aligned): Likewise.
2577         (aarch64_align_watchpoint): Likewise.
2578         (aarch64_linux_set_debug_regs):
2579         (aarch64_dr_state_insert_one_point): Likewise.
2580         (aarch64_dr_state_remove_one_point): Likewise.
2581         (aarch64_handle_breakpoint): Likewise.
2582         (aarch64_handle_aligned_watchpoint): Likewise.
2583         (aarch64_handle_unaligned_watchpoint): Likewise.
2584         (aarch64_handle_watchpoint): Likewise.
2585
2586 2015-07-17  Yao Qi  <yao.qi@linaro.org>
2587
2588         * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2589         and don't aarch64_get_debug_reg_state.  All callers update.
2590         (aarch64_handle_aligned_watchpoint): Likewise.
2591         (aarch64_handle_unaligned_watchpoint): Likewise.
2592         (aarch64_handle_watchpoint): Likewise.
2593         (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2594         (aarch64_remove_point): Likewise.
2595
2596 2015-07-17  Yao Qi  <yao.qi@linaro.org>
2597
2598         * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2599         debug_printf.
2600         (aarch64_handle_unaligned_watchpoint): Likewise.
2601
2602 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
2603
2604         Revert the previous 3 commits:
2605         Move gdb_regex* to common/
2606         Move linux_find_memory_regions_full & co.
2607         gdbserver build-id attribute generator
2608
2609 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
2610             Jan Kratochvil  <jan.kratochvil@redhat.com>
2611
2612         gdbserver build-id attribute generator.
2613         * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2614         (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2615         (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2616         (find_phdr): New.
2617         (get_dynamic): Use find_pdhr to traverse program headers.
2618         (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2619         (compare_mapping_entry_range, struct find_memory_region_callback_data)
2620         (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2621         (get_hex_build_id): New.
2622         (linux_qxfer_libraries_svr4): Add optional build-id attribute
2623         to reply XML document.
2624
2625 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
2626             Jan Kratochvil  <jan.kratochvil@redhat.com>
2627
2628         * target.c: Include target/target-utils.h and fcntl.h.
2629         (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2630         (target_fileio_read_stralloc): New functions.
2631
2632 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
2633
2634         * Makefile.in (OBS): Add gdb_regex.o.
2635         (gdb_regex.o): New.
2636         * config.in: Rebuilt.
2637         * configure: Rebuilt.
2638
2639 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
2640             Jan Kratochvil  <jan.kratochvil@redhat.com>
2641
2642         Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2643         * Makefile.in (OBS): Add target-utils.o.
2644         (linux-maps.o, target-utils.o): New.
2645         * configure.srv (srv_linux_obj): Add linux-maps.o.
2646
2647 2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
2648
2649         * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2650         function, return 1.
2651         (the_low_target): Install it.
2652
2653 2015-07-14  Pedro Alves  <palves@redhat.com>
2654
2655         * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2656         Instead, ignore ECHILD, and throw an error for other errnos.
2657
2658 2015-07-10  Pedro Alves  <palves@redhat.com>
2659
2660         * event-loop.c (struct callback_event) <data>: Change type to
2661         gdb_client_data instance instead of gdb_client_data pointer.
2662         (append_callback_event): Adjust.
2663
2664 2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
2665
2666         * linux-aarch64-low.c: Add comments for each linux_target_ops
2667         method.  Remove comments already covered in target_ops and
2668         linux_target_ops definitions.
2669         (the_low_target): Add comments for each unimplemented method.
2670
2671 2015-07-09  Yao Qi  <yao.qi@linaro.org>
2672
2673         * linux-aarch64-low.c (aarch64_regmap): Remove.
2674         (aarch64_usrregs_info): Remove.
2675         (regs_info): Set field usrregs to NULL.
2676
2677 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
2678
2679         * linux-low.c: Include "rsp-low.h"
2680         (linux_low_encode_pt_config, linux_low_encode_raw): New.
2681         (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2682         (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2683         (handle_btrace_enable_pt): New.
2684         (handle_btrace_general_set): Support "pt".
2685         (handle_btrace_conf_general_set): Support "pt:size".
2686
2687 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
2688
2689         * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2690         Z_PACKET_SW_BP.
2691
2692 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
2693
2694         * linux-aarch64-low.c: Remove comment about endianness.
2695         (aarch64_breakpoint): Change type to gdb_byte[].  Set to "brk #0".
2696         (aarch64_breakpoint_at): Change type of insn to gdb_byte[].  Use
2697         memcmp.
2698
2699 2015-06-24  Gary Benson  <gbenson@redhat.com>
2700
2701         * linux-i386-ipa.c (stdint.h): Do not include.
2702         * lynx-i386-low.c (stdint.h): Likewise.
2703         * lynx-ppc-low.c (stdint.h): Likewise.
2704         * mem-break.c (stdint.h): Likewise.
2705         * thread-db.c (stdint.h): Likewise.
2706         * tracepoint.c (stdint.h): Likewise.
2707         * win32-low.c (stdint.h): Likewise.
2708
2709 2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
2710
2711         * server.c (write_qxfer_response): Update call to
2712         remote_escape_output.
2713
2714 2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
2715             Jan Kratochvil  <jan.kratochvil@redhat.com>
2716
2717         Merge multiple hex conversions.
2718         * gdbreplay.c (tohex): Rename to 'fromhex'.
2719         (logchar): Use fromhex.
2720
2721 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
2722
2723         * server.c (handle_qxfer_libraries): Set `version' attribute for
2724         <library-list>.
2725
2726 2015-06-10  Gary Benson  <gbenson@redhat.com>
2727
2728         * target.h (struct target_ops) <multifs_open>: New field.
2729         <multifs_unlink>: Likewise.
2730         <multifs_readlink>: Likewise.
2731         * linux-low.c (nat/linux-namespaces.h): New include.
2732         (linux_target_ops): Initialize the_target->multifs_open,
2733         the_target->multifs_unlink and the_target->multifs_readlink.
2734         * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2735         * hostio.c (hostio_fs_pid): New static variable.
2736         (hostio_handle_new_gdb_connection): New function.
2737         (handle_setfs): Likewise.
2738         (handle_open): Use the_target->multifs_open as appropriate.
2739         (handle_unlink): Use the_target->multifs_unlink as appropriate.
2740         (handle_readlink): Use the_target->multifs_readlink as
2741         appropriate.
2742         (handle_vFile): Handle vFile:setfs packets.
2743         * server.c (handle_query): Call hostio_handle_new_gdb_connection
2744         after target_handle_new_gdb_connection.
2745
2746 2015-06-10  Gary Benson  <gbenson@redhat.com>
2747
2748         * configure.ac (AC_CHECK_FUNCS): Add setns.
2749         * config.in: Regenerate.
2750         * configure: Likewise.
2751         * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2752         (linux-namespaces.o): New rule.
2753         * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2754
2755 2015-06-09  Gary Benson <gbenson@redhat.com>
2756
2757         * hostio.c (handle_open): Process mode argument with
2758         fileio_to_host_mode.
2759
2760 2015-06-01  Yao Qi  <yao.qi@linaro.org>
2761
2762         * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2763         * linux-x86-low.c: Likewise.
2764
2765 2015-05-28  Don Breazeal  <donb@codesourcery.com>
2766
2767         * linux-low.c (handle_extended_wait): Initialize
2768         thread_info.last_resume_kind for new fork children.
2769
2770 2015-05-15  Pedro Alves  <palves@redhat.com>
2771
2772         * target.h (target_handle_new_gdb_connection): Rewrite using if
2773         wrapped in do/while.
2774
2775 2015-05-14  Joel Brobecker  <brobecker@adacore.com>
2776
2777         * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2778         * configure, config.in: Regenerate.
2779         * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2780         Declare typedef.
2781
2782 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2783
2784         * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2785         PTRACE_EVENT_VFORK_DONE.
2786         (linux_low_ptrace_options, extended_event_reported): Add vfork
2787         events.
2788         * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2789         and "vforkdone" for RSP 'T' Stop Reply Packet.
2790         * server.h (report_vfork_events): Declare
2791         global variable.
2792
2793 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2794
2795         * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2796         (the_low_target) <new_fork>: Initialize new member.
2797         * linux-arm-low.c (arm_new_fork): New function.
2798         (the_low_target) <new_fork>: Initialize new member.
2799         * linux-low.c (handle_extended_wait): Call new target function
2800         new_fork.
2801         * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2802         * linux-mips-low.c (mips_add_watchpoint): New function
2803         extracted from mips_insert_point.
2804         (the_low_target) <new_fork>: Initialize new member.
2805         (mips_linux_new_fork): New function.
2806         (mips_insert_point): Call mips_add_watchpoint.
2807         * linux-x86-low.c (x86_linux_new_fork): New function.
2808         (the_low_target) <new_fork>: Initialize new member.
2809
2810 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2811
2812         * linux-low.c (handle_extended_wait): Implement return value,
2813         rename argument 'event_child' to 'event_lwp', handle
2814         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2815         (linux_low_ptrace_options): New function.
2816         (linux_low_filter_event): Call linux_low_ptrace_options,
2817         use different argument fo linux_enable_event_reporting,
2818         use return value from handle_extended_wait.
2819         (extended_event_reported): New function.
2820         (linux_wait_1): Call extended_event_reported and set
2821         status to report fork events.
2822         (linux_write_memory): Add pid to debug message.
2823         (reset_lwp_ptrace_options_callback): New function.
2824         (linux_handle_new_gdb_connection): New function.
2825         (linux_target_ops): Initialize new structure member.
2826         * linux-low.h (struct lwp_info) <waitstatus>: New member.
2827         * lynx-low.c: Initialize new structure member.
2828         * remote-utils.c (prepare_resume_reply): Implement stop reason
2829         "fork" for "T" stop message.
2830         * server.c (handle_query): Call handle_new_gdb_connection.
2831         * server.h (report_fork_events): Declare global flag.
2832         * target.h (struct target_ops) <handle_new_gdb_connection>:
2833         New member.
2834         (target_handle_new_gdb_connection): New macro.
2835         * win32-low.c: Initialize new structure member.
2836
2837 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2838
2839         * mem-break.c (APPEND_TO_LIST): Define macro.
2840         (clone_agent_expr): New function.
2841         (clone_one_breakpoint): New function.
2842         (clone_all_breakpoints): New function.
2843         * mem-break.h: Declare new functions.
2844
2845 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2846
2847         * linux-low.c (linux_supports_fork_events): New function.
2848         (linux_supports_vfork_events): New function.
2849         (linux_target_ops): Initialize new structure members.
2850         (initialize_low): Call linux_check_ptrace_features.
2851         * lynx-low.c (lynx_target_ops): Initialize new structure
2852         members.
2853         * server.c (report_fork_events, report_vfork_events):
2854         New global flags.
2855         (handle_query): Add new features to qSupported packet and
2856         response.
2857         (captured_main): Initialize new global variables.
2858         * target.h (struct target_ops) <supports_fork_events>:
2859         New member.
2860         <supports_vfork_events>: New member.
2861         (target_supports_fork_events): New macro.
2862         (target_supports_vfork_events): New macro.
2863         * win32-low.c (win32_target_ops): Initialize new structure
2864         members.
2865
2866 2015-05-12  Gary Benson <gbenson@redhat.com>
2867
2868         * server.c (handle_qxfer_exec_file): Use current process
2869         if annex is empty.
2870
2871 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
2872
2873         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
2874         Remove HAVE_PTRACE_GETREGS conditionals.
2875         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2876         instead of PTRACE_GETREGS and PTRACE_SETREGS.
2877
2878 2015-05-08  Yao Qi  <yao.qi@linaro.org>
2879
2880         * linux-low.c (linux_supports_conditional_breakpoints): New
2881         function.
2882         (linux_target_ops): Install new target method.
2883         * lynx-low.c (lynx_target_ops): Install NULL hook for
2884         supports_conditional_breakpoints.
2885         * nto-low.c (nto_target_ops): Likewise.
2886         * spu-low.c (spu_target_ops): Likewise.
2887         * win32-low.c (win32_target_ops): Likewise.
2888         * server.c (handle_query): Check
2889         target_supports_conditional_breakpoints.
2890         * target.h (struct target_ops) <supports_conditional_breakpoints>:
2891         New field.
2892         (target_supports_conditional_breakpoints): New macro.
2893
2894 2015-05-06  Pedro Alves  <palves@redhat.com>
2895
2896         PR server/18081
2897         * server.c (start_inferior): If the process exits, mourn it.
2898
2899 2015-04-21  Gary Benson <gbenson@redhat.com>
2900
2901         * hostio.c (fileio_open_flags_to_host): Factored out to
2902         fileio_to_host_openflags in common/fileio.c.  Single use
2903         updated.
2904
2905 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2906
2907         * linux-xtensa-low.c (xtensa_fill_gregset)
2908         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2909         XCHAL_HAVE_LOOP.
2910
2911 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2912
2913         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2914         (regs_info): Replace usrregs pointer with NULL.
2915
2916 2015-04-17  Gary Benson  <gbenson@redhat.com>
2917
2918         * target.h (struct target_ops) <pid_to_exec_file>: New field.
2919         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2920         * server.c (handle_qxfer_exec_file): New function.
2921         (qxfer_packets): Add exec-file entry.
2922         (handle_query): Report qXfer:exec-file:read as supported packet.
2923
2924 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
2925
2926         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2927
2928 2015-04-09  Gary Benson <gbenson@redhat.com>
2929
2930         * hostio-errno.c (errno_to_fileio_error): Remove function.
2931         Update caller to use remote_fileio_to_fio_error.
2932
2933 2015-04-09  Yao Qi  <yao.qi@linaro.org>
2934
2935         * linux-low.c (linux_insert_point): Call
2936         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2937         (linux_remove_point): Call remove_memory_breakpoint if type is
2938         raw_bkpt_type_sw.
2939         * linux-x86-low.c (x86_insert_point): Don't call
2940         insert_memory_breakpoint.
2941         (x86_remove_point): Don't call remove_memory_breakpoint.
2942
2943 2015-04-01  Pedro Alves  <palves@redhat.com>
2944             Cleber Rosa  <crosa@redhat.com>
2945
2946         * server.c (gdbserver_usage): Reorganize and extend the usage
2947         message.
2948
2949 2015-03-24  Pedro Alves  <palves@redhat.com>
2950
2951         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2952         output.  Also dump TRAP_TRACE.
2953         (linux_low_filter_event): In debug output, distinguish a
2954         resume_stop SIGSTOP from a delayed SIGSTOP.
2955
2956 2015-03-24  Gary Benson  <gbenson@redhat.com>
2957
2958         * linux-x86-low.c (x86_linux_new_thread): Moved to
2959         nat/x86-linux.c.
2960         (x86_linux_prepare_to_resume): Likewise.
2961
2962 2015-03-24  Gary Benson  <gbenson@redhat.com>
2963
2964         * Makefile.in (x86-linux-dregs.o): New rule.
2965         * configure.srv: Add x86-linux-dregs.o to relevant targets.
2966         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2967         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2968         (x86_linux_dr_get): Likewise.
2969         (x86_linux_dr_set): Likewise.
2970         (update_debug_registers_callback): Likewise.
2971         (x86_linux_dr_set_addr): Likewise.
2972         (x86_linux_dr_get_addr): Likewise.
2973         (x86_linux_dr_set_control): Likewise.
2974         (x86_linux_dr_get_control): Likewise.
2975         (x86_linux_dr_get_status): Likewise.
2976         (x86_linux_update_debug_registers): Likewise.
2977
2978 2015-03-24  Gary Benson  <gbenson@redhat.com>
2979
2980         * linux-x86-low.c (x86_linux_update_debug_registers):
2981         New function, factored out from...
2982         (x86_linux_prepare_to_resume): ...this.
2983
2984 2015-03-24  Gary Benson  <gbenson@redhat.com>
2985
2986         * linux-x86-low.c (x86_linux_dr_get): Update comments.
2987         (x86_linux_dr_set): Likewise.
2988         (update_debug_registers_callback): Likewise.
2989         (x86_linux_dr_set_addr): Likewise.
2990         (x86_linux_dr_get_addr): Likewise.
2991         (x86_linux_dr_set_control): Likewise.
2992         (x86_linux_dr_get_control): Likewise.
2993         (x86_linux_dr_get_status): Likewise.
2994         (x86_linux_prepare_to_resume): Likewise.
2995
2996 2015-03-24  Gary Benson  <gbenson@redhat.com>
2997
2998         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2999         Use perror_with_name.  Pass string through gettext.
3000         (x86_linux_dr_set): Likewise.
3001
3002 2015-03-24  Gary Benson  <gbenson@redhat.com>
3003
3004         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3005         (x86_linux_dr_set_addr): ...this.
3006         (x86_dr_low_get_addr): Rename to...
3007         (x86_linux_dr_get_addr): ...this.
3008         (x86_dr_low_set_control): Rename to...
3009         (x86_linux_dr_set_control): ...this.
3010         (x86_dr_low_get_control): Rename to...
3011         (x86_linux_dr_get_control): ...this.
3012         (x86_dr_low_get_status): Rename to...
3013         (x86_linux_dr_get_status): ...this.
3014         (x86_dr_low): Update with new function names.
3015
3016 2015-03-24  Gary Benson  <gbenson@redhat.com>
3017
3018         * Makefile.in (x86-linux.o): New rule.
3019         * configure.srv: Add x86-linux.o to relevant targets.
3020         * linux-low.c (lwp_set_arch_private_info): New function.
3021         (lwp_arch_private_info): Likewise.
3022         * linux-x86-low.c: Include nat/x86-linux.h.
3023         (arch_lwp_info): Removed structure.
3024         (update_debug_registers_callback):
3025         Use lwp_set_debug_registers_changed.
3026         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3027         and lwp_set_debug_registers_changed.
3028         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3029
3030 2015-03-24  Gary Benson  <gbenson@redhat.com>
3031
3032         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3033         * linux-arm-low.c (arm_new_thread): Likewise.
3034         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3035         * linux-mips-low.c (mips_linux_new_thread): Likewise.
3036         * linux-x86-low.c (x86_linux_new_thread): Likewise.
3037         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3038
3039 2015-03-24  Gary Benson  <gbenson@redhat.com>
3040
3041         * linux-low.c (ptid_of_lwp): New function.
3042         (lwp_is_stopped): Likewise.
3043         (lwp_stop_reason): Likewise.
3044         * linux-x86-low.c (update_debug_registers_callback):
3045         Use lwp_is_stopped.
3046         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3047         lwp_stop_reason.
3048
3049 2015-03-24  Gary Benson  <gbenson@redhat.com>
3050
3051         * linux-low.h (linux_stop_lwp): Remove declaration.
3052
3053 2015-03-24  Gary Benson  <gbenson@redhat.com>
3054
3055         * linux-low.h: Include nat/linux-nat.h.
3056         * linux-low.c (iterate_over_lwps_args): New structure.
3057         (iterate_over_lwps_filter): New function.
3058         (iterate_over_lwps): Likewise.
3059         * linux-x86-low.c (update_debug_registers_callback):
3060         Update signature to what iterate_over_lwps expects.
3061         Remove PID check that iterate_over_lwps now performs.
3062         (x86_dr_low_set_addr): Use iterate_over_lwps.
3063         (x86_dr_low_set_control): Likewise.
3064
3065 2015-03-24  Gary Benson  <gbenson@redhat.com>
3066
3067         * linux-x86-low.c (x86_debug_reg_state): New function.
3068         (x86_linux_prepare_to_resume): Use the above.
3069
3070 2015-03-24  Gary Benson  <gbenson@redhat.com>
3071
3072         * linux-low.c (current_lwp_ptid): New function.
3073         * linux-x86-low.c: Include nat/linux-nat.h.
3074         (x86_dr_low_get_addr): Use current_lwp_ptid.
3075         (x86_dr_low_get_control): Likewise.
3076         (x86_dr_low_get_status): Likewise.
3077
3078 2015-03-20  Pedro Alves  <palves@redhat.com>
3079
3080         * tracepoint.c (cmd_qtstatus): Make "str" const.
3081
3082 2015-03-20  Pedro Alves  <palves@redhat.com>
3083
3084         * server.c (handle_general_set): Make "req_str" const.
3085
3086 2015-03-19  Pedro Alves  <palves@redhat.com>
3087
3088         * linux-low.c (linux_resume_one_lwp): Rename to ...
3089         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
3090         instead call perror_with_name.
3091         (check_ptrace_stopped_lwp_gone): New function.
3092         (linux_resume_one_lwp): Reimplement as wrapper around
3093         linux_resume_one_lwp_throw that swallows errors if the LWP is
3094         gone.
3095
3096 2015-03-19  Pedro Alves  <palves@redhat.com>
3097
3098         * linux-low.c (count_events_callback, select_event_lwp_callback):
3099         No longer check whether the thread has resume_stop as last resume
3100         kind.
3101
3102 2015-03-19 Pedro Alves  <palves@redhat.com>
3103
3104         * linux-low.c (count_events_callback, select_event_lwp_callback):
3105         Use the lwp's status_pending_p field, not the thread's.
3106
3107 2015-03-19  Pedro Alves  <palves@redhat.com>
3108
3109         * linux-low.c (select_event_lwp_callback): Update comments to
3110         no longer mention SIGTRAP.
3111
3112 2015-03-18  Gary Benson  <gbenson@redhat.com>
3113
3114         * server.c (handle_query): Do not report vFile:fstat as supported.
3115
3116 2015-03-11  Gary Benson  <gbenson@redhat.com>
3117
3118         * hostio.c (sys/types.h): New include.
3119         (sys/stat.h): Likewise.
3120         (common-remote-fileio.h): Likewise.
3121         (handle_fstat): New function.
3122         (handle_vFile): Handle vFile:fstat packets.
3123
3124 2015-03-11  Gary Benson  <gbenson@redhat.com>
3125
3126         * configure.ac (AC_CHECK_MEMBERS): Add checks for
3127         struct stat.st_blocks and struct stat.st_blksize.
3128         * configure: Regenerate.
3129         * config.in: Likewise.
3130         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3131         (OBS): Add common-remote-fileio.o.
3132         (common-remote-fileio.o): New rule.
3133
3134 2015-03-09  Pedro Alves  <palves@redhat.com>
3135
3136         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3137         'struct sockaddr' pointer in 'accept' call.
3138
3139 2015-03-09  Pedro Alves  <palves@redhat.com>
3140
3141         Revert:
3142         2015-03-07  Pedro Alves  <palves@redhat.com>
3143         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3144         or <winsock2.h> here.  Instead include "gdb_socket.h".
3145         (remote_open): Use union gdb_sockaddr_u.
3146         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3147         or <winsock2.h> here.  Instead include "gdb_socket.h".
3148         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3149         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3150         or <sys/un.h>.
3151         (init_named_socket, gdb_agent_helper_thread): Use union
3152         gdb_sockaddr_u.
3153
3154 2015-03-07  Pedro Alves  <palves@redhat.com>
3155
3156         * configure.ac (build_warnings): Move
3157         -Wdeclaration-after-statement to the C-specific set.
3158         * configure: Regenerate.
3159
3160 2015-03-07  Pedro Alves  <palves@redhat.com>
3161
3162         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3163         or <winsock2.h> here.  Instead include "gdb_socket.h".
3164         (remote_open): Use union gdb_sockaddr_u.
3165         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3166         or <winsock2.h> here.  Instead include "gdb_socket.h".
3167         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3168         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3169         or <sys/un.h>.
3170         (init_named_socket, gdb_agent_helper_thread): Use union
3171         gdb_sockaddr_u.
3172
3173 2015-03-07  Pedro Alves  <palves@redhat.com>
3174
3175         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3176         instead.
3177
3178 2015-03-06  Yao Qi  <yao.qi@linaro.org>
3179
3180         * linux-aarch64-low.c (aarch64_insert_point): Use
3181         show_debug_regs as a boolean.
3182         (aarch64_remove_point): Likewise.
3183
3184 2015-03-05  Pedro Alves  <palves@redhat.com>
3185
3186         * lynx-low.c (lynx_target_ops): Install NULL hooks for
3187         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3188         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3189         * nto-low.c (nto_target_ops): Likewise.
3190         * spu-low.c (spu_target_ops): Likewise.
3191         * win32-low.c (win32_target_ops): Likewise.
3192
3193 2015-03-04  Pedro Alves  <palves@redhat.com>
3194
3195         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3196         Decide whether a breakpoint triggered based on the SIGTRAP's
3197         siginfo.si_code.
3198         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3199         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3200         (linux_low_filter_event): Check for breakpoints before checking
3201         watchpoints.
3202         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3203         siginfo.si_code.
3204         (linux_stopped_by_sw_breakpoint)
3205         (linux_supports_stopped_by_sw_breakpoint)
3206         (linux_stopped_by_hw_breakpoint)
3207         (linux_supports_stopped_by_hw_breakpoint): New functions.
3208         (linux_target_ops): Install new target methods.
3209
3210 2015-03-04  Pedro Alves  <palves@redhat.com>
3211
3212         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3213         * server.c (swbreak_feature, hwbreak_feature): New globals.
3214         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3215         (captured_main): Clear swbreak_feature and hwbreak_feature.
3216         * server.h (swbreak_feature, hwbreak_feature): Declare.
3217         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3218         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3219         supports_stopped_by_hw_breakpoint>: New fields.
3220         (target_supports_stopped_by_sw_breakpoint)
3221         (target_stopped_by_sw_breakpoint)
3222         (target_supports_stopped_by_hw_breakpoint)
3223         (target_stopped_by_hw_breakpoint): Declare.
3224
3225 2015-03-04  Pedro Alves  <palves@redhat.com>
3226
3227         enum lwp_stop_reason -> enum target_stop_reason
3228         * linux-low.c (check_stopped_by_breakpoint): Adjust.
3229         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3230         (linux_wait_1, stuck_in_jump_pad_callback)
3231         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3232         (linux_stopped_by_watchpoint):
3233         * linux-low.h (enum lwp_stop_reason): Delete.
3234         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3235         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3236
3237 2015-03-04  Yao Qi  <yao.qi@linaro.org>
3238
3239         * Makefile.in (SFILES): Add linux-aarch64-low.c.
3240
3241 2015-03-03  Gary Benson  <gbenson@redhat.com>
3242
3243         * hostio.c (handle_vFile): Fix prefix lengths.
3244
3245 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
3246
3247         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3248         ptr_bits.
3249
3250 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3251
3252         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3253         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3254         (clean): Add "rm -f" for above C files.
3255         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3256         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3257         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3258         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3259         * linux-s390-low.c (HWCAP_S390_VX): New macro.
3260         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3261         (init_registers_s390x_vx_linux64)
3262         (init_registers_s390x_tevx_linux64)
3263         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3264         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3265         declarations.
3266         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3267         (s390_store_vxrs_high): New functions.
3268         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3269         NT_S390_VXRS_HIGH.
3270         (s390_arch_setup): Add logic for selecting one of the new target
3271         descriptions.  Activate the new vector regsets if applicable.
3272         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3273         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3274         and init_registers_s390x_tevx_linux64.
3275
3276 2015-03-01  Pedro Alves  <palves@redhat.com>
3277
3278         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3279         parameter.
3280
3281 2015-02-27  Pedro Alves  <palves@redhat.com>
3282
3283         * linux-x86-low.c (u_debugreg_offset): New function.
3284         (x86_linux_dr_get, x86_linux_dr_set): Use it.
3285
3286 2015-02-27  Pedro Alves  <palves@redhat.com>
3287
3288         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3289         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3290         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3291         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3292         (ps_lsetfpregs, ps_getpid)
3293         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3294         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3295         (ps_lsetxregs, ps_plog): Declare.
3296
3297 2015-02-27  Pedro Alves  <palves@redhat.com>
3298
3299         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3300         IP_AGENT_EXPORT_FUNC.
3301         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3302         IP_AGENT_EXPORT_FUNC.
3303         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3304         (IP_AGENT_EXPORT): Delete.
3305         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3306         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3307         (gdb_trampoline_buffer_error, collecting, gdb_collect)
3308         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3309         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3310         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3311         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3312         (traceframe_read_count, traceframe_write_count)
3313         (traceframes_created, trace_state_variables, get_raw_reg)
3314         (get_trace_state_variable_value, set_trace_state_variable_value)
3315         (ust_loaded, helper_thread_id, cmd_buf): Use
3316         IPA_SYM_EXPORTED_NAME.
3317         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3318         (tracepoints) Use IP_AGENT_EXPORT_VAR.
3319         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3320         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3321         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3322         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3323         EXTERN_C_PUSH/EXTERN_C_POP.
3324         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3325         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3326         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3327         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3328         (traceframe_write_count, traceframe_read_count)
3329         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3330         (about_to_request_buffer_space, get_trace_state_variable_value)
3331         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3332         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3333         EXTERN_C_PUSH/EXTERN_C_POP.
3334         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3335         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3336         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3337         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3338         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3339         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3340         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3341         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3342         Define.
3343         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3344         (IP_AGENT_EXPORT_VAR_DECL): Define.
3345         (tracing): Declare.
3346         (gdb_agent_get_raw_reg): Declare.
3347
3348 2015-02-27  Tom Tromey  <tromey@redhat.com>
3349             Pedro Alves  <palves@redhat.com>
3350
3351         Rename symbols whose names are reserved C++ keywords throughout.
3352
3353 2015-02-27  Pedro Alves  <palves@redhat.com>
3354
3355         * Makefile.in (COMPILER): New, get it from autoconf.
3356         (CXX): Get from autoconf instead.
3357         (COMPILE.pre): Use COMPILER.
3358         (CC-LD): Rename to ...
3359         (CC_LD): ... this.  Use COMPILER.
3360         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3361         (CXX_FOR_TARGET): Default to g++ instead of gcc.
3362         * acinclude.m4: Include build-with-cxx.m4.
3363         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3364         Disable -Werror by default if building in C++ mode.
3365         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3366         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3367         the C++ compiler.  Save/restore CXXFLAGS too.
3368         * configure: Regenerate.
3369
3370 2015-02-27  Pedro Alves  <palves@redhat.com>
3371
3372         * acinclude.m4: Include libiberty.m4.
3373         * configure.ac: Call libiberty_INIT.
3374         * config.in, configure: Regenerate.
3375
3376 2015-02-26  Pedro Alves  <palves@redhat.com>
3377
3378         * linux-low.c (linux_wait_1): When incrementing the PC past a
3379         program breakpoint always use the_low_target.breakpoint_len as
3380         increment, rather than the maximum between that and
3381         the_low_target.decr_pc_after_break.
3382
3383 2015-02-23  Pedro Alves  <palves@redhat.com>
3384
3385         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3386         thread was doing a step-over; always adjust the PC if
3387         we stepped over a permanent breakpoint.
3388         (linux_wait_1): If we stepped over breakpoint that was on top of a
3389         permanent breakpoint, manually advance the PC past it.
3390
3391 2015-02-23  Pedro Alves  <palves@redhat.com>
3392
3393         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3394         modes.
3395         (x86_fill_gregset, x86_store_gregset): Use it when handling
3396         $orig_eax.
3397
3398 2015-02-20  Pedro Alves  <palves@redhat.com>
3399
3400         * thread-db.c: Include "nat/linux-procfs.h".
3401         (thread_db_init): Skip listing new threads if the kernel supports
3402         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3403
3404 2015-02-20  Pedro Alves  <palves@redhat.com>
3405
3406         * linux-low.c (status_pending_p_callback): Use ptid_match.
3407
3408 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3409
3410         PR breakpoints/16812
3411         * linux-low.c (wstatus_maybe_breakpoint): Remove.
3412         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3413         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3414
3415 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
3416
3417         PR breakpoints/15956
3418         * tracepoint.c (cmd_qtinit): Add check for current_thread.
3419
3420 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
3421
3422         * linux-low.c (linux_low_btrace_conf): Print size.
3423         * server.c (handle_btrace_conf_general_set): New.
3424         (hanle_general_set): Call handle_btrace_conf_general_set.
3425         (handle_query): Report Qbtrace-conf:bts:size as supported.
3426
3427 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
3428
3429         * linux-low.c (linux_low_enable_btrace): Update parameters.
3430         (linux_low_btrace_conf): New.
3431         (linux_target_ops)<to_btrace_conf>: Initialize.
3432         * server.c (current_btrace_conf): New.
3433         (handle_btrace_enable): Rename to ...
3434         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
3435         to target_enable_btrace.  Update comment.  Update users.
3436         (handle_qxfer_btrace_conf): New.
3437         (qxfer_packets): Add btrace-conf entry.
3438         (handle_query): Report qXfer:btrace-conf:read as supported packet.
3439         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3440         (target_ops)<read_btrace_conf>: New.
3441         (target_enable_btrace): Update parameters.
3442         (target_read_btrace_conf): New.
3443
3444 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
3445
3446         * server.c (handle_btrace_general_set): Remove call to
3447         target_supports_btrace.
3448         (supported_btrace_packets): New.
3449         (handle_query): Call supported_btrace_packets.
3450         * target.h: include btrace-common.h.
3451         (btrace_target_info): Removed.
3452         (supports_btrace, target_supports_btrace): Update parameters.
3453
3454 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
3455
3456         * Makefile.in (SFILES): Add common/btrace-common.c.
3457         (OBS): Add common/btrace-common.o.
3458         (btrace-common.o): Add build rules.
3459         * linux-low: Include btrace-common.h.
3460         (linux_low_read_btrace): Use struct btrace_data.  Call
3461         btrace_data_init and btrace_data_fini.
3462
3463 2015-02-06  Pedro Alves  <palves@redhat.com>
3464
3465         * thread-db.c (find_new_threads_callback): Add debug output.
3466
3467 2015-02-04  Pedro Alves  <palves@redhat.com>
3468
3469         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3470         (resume_stopped_resumed_lwps): New function.
3471         (linux_wait_for_event_filtered): Use it.
3472
3473 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
3474
3475         * Makefile.in (SFILES): Add linux-personality.c.
3476         (linux-personality.o): New rule.
3477         * configure.srv (srv_linux_obj): Add linux-personality.o to the
3478         list of objects to be built.
3479         * linux-low.c: Include nat/linux-personality.h.
3480         (linux_create_inferior): Remove code to disable address space
3481         randomization (moved to ../nat/linux-personality.c).  Create
3482         cleanup to disable address space randomization.
3483
3484 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
3485
3486         * Makefile.in (posix-strerror.o): New rule.
3487         (mingw-strerror.o): Likewise.
3488         * configure: Regenerated.
3489         * configure.ac: Source file ../common/common.host.  Initialize new
3490         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
3491
3492 2015-01-14  Yao Qi  <yao@codesourcery.com>
3493
3494         * Makefile.in (SFILES): Add nat/ppc-linux.c.
3495         (ppc-linux.o): New rule.
3496         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3497         * configure.ac: AC_CHECK_FUNCS(getauxval).
3498         * config.in: Re-generated.
3499         * configure: Re-generated.
3500         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3501         ppc64_64bit_inferior_p
3502
3503 2015-01-14  Yao Qi  <yao@codesourcery.com>
3504
3505         * linux-ppc-low.c: Include "nat/ppc-linux.h".
3506          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3507         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
3508         (PT_ORIG_R3, PT_TRAP): Likewise.
3509         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3510         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3511         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3512
3513 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
3514
3515         * i387-fp.c (i387_cache_to_xsave): In look over
3516         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3517         zmmh_low_space field by use of zmmh_high_space.
3518
3519 2015-01-09  Pedro Alves  <palves@redhat.com>
3520
3521         * linux-low.c (step_over_bkpt): Move higher up in the file.
3522         (handle_extended_wait): Don't store the stop_pc here.
3523         (get_stop_pc): Adjust comments and rename to ...
3524         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
3525         stopped for a software breakpoint or hardware breakpoint.
3526         (thread_still_has_status_pending_p): New function.
3527         (status_pending_p_callback): Use
3528         thread_still_has_status_pending_p.  If the event is no longer
3529         interesting, resume the LWP.
3530         (handle_tracepoints): Add assert.
3531         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3532         (wstatus_maybe_breakpoint): New function.
3533         (cancel_breakpoint): Delete function.
3534         (check_stopped_by_watchpoint): New function, factored out from
3535         linux_low_filter_event.
3536         (lp_status_maybe_breakpoint): Delete function.
3537         (linux_low_filter_event): Remove filter_ptid argument.
3538         Leave thread group exits pending here.  Store the LWP's stop PC.
3539         Always leave events pending.
3540         (linux_wait_for_event_filtered): Pull all events out of the
3541         kernel, and leave them all pending.
3542         (count_events_callback, select_event_lwp_callback): Consider all
3543         events.
3544         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3545         (select_event_lwp): Only give preference to the stepping LWP in
3546         all-stop mode.  Adjust comments.
3547         (ignore_event): New function.
3548         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
3549         references to cancel_breakpoints.  Adjust to renames.  Also give
3550         equal priority to all LWPs that have had events in non-stop mode.
3551         If reporting a software breakpoint event, unadjust the LWP's PC.
3552         (linux_wait): If linux_wait_1 returned an ignored event, retry.
3553         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3554         Adjust.
3555         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
3556         (resume_status_pending_p): Use thread_still_has_status_pending_p.
3557         (linux_stopped_by_watchpoint): Adjust.
3558         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3559         * linux-low.h (enum lwp_stop_reason): New.
3560         (struct lwp_info) <stop_pc>: Adjust comment.
3561         <stopped_by_watchpoint>: Delete field.
3562         <stop_reason>: New field.
3563         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3564         * mem-break.c (software_breakpoint_inserted_here)
3565         (hardware_breakpoint_inserted_here): New function.
3566         * mem-break.h (software_breakpoint_inserted_here)
3567         (hardware_breakpoint_inserted_here): Declare.
3568         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3569         (cancel_breakpoints): Delete.
3570         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3571         (upload_fast_traceframes): Remove references to
3572         cancel_breakpoints.
3573
3574 2015-01-09  Pedro Alves  <palves@redhat.com>
3575
3576         * thread-db.c (find_new_threads_callback): Ignore thread if the
3577         kernel thread ID is -1.
3578
3579 2015-01-09  Pedro Alves  <palves@redhat.com>
3580
3581         * linux-low.c (linux_attach_fail_reason_string): Move to
3582         nat/linux-ptrace.c, and rename.
3583         (linux_attach_lwp): Update comment.
3584         (attach_proc_task_lwp_callback): New function.
3585         (linux_attach): Adjust to rename and use
3586         linux_proc_attach_tgid_threads.
3587         (linux_attach_fail_reason_string): Delete declaration.
3588
3589 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
3590
3591         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3592         * server.c (gdbserver_version): Likewise.
3593
3594 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3595
3596         * remote-utils.c: Include ctype.h.
3597         (input_interrupt): Explicitly handle the case when the char
3598         received is the NUL byte.  Improve the printing of non-ASCII
3599         characters.
3600
3601 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
3602
3603         * linux-low.c (linux_low_filter_event): Update call to
3604         linux_enable_event_reporting following the addition of
3605         a new parameter to that function.
3606
3607 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
3608
3609         PR server/17457
3610         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3611         (AARCH64_FPCR_REGNO): Likewise.
3612         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3613         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3614         (aarch64_store_fpregset): Likewise.
3615
3616 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
3617
3618         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3619         Remove FIXME comment about assumption about N.
3620
3621 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
3622
3623         * configure.ac: If large-file support is disabled in GDBserver,
3624         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3625         * configure: Regenerate.
3626
3627 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3628
3629         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3630         warning upon ENODATA from ptrace.
3631         * linux-s390-low.c (s390_store_tdb): New.
3632         (s390_regsets): Add regset for NT_S390_TDB.
3633
3634 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3635
3636         * linux-low.c (regsets_store_inferior_registers): Skip regsets
3637         without a fill_function.
3638         * linux-s390-low.c (s390_fill_last_break): Remove.
3639         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3640         (s390_arch_setup): Use regset's size instead of fill_function for
3641         loop end condition.
3642
3643 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3644
3645         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3646         the regset's store function when ptrace returned an error.
3647         * regcache.c (get_thread_regcache): Invalidate register cache
3648         before fetching inferior's registers.
3649
3650 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3651
3652         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3653         while-loop as for-loop.
3654         (regsets_store_inferior_registers): Likewise.
3655
3656 2014-11-28  Yao Qi  <yao@codesourcery.com>
3657
3658         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3659         * config.in, configure: Re-generate.
3660         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3661         is defined.
3662
3663 2014-11-21  Yao Qi  <yao@codesourcery.com>
3664
3665         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3666         (AC_CHECK_HEADERS): Remove malloc.h.
3667         * configure: Re-generated.
3668         * config.in: Re-generated.
3669         * server.h: Don't include alloca.h and malloc.h.
3670         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3671         Don't include malloc.h.
3672
3673 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
3674
3675         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3676         corresponding ERRNO check in same block.
3677
3678 2014-11-12  Pedro Alves  <palves@redhat.com>
3679
3680         * server.c (cont_thread): Update comment.
3681         (start_inferior, attach_inferior): No longer clear cont_thread.
3682         (handle_v_cont): No longer set cont_thread.
3683         (captured_main): Clear cont_thread each time a GDB connects.
3684
3685 2014-11-12  Pedro Alves  <palves@redhat.com>
3686
3687         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3688         thread, and don't resume all threads if the Hc thread has exited.
3689
3690 2014-11-12  Pedro Alves  <palves@redhat.com>
3691
3692         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3693         the process group instead of to a specific LWP.
3694
3695 2014-10-15  Pedro Alves  <palves@redhat.com>
3696
3697         PR server/17487
3698         * win32-arm-low.c (arm_set_thread_context): Remove current_event
3699         parameter.
3700         (arm_set_thread_context): Delete.
3701         (the_low_target): Adjust.
3702         * win32-i386-low.c (debug_registers_changed)
3703         (debug_registers_used): Delete.
3704         (update_debug_registers_callback): New function.
3705         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3706         needing to update their debug registers.
3707         (win32_get_current_dr): New function.
3708         (x86_dr_low_get_addr, x86_dr_low_get_control)
3709         (x86_dr_low_get_status): Fetch the debug register from the thread
3710         record's context.
3711         (i386_initial_stuff): Adjust.
3712         (i386_get_thread_context): Remove current_event parameter.  Don't
3713         clear debug_registers_changed nor copy DR values to
3714         debug_reg_state.
3715         (i386_set_thread_context): Delete.
3716         (i386_prepare_to_resume): New function.
3717         (i386_thread_added): Mark the thread as needing to update irs
3718         debug registers.
3719         (the_low_target): Remove i386_set_thread_context and install
3720         i386_prepare_to_resume.
3721         * win32-low.c (win32_get_thread_context): Adjust.
3722         (win32_set_thread_context): Use SetThreadContext
3723         directly.
3724         (win32_prepare_to_resume): New function.
3725         (win32_require_context): New function, factored out from ...
3726         (thread_rec): ... this.
3727         (continue_one_thread): Call win32_prepare_to_resume on each thread
3728         we're about to continue.
3729         (win32_resume): Call win32_prepare_to_resume on the event thread.
3730         * win32-low.h (struct win32_thread_info)
3731         <debug_registers_changed>: New field.
3732         (struct win32_target_ops): Change prototype of set_thread_context,
3733         delete set_thread_context and add prepare_to_resume.
3734         (win32_require_context): New declaration.
3735
3736 2014-10-08  Gary Benson  <gbenson@redhat.com>
3737
3738         * server.h: Do not include common-exceptions.h.
3739
3740 2014-10-08  Gary Benson  <gbenson@redhat.com>
3741
3742         * server.h: Do not include cleanups.h.
3743
3744 2014-09-30  James Hogan  <james.hogan@imgtec.com>
3745
3746         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3747         mips64-dsp-linux.c.
3748
3749 2014-09-23  Yao Qi  <yao@codesourcery.com>
3750
3751         * linux-low.c (lp_status_maybe_breakpoint): New function.
3752         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3753         (count_events_callback): Likewise.
3754         (select_event_lwp_callback): Likewise.
3755         (cancel_breakpoints_callback): Likewise.
3756
3757 2014-09-19  Don Breazeal  <donb@codesourcery.com>
3758
3759         * linux-low.c (handle_extended_wait): Call
3760         linux_ptrace_get_extended_event.
3761         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3762         linux_is_extended_waitstatus.
3763
3764 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
3765
3766         * Makefile.in (CPPFLAGS): Define.
3767         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3768         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3769
3770 2014-09-16  Gary Benson  <gbenson@redhat.com>
3771
3772         * inferiors.h (current_inferior): Renamed as...
3773         (current_thread): New variable.  All uses updated.
3774         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3775         (maybe_move_out_of_jump_pad): Likewise.
3776         (cancel_breakpoint): Likewise.
3777         (linux_low_filter_event): Likewise.
3778         (wait_for_sigstop): Likewise.
3779         (linux_resume_one_lwp): Likewise.
3780         (need_step_over_p): Likewise.
3781         (start_step_over): Likewise.
3782         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3783         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3784         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3785         and save_inferior as saved_thread.
3786         * regcache.c (get_thread_regcache): Renamed saved_inferior as
3787         saved_thread.
3788         (regcache_invalidate_thread): Likewise.
3789         * remote-utils.c (prepare_resume_reply): Likewise.
3790         * thread-db.c (thread_db_get_tls_address): Likewise.
3791         (disable_thread_event_reporting): Likewise.
3792         (remove_thread_event_breakpoints): Likewise.
3793         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3794         as saved_thread.
3795         * target.h (set_desired_inferior): Renamed as...
3796         (set_desired_thread): New declaration.  All uses updated.
3797         * server.c (myresume): Updated comment to reference thread instead
3798         of inferior.
3799         (handle_serial_event): Likewise.
3800         (handle_target_event): Likewise.
3801
3802 2014-09-12  Tom Tromey  <tromey@redhat.com>
3803             Gary Benson  <gbenson@redhat.com>
3804
3805         * regcache.h: Include common-regcache.h.
3806         (regcache_read_pc): Don't declare.
3807         * regcache.c (get_thread_regcache_for_ptid): New function.
3808
3809 2014-09-11  Tom Tromey  <tromey@redhat.com>
3810             Gary Benson  <gbenson@redhat.com>
3811
3812         * symbol.c: New file.
3813         * Makefile.in (SFILES): Add symbol.c.
3814         (OBS): Add symbol.o.
3815
3816 2014-09-11  Gary Benson  <gbenson@redhat.com>
3817
3818         * target.c (target_stop_ptid, target_continue_ptid): New
3819         functions.
3820
3821 2014-09-11  Tom Tromey  <tromey@redhat.com>
3822             Gary Benson  <gbenson@redhat.com>
3823
3824         * target.h: Include target/target.h.
3825         * target.c (target_read_memory, target_read_uint32)
3826         (target_write_memory): New functions.
3827
3828 2014-09-11  Gary Benson  <gbenson@redhat.com>
3829
3830         * server.h (debug_hw_points): Don't declare.
3831         * server.c (debug_hw_points): Don't define.  Replace all uses
3832         with show_debug_regs.
3833         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
3834         all uses with show_debug_regs.
3835
3836 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
3837
3838         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3839         endianness into account.
3840         (ppc_supply_ptrace_register): Likewise.
3841
3842 2014-09-03  James Hogan  <james.hogan@imgtec.com>
3843
3844         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3845         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3846
3847 2014-09-03  Gary Benson  <gbenson@redhat.com>
3848
3849         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3850         ALL_DEBUG_ADDRESS_REGISTERS.
3851
3852 2014-09-02  Gary Benson  <gbenson@redhat.com>
3853
3854         * i386-low.h: Renamed as...
3855         * x86-low.h: New file.  All type, function and variable name
3856         prefixes changed from "i386_" to "x86_".  All references updated.
3857         * i386-low.c: Renamed as...
3858         * x86-low.c: New file.  All type, function and variable name
3859         prefixes changed from "i386_" to "x86_".  All references updated.
3860
3861 2014-09-02  Gary Benson  <gbenson@redhat.com>
3862
3863         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3864         (x86_linux_new_thread): Likewise.
3865
3866 2014-08-29  Gary Benson  <gbenson@redhat.com>
3867
3868         * server.h (setjmp.h): Do not include.
3869         (toplevel): Do not declare.
3870         (common-exceptions.h): Include.
3871         (cleanups.h): Likewise.
3872         * server.c (toplevel): Do not define.
3873         (exit_code): New static global.
3874         (detach_or_kill_for_exit_cleanup): New function.
3875         (main): New function.  Original main renamed to...
3876         (captured_main): New function.
3877         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3878
3879 2014-08-29  Gary Benson  <gbenson@redhat.com>
3880
3881         * Makefile.in (SFILES): Add common/common-exceptions.c.
3882         (OBS): Add common-exceptions.o.
3883         (common-exceptions.o): New rule.
3884         * utils.c (prepare_to_throw_exception): New function.
3885
3886 2014-08-29  Gary Benson  <gbenson@redhat.com>
3887
3888         * config.in: Regenerate.
3889         * configure: Likewise.
3890
3891 2014-08-29  Gary Benson  <gbenson@redhat.com>
3892
3893         * Makefile.in (SFILES): Add common/cleanups.c.
3894         (OBS): cleanups.o.
3895         (cleanups.o): New rule.
3896
3897 2014-08-29  Gary Benson  <gbenson@redhat.com>
3898
3899         * utils.c (internal_vwarning): New function.
3900
3901 2014-08-28  Gary Benson  <gbenson@redhat.com>
3902
3903         * utils.h (fatal): Remove declaration.
3904         * utils.c (fatal): Remove function.
3905
3906 2014-08-28  Gary Benson  <gbenson@redhat.com>
3907
3908         * tracepoint.c (gdb_agent_init): Replace fatal with
3909         perror_with_name.
3910         (initialize_tracepoint): Likewise.
3911
3912 2014-08-28  Gary Benson  <gbenson@redhat.com>
3913
3914         * remote-utils.c (remote_prepare): Replace fatal with error.
3915
3916 2014-08-28  Gary Benson  <gbenson@redhat.com>
3917
3918         * linux-low.c (linux_async): Replace fatal with warning.
3919         Tidy up and return.
3920         (linux_start_non_stop): Return -1 if linux_async failed.
3921
3922 2014-08-28  Gary Benson  <gbenson@redhat.com>
3923
3924         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3925         gdb_assert.
3926         (i386_dr_low_get_addr): Remove vague comment.
3927         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3928         gdb_assert.
3929
3930 2014-08-28  Gary Benson  <gbenson@redhat.com>
3931
3932         * inferiors.c (get_thread_process): Replace check with gdb_assert.
3933         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3934         internal_error.
3935         (linux_resume_one_lwp): Likewise.
3936         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3937         gdb_assert.
3938         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3939         with internal_error.
3940         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3941         (init_register_cache): Replace fatal with gdb_assert_not_reached.
3942         (find_register_by_name): Replace fatal with internal_error.
3943         (find_regno): Likewise.
3944         * tdesc.c (init_target_desc): Replace check with gdb_assert.
3945         * thread-db.c (thread_db_create_event): Likewise.
3946         (thread_db_load_search): Likewise.
3947         (try_thread_db_load_1): Likewise.
3948         * tracepoint.c (get_jump_space_head): Replace fatal with
3949         internal_error.
3950         (claim_trampoline_space): Likewise.
3951         (have_fast_tracepoint_trampoline_buffer): Likewise.
3952         (cmd_qtstart): Likewise.
3953         (stop_tracing): Likewise.
3954         (fast_tracepoint_collecting): Likewise.
3955         (target_malloc): Likewise.
3956         (download_tracepoint): Likewise.
3957         (download_trace_state_variables): Replace check with gdb_assert.
3958         (upload_fast_traceframes): Replace fatal with internal_error.
3959
3960 2014-08-19  Tom Tromey  <tromey@redhat.com>
3961             Gary Benson  <gbenson@redhat.com>
3962
3963         * Makefile.in (SFILES): Add common/common-debug.c.
3964         (OBS): Add common-debug.o.
3965         (common-debug.o): New rule.
3966         * debug.h (debug_printf): Don't declare.
3967         * debug.c (debug_printf): Renamed and rewritten as...
3968         (debug_vprintf): New function.
3969
3970 2014-08-19  Gary Benson  <gbenson@redhat.com>
3971
3972         * utils.h: Do not include print-utils.h.
3973
3974 2014-08-19  Tom Tromey  <tromey@redhat.com>
3975             Gary Benson  <gbenson@redhat.com>
3976
3977         * server.h: Add static assertion.
3978         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3979
3980 2014-08-19  Tom Tromey  <tromey@redhat.com>
3981             Gary Benson  <gbenson@redhat.com>
3982
3983         * Makefile.in (SFILES): Add common/errors.c.
3984         (OBS): Add errors.o.
3985         (IPA_OBS): Add errors-ipa.o.
3986         (errors.o): New rule.
3987         (errors-ipa.o): Likewise.
3988         * utils.h (perror_with_name, error, warning): Don't declare.
3989         * utils.c (warning): Renamed and rewritten as...
3990         (vwarning): New function.
3991         (error): Renamed and rewritten as...
3992         (verror): New function.
3993         (internal_error): Renamed and rewritten as...
3994         (internal_verror): New function.
3995
3996 2014-08-07  Gary Benson  <gbenson@redhat.com>
3997
3998         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3999         * configure: Regenerate.
4000         * config.in: Likewise.
4001         * server.h: Do not include errno.h.
4002         * event-loop.c: Likewise.
4003         * hostio-errno.c: Likewise.
4004         * linux-low.c: Likewise.
4005         * remote-utils.c: Likewise.
4006         * spu-low.c: Likewise.
4007         * utils.c: Likewise.
4008         * gdbreplay.c: Unconditionally include errno.h.
4009
4010 2014-08-07  Gary Benson  <gbenson@redhat.com>
4011
4012         * server.h: Do not include string.h.
4013         * event-loop.c: Likewise.
4014         * linux-low.c: Likewise.
4015         * regcache.c: Likewise.
4016         * remote-utils.c: Likewise.
4017         * spu-low.c: Likewise.
4018         * utils.c: Likewise.
4019
4020 2014-08-07  Gary Benson  <gbenson@redhat.com>
4021
4022         * server.h: Do not include gdb_assert.h.
4023
4024 2014-08-07  Gary Benson  <gbenson@redhat.com>
4025
4026         * server.h: Do not include common-utils.h.
4027
4028 2014-08-07  Gary Benson  <gbenson@redhat.com>
4029
4030         * server.h: Do not include ptid.h.
4031         * notif.h: Likewise.
4032
4033 2014-08-07  Gary Benson  <gbenson@redhat.com>
4034
4035         * server.h: Do not include gdb_locale.h.
4036
4037 2014-08-07  Gary Benson  <gbenson@redhat.com>
4038
4039         * server.h: Do not include gdb/signals.h.
4040         * win32-low.c: Likewise.
4041
4042 2014-08-07  Gary Benson  <gbenson@redhat.com>
4043
4044         * server.h: Do not include pathmax.h.
4045
4046 2014-08-07  Gary Benson  <gbenson@redhat.com>
4047
4048         * server.h: Do not include libiberty.h.
4049         * linux-bfin-low.c: Likewise.
4050
4051 2014-08-07  Gary Benson  <gbenson@redhat.com>
4052
4053         * server.h: Do not include ansidecl.h.
4054
4055 2014-08-07  Gary Benson  <gbenson@redhat.com>
4056
4057         * linux-x86-low.c: Do not include stddef.h.
4058         * lynx-ppc-low.c: Likewise.
4059         * tracepoint.c: Likewise.
4060
4061 2014-08-07  Gary Benson  <gbenson@redhat.com>
4062
4063         * server.h: Do not include stdarg.h.
4064         * nto-low.c: Likewise.
4065
4066 2014-08-07  Gary Benson  <gbenson@redhat.com>
4067
4068         * server.h: Do not include stdlib.h.
4069         * inferiors.c: Likewise.
4070         * linux-low.c: Likewise.
4071         * regcache.c: Likewise.
4072         * spu-low.c: Likewise.
4073         * tracepoint.c: Likewise.
4074         * utils.c: Likewise.
4075
4076 2014-08-07  Gary Benson  <gbenson@redhat.com>
4077
4078         * server.h: Do not include stdio.h.
4079         * linux-low.c: Likewise.
4080         * remote-utils.c: Likewise.
4081         * spu-low.c: Likewise.
4082         * utils.c: Likewise.
4083         * wincecompat.c: Likewise.
4084
4085 2014-08-06  Gary Benson  <gbenson@redhat.com>
4086
4087         * regcache.c (init_register_cache): Move conditionals inside if.
4088
4089 2014-08-06  Gary Benson  <gbenson@redhat.com>
4090
4091         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4092
4093 2014-07-31  Gary Benson  <gbenson@redhat.com>
4094
4095         * ax.h: Do not include server.h.
4096         * gdbthread.h: Likewise.
4097         * lynx-low.h: Likewise.
4098         * notif.h: Likewise.
4099
4100 2014-07-30  Gary Benson  <gbenson@redhat.com>
4101
4102         * server.h: Include common-defs.h.
4103         Do not include config.h or build-gnulib-gdbserver/config.h.
4104
4105 2014-07-30  Gary Benson  <gbenson@redhat.com>
4106
4107         * hostio-errno.c: Move server.h to top of includes list.
4108         * inferiors.c: Likewise.
4109         * linux-x86-low.c: Likewise.
4110         * notif.c: Include server.h.
4111
4112 2014-07-24  Tom Tromey  <tromey@redhat.com>
4113             Gary Benson  <gbenson@redhat.com>
4114
4115         * server.h (CORE_ADDR): Now unsigned.
4116
4117 2014-07-16  Pedro Alves  <palves@redhat.com>
4118
4119         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4120
4121 2014-07-15  Pedro Alves  <palves@redhat.com>
4122
4123         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4124         copy.
4125
4126 2014-07-11  Pedro Alves  <palves@redhat.com>
4127
4128         * linux-low.c (kill_wait_lwp): New function, based on
4129         kill_one_lwp_callback, but use my_waitpid directly.
4130         (kill_one_lwp_callback, linux_kill): Use it.
4131
4132 2014-06-23  Pedro Alves  <palves@redhat.com>
4133
4134         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4135         before setting DR0..DR3.
4136
4137 2014-06-20  Gary Benson  <gbenson@redhat.com>
4138
4139         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4140         * configure: Regenerated.
4141         * config.in: Likewise.
4142
4143 2014-06-20  Gary Benson  <gbenson@redhat.com>
4144
4145         * Makefile.in (SFILES): Update locations for files moved
4146         from common to nat.
4147         (object file files): Reordered.
4148
4149 2014-06-20  Gary Benson  <gbenson@redhat.com>
4150
4151         * i386-low.h (i386_dr_low_can_set_addr): Removed.
4152         (i386_dr_low_set_addr): Likewise.
4153         (i386_dr_low_get_addr): Likewise.
4154         (i386_dr_low_can_set_control): Likewise.
4155         (i386_dr_low_set_control): Likewise.
4156         (i386_dr_low_get_control): Likewise.
4157         (i386_dr_low_get_status): Likewise.
4158         (i386_get_debug_register_length): Likewise.
4159         * linux-x86-low.c (i386_dr_low_set_addr):
4160         Changed signature.  Made static.
4161         (i386_dr_low_get_addr): Likewise.
4162         (i386_dr_low_set_control): Likewise.
4163         (i386_dr_low_get_control): Likewise.
4164         (i386_dr_low_get_status): Likewise.
4165         (i386_dr_low): New global variable.
4166         * win32-i386-low.c (i386_dr_low_set_addr):
4167         Changed signature.  Made static.
4168         (i386_dr_low_get_addr): Likewise.
4169         (i386_dr_low_set_control): Likewise.
4170         (i386_dr_low_get_control): Likewise.
4171         (i386_dr_low_get_status): Likewise.
4172         (i386_dr_low): New global variable.
4173
4174 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
4175
4176         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4177         * Makefile.in (AR, AR_FLAGS): Define.
4178         * configure: Regenerate.
4179
4180 2014-06-19  Gary Benson  <gbenson@redhat.com>
4181
4182         * Makefile.in (i386-dregs.o): New rule.
4183         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4184         * i386-low.c (target.h): Remove include.
4185         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4186         (DR_CONTROL_SHIFT): Likewise.
4187         (DR_CONTROL_SIZE): Likewise.
4188         (DR_RW_EXECUTE): Likewise.
4189         (DR_RW_WRITE): Likewise.
4190         (DR_RW_READ): Likewise.
4191         (DR_RW_IORW): Likewise.
4192         (DR_LEN_1): Likewise.
4193         (DR_LEN_2): Likewise.
4194         (DR_LEN_4): Likewise.
4195         (DR_LEN_8): Likewise.
4196         (DR_LOCAL_ENABLE_SHIFT): Likewise.
4197         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4198         (DR_ENABLE_SIZE): Likewise.
4199         (DR_LOCAL_SLOWDOWN): Likewise.
4200         (DR_GLOBAL_SLOWDOWN): Likewise.
4201         (DR_CONTROL_RESERVED): Likewise.
4202         (I386_DR_CONTROL_MASK): Likewise.
4203         (I386_DR_VACANT): Likewise.
4204         (I386_DR_LOCAL_ENABLE): Likewise.
4205         (I386_DR_GLOBAL_ENABLE): Likewise.
4206         (I386_DR_DISABLE): Likewise.
4207         (I386_DR_SET_RW_LEN): Likewise.
4208         (I386_DR_GET_RW_LEN): Likewise.
4209         (I386_DR_WATCH_HIT): Likewise.
4210         (i386_wp_op_t): Likewise.
4211         (i386_show_dr): Likewise.
4212         (i386_length_and_rw_bits): Likewise.
4213         (i386_insert_aligned_watchpoint): Likewise.
4214         (i386_remove_aligned_watchpoint): Likewise.
4215         (i386_handle_nonaligned_watchpoint): Likewise.
4216         i386_update_inferior_debug_regs(): Likewise.
4217         (i386_dr_insert_watchpoint): Likewise.
4218         (i386_dr_remove_watchpoint): Likewise.
4219         (i386_dr_region_ok_for_watchpoint): Likewise.
4220         (i386_dr_stopped_data_address): Likewise.
4221         (i386_dr_stopped_by_watchpoint): Likewise.
4222
4223 2014-06-19  Gary Benson  <gbenson@redhat.com>
4224
4225         * i386-low.c (i386_dr_show): Renamed to
4226         i386_show_dr and made static.  All uses updated.
4227         (i386_dr_length_and_rw_bits): Renamed to
4228         i386_length_and_rw_bits and made static.
4229         All uses updated.
4230         (i386_dr_insert_aligned_watchpoint): Renamed to
4231         i386_insert_aligned_watchpoint and made static.
4232         All uses updated.
4233         (i386_dr_remove_aligned_watchpoint): Renamed to
4234         i386_remove_aligned_watchpoint and made static.
4235         All uses updated.
4236         (i386_dr_update_inferior_debug_regs): Renamed to
4237         i386_update_inferior_debug_regs and made static.
4238         All uses updated.
4239
4240 2014-06-18  Gary Benson  <gbenson@redhat.com>
4241
4242         * i386-low.h (i386_dr_low_can_set_addr): New macro.
4243         (i386_dr_low_can_set_control): Likewise.
4244         (i386_get_debug_register_length): Likewise.
4245         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4246         (i386_dr_low_can_set_control): Likewise.
4247         (i386_get_debug_register_length): Likewise.
4248
4249 2014-06-17  Gary Benson  <gbenson@redhat.com>
4250
4251         * i386-low.h (i386-dregs.h): New include.
4252         (DR_FIRSTADDR): Now in i386-dregs.h.
4253         (DR_LASTADDR): Likewise.
4254         (DR_NADDR): Likewise.
4255         (DR_STATUS): Likewise.
4256         (DR_CONTROL): Likewise.
4257         (i386_debug_reg_state): Likewise.
4258         (i386_dr_insert_watchpoint): Likewise.
4259         (i386_dr_remove_watchpoint): Likewise.
4260         (i386_dr_region_ok_for_watchpoint): Likewise.
4261         (i386_dr_stopped_data_address): Likewise.
4262         (i386_dr_stopped_by_watchpoint): Likewise.
4263         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4264
4265 2014-06-18  Gary Benson  <gbenson@redhat.com>
4266
4267         * i386-low.h (i386_low_insert_watchpoint): Renamed to
4268         i386_dr_insert_watchpoint.
4269         (i386_low_remove_watchpoint): Renamed to
4270         i386_dr_remove_watchpoint.
4271         (i386_low_region_ok_for_watchpoint): Renamed to
4272         i386_dr_region_ok_for_watchpoint.
4273         (i386_low_stopped_data_address): Renamed to
4274         i386_dr_stopped_data_address.
4275         (i386_low_stopped_by_watchpoint): Renamed to
4276         i386_dr_stopped_by_watchpoint.
4277         * i386-low.c (i386_show_dr): Renamed to
4278         i386_dr_show and made nonstatic.  All uses updated.
4279         (i386_length_and_rw_bits): Renamed to
4280         i386_dr_length_and_rw_bits and made nonstatic.
4281         All uses updated.
4282         (i386_insert_aligned_watchpoint): Renamed to
4283         i386_dr_insert_aligned_watchpoint and made nonstatic.
4284         All uses updated.
4285         (i386_remove_aligned_watchpoint): Renamed to
4286         i386_dr_remove_aligned_watchpoint and made nonstatic.
4287         All uses updated.
4288         (i386_update_inferior_debug_regs): Renamed to
4289         i386_dr_update_inferior_debug_regs and made nonstatic.
4290         All uses updated.
4291         (i386_low_insert_watchpoint): Renamed to
4292         i386_dr_insert_watchpoint.  All uses updated.
4293         (i386_low_remove_watchpoint): Renamed to
4294         i386_dr_remove_watchpoint.  All uses updated.
4295         (i386_low_region_ok_for_watchpoint): Renamed to
4296         i386_dr_region_ok_for_watchpoint.  All uses updated.
4297         (i386_low_stopped_data_address): Renamed to
4298         i386_dr_stopped_data_address.  All uses updated.
4299         (i386_low_stopped_by_watchpoint): Renamed to
4300         i386_dr_stopped_by_watchpoint.  All uses updated.
4301
4302 2014-06-18  Gary Benson  <gbenson@redhat.com>
4303
4304         * i386-low.c (i386_dr_low_can_set_addr): New macro.
4305         (i386_dr_low_can_set_control): Likewise.
4306         (i386_insert_aligned_watchpoint): New check.
4307
4308 2014-06-18  Gary Benson  <gbenson@redhat.com>
4309
4310         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4311         Renamed to state.
4312
4313 2014-06-18  Gary Benson  <gbenson@redhat.com>
4314
4315         * i386-low.c (i386_length_and_rw_bits): Use internal_error
4316         instead of fatal and error.
4317         (i386_handle_nonaligned_watchpoint): Likewise.
4318
4319 2014-06-18  Gary Benson  <gbenson@redhat.com>
4320
4321         * i386-low.c (i386_get_debug_register_length): New macro.
4322         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
4323         (i386_show_dr): Use debug_printf instead of fprintf.  Use
4324         phex to format values.
4325
4326 2014-06-18  Gary Benson  <gbenson@redhat.com>
4327
4328         * i386-low.h: Comment changes.
4329         * i386-low.c: Likewise.
4330
4331 2014-06-18  Gary Benson  <gbenson@redhat.com>
4332
4333         * i386-low.c: Whitespace changes.
4334
4335 2014-06-12  Tom Tromey  <tromey@redhat.com>
4336
4337         * utils.c (freeargv): Remove.
4338
4339 2014-06-12  Tom Tromey  <tromey@redhat.com>
4340
4341         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4342         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4343         (parse_debug_format_options): Likewise.
4344         (gdbserver_usage): Likewise.
4345         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4346         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4347         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4348         against libiberty.
4349         ($(LIBGNU)): Depend on libiberty.
4350         (all-lib): Recurse into all subdirs.
4351         (install-only): Invoke "install" target in subdirs.
4352         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4353         targets.
4354         * configure: Rebuild.
4355         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
4356         for vasprintf, vsnprintf, or gettimeofday.
4357         * configure.srv: Don't add safe-ctype.o or lbasename.o to
4358         srv_tgtobj.
4359
4360 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
4361
4362         * development.sh: Delete.
4363         * Makefile.in (config.status): Adjust dependency on development.sh.
4364         * configure.ac: Adjust development.sh source call.
4365         * configure: Regenerate.
4366
4367 2014-06-02  Pedro Alves  <palves@redhat.com>
4368
4369         * ax.c (gdb_free_agent_expr): New function.
4370         * ax.h (gdb_free_agent_expr): New declaration.
4371         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4372         list.
4373         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4374         static.
4375         (clear_breakpoint_conditions_and_commands): New function.
4376         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4377         (clear_breakpoint_conditions_and_commands): New declaration.
4378
4379 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
4380
4381         * linux-aarch64-low.c (asm/ptrace.h): Include.
4382
4383 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
4384
4385         Fix TLS access for -static -pthread.
4386         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4387         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4388         (thread_db_load_search, try_thread_db_load_1): Initialize it.
4389
4390 2014-05-20  Pedro Alves  <palves@redhat.com>
4391
4392         * linux-aarch64-low.c (aarch64_insert_point)
4393         (aarch64_remove_point): No longer check whether the type is
4394         supported here.  Adjust to new interface.
4395         (the_low_target): Install aarch64_supports_z_point_type as
4396         supports_z_point_type method.
4397         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4398         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4399         instead of a Z packet char.  Adjust.
4400         (arm_supports_z_point_type): New function.
4401         (arm_insert_point, arm_remove_point): Adjust to new interface.
4402         (the_low_target): Install arm_supports_z_point_type.
4403         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4404         (cris_insert_point, cris_remove_point): Adjust to new interface.
4405         Don't check whether the type is supported here.
4406         (the_low_target): Install cris_supports_z_point_type.
4407         * linux-low.c (linux_supports_z_point_type): New function.
4408         (linux_insert_point, linux_remove_point): Adjust to new interface.
4409         * linux-low.h (struct linux_target_ops) <insert_point,
4410         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
4411         raw_breakpoint pointer parameter.
4412         <supports_z_point_type>: New method.
4413         * linux-mips-low.c (mips_supports_z_point_type): New function.
4414         (mips_insert_point, mips_remove_point): Adjust to new interface.
4415         Use mips_supports_z_point_type.
4416         (the_low_target): Install mips_supports_z_point_type.
4417         * linux-ppc-low.c (the_low_target): Install NULL as
4418         supports_z_point_type method.
4419         * linux-s390-low.c (the_low_target): Install NULL as
4420         supports_z_point_type method.
4421         * linux-sparc-low.c (the_low_target): Install NULL as
4422         supports_z_point_type method.
4423         * linux-x86-low.c (x86_supports_z_point_type): New function.
4424         (x86_insert_point): Adjust to new insert_point interface.  Use
4425         insert_memory_breakpoint.  Adjust to new
4426         i386_low_insert_watchpoint interface.
4427         (x86_remove_point): Adjust to remove_point interface.  Use
4428         remove_memory_breakpoint.  Adjust to new
4429         i386_low_remove_watchpoint interface.
4430         (the_low_target): Install x86_supports_z_point_type.
4431         * lynx-low.c (lynx_target_ops): Install NULL as
4432         supports_z_point_type callback.
4433         * nto-low.c (nto_supports_z_point_type): New.
4434         (nto_insert_point, nto_remove_point): Adjust to new interface.
4435         (nto_target_ops): Install nto_supports_z_point_type.
4436         * mem-break.c: Adjust intro comment.
4437         (struct raw_breakpoint) <raw_type, size>: New fields.
4438         <inserted>: Update comment.
4439         <shlib_disabled>: Delete field.
4440         (enum bkpt_type) <gdb_breakpoint>: Delete value.
4441         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4442         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4443         (raw_bkpt_type_to_target_hw_bp_type): New function.
4444         (find_enabled_raw_code_breakpoint_at): New function.
4445         (find_raw_breakpoint_at): New type and size parameters.  Use them.
4446         (insert_memory_breakpoint): New function, based off
4447         set_raw_breakpoint_at.
4448         (remove_memory_breakpoint): New function.
4449         (set_raw_breakpoint_at): Reimplement.
4450         (set_breakpoint): New, based on set_breakpoint_at.
4451         (set_breakpoint_at): Reimplement.
4452         (delete_raw_breakpoint): Go through the_target->remove_point
4453         instead of assuming memory breakpoints.
4454         (find_gdb_breakpoint_at): Delete.
4455         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4456         (find_gdb_breakpoint): New function.
4457         (set_gdb_breakpoint_at): Delete.
4458         (z_type_supported): New function.
4459         (set_gdb_breakpoint_1): New function, loosely based off
4460         set_gdb_breakpoint_at.
4461         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4462         (delete_gdb_breakpoint_at): Delete.
4463         (delete_gdb_breakpoint_1): New function, loosely based off
4464         delete_gdb_breakpoint_at.
4465         (delete_gdb_breakpoint): New function.
4466         (clear_gdb_breakpoint_conditions): Rename to ...
4467         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
4468         breakpoint.
4469         (add_condition_to_breakpoint): Make static.
4470         (add_breakpoint_condition): Take a struct breakpoint pointer
4471         instead of an address.  Adjust.
4472         (gdb_condition_true_at_breakpoint): Rename to ...
4473         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4474         z_type parameter.
4475         (gdb_condition_true_at_breakpoint): Reimplement.
4476         (add_breakpoint_commands): Take a struct breakpoint pointer
4477         instead of an address.  Adjust.
4478         (gdb_no_commands_at_breakpoint): Rename to ...
4479         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
4480         parameter.  Return true if no breakpoint was found.  Change debug
4481         output.
4482         (gdb_no_commands_at_breakpoint): Reimplement.
4483         (run_breakpoint_commands): Rename to ...
4484         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
4485         and change return type to boolean.
4486         (run_breakpoint_commands): New function.
4487         (gdb_breakpoint_here): Also check for Z1 breakpoints.
4488         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4489         breakpoint.  Go through the_target->remove_point instead of
4490         assuming memory breakpoint.
4491         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4492         software and hardware breakpoints.
4493         (reinsert_raw_breakpoint): Go through the_target->insert_point
4494         instead of assuming memory breakpoint.
4495         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4496         software and hardware breakpoints.
4497         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4498         Check both software and hardware breakpoints.
4499         (validate_inserted_breakpoint): Assert the breakpoint is a
4500         software breakpoint.  Set the inserted flag to -1 instead of
4501         setting shlib_disabled.
4502         (delete_disabled_breakpoints): Adjust.
4503         (validate_breakpoints): Only validate software breakpoints.
4504         Adjust to inserted flag change.
4505         (check_mem_read, check_mem_write): Skip breakpoint types other
4506         than software breakpoints.  Adjust to inserted flag change.
4507         * mem-break.h (enum raw_bkpt_type): New enum.
4508         (raw_breakpoint, struct process_info): Forward declare.
4509         (Z_packet_to_target_hw_bp_type): Delete declaration.
4510         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4511         (set_gdb_breakpoint, delete_gdb_breakpoint)
4512         (clear_breakpoint_conditions): New declarations.
4513         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4514         (breakpoint_inserted_here): Update comment.
4515         (add_breakpoint_condition, add_breakpoint_commands): Replace
4516         address parameter with a breakpoint pointer parameter.
4517         (gdb_breakpoint_here): Update comment.
4518         (delete_gdb_breakpoint_at): Delete.
4519         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4520         * server.c (process_point_options): Take a struct breakpoint
4521         pointer instead of an address.  Adjust.
4522         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4523         delete_gdb_breakpoint.
4524         * spu-low.c (spu_target_ops): Install NULL as
4525         supports_z_point_type method.
4526         * target.h: Include mem-break.h.
4527         (struct target_ops) <prepare_to_access_memory>: Update comment.
4528         <supports_z_point_type>: New field.
4529         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4530         instead of a char.  Also take a raw breakpoint pointer.
4531         * win32-arm-low.c (the_low_target): Install NULL as
4532         supports_z_point_type.
4533         * win32-i386-low.c (i386_supports_z_point_type): New function.
4534         (i386_insert_point, i386_remove_point): Adjust to new interface.
4535         (the_low_target): Install i386_supports_z_point_type.
4536         * win32-low.c (win32_supports_z_point_type): New function.
4537         (win32_insert_point, win32_remove_point): Adjust to new interface.
4538         (win32_target_ops): Install win32_supports_z_point_type.
4539         * win32-low.h (struct win32_target_ops):
4540         <supports_z_point_type>: New method.
4541         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4542         instead of a char.  Also take a raw breakpoint pointer.
4543
4544 2014-05-20  Pedro Alves  <palves@redhat.com>
4545
4546         * mem-break.h: Include break-common.h.
4547         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4548         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4549         (Z_packet_to_target_hw_bp_type): New declaration.
4550         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4551         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4552         (Z_PACKET_ACCESS_WP): Delete macros.
4553         (Z_packet_to_hw_type): Delete function.
4554         * i386-low.h: Don't include break-common.h here.
4555         (Z_packet_to_hw_type): Delete declaration.
4556         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4557         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4558         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4559         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4560         * linux-aarch64-low.c: Don't include break-common.h here.
4561         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4562         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4563         (Z_packet_to_target_hw_bp_type): Delete function.
4564         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4565         function.
4566         (mips_insert_point, mips_remove_point): Use
4567         Z_packet_to_target_hw_bp_type.
4568
4569 2014-05-20  Pedro Alves  <palves@redhat.com>
4570
4571         * linux-aarch64-low.c: Include break-common.h.
4572         (enum target_point_type): Delete.
4573         (Z_packet_to_point_type): Rename to ...
4574         (Z_packet_to_target_hw_bp_type): ... this, and return a
4575         target_hw_bp_type instead.
4576         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4577         instead of an enum target_point_type.
4578         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
4579         breakpoint type.
4580         (aarch64_dr_state_insert_one_point)
4581         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4582         (aarch64_handle_aligned_watchpoint)
4583         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4584         Take an enum target_hw_bp_type instead of an enum
4585         target_point_type.
4586         (aarch64_supports_z_point_type): New function.
4587         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
4588         use Z_packet_to_target_hw_bp_type.
4589
4590 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
4591
4592         * configure.ac: Only use -Werror by default when DEVELOPMENT
4593         is true.
4594         * configure: Regenerate.
4595
4596 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
4597
4598         Fix gdbserver qGetTLSAddr for x86_64 -m32.
4599         * linux-x86-low.c (X86_64_USER_REGS): New.
4600         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4601
4602 2014-04-28  Yao Qi  <yao@codesourcery.com>
4603
4604         * Makefile.in (i386-avx512.c): Fix the typo of generated file
4605         name.
4606
4607 2014-04-25  Pedro Alves  <palves@redhat.com>
4608
4609         PR server/16255
4610         * linux-low.c (linux_attach_fail_reason_string): New function.
4611         (linux_attach_lwp): Delete.
4612         (linux_attach_lwp_1): Rename to ...
4613         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
4614         argument.  Remove "initial" parameter.  Return int instead of
4615         void.  Don't error or warn here.
4616         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
4617         failure to attach to the tgid.  Call warning when failing to
4618         attach to an lwp.
4619         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4620         argument.  Remove "initial" parameter.  Return int instead of
4621         void.  Don't error or warn here.
4622         (linux_attach_fail_reason_string): New declaration.
4623         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4624         interface change.  Use linux_attach_fail_reason_string.
4625
4626 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
4627             Walfred Tedeschi  <walfred.tedeschi@intel.com>
4628
4629         * Makefile.in: Added rules to handle new files
4630         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4631         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4632         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4633         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4634         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4635         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4636         x32-avx512-linux.o.
4637         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4638         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4639         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4640         i386/x32-avx512.xml.
4641         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4642         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4643         i386/x32-avx512-linux.xml.
4644         * i387-fp.c (num_avx512_k_registers): New constant for number
4645         of K registers.
4646         (num_avx512_zmmh_low_registers): New constant for number of
4647         lower ZMM registers (0-15).
4648         (num_avx512_zmmh_high_registers): New constant for number of
4649         higher ZMM registers (16-31).
4650         (num_avx512_ymmh_registers): New contant for number of higher
4651         YMM registers (ymm16-31 added by avx521 on x86_64).
4652         (num_avx512_xmm_registers): New constant for number of higher
4653         XMM registers (xmm16-31 added by AVX512 on x86_64).
4654         (struct i387_xsave): Add space for AVX512 registers.
4655         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4656         Add code to handle AVX512 registers.
4657         (i387_xsave_to_cache): Add code to handle AVX512 registers.
4658         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4659         prototypei from generated file.
4660         (tdesc_amd64_avx512_linux): Likewise.
4661         (init_registers_x32_avx512_linux): Likewise.
4662         (tdesc_x32_avx512_linux): Likewise.
4663         (init_registers_i386_avx512_linux): Likewise.
4664         (tdesc_i386_avx512_linux): Likewise.
4665         (x86_64_regmap): Add AVX512 registers.
4666         (x86_linux_read_description): Add code to handle AVX512 XSTATE
4667         mask.
4668         (initialize_low_arch): Add code to initialize AVX512 registers.
4669
4670 2014-04-23  Pedro Alves  <palves@redhat.com>
4671
4672         * mem-break.c (find_gdb_breakpoint_at): Make static.
4673         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4674
4675 2014-04-23  Pedro Alves  <palves@redhat.com>
4676
4677         * i386-low.c: Don't include break-common.h here.
4678         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4679         prototype to take target_hw_bp_type as argument instead of a Z
4680         packet char.
4681         * i386-low.h: Include break-common.h here.
4682         (Z_packet_to_hw_type): Declare.
4683         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4684         prototypes.
4685         * linux-x86-low.c (x86_insert_point): Convert the packet number to
4686         a target_hw_bp_type before calling i386_low_insert_watchpoint.
4687         (x86_remove_point): Convert the packet number to a
4688         target_hw_bp_type before calling i386_low_remove_watchpoint.
4689         * win32-i386-low.c (i386_insert_point): Convert the packet number
4690         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4691         (i386_remove_point): Convert the packet number to a
4692         target_hw_bp_type before calling i386_low_remove_watchpoint.
4693
4694 2014-04-23  Pedro Alves  <palves@redhat.com>
4695
4696         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4697
4698 2014-04-10  Pedro Alves  <palves@redhat.com>
4699
4700         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4701         Check if the condition or command is NULL before checking if the
4702         breakpoint is known.  On success, return true.
4703         * mem-break.h (add_breakpoint_condition): Document return.
4704         (add_breakpoint_commands): Add describing comment.
4705         * server.c (skip_to_semicolon): New function.
4706         (process_point_options): Use it.
4707
4708 2014-04-09  Pedro Alves  <palves@redhat.com>
4709
4710         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4711         to lwpid_of.
4712
4713 2014-02-27  Pedro Alves  <palves@redhat.com>
4714
4715         PR 12702
4716         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4717         macros.
4718         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4719         output.
4720         (last_thread_of_process_p): Take a PID argument instead of a
4721         thread pointer.
4722         (linux_wait_for_lwp): Delete.
4723         (num_lwps, check_zombie_leaders, not_stopped_callback): New
4724         functions.
4725         (linux_low_filter_event): New function, party factored out from
4726         linux_wait_for_event.
4727         (linux_wait_for_event): Rename to ...
4728         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
4729         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
4730         sigsuspend.  Check for zombie leaders.
4731         (linux_wait_for_event): Reimplement as wrapper around
4732         linux_wait_for_event_filtered.
4733         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
4734         a normal or signal exit is seen, it's the whole process exiting.
4735         (wait_for_sigstop): No longer a for_each_inferior callback.
4736         Rewrite on top of linux_wait_for_event_filtered.
4737         (stop_all_lwps): Call wait_for_sigstop directly.
4738         * server.c (resume, handle_target_event): Handle
4739         TARGET_WAITKIND_NO_RESUMED.
4740
4741 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
4742
4743         * win32-low.c (psapi_get_dll_name,
4744         * win32_CreateToolhelp32Snapshot): Delete.
4745         (win32_CreateToolhelp32Snapshot, win32_Module32First)
4746         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4747         Delete.
4748         (handle_load_dll): Add function description.
4749         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4750
4751 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
4752
4753         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4754         Add comment.
4755         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4756         base address when calling win32_add_one_solib.
4757         (handle_load_dll): Delete local variable load_addr.
4758         Remove 0x1000 offset applied to DLL base address when calling
4759         win32_add_one_solib.
4760         (handle_unload_dll): Add comment.
4761
4762 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
4763
4764         * win32-low.c (win32_add_all_dlls): Renames
4765         win32_ensure_ntdll_loaded.  Rewrite function documentation.
4766         Adjust implementation to always load all DLLs.
4767         Add 0x1000 offset to DLL base address when calling
4768         win32_add_one_solib.
4769         (child_initialization_done): New static global.
4770         (do_initial_child_stuff): Set child_initialization_done to
4771         zero during child initialization, and 1 after.  Replace call
4772         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4773         Add comment.
4774         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4775         (handle_unload_dll): Add function documentation.
4776         (get_child_debug_event): Ignore load and unload DLL events
4777         during child initialization.
4778
4779 2014-02-20  Doug Evans  <dje@google.com>
4780
4781         Remove global all_lwps.
4782         * inferiors.h (ptid_of): Move here from linux-low.h.
4783         (pid_of, lwpid_of): Ditto.
4784         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4785         parameter is a struct thread_info * now.
4786         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4787         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
4788         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4789         directly.
4790         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4791         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4792         * linux-arm-low.c (update_registers_callback): Update, "entry"
4793         parameter is a struct thread_info * now.
4794         Fetch lwpid from current_inferior directly.
4795         (arm_insert_point): Pass &all_threads to find_inferior instead of
4796         &all_lwps.
4797         (arm_remove_point): Ditto.
4798         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4799         (arm_prepare_to_resume): Fetch pid from thread.
4800         (arm_read_description): Fetch lwpid from current_inferior directly.
4801         * linux-low.c (all_lwps): Delete.
4802         (delete_lwp): Delete call to remove_inferior.
4803         (handle_extended_wait): Fetch lwpid from thread.
4804         (add_lwp): Don't set lwp->entry.id.  Remove call to
4805         add_inferior_to_list.
4806         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4807         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4808         (kill_one_lwp_callback): Ditto.
4809         (linux_kill): Don't dereference NULL pointer.
4810         Fetch ptid,lwpid from thread.
4811         (get_detach_signal): Fetch ptid from thread.
4812         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4813         Simplify call to regcache_invalidate_thread.
4814         (delete_lwp_callback): Update, "entry" parameter is a
4815         struct thread_info * now.  Fetch pid from thread.
4816         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4817         (status_pending_p_callback): Update, "entry" parameter is a
4818         struct thread_info * now.  Fetch ptid from thread.
4819         (find_lwp_pid): Update, "entry" parameter is a
4820         struct thread_info * now.
4821         (linux_wait_for_lwp): Fetch pid from thread.
4822         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4823         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4824         (enqueue_one_deferred_signal): Fetch lwpid from thread.
4825         (dequeue_one_deferred_signal): Ditto.
4826         (cancel_breakpoint): Fetch ptid from current_inferior.
4827         (linux_wait_for_event): Pass &all_threads to find_inferior,
4828         not &all_lwps.  Fetch ptid, lwpid from thread.
4829         (count_events_callback): Update, "entry" parameter is a
4830         struct thread_info * now.
4831         (select_singlestep_lwp_callback): Ditto.
4832         (select_event_lwp_callback): Ditto.
4833         (cancel_breakpoints_callback): Ditto.
4834         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4835         not &all_lwps.
4836         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
4837         (unsuspend_one_lwp): Update, "entry" parameter is a
4838         struct thread_info * now.
4839         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4840         not &all_lwps.
4841         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
4842         Fetch lwpid from thread, not lwp.
4843         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4844         Pass &all_threads to find_inferior, not &all_lwps.
4845         (send_sigstop): Fetch lwpid from thread, not lwp.
4846         (send_sigstop_callback): Update, "entry" parameter is a
4847         struct thread_info * now.
4848         (suspend_and_send_sigstop_callback): Ditto.
4849         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
4850         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4851         struct thread_info * now.
4852         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
4853         from thread, lwp.
4854         (lwp_running): Update, "entry" parameter is a
4855         struct thread_info * now.
4856         (stop_all_lwps): Fetch ptid from thread.
4857         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4858         (linux_resume_one_lwp): Fetch lwpid from thread.
4859         (linux_set_resume_request): Update, "entry" parameter is a
4860         struct thread_info * now.  Fetch pid, lwpid from thread.
4861         (resume_status_pending_p): Update, "entry" parameter is a
4862         struct thread_info * now.
4863         (need_step_over_p): Ditto.  Fetch lwpid from thread.
4864         (start_step_over): Fetch lwpid from thread.
4865         (linux_resume_one_thread): Update, "entry" parameter is a
4866         struct thread_info * now.  Fetch lwpid from thread.
4867         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4868         (proceed_one_lwp): Update, "entry" parameter is a
4869         struct thread_info * now.  Fetch lwpid from thread.
4870         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4871         struct thread_info * now.
4872         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4873         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
4874         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4875         directly.
4876         (regsets_store_inferior_registers): Ditto.
4877         (fetch_register, store_register): Ditto.
4878         (linux_read_memory, linux_write_memory): Ditto.
4879         (linux_request_interrupt): Ditto.
4880         (linux_read_auxv): Ditto.
4881         (linux_xfer_siginfo): Ditto.
4882         (linux_qxfer_spu): Ditto.
4883         (linux_qxfer_libraries_svr4): Ditto.
4884         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4885         moved to inferiors.h.
4886         (get_lwp): Delete.
4887         (get_thread_lwp): Update.
4888         (struct lwp_info): Delete member "entry".  Simplify comment for
4889         member "thread".
4890         (all_lwps): Delete.
4891         * linux-mips-low.c (mips_read_description): Fetch lwpid from
4892         current_inferior directly.
4893         (update_watch_registers_callback): Update, "entry" parameter is a
4894         struct thread_info * now.  Fetch pid from thread.
4895         (mips_linux_prepare_to_resume): Fetch ptid from thread.
4896         (mips_insert_point): Fetch lwpid from current_inferior.
4897         Pass &all_threads to find_inferior, not &all_lwps.
4898         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4899         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4900         directly.
4901         (mips_stopped_data_address): Ditto.
4902         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4903         directly.
4904         * linux-tile-low.c (tile_arch_setup): Ditto.
4905         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4906         (update_debug_registers_callback): Update, "entry" parameter is a
4907         struct thread_info * now.  Fetch pid from thread.
4908         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4909         Pass &all_threads to find_inferior, not &all_lwps.
4910         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4911         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4912         Pass &all_threads to find_inferior, not &all_lwps.
4913         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4914         (i386_dr_low_get_status): Ditto.
4915         (x86_linux_prepare_to_resume): Fetch ptid from thread.
4916         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4917         (x86_linux_read_description): Ditto.
4918         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4919
4920 2014-02-20  Doug Evans  <dje@google.com>
4921
4922         * inferiors.c (get_first_inferior): Fix buglet.
4923
4924 2014-02-19  Doug Evans  <dje@google.com>
4925
4926         * gdbthread.h (add_thread): Change result type to struct thread_info *.
4927         * inferiors.c (add_thread): Change result type to struct thread_info *.
4928         All callers updated.
4929         (add_lwp): Call add_thread here instead of in callers.
4930         All callers updated.
4931         * linux-low.h (get_lwp_thread): Rewrite.
4932         (struct lwp_info): New member "thread".
4933
4934 2014-02-19  Doug Evans  <dje@google.com>
4935
4936         * linux-low.c (add_lwp): Change result to struct lwp_info *.
4937         All callers updated.
4938
4939 2014-02-19  Doug Evans  <dje@google.com>
4940
4941         * inferiors.c (add_thread): Fix whitespace.
4942
4943 2014-02-19  Doug Evans  <dje@google.com>
4944
4945         * dll.c (clear_dlls): Replace accessing list implemention details
4946         with API function.
4947         * gdbthread.h (get_first_thread): Declare.
4948         * inferiors.c (for_each_inferior_with_data): New function.
4949         (get_first_thread): New function.
4950         (find_thread_ptid): Simplify.
4951         (get_first_inferior): New function.
4952         (clear_list): Delete.
4953         (one_inferior_p): New function.
4954         (clear_inferior_list): New function.
4955         (clear_inferiors): Update.
4956         * inferiors.h (for_each_inferior_with_data): Declare.
4957         (clear_inferior_list): Declare.
4958         (one_inferior_p): Declare.
4959         (get_first_inferior): Declare.
4960         * linux-low.c (linux_wait_for_event): Replace accessing list
4961         implemention details with API function.
4962         * server.c (target_running): Ditto.
4963         (accumulate_file_name_length): New function.
4964         (emit_dll_description): New function.
4965         (handle_qxfer_libraries): Replace accessing list implemention
4966         details with API function.
4967         (handle_qxfer_threads_worker): New function.
4968         (handle_qxfer_threads_proper): Replace accessing list implemention
4969         details with API function.
4970         (handle_query): Ditto.
4971         (visit_actioned_threads_callback_ftype): New typedef.
4972         (visit_actioned_threads_data): New struct.
4973         (visit_actioned_threads): Rewrite to be find_inferior callback.
4974         (resume): Call find_inferior.
4975         (handle_status): Replace accessing list implemention
4976         details with API function.
4977         (process_serial_event): Replace accessing list implemention details
4978         with API function.
4979         * target.c (set_desired_inferior): Replace accessing list implemention
4980         details with API function.
4981         * tracepoint.c (same_process_p): New function.
4982         (gdb_agent_about_to_close): Replace accessing list implemention
4983         details with API function.
4984         * win32-low.c (child_delete_thread): Replace accessing list
4985         implemention details with API function.
4986         (match_dll_by_basename): New function.
4987         (dll_is_loaded_by_basename): New function.
4988         (win32_ensure_ntdll_loaded): Replace accessing list implemention
4989         details call to dll_is_loaded_by_basename.
4990
4991 2014-02-19  Doug Evans  <dje@google.com>
4992
4993         * dll.h (struct dll_info): Add comment.
4994         * gdbthread.h (struct thread_info): Add comment.
4995         (current_ptid): Simplify.
4996         * inferiors.c (add_process): Update.
4997         (remove_process): Update.
4998         * inferiors.h (struct process_info): Rename member "head" to "entry".
4999         * linux-low.c (delete_lwp): Update.
5000         (add_lwp): Update.
5001         (last_thread_of_process_p): Update.
5002         (kill_one_lwp_callback, linux_kill): Update.
5003         (status_pending_p_callback): Update.
5004         (wait_for_sigstop): Update.  Simplify read of ptid.
5005         (start_step_over): Update.
5006         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5007         (get_lwp_thread): Update.
5008         (struct lwp_info): Rename member "head" to "entry".
5009         * regcache.h (inferior_list_entry): Delete.
5010         * server.c (kill_inferior_callback): Update.
5011         (detach_or_kill_inferior_callback): Update.
5012         (print_started_pid): Update.
5013         (print_attached_pid): Update.
5014         (process_serial_event): Simplify read of ptid.
5015         * thread-db.c (thread_db_create_event): Update.
5016         (thread_db_get_tls_address): Update.
5017         * win32-low.c (current_inferior_ptid): Simplify.
5018
5019 2014-02-19  Tom Tromey  <tromey@redhat.com>
5020
5021         * target.h (struct target_ops) <supports_btrace>: Add target_ops
5022         argument.
5023         (target_supports_btrace): Update.
5024
5025 2014-02-14  Yao Qi  <yao@codesourcery.com>
5026
5027         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5028         (rsp-low-ipa.o): New target.
5029
5030 2014-02-12  Tom Tromey  <tromey@redhat.com>
5031
5032         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5033         convert_ascii_to_int.
5034         * regcache.c (registers_to_string): Likewise.
5035         * remote-utils.c (decode_M_packet): Likewise.
5036         * server.c (process_serial_event): Likewise.
5037
5038 2014-02-12  Tom Tromey  <tromey@redhat.com>
5039
5040         * server.c (handle_query, handle_v_run): Use hex2bin, not
5041         unhexify.
5042         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5043
5044 2014-02-12  Tom Tromey  <tromey@redhat.com>
5045
5046         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5047         convert_int_to_ascii.
5048         * regcache.c (registers_to_string, collect_register_as_string):
5049         Likewise.
5050         * remote-utils.c (look_up_one_symbol, relocate_instruction):
5051         Likewise.
5052         * server.c (process_serial_event): Likewise.
5053         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5054         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5055
5056 2014-02-12  Tom Tromey  <tromey@redhat.com>
5057
5058         * remote-utils.c (look_up_one_symbol, monitor_output): Use
5059         bin2hex, not hexify.
5060         * tracepoint.c (cmd_qtstatus): Likewise.
5061
5062 2014-02-12  Tom Tromey  <tromey@redhat.com>
5063
5064         * remote-utils.c (monitor_output): Pass explicit length to
5065         hexify.
5066
5067 2014-02-12  Tom Tromey  <tromey@redhat.com>
5068
5069         * tracepoint.c: Include rsp-low.h.
5070         * server.c: Include rsp-low.h.
5071         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5072         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5073         declare.
5074         * remote-utils.c: Include rsp-low.h.
5075         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5076         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5077         (convert_int_to_ascii, convert_ascii_to_int): Move to
5078         common/rsp-low.c.
5079         * regcache.c: Include rsp-low.h.
5080         * ax.c: Include rsp-low.h.
5081         * Makefile.in (SFILES): Add common/rsp-low.c.
5082         (OBS): Add rsp-low.o.
5083         (rsp-low.o): New target.
5084
5085 2014-02-12  Tom Tromey  <tromey@redhat.com>
5086
5087         * utils.h (pulongest, plongest, phex_nz): Don't declare.
5088         Include print-utils.h.
5089         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5090         (plongest, thirty_two, phex_nz): Remove.
5091         * Makefile.in (SFILES): Add common/print-utils.c.
5092         (OBS): Add print-utils.o.
5093         (print-utils-ipa.o): New target.
5094         (print-utils.o): New target.
5095         (IPA_OBJS): Add print-utils-ipa.o.
5096
5097 2014-02-06  Tom Tromey  <tromey@redhat.com>
5098
5099         * Makefile.in (SFILES): Fix indentation.
5100
5101 2014-02-05  Doug Evans  <dje@google.com>
5102
5103         * linux-low.c (linux_wait_for_event): Improve comment.
5104         (linux_wait_1): Keep current_inferior in sync with event_child.
5105
5106 2014-01-22  Doug Evans  <dje@google.com>
5107
5108         * gdbthread.h (gdb_id_to_thread): Delete, unused.
5109
5110 2014-01-22  Doug Evans  <dje@google.com>
5111
5112         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5113         * configure: Regenerate.
5114         * config.in: Regenerate.
5115         * Makefile.in (SFILES): Add debug.c.
5116         (OBS): Add debug.o.
5117         * debug.c: New file.
5118         * debug.h: New file.
5119         * linux-aarch64-low.c (*): Update all debugging printfs to use
5120         debug_printf instead of fprintf.
5121         * linux-arm-low.c (*): Ditto.
5122         * linux-cris-low.c (*): Ditto.
5123         * linux-crisv32-low.c (*): Ditto.
5124         * linux-m32r-low.c (*): Ditto.
5125         * linux-sparc-low.c (*): Ditto.
5126         * linux-x86.c (*): Ditto.
5127         * linux-low.c (*): Ditto.
5128         (linux_wait_1): Add calls to debug_enter, debug_exit.
5129         (linux_wait): Remove redundant debugging printf.
5130         (stop_all_lwps): Add calls to debug_enter, debug_exit.
5131         (linux_resume, unstop_all_lwps): Ditto.
5132         * mem-break.c (*): Update all debugging printfs to use
5133         debug_printf instead of fprintf.
5134         * remote-utils.c (*): Ditto.
5135         * thread-db.c (*): Ditto.
5136         * server.c #include <ctype.h>, "gdb_vecs.h".
5137         (debug_threads): Moved to debug.c.
5138         (*): Update all debugging printfs to use debug_printf instead of
5139         fprintf.
5140         (start_inferior): Replace call to fflush with call to debug_flush.
5141         (monitor_show_help): Mention set debug-format.
5142         (parse_debug_format_options): New function.
5143         (handle_monitor_command): Handle "monitor set debug-format".
5144         (gdbserver_usage): Mention --debug-format.
5145         (main): Parse --debug-format.
5146         * server.h (debug_threads): Declaration moved to debug.h.
5147         #include "debug.h".
5148         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5149         trace_debug_1 that uses debug_printf.
5150         (tracepoint_look_up_symbols): Update all debugging printfs to use
5151         debug_printf instead of fprintf.
5152
5153 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
5154
5155         * linux-xtensa-low.c: Include asm/ptrace.h instead of
5156         sys/ptrace.h.
5157
5158 2014-01-17  Pedro Alves  <palves@redhat.com>
5159
5160         PR build/16445
5161         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5162         defined after including gdb_proc_service.h.
5163
5164 2014-01-16  Doug Evans  <dje@google.com>
5165
5166         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5167         (match_dll): Use it.
5168
5169 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
5170
5171         * target.h (target_ops) <read_btrace>: Change parameters and
5172         return type to allow error reporting.
5173         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
5174         trace reading errors on.
5175         * linux-low.c (linux_low_read_btrace): Pass trace reading
5176         errors on.
5177         (linux_low_disable_btrace): New.
5178
5179 2014-01-15  Doug Evans  <dje@google.com>
5180
5181         * inferiors.c (thread_id_to_gdb_id): Delete.
5182         * inferiors.h (thread_id_to_gdb_id): Delete.
5183
5184 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
5185
5186         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5187         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
5188         versions.
5189
5190 2014-01-08  Pedro Alves  <palves@redhat.com>
5191
5192         * server.c (handle_status): Don't discard previous queued stop
5193         replies or thread's pending status here.
5194         (main) <disconnection>: Do it here instead.
5195
5196 2014-01-08  Pedro Alves  <palves@redhat.com>
5197
5198         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5199         * server.c (visit_actioned_threads, handle_pending_status): New
5200         function.
5201         (handle_v_cont): Factor out parts to ...
5202         (resume): ... this new function.  If in all-stop, and a thread
5203         being resumed has a pending status, report it without actually
5204         resuming.
5205         (myresume): Adjust to use the new 'resume' function.
5206         (clear_pending_status_callback, set_pending_status_callback)
5207         (find_status_pending_thread_callback): New functions.
5208         (handle_status): Handle the case of multiple threads having
5209         interesting statuses to report.  Report threads' real last signal
5210         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
5211         with an interesting thread to report the status for, instead of
5212         always reporting the status of the first thread.
5213
5214 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
5215
5216         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5217         * gdbreplay.c (gdbreplay_version): Likewise.
5218
5219 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
5220
5221         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5222         iov.iov_len with the real length in use.
5223
5224 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
5225
5226         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5227         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5228         for all targets that use win32-low.c.
5229         * win32-low.c (win32_ensure_ntdll_loaded): New function.
5230         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5231
5232 2013-12-13  Pedro Alves  <palves@redhat.com>
5233
5234         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5235         if equal to TARGET_WAITKIND_LOADED.
5236         * win32-low.c (cached_status): New static global.
5237         (win32_wait): Add declaration.
5238         (do_initial_child_stuff): Flush all initial pending debug events
5239         up to the initial breakpoint.
5240         (win32_wait): If CACHED_STATUS was set, return that instead
5241         of doing a real wait.  Remove the code resuming the execution
5242         of the inferior after receiving a TARGET_WAITKIND_LOADED event
5243         during the initial phase.  Also remove the code changing
5244         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5245         TARGET_WAITKIND_STOPPED.
5246
5247 2013-12-11  Yao Qi  <yao@codesourcery.com>
5248
5249         * notif.c (handle_notif_ack): Return 0 if no notification
5250         matches.
5251
5252 2013-11-20  Doug Evans  <dje@google.com>
5253
5254         * linux-low.c (linux_set_resume_request): Fix comment.
5255
5256 2013-11-20  Doug Evans  <dje@google.com>
5257
5258         * linux-low.c (resume_status_pending_p): Tweak comment.
5259
5260 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5261
5262         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5263         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5264         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5265         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5266         (srv_amd64_regobj): Add amd64-mpx.o.
5267         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5268         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5269         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5270         * i387-fp.c (num_pl_bnd_register) Added constant.
5271         (num_pl_bnd_cfg_registers) Added constant.
5272         (struct i387_xsave) Added reserved area and MPX fields.
5273         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5274         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5275         function.
5276         (tdesc_i386_mpx_linux): Add MPX amd64 target.
5277         (init_registers_amd64_mpx_linux): Declare new function.
5278         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5279         (x86_64_regmap): Add MPX registers.
5280         (x86_linux_read_description): Add MPX case.
5281         (initialize_low_arch): Initialize MPX targets.
5282
5283 2013-11-18  Tom Tromey  <tromey@redhat.com>
5284
5285         * configure: Rebuild.
5286         * configure.ac: Don't check for stdlib.h.
5287         * gdbreplay.c: Unconditionally include stdlib.h.
5288
5289 2013-11-18  Tom Tromey  <tromey@redhat.com>
5290
5291         * config.in: Rebuild.
5292         * configure: Rebuild.
5293         * configure.ac: Don't use AC_HEADER_DIRENT.
5294
5295 2013-11-18  Tom Tromey  <tromey@redhat.com>
5296
5297         * server.h: Don't check HAVE_STRING_H.
5298         * gdbreplay.c: Don't check HAVE_STRING_H.
5299         * configure: Rebuild.
5300
5301 2013-11-18  Tom Tromey  <tromey@redhat.com>
5302
5303         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5304         LIBGNU.
5305
5306 2013-11-08  Tom Tromey  <tromey@redhat.com>
5307
5308         * configure, config.in: Rebuild.
5309         * configure.ac: Remove unused configury.
5310
5311 2013-11-08  Tom Tromey  <tromey@redhat.com>
5312
5313         * acinclude.m4: Include common.m4, codeset.m4.
5314         * configure, config.in: Rebuild.
5315         * configure.ac: Use GDB_AC_COMMON.
5316
5317 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5318
5319         * linux-s390-low.c (HWCAP_S390_TE): New define.
5320         (s390_arch_setup): Consider the TE field in the HWCAP for
5321         determining 'have_regset_tdb'.
5322
5323 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
5324
5325         PR gdb/16014
5326         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5327         call to sizeof.
5328
5329 2013-10-02  Pedro Alves  <palves@redhat.com>
5330
5331         * server.c (process_serial_event): Don't output "GDBserver
5332         exiting" if GDB is connected through stdio.
5333         * target.c (mywait): Likewise, be silent if GDB is connected
5334         through stdio.
5335
5336 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
5337
5338         * lynx-low.c (lynx_add_threads_after_attach): New function.
5339         (lynx_attach): Remove call to add_thread.  Add call to
5340         lynx_add_threads_after_attach instead.
5341
5342 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
5343
5344         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5345         * config.in, configure: Regenerated.
5346
5347 2013-09-18  Yao Qi  <yao@codesourcery.com>
5348
5349         PR server/15959
5350         * server.c (start_inferior): Clear 'resume_info'.
5351
5352 2013-09-16  Jiong Wang  <jiwang@tilera.com>
5353
5354         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5355         for each register.
5356
5357 2013-09-16  Jiong Wang  <jiwang@tilera.com>
5358
5359         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5360         linux-tile-low.o to srv_tgtobj.
5361
5362 2013-09-16  Will Newton  <will.newton@linaro.org>
5363
5364         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5365         out regs.
5366
5367 2013-09-06  Pedro Alves  <palves@redhat.com>
5368
5369         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5370         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5371         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5372         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5373         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5374         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5375
5376 2013-09-06  Pedro Alves  <palves@redhat.com>
5377
5378         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5379         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5380
5381 2013-09-06  Pedro Alves  <palves@redhat.com>
5382
5383         * linux-amd64-ipa.c: Include tracepoint.h.
5384         * linux-i386-ipa.c: Include tracepoint.h.
5385
5386 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
5387
5388         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5389         (ps_get_thread_area): New function.
5390
5391 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
5392
5393         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5394         (initialize_low_arch): Call init_registers_crisv32 rather than
5395         init_register_crisv32.
5396
5397 2013-09-05  Pedro Alves  <palves@redhat.com>
5398
5399         * server.h (handle_vFile, hostio_last_error_from_errno): Move
5400         to ...
5401         * hostio.h: ... this new file.
5402         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5403         win32-low.c: Include hostio.h.
5404
5405 2013-09-05  Pedro Alves  <palves@redhat.com>
5406
5407         * server.h (gdb_client_data, handler_func, callback_handler_func)
5408         (delete_file_handler, add_file_handler, append_callback_event)
5409         (delete_callback_event, start_event_loop, initialize_event_loop):
5410         Move to event-loop.h and include it.
5411         * event-loop.h: New file.
5412
5413 2013-09-05  Pedro Alves  <palves@redhat.com>
5414
5415         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5416         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5417         (loaded_dll, unloaded_dll): Move to ...
5418         * dll.h: ... this new file.
5419         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5420
5421 2013-09-05  Pedro Alves  <palves@redhat.com>
5422
5423         * server.h (current_process, get_thread_process, all_processes)
5424         (add_inferior_to_list, for_each_inferior, current_inferior)
5425         (remove_inferior, add_process, remove_process, find_process_pid)
5426         (have_started_inferiors_p, have_attached_inferiors_p)
5427         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5428         (clear_inferiors, find_inferior, find_inferior_id)
5429         (inferior_target_data, set_inferior_target_data)
5430         (inferior_regcache_data, set_inferior_regcache_data): Move to
5431         inferiors.h, and include it.
5432         * inferiors.h: New file.
5433
5434 2013-09-05  Pedro Alves  <palves@redhat.com>
5435
5436         * server.h (struct emit_ops, current_insn_ptr, emit_error):
5437         Move ...
5438         * ax.h: ... here.
5439
5440 2013-09-05  Pedro Alves  <palves@redhat.com>
5441
5442         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5443         tracepoint.h.
5444         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5445         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5446         (handle_tracepoint_general_set, handle_tracepoint_query)
5447         (tracepoint_finished_step, tracepoint_was_hit)
5448         (release_while_stepping_state_list, current_traceframe)
5449         (in_readonly_region, traceframe_read_mem)
5450         (fetch_traceframe_registers, traceframe_read_sdata)
5451         (traceframe_read_info, struct fast_tpoint_collect_status)
5452         (fast_tracepoint_collecting, force_unlock_trace_buffer)
5453         (handle_tracepoit_bkpts, initialize_low_tracepoint)
5454         (supply_fast_tracepoint_registers)
5455         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5456         (ipa_tdesc, claim_trampoline_space)
5457         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5458         (agent_mem_read, agent_get_trace_state_variable_value)
5459         (agent_set_trace_state_variable_value, agent_tsv_read)
5460         (agent_mem_read_string, get_raw_reg_func_addr)
5461         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5462         * tracepoint.h: ... this new file.
5463
5464 2013-09-05  Pedro Alves  <palves@redhat.com>
5465
5466         * server.h (perror_with_name, error, fatal, warning, paddress)
5467         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5468         include it.
5469         * utils.h: New file.
5470
5471 2013-09-05  Pedro Alves  <palves@redhat.com>
5472
5473         * server.h (remote_debug, noack_mode, transport_is_reliable)
5474         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5475         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5476         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5477         (write_enn, initialize_async_io, enable_async_io)
5478         (disable_async_io, check_remote_input_interrupt_request)
5479         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5480         (dead_thread_notify, prepare_resume_reply)
5481         (decode_address_to_semicolon, decode_address, decode_m_packet)
5482         (decode_M_packet, decode_X_packet, decode_xfer_write)
5483         (decode_search_memory_packet, unhexify, hexify)
5484         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5485         (look_up_one_symbol, relocate_instruction)
5486         (monitor_output): Move to remote-utils.h, and include it.
5487         * remote-utils.h: New file.
5488
5489 2013-09-05  Pedro Alves  <palves@redhat.com>
5490
5491         * server.h (_): Delete.
5492
5493 2013-09-02  Pedro Alves  <palves@redhat.com>
5494
5495         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5496         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5497         allocated.
5498         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5499
5500 2013-09-02  Pierre Muller  <muller@sourceware.org>
5501
5502         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5503         or WriteProcessMemory complete successfully and handle
5504         ERROR_PARTIAL_COPY error.
5505
5506 2013-09-02  Pedro Alves  <palves@redhat.com>
5507
5508         * server.c (gdb_read_memory): Return -1 on traceframe memory read
5509         error instead of EIO.
5510
5511 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
5512
5513         PR server/15604
5514         * linux-low.c: Include filestuff.h.
5515         (linux_create_inferior) <pid == 0>: Call close_most_fds.
5516         * lynx-low.c: Include filestuff.h.
5517         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5518         * server.c: Include filestuff.h.
5519         (main): Call notice_open_fds.
5520         * spu-low.c: Include filestuff.h.
5521         (spu_create_inferior) <pid == 0>: Call close_most_fds.
5522
5523 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
5524
5525         * Makefile.in: Explain why ../target and ../nat are not
5526         listed as include file search paths.
5527         (linux-waitpid.o): New object file rule.
5528         * configure.srv (srv_native_linux_obj): New variable.
5529         Replace all occurrences of linux native object files with
5530         $srv_native_linux_obj.
5531         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5532         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5533         (linux_enable_event_reporting): Remove declaration.
5534         (my_waitpid): Moved to common/linux-waitpid.c.
5535         (linux_wait_for_event): Pass ptid when calling
5536         linux_enable_event_reporting.
5537         (linux_supports_tracefork_flag): Remove.
5538         (linux_enable_event_reporting): Likewise.
5539         (linux_tracefork_grandchild): Remove.
5540         (STACK_SIZE): Moved to common/linux-ptrace.c.
5541         (linux_tracefork_child): Remove.
5542         (linux_test_for_tracefork): Remove.
5543         (linux_look_up_symbols): Call linux_supports_traceclone.
5544         (initialize_low): Remove call to linux_test_for_tracefork.
5545         * linux-low.h (PTRACE_TYPE_ARG3): Move to
5546         common/linux-ptrace.h.
5547         (PTRACE_TYPE_ARG4): Likewise.
5548         Include linux-ptrace.h.
5549
5550 2013-08-21  Pedro Alves  <palves@redhat.com>
5551
5552         * config.in: Renegerate.
5553
5554 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
5555
5556         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5557         (SFILES): Remove $(srcdir)/common/target-common.c and
5558         add $(srcdir)/target/waitstatus.c.
5559         (OBS): Remove target-common.o and add waitstatus.o.
5560         (server_h): Remove $(srcdir)/../common/target-common.h and
5561         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5562         and $(srcdir)/../target/waitstatus.h.
5563         (target-common.o): Remove.
5564         (waitstatus.o): New target object file.
5565         * target.h: Do not include target-common.h and
5566         include target/resume.h, target/wait.h and
5567         target/waitstatus.h.
5568
5569 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
5570
5571         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5572         to PTRACE_TYPE_ARG3.
5573         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5574         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5575         PTRACE_TYPE_ARG4.
5576         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5577         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5578
5579 2013-07-27  Jie Zhang  <jie@codesourcery.com>
5580             Daniel Jacobowitz  <dan@codesourcery.com>
5581             Yao Qi  <yao@codesourcery.com>
5582
5583         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5584         (mips-linux-watch.o): New rule.
5585         (mips_linux_watch_h): New variable.
5586         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5587         srv_tgtobj.
5588         * linux-mips-low.c: Include mips-linux-watch.h.
5589         (struct arch_process_info, struct arch_lwp_info): New.
5590         (update_watch_registers_callback): New function.
5591         (mips_linux_new_process, mips_linux_new_thread) New functions.
5592         (mips_linux_prepare_to_resume, mips_insert_point): New
5593         functions.
5594         (mips_remove_point, mips_stopped_by_watchpoint): New
5595         functions.
5596         (rsp_bp_type_to_target_hw_bp_type): New function.
5597         (mips_stopped_data_address): New function.
5598         (the_low_target): Add watchpoint support functions.
5599
5600 2013-07-27  Yao Qi  <yao@codesourcery.com>
5601
5602         * i386-low.c: Include break-common.h.
5603         (enum target_hw_bp_type): Remove.
5604
5605 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
5606
5607         * Makefile.in (SFILES): /common/target-common.c.
5608         (OBS): Add target-common.o.
5609         (server_h): Add $(srcdir)/../common/target-common.h.
5610         (target-common.o): New target.
5611         * server.c (queue_stop_reply_callback): Free
5612         status string after use.
5613         * target.c (target_waitstatus_to_string): Remove.
5614         * target.h: Include target-common.h.
5615         (resume_kind): Likewise.
5616         (target_waitkind): Likewise.
5617         (target_waitstatus): Likewise.
5618         (TARGET_WNOHANG): Likewise.
5619
5620 2013-07-04  Yao Qi  <yao@codesourcery.com>
5621
5622         * Makefile.in (host_alias): Use @host_noncanonical@.
5623         (target_alias): Use @target_noncanonical@.
5624         * configure.ac: Use ACX_NONCANONICAL_TARGET and
5625         ACX_NONCANONICAL_HOST.
5626         * configure: Regenerated.
5627
5628         Revert:
5629         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
5630
5631         * configure.ac (version_host, version_target): Set and AC_SUBST them.
5632         * configure: Rebuild.
5633         * Makefile.in (version_host, version_target): Get from configure.
5634         (version.c): Use $(version_host) and $(version_target).
5635
5636 2013-07-03  Pedro Alves  <palves@redhat.com>
5637
5638         * Makefile.in (config.status): Depend on development.sh.
5639         * acinclude.m4: Include libmcheck.m4.
5640         * configure: Regenerate.
5641
5642 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
5643
5644         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5645         attribute inside the parentheses.
5646         (winapi_DebugSetProcessKillOnExit): Ditto.
5647         (winapi_DebugBreakProcess): Ditto.
5648         (winapi_GenerateConsoleCtrlEvent): Ditto.
5649
5650 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
5651
5652         * notif.h (notif_event): Add a dummy member to avoid compiler
5653         errors.
5654
5655 2013-07-01  Pedro Alves  <palves@redhat.com>
5656
5657         * hostio.c (HOSTIO_PATH_MAX): Define.
5658         (require_filename, handle_open, handle_unlink, handle_readlink):
5659         Use it.
5660
5661 2013-07-01  Pedro Alves  <palves@redhat.com>
5662
5663         * server.h: Include "pathmax.h".
5664         * linux-low.c: Don't include sys/param.h.
5665         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5666         MAXPATHLEN.
5667         * win32-low.c: Don't include sys/param.h.
5668         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5669
5670 2013-07-01  Pedro Alves  <palves@redhat.com>
5671
5672         * event-loop.c: Don't check HAVE_UNISTD_H before including
5673         <unistd.h>.
5674         * gdbreplay.c: Likewise.
5675         * remote-utils.c: Likewise.
5676         * server.c: Likewise.
5677         * configure.ac: Don't check for unistd.h.
5678         * configure: Regenerate.
5679
5680 2013-06-28  Tom Tromey  <tromey@redhat.com>
5681
5682         * Makefile.in (version.c): Use version.in, not
5683         common/version.in.
5684
5685 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
5686
5687         * configure.ac (version_host, version_target): Set and AC_SUBST them.
5688         * configure: Rebuild.
5689         * Makefile.in (version_host, version_target): Get from configure.
5690         (version.c): Use $(version_host) and $(version_target).
5691
5692 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
5693
5694         Fix trace-status to output user name without trailing colon.
5695         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5696
5697 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
5698
5699         Fix trace-status to output proper start-time and stop-time.
5700         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5701         output start time and stop time in hex as gdb expects.
5702
5703 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
5704
5705         * tracepoint.c (build_traceframe_info_xml): Output trace state
5706         variables present in the trace buffer.
5707
5708 2013-06-24  Tom Tromey  <tromey@redhat.com>
5709
5710         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5711         create-version.sh.
5712         (version.o): Remove.
5713         * gdbreplay.c: Include version.h.
5714         (version, host_name): Don't declare.
5715         * server.h: Include version.h.
5716         (version, host_name): Don't declare.
5717
5718 2013-06-12  Pedro Alves  <palves@redhat.com>
5719
5720         * linux-x86-low.c (linux_is_elf64): Delete global.
5721         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5722         with local linux_pid_exe_is_elf_64_file use.
5723
5724 2013-06-11  Pedro Alves  <palves@redhat.com>
5725
5726         * linux-low.c (regset_disabled, disable_regset): New functions.
5727         (regsets_fetch_inferior_registers)
5728         (regsets_store_inferior_registers): Use them.
5729         (initialize_regsets_info); Don't allocate the disabled_regsets
5730         array here.
5731         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5732         comment.
5733
5734 2013-06-11  Pedro Alves  <palves@redhat.com>
5735
5736         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5737         xmalloc.
5738
5739 2013-06-11  Pedro Alves  <palves@redhat.com>
5740
5741         * linux-x86-low.c (initialize_low_arch): Call
5742         init_registers_x32_avx_linux.
5743
5744 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
5745
5746         Fix compatibility with Android Bionic.
5747         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5748         it is not empty.
5749
5750 2013-06-07  Pedro Alves  <palves@redhat.com>
5751
5752         PR server/14823
5753         * Makefile.in (OBS): Add tdesc.o.
5754         (IPA_OBJS): Add tdesc-ipa.o.
5755         (tdesc-ipa.o): New rule.
5756         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5757         interface.
5758         * linux-low.c (new_inferior): Delete.
5759         (disabled_regsets, num_regsets): Delete.
5760         (linux_add_process): Adjust to set the new per-process
5761         new_inferior flag.
5762         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5763         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
5764         was a stop.  When calling arch_setup, switch the current inferior
5765         to the thread that got an event.
5766         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5767         (regsets_fetch_inferior_registers)
5768         (regsets_store_inferior_registers): New regsets_info parameter.
5769         Adjust to use it.
5770         (linux_register_in_regsets): New regs_info parameter.  Adjust to
5771         use it.
5772         (register_addr, fetch_register, store_register): New usrregs_info
5773         parameter.  Adjust to use it.
5774         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5775         parameter regs_info.  Adjust to use it.
5776         (linux_fetch_registers): Get the current inferior's regs_info, and
5777         adjust to use it.
5778         (linux_store_registers): Ditto.
5779         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5780         (initialize_low): Don't initialize the target_regsets here.  Call
5781         initialize_low_arch.
5782         * linux-low.h (target_regsets): Delete declaration.
5783         (struct regsets_info): New.
5784         (struct usrregs_info): New.
5785         (struct regs_info): New.
5786         (struct process_info_private) <new_inferior>: New field.
5787         (struct linux_target_ops): Delete the num_regs, regmap, and
5788         regset_bitmap fields.  New field regs_info.
5789         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5790         * i387-fp.c (num_xmm_registers): Delete.
5791         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5792         calls to new interface.
5793         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5794         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5795         Infer the number of xmm registers from the regcache's target
5796         description.
5797         * i387-fp.h (num_xmm_registers): Delete.
5798         * inferiors.c (add_thread): Don't install the thread's regcache
5799         here.
5800         * proc-service.c (gregset_info): Fetch the current inferior's
5801         regs_info.  Adjust to use it.
5802         * regcache.c: Include tdesc.h.
5803         (register_bytes, reg_defs, num_registers)
5804         (gdbserver_expedite_regs): Delete.
5805         (get_thread_regcache): If the thread doesn't have a regcache yet,
5806         create one, instead of aborting gdbserver.
5807         (regcache_invalidate_one): Rename to ...
5808         (regcache_invalidate_thread): ... this.
5809         (regcache_invalidate_one): New.
5810         (regcache_invalidate): Only invalidate registers of the current
5811         process.
5812         (init_register_cache): Add target_desc parameter, and use it.
5813         (new_register_cache): Ditto.  Assert the target description has a
5814         non zero registers_size.
5815         (regcache_cpy): Add assertions.  Adjust.
5816         (realloc_register_cache, set_register_cache): Delete.
5817         (registers_to_string, registers_from_string): Adjust.
5818         (find_register_by_name, find_regno, find_register_by_number)
5819         (register_cache_size): Add target_desc parameter, and use it.
5820         (free_register_cache_thread, free_register_cache_thread_one)
5821         (regcache_release, register_cache_size): New.
5822         (register_size): Add target_desc parameter, and use it.
5823         (register_data, supply_register, supply_register_zeroed)
5824         (supply_regblock, supply_register_by_name, collect_register)
5825         (collect_register_as_string, collect_register_by_name): Adjust.
5826         * regcache.h (struct target_desc): Forward declare.
5827         (struct regcache) <tdesc>: New field.
5828         (init_register_cache, new_register_cache): Add target_desc
5829         parameter.
5830         (regcache_invalidate_thread): Declare.
5831         (regcache_invalidate_one): Delete declaration.
5832         (regcache_release): Declare.
5833         (find_register_by_number, register_cache_size, register_size)
5834         (find_regno): Add target_desc parameter.
5835         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5836         declarations.
5837         * remote-utils.c: Include tdesc.h.
5838         (outreg, prepare_resume_reply): Adjust.
5839         * server.c: Include tdesc.h.
5840         (gdbserver_xmltarget): Delete declaration.
5841         (get_features_xml, process_serial_event): Adjust.
5842         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5843         declare.
5844         (struct process_info) <tdesc>: New field.
5845         (ipa_tdesc): Declare.
5846         * tdesc.c: New file.
5847         * tdesc.h: New file.
5848         * tracepoint.c: Include tdesc.h.
5849         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5850         (get_context_regcache): Adjust to pass ipa_tdesc down.
5851         (do_action_at_tracepoint): Adjust to get the register cache size
5852         from the context regcache's description.
5853         (traceframe_walk_blocks): Adjust to get the register cache size
5854         from the current trace frame's description.
5855         (traceframe_get_pc): Adjust to get current trace frame's
5856         description and pass it down.
5857         (gdb_collect): Adjust to get the register cache size from the
5858         IPA's description.
5859         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5860         (gdbserver_xmltarget): Delete.
5861         (initialize_low_tracepoint): Set the ipa's target description.
5862         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5863         (initialize_low_tracepoint): Set the ipa's target description.
5864         * linux-x86-low.c: Include tdesc.h.
5865         [__x86_64__] (is_64bit_tdesc): New.
5866         (ps_get_thread_area, x86_get_thread_area): Use it.
5867         (i386_cannot_store_register): Rename to ...
5868         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
5869         (i386_cannot_fetch_register): Rename to ...
5870         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
5871         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5872         to new interface.
5873         (target_regsets): Rename to ...
5874         (x86_regsets): ... this.
5875         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5876         interface.
5877         (x86_siginfo_fixup): Use is_64bit_tdesc.
5878         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5879         (tdesc_x32_avx_linux, tdesc_x32_linux)
5880         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5881         Declare.
5882         (x86_linux_update_xmltarget): Delete.
5883         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5884         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5885         (AMD64_LINUX_USER64_CS): New.
5886         (x86_linux_read_description): New, based on
5887         x86_linux_update_xmltarget.
5888         (same_process_callback): New.
5889         (x86_arch_setup_process_callback): New.
5890         (x86_linux_update_xmltarget): New.
5891         (x86_regsets_info): New.
5892         (amd64_linux_regs_info): New.
5893         (i386_linux_usrregs_info): New.
5894         (i386_linux_regs_info): New.
5895         (x86_linux_regs_info): New.
5896         (x86_arch_setup): Reimplement.
5897         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5898         (x86_emit_ops): Ditto.
5899         (the_low_target): Adjust.  Install x86_linux_regs_info,
5900         x86_cannot_fetch_register, and x86_cannot_store_register.
5901         (initialize_low_arch): New.
5902         * linux-ia64-low.c (tdesc_ia64): Declare.
5903         (ia64_fetch_register): Adjust.
5904         (ia64_usrregs_info, regs_info): New globals.
5905         (ia64_regs_info): New function.
5906         (the_low_target): Adjust.
5907         (initialize_low_arch): New function.
5908         * linux-sparc-low.c (tdesc_sparc64): Declare.
5909         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5910         Adjust.
5911         (sparc_arch_setup): New function.
5912         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5913         (the_low_target): Adjust.
5914         (initialize_low_arch): New function.
5915         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5916         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5917         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5918         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5919         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5920         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5921         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5922         (tdesc_powerpc_isa205_vsx64l): Declare.
5923         (ppc_cannot_store_register, ppc_collect_ptrace_register)
5924         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5925         (ppc_set_pc, ppc_get_hwcap): Adjust.
5926         (ppc_usrregs_info): Forward declare.
5927         (!__powerpc64__) ppc_regmap_adjusted: New global.
5928         (ppc_arch_setup): Adjust to the current process'es target
5929         description.
5930         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5931         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5932         (ppc_store_evrregset): Adjust.
5933         (target_regsets): Rename to ...
5934         (ppc_regsets): ... this, and make static.
5935         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5936         (ppc_regs_info): New function.
5937         (the_low_target): Adjust.
5938         (initialize_low_arch): New function.
5939         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5940         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5941         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5942         (tdesc_s390x_linux64v2): Declare.
5943         (s390_collect_ptrace_register, s390_supply_ptrace_register)
5944         (s390_fill_gregset, s390_store_last_break): Adjust.
5945         (target_regsets): Rename to ...
5946         (s390_regsets): ... this, and make static.
5947         (s390_get_pc, s390_set_pc): Adjust.
5948         (s390_get_hwcap): New target_desc parameter, and use it.
5949         [__s390x__] (have_hwcap_s390_high_gprs): New global.
5950         (s390_arch_setup): Adjust to set the current process'es target
5951         description.  Don't adjust the regmap.
5952         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5953         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5954         (regs_info_3264): New globals.
5955         (s390_regs_info): New function.
5956         (the_low_target): Adjust.
5957         (initialize_low_arch): New function.
5958         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5959         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5960         [__mips64] (init_registers_mips_linux)
5961         (init_registers_mips_dsp_linux): Delete defines.
5962         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5963         (have_dsp): New global.
5964         (mips_read_description): New, based on mips_arch_setup.
5965         (mips_arch_setup): Reimplement.
5966         (get_usrregs_info): New function.
5967         (mips_cannot_fetch_register, mips_cannot_store_register)
5968         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5969         (mips_fill_fpregset, mips_store_fpregset): Adjust.
5970         (target_regsets): Rename to ...
5971         (mips_regsets): ... this, and make static.
5972         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5973         (dsp_regs_info, regs_info): New globals.
5974         (mips_regs_info): New function.
5975         (the_low_target): Adjust.
5976         (initialize_low_arch): New function.
5977         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5978         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5979         Declare.
5980         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5981         (arm_read_description): New, with bits factored from
5982         arm_arch_setup.
5983         (arm_arch_setup): Reimplement.
5984         (target_regsets): Rename to ...
5985         (arm_regsets): ... this, and make static.
5986         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5987         (arm_regs_info): New function.
5988         (the_low_target): Adjust.
5989         (initialize_low_arch): New function.
5990         * linux-m68k-low.c (tdesc_m68k): Declare.
5991         (target_regsets): Rename to ...
5992         (m68k_regsets): ... this, and make static.
5993         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5994         (m68k_regs_info): New function.
5995         (m68k_arch_setup): New function.
5996         (the_low_target): Adjust.
5997         (initialize_low_arch): New function.
5998         * linux-sh-low.c (tdesc_sharch): Declare.
5999         (target_regsets): Rename to ...
6000         (sh_regsets): ... this, and make static.
6001         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6002         (sh_regs_info, sh_arch_setup): New functions.
6003         (the_low_target): Adjust.
6004         (initialize_low_arch): New function.
6005         * linux-bfin-low.c (tdesc_bfin): Declare.
6006         (bfin_arch_setup): New function.
6007         (bfin_usrregs_info, regs_info): New globals.
6008         (bfin_regs_info): New function.
6009         (the_low_target): Adjust.
6010         (initialize_low_arch): New function.
6011         * linux-cris-low.c (tdesc_cris): Declare.
6012         (cris_arch_setup): New function.
6013         (cris_usrregs_info, regs_info): New globals.
6014         (cris_regs_info): New function.
6015         (the_low_target): Adjust.
6016         (initialize_low_arch): New function.
6017         * linux-cris-low.c (tdesc_crisv32): Declare.
6018         (cris_arch_setup): New function.
6019         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6020         (cris_regs_info): New function.
6021         (the_low_target): Adjust.
6022         (initialize_low_arch): New function.
6023         * linux-m32r-low.c (tdesc_m32r): Declare.
6024         (m32r_arch_setup): New function.
6025         (m32r_usrregs_info, regs_info): New globals.
6026         (m32r_regs_info): Adjust.
6027         (initialize_low_arch): New function.
6028         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6029         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6030         (tic6x_usrregs_info): Forward declare.
6031         (tic6x_read_description): New function, based on ...
6032         (tic6x_arch_setup): ... this.  Reimplement.
6033         (target_regsets): Rename to ...
6034         (tic6x_regsets): ... this, and make static.
6035         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6036         (tic6x_regs_info): New function.
6037         (the_low_target): Adjust.
6038         (initialize_low_arch): New function.
6039         * linux-xtensa-low.c (tdesc_xtensa): Declare.
6040         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6041         (target_regsets): Rename to ...
6042         (xtensa_regsets): ... this, and make static.
6043         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6044         globals.
6045         (xtensa_arch_setup, xtensa_regs_info): New functions.
6046         (the_low_target): Adjust.
6047         (initialize_low_arch): New function.
6048         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6049         (nios2_arch_setup): Set the current process'es tdesc.
6050         (target_regsets): Rename to ...
6051         (nios2_regsets): ... this.
6052         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6053         (nios2_regs_info): New function.
6054         (the_low_target): Adjust.
6055         (initialize_low_arch): New function.
6056         * linux-aarch64-low.c (tdesc_aarch64): Declare.
6057         (aarch64_arch_setup): Set the current process'es tdesc.
6058         (target_regsets): Rename to ...
6059         (aarch64_regsets): ... this.
6060         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6061         (aarch64_regs_info): New function.
6062         (the_low_target): Adjust.
6063         (initialize_low_arch): New function.
6064         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6065         globals.
6066         (target_regsets): Rename to ...
6067         (tile_regsets): ... this.
6068         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6069         (tile_regs_info): New function.
6070         (tile_arch_setup): Set the current process'es tdesc.
6071         (the_low_target): Adjust.
6072         (initialize_low_arch): New function.
6073         * spu-low.c (tdesc_spu): Declare.
6074         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6075         * win32-arm-low.c (tdesc_arm): Declare.
6076         (arm_arch_setup): New function.
6077         (the_low_target): Install arm_arch_setup instead of
6078         init_registers_arm.
6079         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6080         (init_windows_x86): Rename to ...
6081         (i386_arch_setup): ... this.  Set `win32_tdesc'.
6082         (the_low_target): Adjust.
6083         * win32-low.c (win32_tdesc): New global.
6084         (child_add_thread): Don't create the thread cache here.
6085         (do_initial_child_stuff): Set the new process'es tdesc.
6086         * win32-low.h (struct target_desc): Forward declare.
6087         (win32_tdesc): Declare.
6088         * lynx-i386-low.c (tdesc_i386): Declare global.
6089         (lynx_i386_arch_setup): Set `lynx_tdesc'.
6090         * lynx-low.c (lynx_tdesc): New global.
6091         (lynx_add_process): Set the new process'es tdesc.
6092         * lynx-low.h (struct target_desc): Forward declare.
6093         (lynx_tdesc): Declare global.
6094         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6095         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6096         * nto-low.c (nto_tdesc): New global.
6097         (do_attach): Set the new process'es tdesc.
6098         * nto-low.h (struct target_desc): Forward declare.
6099         (nto_tdesc): Declare.
6100         * nto-x86-low.c (tdesc_i386): Declare.
6101         (nto_x86_arch_setup): Set `nto_tdesc'.
6102
6103 2013-06-04  Gary Benson  <gbenson@redhat.com>
6104
6105         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6106         to qSupported response when appropriate.
6107         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6108         with nonzero-length annex.
6109         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6110         arguments supplied in annex.
6111
6112 2013-05-31  Doug Evans  <dje@google.com>
6113
6114         PR server/15594
6115         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6116         64 bits in 64-cross-32 environment.
6117
6118 2013-05-28  Pedro Alves  <palves@redhat.com>
6119
6120         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6121         (aarch64-without-fpu.c): Delete rule.
6122         * configure.srv (aarch64*-*-linux*): Remove references to
6123         aarch64-without-fpu.o and aarch64-without-fpu.xml.
6124         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6125         declaration.
6126
6127 2013-05-24  Pedro Alves  <palves@redhat.com>
6128
6129         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6130         instead of strchr/decode_address.  Error if the range isn't split
6131         with a ','.  Don't assume there's be a ':' in the action.
6132
6133 2013-05-23  Yao Qi  <yao@codesourcery.com>
6134             Pedro Alves  <palves@redhat.com>
6135
6136         * linux-low.c (lwp_in_step_range): New function.
6137         (linux_wait_1): If the thread was range stepping and stopped
6138         outside the stepping range, report the stop to GDB.  Otherwise,
6139         continue stepping.  Add range stepping debug output.
6140         (linux_set_resume_request): Copy the step range from the resume
6141         request to the lwp.
6142         (linux_supports_range_stepping): New.
6143         (linux_target_ops) <supports_range_stepping>: Set to
6144         linux_supports_range_stepping.
6145         * linux-low.h (struct linux_target_ops)
6146         <supports_range_stepping>: New field.
6147         (struct lwp_info) <step_range_start, step_range_end>: New fields.
6148         * linux-x86-low.c (x86_supports_range_stepping): New.
6149         (the_low_target) <supports_range_stepping>: Set to
6150         x86_supports_range_stepping.
6151         * server.c (handle_v_cont): Handle 'r' action.
6152         (handle_v_requests): Append ";r" if the target supports range
6153         stepping.
6154         * target.h (struct thread_resume) <step_range_start,
6155         step_range_end>: New fields.
6156         (struct target_ops) <supports_range_stepping>:
6157         New field.
6158         (target_supports_range_stepping): New macro.
6159
6160 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
6161
6162         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6163         confusion in comment.
6164
6165 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
6166
6167         * lynx-low.c (struct process_info_private): New type.
6168         (lynx_add_process): New function.
6169         (lynx_create_inferior, lynx_attach): Replace calls to
6170         add_process by calls to lynx_add_process.
6171         (lynx_resume): If PTID is null, then try using
6172         current_process()->private->last_wait_event_ptid.
6173         Add comments.
6174         (lynx_clear_inferiors): Delete.  The contents of that function
6175         has been inlined in lynx_mourn;
6176         (lynx_wait_1): Save the ptid in the process's private data.
6177         (lynx_mourn): Free the process' private data.  Replace call
6178         to lynx_clear_inferiors by call to clear_inferiors.
6179
6180 2013-05-17  Yao Qi  <yao@codesourcery.com>
6181
6182         * i386-low.c (i386_length_and_rw_bits): Move the comment to
6183         the right place.
6184
6185 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
6186
6187         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6188         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
6189         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6190         PT_TEXT_END_ADDR guards.  Update comments.
6191         (linux_target_op) <read_offsets>: Conditionally define to
6192         linux_read_offsets if the target is UCLIBC and if it defines
6193         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6194
6195 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
6196             Andrew Jenner  <andrew@codesourcery.com>
6197
6198         * Makefile.in (SFILES): Add linux-nios2-low.c.
6199         (clean): Add action to delete nios2-linux.c.
6200         (nios2-linux.c): New rule.
6201         * configure.srv: Add nios2*-*-linux*.
6202         * linux-nios2-low.c: New.
6203
6204 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
6205
6206         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6207
6208 2013-04-25  Hui Zhu  <hui@codesourcery.com>
6209
6210         PR gdb/15186
6211         * ax.c (ax_printf): Add fflush.
6212
6213 2013-04-22  Tom Tromey  <tromey@redhat.com>
6214
6215         * Makefile.in (SFILES): Add filestuff.c.
6216         (OBS): Add filestuff.o.
6217         (filestuff.o): New target.
6218         * config.in, configure: Rebuild.
6219         * configure.ac: Check for fdwalk, pipe2.
6220
6221 2013-04-17  Pedro Alves  <palves@redhat.com>
6222
6223         * configure.ac (USE_THREAD_DB): Delete variable.
6224         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6225         Don't AC_SUBST USE_THREAD_DB.
6226         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6227         * config.in, configure: Regenerate.
6228
6229 2013-04-16  Pedro Alves  <palves@redhat.com>
6230
6231         * linux-low.h (struct lwp_info) <thread_known>: Move under
6232         the USE_THREAD_DB #ifdef.
6233
6234 2013-04-16  Pedro Alves  <palves@redhat.com>
6235
6236         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6237         (linux-low.o): Delete rule.
6238         * linux-low.h: Always include "gdb_thread_db.h" instead of
6239         conditionally including thread_db.h.
6240         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6241         HAVE_THREAD_DB_H.
6242
6243 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6244
6245         * Makefile.in (install-only): Fix make install regression.
6246
6247 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
6248
6249         Convert man pages to texinfo, new gdbinit.5 texinfo page.
6250         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6251         installation.
6252         * gdbserver.1: Remove.
6253
6254 2013-03-22  Pedro Alves  <palves@redhat.com>
6255
6256         * linux-low.c (handle_extended_wait): Don't call
6257         linux_enable_event_reporting.
6258
6259 2013-03-15  Tony Theodore  <tonyt@logyst.com>
6260
6261         PR build/9098:
6262         * Makefile.in (SHELL): Use @SHELL@.
6263
6264 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
6265
6266         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6267         compiler warning.
6268
6269 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
6270
6271         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6272         Remove extraneous NULL element.
6273
6274 2013-03-13  Yao Qi  <yao@codesourcery.com>
6275
6276         * tracepoint.c (traceframe_read_tsv): Look for the last matched
6277         'V' block in trace frame.
6278
6279 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
6280
6281         * target.h (struct target_ops): Add btrace ops.
6282         (target_supports_btrace): New macro.
6283         (target_enable_btrace): New macro.
6284         (target_disable_btrace): New macro.
6285         (target_read_btrace): New macro.
6286         * gdbthread.h (struct thread_info): Add btrace field.
6287         * server.c: Include btrace-common.h.
6288         (handle_btrace_general_set): New function.
6289         (handle_btrace_enable): New function.
6290         (handle_btrace_disable): New function.
6291         (handle_general_set): Call handle_btrace_general_set.
6292         (handle_qxfer_btrace): New function.
6293         (struct qxfer qxfer_packets[]): Add btrace entry.
6294         * inferiors.c (remove_thread): Disable btrace.
6295         * linux-low: Include linux-btrace.h.
6296         (linux_low_enable_btrace): New function.
6297         (linux_low_read_btrace): New function.
6298         (linux_target_ops): Add btrace ops.
6299         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6300         Add srv_linux_btrace=yes.
6301         (x86_64-*-linux*): Add linux-btrace.o.
6302         Add srv_linux_btrace=yes.
6303         * configure.ac: Define HAVE_LINUX_BTRACE.
6304         * config.in: Regenerated.
6305         * configure: Regenerated.
6306
6307 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
6308
6309         * server.c (handle_qxfer): Preserve error message if -3 is
6310         returned.
6311         (qxfer): Document the -3 return value.
6312
6313 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
6314
6315         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6316         (linux_btrace_h): New variable.
6317         (linux-btrace.o): New rule.
6318
6319 2013-03-08  Stan Shebs  <stan@codesourcery.com>
6320             Hafiz Abid Qadeer  <abidh@codesourcery.com>
6321
6322         * tracepoint.c (trace_buffer_size): New global.
6323         (DEFAULT_TRACE_BUFFER_SIZE): New define.
6324         (init_trace_buffer): Change to one-argument function. Allocate
6325         trace buffer memory.
6326         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6327         handle QTBuffer:size packet.
6328         (cmd_bigqtbuffer_size): New function.
6329         (initialize_tracepoint): Call init_trace_buffer with
6330         DEFAULT_TRACE_BUFFER_SIZE.
6331         * server.c (handle_query): Add QTBuffer:size in the
6332         supported packets.
6333
6334 2013-03-07  Yao Qi  <yao@codesourcery.com>
6335
6336         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6337         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6338         of -1.
6339         (cmd_qtsp): Adjust condition.  Do post increment.
6340         Set cur_action and cur_step_action back to 0.
6341
6342 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
6343
6344         PR server/15236
6345         * linux-low.c (linux_write_memory): Return early success if LEN is
6346         zero.
6347
6348 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
6349
6350         * configure.srv: Add x86_64-*-cygwin* as target.
6351
6352 2013-02-28  Tom Tromey  <tromey@redhat.com>
6353
6354         * configure.ac: Invoke AC_SYS_LARGEFILE.
6355         * configure, config.in: Rebuild.
6356
6357 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
6358
6359         * win32-low.c: Throughout, fix format strings and casts of
6360         printf-like functions to avoid type related warnings on all
6361         platforms.
6362         (get_child_debug_event): Print dwDebugEventCode as hex since
6363         that's how it's usually documented.
6364
6365 2013-02-28  Yao Qi  <yao@codesourcery.com>
6366
6367         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6368         pulongest.
6369
6370 2013-02-27  Jiong Wang  <jiwang@tilera.com>
6371
6372         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6373         (reg-tilegx32.c): New rule.
6374         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6375         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
6376         different register info initializer according to elf class.
6377         (init_registers_tilgx32): New function.  The tilegx32 register info
6378         initializer.
6379         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6380         (tile_store_gregset): Likewise.
6381
6382 2013-02-27  Yao Qi  <yao@codesourcery.com>
6383
6384         * server.c (process_point_options): Print debug message when
6385         debug_threads is true.
6386
6387 2013-02-26  Yao Qi  <yao@codesourcery.com>
6388
6389         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6390
6391 2013-02-19  Pedro Alves  <palves@redhat.com>
6392             Kai Tietz <ktietz@redhat.com>
6393
6394         PR gdb/15161
6395
6396         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6397         instead of strtoul to extract address from packet.
6398         (process_serial_event) <'z'>: Likewise.
6399
6400 2013-02-18  Yao Qi  <yao@codesourcery.com>
6401
6402         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6403
6404 2013-02-14  Pedro Alves  <palves@redhat.com>
6405
6406         Plug memory leak.
6407
6408         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6409         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6410
6411 2013-02-14  Pedro Alves  <palves@redhat.com>
6412
6413         * tracepoint.c (cmd_qtdpsrc): Use savestring.
6414
6415 2013-02-14  Pedro Alves  <palves@redhat.com>
6416
6417         * tracepoint.c (save_string): Delete.
6418         (add_tracepoint_action): Use savestring instead of save_string.
6419
6420 2013-02-12  Pedro Alves  <palves@redhat.com>
6421
6422         * linux-xtensa-low.c: Ditto.
6423         * xtensa-xtregs.c: Ditto.
6424
6425 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
6426
6427         * thread-db.c (thread_db_get_tls_address): NULL pointer check
6428         thread_db.
6429
6430 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
6431
6432         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6433         aarch64_num_wp_regs and aarch64_num_bp_regs to
6434         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6435
6436 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
6437
6438         * linux-aarch64-low.c (ps_get_thread_area): Replace
6439         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6440
6441 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
6442             Marcus Shawcroft  <marcus.shawcroft@arm.com>
6443             Nigel Stephens  <nigel.stephens@arm.com>
6444             Yufeng Zhang  <yufeng.zhang@arm.com>
6445
6446         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6447         (aarch64.c, aarch64-without-fpu.c): New targets.
6448         * configure.srv (aarch64*-*-linux*): New.
6449         * linux-aarch64-low.c: New file.
6450
6451 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
6452
6453         * linux-low.c (handle_extended_wait, linux_create_inferior)
6454         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6455         (dequeue_one_deferred_signal, linux_resume_one_thread)
6456         (fetch_register, linux_write_memory, linux_enable_event_reporting)
6457         (linux_tracefork_grandchild, linux_test_for_tracefork)
6458         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6459         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6460         where the argument is 0.
6461
6462 2013-01-25  Yao Qi  <yao@codesourcery.com>
6463
6464         * event-loop.c: Include "queue.h".
6465         (gdb_event_p): New typedef.
6466         (struct gdb_event) <next_event>: Remove.
6467         (event_queue): Change to QUEUE(gdb_event_p).
6468         (async_queue_event): Remove.
6469         (gdb_event_xfree): New.
6470         (initialize_event_loop): New.
6471         (process_event): Use API from QUEUE.
6472         (wait_for_event): Likewise.
6473         * server.c (main): Call initialize_event_loop.
6474         * server.h (initialize_event_loop): Declare.
6475
6476 2013-01-18  Yao Qi  <yao@codesourcery.com>
6477
6478         * ax.h (struct eval_agent_expr_context): New.
6479         (gdb_eval_agent_expr): Update declaration.
6480         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6481         TFRAME.  Add new argument CTX.
6482         * server.h (struct eval_agent_expr_context): Declare.
6483         (agent_mem_read, agent_tsv_read): Update declaration.
6484         (agent_mem_read_string): Likewise.
6485         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6486         (add_traceframe_block): Add new argument TPOINT.
6487         Increase TPOINT->traceframe_usage.
6488         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6489         eval_tracepoint_agent_expr.
6490         (condition_true_at_tracepoint): Likewise.
6491         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
6492         (agent_mem_read_string, agent_tsv_read): Likewise.
6493
6494 2013-01-16  Yao Qi  <yao@codesourcery.com>
6495
6496         * linux-low.c (linux_resume_one_lwp): Don't check
6497         'lwp->bp_reinsert != 0'.
6498
6499 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6500             Pedro Alves  <palves@redhat.com>
6501
6502         * lynx-low.c (ptrace_request_to_str): Define a temporary
6503         macro and use it to simplify this function's implementation.
6504
6505 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6506
6507         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6508         sets errno.
6509
6510 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6511
6512         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6513
6514 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6515
6516         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6517
6518 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6519
6520         * lynx-low.c (lynx_resume): Use the resume_info parameter
6521         to determine the ptid for the lynx_ptrace call, unless
6522         it is equal to minus_one_ptid, in which case we use the
6523         ptid of the current_inferior.
6524         (lynx_wait_1): After having received a thread create/exit
6525         event, resume the inferior's execution using the signaling
6526         thread's ptid, rather than the old ptid.
6527
6528 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6529
6530         * lynx-low.c (lynx_resume): Delete variable ret.
6531
6532 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
6533
6534         * gdbreplay.c (gdbreplay_version): Update copyright year.
6535         * server.c (gdbserver_version): Likewise.
6536
6537 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6538
6539         * lynx-low.c (lynx_wait_1): Add debug trace before adding
6540         new thread.
6541
6542 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6543
6544         * lynx-low.c (ptrace_request_to_str): Add handling for
6545         PTRACE_GETTRACESIG.
6546
6547 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6548
6549         * lynx-low.c (lynx_attach): Delete variable new_process.
6550
6551 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6552
6553         * lynx-low.c (lynx_create_inferior): Delete variable
6554         new_process.
6555
6556 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6557
6558         * lynx-low.c (ptrace_request_to_str): Do not handle
6559         PTRACE_GETTHREADLIST if this macro does not exist.
6560
6561 2012-12-15  Yao Qi  <yao@codesourcery.com>
6562
6563         * Makefile.in (OBS): Add notif.o.
6564         * notif.c, notif.h: New.
6565         * server.c: Include "notif.h".
6566         (struct vstop_notif) <next>: Remove.
6567         <base>: New field.
6568         (queue_stop_reply): Update.
6569         (push_event, send_next_stop_reply): Remove.
6570         (discard_queued_stop_replies): Update.
6571         (notif_stop): New variable.
6572         (handle_v_stopped): Remove.
6573         (handle_v_requests): Don't call handle_v_stopped.  Call
6574         handle_ack_notif instead.
6575         (queue_stop_reply_callback): Call notif_event_enque instead
6576         of queue_stop_reply.
6577         (handle_status): Don't call send_next_stop_reply, call
6578         notif_write_event instead.
6579         (kill_inferior_callback): Likewise.
6580         (detach_or_kill_inferior_callback): Likewise.
6581         (main): Call initialize_notif.
6582         (process_serial_event): Call QUEUE_is_empty.
6583         (handle_target_event): Call notif_push instead of push event.
6584         * server.h (push_event): Remove declaration.
6585
6586 2012-12-10  Tom Tromey  <tromey@redhat.com>
6587
6588         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6589         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6590         macros.
6591         (.c.o): Rewrite.
6592         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6593         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6594         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6595         (amd64-linux-ipa.o, ax.o): Rewrite.
6596         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6597         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6598         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6599         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6600         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6601         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6602         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6603         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6604         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6605         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6606         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6607         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6608         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6609         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6610         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6611         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6612         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6613         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6614         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6615         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6616         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6617         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6618         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6619         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6620         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6621         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6622         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6623         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6624         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6625         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6626         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6627         (reg-tilegx.o): Remove.
6628         (all_object_files): New macro.
6629         Include .deps files.
6630         * aclocal.m4, configure: Rebuild.
6631         * acinclude.m4: Include depstand.m4, lead-dot.m4.
6632         * configure.ac: Invoke ZW_CREATE_DEPDIR,
6633         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
6634
6635 2012-12-05  Tom Tromey  <tromey@redhat.com>
6636
6637         PR gdb/14917:
6638         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6639
6640 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
6641
6642         * configure.ac: Check for linux/perf_event.h.
6643         * config.in: Regenerated.
6644         * configure: Regenerated.
6645
6646 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
6647
6648         * hostio.c (handle_readlink): Decrease buffer size
6649         parameter passed to readlink by one byte.
6650
6651 2012-11-26  Yao Qi  <yao@codesourcery.com>
6652
6653         * configure.ac (build_warnings): Append '-Wempty-body'.
6654         * configure: Regenerated.
6655         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6656         body.
6657
6658 2012-11-15  Pierre Muller  <muller@sourceware.org>
6659
6660         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6661         * config.in: Regenerate.
6662         * configure: Regenerate.
6663         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6664         Use "gdb_wait.h" header instead of <sys/wait.h> header.
6665         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6666         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6667         header.
6668         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
6669         instead of <sys/wait.h> header.
6670         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6671
6672 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
6673
6674         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6675         (various make rules): Remove -DGDBSERVER
6676
6677 2012-11-09  Yao Qi  <yao@codesourcery.com>
6678
6679         * spu-low.c (current_ptid): Move it to ..
6680         * gdbthread.h: ... here.  New.
6681         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6682         * server.c (myresume, process_serial_event): Likewise.
6683         * thread-db.c (thread_db_find_new_threads): Likewise.
6684         * tracepoint.c (run_inferior_command): Likewise.
6685
6686 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
6687
6688         * server.c (handle_search_memory_1): Include access length in
6689         warning message.
6690
6691 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
6692
6693         * linux-crisv32-low.c: Fix compile errors.
6694
6695 2012-09-04  Yao Qi  <yao@codesourcery.com>
6696
6697         * tracepoint.c (cmd_qtsv): Adjust debug message.
6698         Don't check CUR_TPOINT.
6699
6700 2012-08-28  Yao Qi  <yao@codesourcery.com>
6701
6702         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6703         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6704         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6705         Remove declarations of xmalloc, xreallloc, xstrdup and
6706         freeargv.
6707         * Makefile.in (libiberty_h): New.
6708         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6709         (linux-bfin-low.o): Append dependency 'libiberty.h'.
6710
6711 2012-08-23  Yao Qi  <yao@codesourcery.com>
6712
6713         * server.h: Remove declaration of 'xsnprintf'.
6714
6715 2012-08-22  Keith Seitz  <keiths@redhat.com>
6716
6717         * server.h: Include build-gnulib-gbserver/config.h.
6718         * gdbreplay.c: Likewise.
6719
6720 2012-08-08  Doug Evans  <dje@google.com>
6721
6722         * Makefile.in (SFILES): Add gdb_vecs.c.
6723         (OBS): Add gdb_vecs.o.
6724         (gdb_vecs_h, host_defs_h): New variables.
6725         (thread-db.o): Add $(gdb_vecs_h) dependency.
6726         (gdb_vecs.o): New rule.
6727         * thread-db.c: #include "gdb_vecs.h".
6728         (thread_db_load_search): Use a vector to iterate over path elements.
6729         Handle text appearing after "$pdir".
6730
6731         * configure.ac: Add check for strstr.
6732         * config.in: Regenerate.
6733         * configure: Regenerate.
6734
6735 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
6736
6737         * hostio.c (handle_pread): If pread fails, fall back to attempting
6738         lseek/read.
6739         (handle_pwrite): Likewise for pwrite.
6740
6741 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
6742
6743         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6744         between unsupported TYPE and unimplementable ADDR/LEN combination.
6745         (arm_insert_point): Act on new return value.
6746
6747 2012-07-31  Pedro Alves  <palves@redhat.com>
6748
6749         * server.c (process_point_options): Only skip tokens if we find
6750         one that is unrecognized.  Don't treat 'X' specially while
6751         skipping unrecognized tokens.
6752
6753 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
6754
6755         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6756         to 4-byte-align HW breakpoint addresses for Thumb.
6757
6758 2012-07-27  Yao Qi  <yao@codesourcery.com>
6759
6760         PR remote/14161.
6761
6762         * server.h: Declare gdb_agent_about_to_close.
6763         * target.c (kill_inferior): Include "agent.h".
6764         New.  Send command 'kill'.
6765         * target.h (kill_inferior): Removed macro.
6766         * tracepoint.c (gdb_agent_about_to_close): New.
6767         (gdb_agent_helper_thread): Handle command 'close'.
6768         Wait endlessly until the inferior stops.
6769         Install gdb_agent_remove_socket to atexit hook.
6770         (agent_socket_name): New static variable.
6771         (gdb_agent_socket_init): Replace local variable 'name' with
6772         'agent_socket_name'.
6773         (gdb_agent_remove_socket): New.
6774
6775 2012-07-27  Yao Qi  <yao@codesourcery.com>
6776
6777         * server.c (process_point_options): Stop at 'X' when parsing.
6778
6779 2012-07-19  Michael Eager  <eager@eagercon.com>
6780
6781         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6782         to hw_execute.
6783         * linux-x86-low.c (x86_insert_point, x86_remove_point):
6784         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6785         hardware breakpoint.
6786
6787 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6788
6789         * gdbserver/linux-low.c (initialize_low): Call
6790         linux_ptrace_init_warnings.
6791
6792 2012-07-02  Doug Evans  <dje@google.com>
6793
6794         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6795         pointer to int.
6796
6797 2012-07-02  Stan Shebs  <stan@codesourcery.com>
6798
6799         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6800         (ax.o): Add it to build rule.
6801         (ax-ipa.o): Ditto.
6802         (OBS): Add format.o.
6803         (IPA_OBS): Add format.o.
6804         * server.c (handle_query): Claim support for breakpoint commands.
6805         (process_point_options): Add command case.
6806         (process_serial_event): Leave running if there are printfs in
6807         effect.
6808         * mem-break.h (any_persistent_commands): Declare.
6809         (add_breakpoint_commands): Declare.
6810         (gdb_no_commands_at_breakpoint): Declare.
6811         (run_breakpoint_commands): Declare.
6812         * mem-break.c (struct point_command_list): New struct.
6813         (struct breakpoint): New field command_list.
6814         (any_persistent_commands): New function.
6815         (add_commands_to_breakpoint): New function.
6816         (add_breakpoint_commands): New function.
6817         (gdb_no_commands_at_breakpoint): New function.
6818         (run_breakpoint_commands): New function.
6819         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6820         locally.
6821         * ax.c: Include format.h.
6822         (ax_printf): New function.
6823         (gdb_eval_agent_expr): Add printf opcode.
6824
6825 2012-06-13  Yao Qi  <yao@codesourcery.com>
6826
6827         * server.c (start_inferior): Remove duplicated writes to fields
6828         'last_resume_kind' and 'last_status' of 'current_inferior'.
6829
6830 2012-06-12  Yao Qi  <yao@codesourcery.com>
6831             Pedro Alves  <palves@redhat.com>
6832
6833         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
6834         comment.
6835         * server.c (handle_v_cont): Extend comment.
6836
6837 2012-06-11  Yao Qi  <yao@codesourcery.com>
6838
6839         * linux-low.c (linux_attach): Add 'static'.
6840
6841 2012-06-06  Yao Qi  <yao@codesourcery.com>
6842
6843         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6844
6845 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6846
6847         Fix gcc -flto compilation warning.
6848         * server.c (main): Make variable multi_mode and attach volatile.
6849
6850 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6851
6852         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6853         if the platform doesn't know about it.
6854
6855 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
6856
6857         * Makefile.in (SFILES): Add linux-tile-low.c.
6858         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6859         * configure.srv: Handle tilegx-*-linux*.
6860         * linux-tile-low.c: New file.
6861
6862 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
6863
6864         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6865
6866 2012-05-24  Pedro Alves  <palves@redhat.com>
6867
6868         PR gdb/7205
6869
6870         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6871
6872 2012-05-24  Pedro Alves  <palves@redhat.com>
6873
6874         PR gdb/7205
6875
6876         Replace target_signal with gdb_signal throughout.
6877
6878 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
6879
6880         * linux-low.c (linux_store_registers): Avoid the copying sequence
6881         when no data has been retrieved by ptrace.
6882
6883 2012-05-22  Will Deacon  <will.deacon@arm.com>
6884
6885         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6886         Include asm/ptrace.h.
6887         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6888         already defined.
6889
6890 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
6891
6892         * linux-low.c (linux_store_registers): Don't re-retrieve data
6893         with ptrace that has already been obtained from /proc.  Always
6894         copy any data retrieved with ptrace to the buffer supplied.
6895
6896 2012-05-11  Yao Qi  <yao@codesourcery.com>
6897             Pedro Alves  <palves@redhat.com>
6898
6899         * linux-low.c (enum stopping_threads_kind): New.
6900         (stopping_threads): Change type to `enum stopping_threads_kind'.
6901         (handle_extended_wait): If stopping and suspending threads, leave
6902         the new_lwp suspended too.
6903         (linux_wait_for_event): Adjust.
6904         (stop_all_lwps): Set `stopping_threads' to
6905         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6906         whether we're suspending threads or just stopping them.  Assert no
6907         recursion happens.
6908
6909 2012-04-29  Yao Qi  <yao@codesourcery.com>
6910
6911         * server.h: Move some code to ...
6912         * gdbthread.h: ... here.  New.
6913         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6914         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6915         (nto-low.o, win32-low.o): Likewise.
6916         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6917         * regcache.c, remote-utils.c, server.c: Likewise.
6918         * target.c, tracepoint.c, win32-low.c: Likewise.
6919
6920 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6921
6922         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6923         (PTRACE_ARG4_TYPE): Likewise.
6924         (PTRACE_XFER_TYPE): Likewise.
6925         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6926         ptrace to PTRACE_ARG3_TYPE.
6927         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6928         (PTRACE_ARG4_TYPE): Likewise.
6929         (PTRACE_XFER_TYPE): Likewise.
6930         (linux_detach_one_lwp): Cast fourth argument of
6931         ptrace to long then PTRACE_ARG4_TYPE.
6932         (regsets_fetch_inferior_registers): Cast third argument of
6933         ptrace to long then PTRACE_ARG3_TYPE.
6934         (regsets_store_inferior_registers): Likewise.
6935
6936 2012-04-20  Pedro Alves  <palves@redhat.com>
6937
6938         * configure: Regenerate.
6939
6940 2012-04-19  Pedro Alves  <palves@redhat.com>
6941
6942         * Makefile.in (GNULIB_BUILDDIR): New.
6943         (LIBGNU, INCGNU, GNULIB_H): Adjust.
6944         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6945         (all, install-only, uninstall, clean-info, all-lib, clean): No
6946         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
6947         (maintainer-clean realclean distclean): Use subdir_do.
6948         (subdir_do): New.
6949         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
6950         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
6951         * acinclude.m4: Include acx_configure_dir.m4.
6952         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6953         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
6954         ACX_CONFIGURE_DIR.
6955         (GNULIB): New.
6956         (GNULIB_STDINT_H): Adjust.
6957         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6958         * gdbreplay.c: Include build-gnulib/config.h.
6959         * server.h: Likewise.
6960         * aclocal.m4: Regenerate.
6961         * config.in: Regenerate.
6962         * configure: Regenerate.
6963
6964 2012-04-19  Pedro Alves  <palves@redhat.com>
6965
6966         * Makefile.in (LIBGNU, INCGNU): Adjust.
6967         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6968         (all, install-only, uninstall, clean-info, all-lib, clean)
6969         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6970         * configure.ac: Adjust AC_OUTPUT output.
6971         * aclocal.m4: Regenerate.
6972         * configure: Regenerate.
6973
6974 2012-04-19  Pedro Alves  <palves@redhat.com>
6975
6976         * Makefile.in (generated_files): New.
6977         (server_h): Remove the explicit dependency on config.h, and depend
6978         on $generated_files.
6979
6980 2012-04-19  Pedro Alves  <palves@redhat.com>
6981
6982         * Makefile.in (INCGNU): Add -Ignulib.
6983
6984 2012-04-19  Pedro Alves  <palves@redhat.com>
6985
6986         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6987         (INCGNU): ... this, and spell out -I here.
6988         (GNULIB_LIB): Rename to ...
6989         (LIBGNU): ... this.
6990         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6991
6992 2012-04-19  Pedro Alves  <palves@redhat.com>
6993
6994         * config.in: Regenerate.
6995
6996 2012-04-19  Pedro Alves  <palves@redhat.com>
6997
6998         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6999         * server.h (memmem): Remove declaration.
7000         * config.in: Regenerate.
7001         * configure: Regenerate.
7002
7003 2012-04-19  Yao Qi  <yao@codesourcery.com>
7004
7005         * Makefile.in (SFILES): Add common/vec.c.
7006         (OBS): Add vec.o.
7007         (vec.o): New rule.
7008
7009 2012-04-19  Yao Qi  <yao@codesourcery.com>
7010
7011         * remote-utils.c (prepare_resume_reply): Replace with macro
7012         target_core_of_thread.
7013         * server.c (handle_qxfer_threads_proper): Likewise.
7014         * target.h (traget_core_of_thread): New macro.
7015
7016 2012-04-18  Pedro Alves  <palves@redhat.com>
7017
7018         * aclocal.m4: Regenerate.
7019         * configure: Regenerate.
7020
7021 2012-04-16  Yao Qi  <yao@codesourcery.com>
7022
7023         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7024         duplicated on address.
7025
7026 2012-04-16  Yao Qi  <yao@codesourcery.com>
7027
7028         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7029         (struct tracepoint_action_ops) <send>: New field.
7030         (m_tracepoint_action_send, r_tracepoint_action_send): New.
7031         (agent_expr_send, x_tracepoint_action_send): New.
7032         (l_tracepoint_action_send): New.
7033         (cmd_qtdp): Download and install tracepoint
7034         according to `use_agent'.
7035         (run_inferior_command): Add one more parameter `len'.
7036         Update callers.
7037         (tracepoint_send_agent): New.
7038         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7039
7040 2012-04-16  Yao Qi  <yao@codesourcery.com>
7041
7042         * tracepoint.c (download_tracepoints): Moved to ...
7043         (cmd_qtstart): ... here.
7044
7045 2012-04-14  Yao Qi  <yao@codesourcery.com>
7046
7047         * tracepoint.c: Include inttypes.h.
7048         (struct collect_memory_action): Use sized types.
7049         (struct tracepoint): Likewise.
7050         (cmd_qtdp, stop_tracing): Update print specifiers.
7051         (cmd_qtp, response_tracepoint): Likewise.
7052         (collect_data_at_tracepoint): Likewise.
7053         (collect_data_at_step): Likewise.
7054
7055 2012-04-14  Yao Qi  <yao@codesourcery.com>
7056
7057         Import gnulib module inttypes.
7058         * aclocal.m4, config.in, configure: Regenerated.
7059
7060 2012-04-14  Yao Qi  <yao@codesourcery.com>
7061
7062         * Makefile.in (maintainer-clean, realclean, distclean): Remove
7063         Makefile and config.status at last.
7064
7065 2012-04-13  Yao Qi  <yao@codesourcery.com>
7066
7067         * tracepoint.c: Include stdint.h unconditionally.
7068
7069 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
7070
7071         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7072         on BFD_HAVE_SYS_PROCFS_TYPE.
7073         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7074         * configure: Regenerate.
7075         * config.in: Likewise.
7076
7077 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
7078
7079         * Makefile.in (clean): Also remove x32.c x32-linux.c
7080         x32-avx.c x32-avx-linux.c.
7081         (x32.o): New target.
7082         (x32.c): Likewise.
7083         (x32-linux.o): Likewise.
7084         (x32-linux.c): Likewise.
7085         (x32-avx.o): Likewise.
7086         (x32-avx.c): Likewise.
7087         (x32-avx-linux.o): Likewise.
7088         (x32-avx-linux.c): Likewise.
7089
7090         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7091         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7092         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7093         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7094         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7095         i386/x32-avx-linux.xml.
7096
7097         * linux-x86-low.c (init_registers_x32_linux): New prototype.
7098         (init_registers_x32_avx_linux): Likwise.
7099         (x86_linux_update_xmltarget): Call init_registers_x32_linux
7100         or init_registers_x32_avx_linux if linux_is_elf64 is false.
7101
7102 2012-04-13  Pedro Alves  <palves@redhat.com>
7103
7104         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7105         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7106         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7107         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7108         the sub-make.
7109
7110 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
7111
7112         * linux-x86-low.c (compat_x32_clock_t): New.
7113         (compat_x32_siginfo_t): Likewise.
7114         (compat_x32_siginfo_from_siginfo): Likewise.
7115         (siginfo_from_compat_x32_siginfo): Likewise.
7116         (linux_is_elf64): Likewise.
7117         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7118         and siginfo_from_compat_x32_siginfo for x32.
7119         (x86_arch_setup): Set linux_is_elf64.
7120
7121 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
7122
7123         PR gdb/13969
7124         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7125         e_machine field.
7126         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7127         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7128         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7129         compatible with process.
7130
7131 2012-04-12  Yao Qi  <yao@codesourcery.com>
7132
7133         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7134         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7135         (install-only, install-info, clean): Handle sub dir gnulib.
7136         (all-lib, am--refresh): New targets.
7137         (memmem.o): Remove target.
7138         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7139         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
7140         (AC_REPLACE_FUNCS): Remove memmem.
7141         Invoke gl_INIT and AM_INIT_AUTOMAKE.
7142         (AC_OUTPUT): Generate Makefile in gnulib/.
7143         * aclocal.m4, config.in, configure: Regenerated.
7144
7145 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
7146
7147         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7148
7149 2012-04-05  Pedro Alves  <palves@redhat.com>
7150
7151         -Werror=strict-aliasing
7152
7153         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7154         pointer.
7155
7156 2012-04-04  Pedro Alves  <palves@redhat.com>
7157
7158         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7159         (sparc_store_gregset_from_stack, sparc_store_gregset)
7160         (sparc_breakpoint_at): Fix formatting.
7161
7162 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
7163
7164         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7165         are available.
7166         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7167         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7168         * config.in: Regenerate.
7169         * configure: Likewise.
7170
7171 2012-03-29  Pedro Alves  <palves@redhat.com>
7172
7173         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7174         Correct ptrace arguments.
7175
7176 2012-03-28  Pedro Alves  <palves@redhat.com>
7177
7178         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7179         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7180         (IA64_FR1_REGNUM): New defines.
7181         (ia64_fetch_register): New.
7182         (the_low_target): Install it.
7183         * linux-low.h (struct linux_target_ops) <fetch_register>: New
7184         field.
7185         * linux-low.c (linux_fetch_registers): Try the
7186         the_low_target.fetch_register hook first.
7187
7188         * linux-arm-low.c (the_low_target): Adjust.
7189         * linux-bfin-low.c (the_low_target): Adjust.
7190         * linux-cris-low.c (the_low_target): Adjust.
7191         * linux-crisv32-low.c (the_low_target): Adjust.
7192         * linux-m32r-low.c (the_low_target): Adjust.
7193         * linux-m68k-low.c (the_low_target): Adjust.
7194         * linux-mips-low.c (the_low_target): Adjust.
7195         * linux-ppc-low.c (the_low_target): Adjust.
7196         * linux-s390-low.c (the_low_target): Adjust.
7197         * linux-sh-low.c (the_low_target): Adjust.
7198         * linux-sparc-low.c (the_low_target): Adjust.
7199         * linux-tic6x-low.c (the_low_target): Adjust.
7200         * linux-x86-low.c (the_low_target): Adjust.
7201         * linux-xtensa-low.c (the_low_target): Adjust.
7202
7203 2012-03-26  Pedro Alves  <palves@redhat.com>
7204
7205         * server.c (handle_qxfer_libraries): Don't bail early if
7206         the_target->qxfer_libraries_svr4 is not NULL.
7207
7208 2012-03-26  Pedro Alves  <palves@redhat.com>
7209
7210         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7211
7212 2012-03-23  Pedro Alves  <palves@redhat.com>
7213
7214         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7215         "library-list-svr4" element's start tag when the the DSO list is
7216         empty.
7217
7218 2012-03-23  Pedro Alves  <palves@redhat.com>
7219
7220         * linux-low.c (read_one_ptr): Read the inferior's pointer through
7221         a variable whose type size is the same as the inferior's pointer
7222         size.
7223
7224 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
7225
7226         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7227         struct siginfo.
7228         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7229         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7230         * linux-low.h: Include <signal.h>.
7231         (struct siginfo): Remove forward declaration.
7232         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7233         struct siginfo.
7234
7235 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
7236
7237         * .gitignore: Ignore more files.
7238
7239 2012-03-19  Pedro Alves  <palves@redhat.com>
7240             Jan Kratochvil  <jan.kratochvil@redhat.com>
7241
7242         * server.c (cont_thread, general_thread): Add describing comments.
7243         (start_inferior): Clear `cont_thread'.
7244         (handle_v_cont): Don't set `cont_thread' if resuming all threads
7245         of a process.
7246
7247 2012-03-15  Yao Qi  <yao@codesourcery.com>
7248
7249         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7250         handling to ...
7251         (cmd_qtdp): ... here.
7252
7253 2012-03-15  Yao Qi  <yao@codesourcery.com>
7254
7255         * tracepoint.c (struct tracepoint_action_ops): New.
7256         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7257         (m_tracepoint_action_download): New.
7258         (r_tracepoint_action_download): New.
7259         (x_tracepoint_action_download): New.
7260         (l_tracepoint_action_download): New.
7261         (add_tracepoint_action): Install `action->ops' according type.
7262         (download_tracepoint_1): Move code `download' function pointer
7263         of various tracepoint_action_ops.
7264
7265 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
7266
7267         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
7268         linux_ptrace_attach_warnings.
7269
7270 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
7271
7272         * Makefile.in (linux-ptrace.o): New.
7273         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7274         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7275         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7276         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7277         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7278         of these targets.
7279         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7280
7281 2012-03-08  Yao Qi  <yao@codesourcery.com>
7282             Pedro Alves  <palves@redhat.com>
7283
7284         Fix PR server/13392.
7285         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7286         offset of JMP insn.
7287         * tracepoint.c (remove_tracepoint): New.
7288         (cmd_qtdp): Call remove_tracepoint when failed to install.
7289
7290 2012-03-07  Pedro Alves  <palves@redhat.com>
7291
7292         * linux-low.c (get_detach_signal): New.
7293         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7294         Pass on pending signals to PTRACE_DETACH.  Check the result of the
7295         ptrace call.
7296         * server.c (program_signals, program_signals_p): New.
7297         (handle_general_set): Handle QProgramSignals.
7298         * server.h (program_signals, program_signals_p): Declare.
7299
7300 2012-03-05  Pedro Alves  <palves@redhat.com>
7301             Jan Kratochvil  <jan.kratochvil@redhat.com>
7302
7303         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7304         New comment why.
7305
7306 2012-03-03  Yao Qi  <yao@codesourcery.com>
7307
7308         * tracepoint.c (tracepoint_look_up_symbols): Update call to
7309         agent_look_up_symbols.
7310
7311 2012-03-03  Yao Qi  <yao@codesourcery.com>
7312
7313         * Makefile.in (linux-low.o): Keep dependence on agent.h.
7314         (linux-x86-low.o): Likewise.
7315         * server.h: Remove in_process_agent_loaded.
7316         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
7317         common/agent.c.
7318         Update callers.
7319
7320 2012-03-03  Yao Qi  <yao@codesourcery.com>
7321
7322         * tracepoint.c (gdb_agent_capability): New global.
7323         (in_process_agent_loaded_ust): Renamed to
7324         `in_process_agent_supports_ust'.
7325         Update callers.
7326         (in_process_agent_supports_ust): Call agent_capability_check.
7327         (clear_installed_tracepoints): Assert that agent supports
7328         agent.
7329
7330 2012-03-03  Yao Qi  <yao@codesourcery.com>
7331
7332         * linux-low.c (linux_supports_agent): New.
7333         (linux_target_ops): Initialize field `supports_agent' with
7334         linux_supports_agent.
7335         * target.h (struct target_ops) <supports_agent>: New.
7336         (target_supports_agent): New macro.
7337         * server.c (handle_general_set): Handle packet 'QAgent'.
7338         (handle_query): Send `QAgent+'.
7339         * Makefile.in (server.o): Depends on agent.h.
7340
7341 2012-03-03  Yao Qi  <yao@codesourcery.com>
7342
7343         * Makefile.in (OBS): Add agent.o.
7344         Add new rule for agent.o.
7345         Track dependence of tracepoint.c on agent.h.
7346         * tracepoint.c (run_inferior_command_1):
7347         (run_inferior_command): Call agent_run_command.
7348         (gdb_ust_connect_sync_socket): Deleted.  Move it to
7349         common/agent.c.
7350         (resume_thread, stop_thread): Likewise.
7351         (gdb_ust_socket_init): Renamed to ...
7352         (gdb_agent_socket_init): ... New.
7353         (gdb_ust_thread): Renamed to ...
7354         (gdb_agent_helper_thread): ... New.
7355         (gdb_ust_init): Move some code to ...
7356         (gdb_agent_init): ... here.  New.
7357         [HAVE_UST]: Call gdb_ust_init.
7358         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
7359         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7360         * config.in, configure: Regenerated.
7361
7362 2012-03-02  Pedro Alves  <palves@redhat.com>
7363
7364         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7365         * linux-low.c (struct simple_pid_list): New.
7366         (stopped_pids): New a struct simple_pid_list pointer.
7367         (add_to_pid_list, pull_pid_from_list): New.
7368         (handle_extended_wait): Don't assume the first signal new children
7369         report is SIGSTOP.  Adjust call to pull_pid_from_list.
7370         (linux_wait_for_lwp): Adjust.
7371
7372 2012-03-02  Yao Qi  <yao@codesourcery.com>
7373
7374         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7375         debug log.
7376
7377 2012-03-02  Yao Qi  <yao@codesourcery.com>
7378
7379         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7380         `stop_pc' and `tpoint'.  Update caller.
7381
7382 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
7383
7384         * linux-low.h (linux_target_ops): Add regset_bitmap member.
7385         * linux-low.c (use_linux_regsets): New macro.
7386         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7387         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7388         (linux_register_in_regsets): New function.
7389         (usr_fetch_inferior_registers): Skip registers covered by
7390         regsets.
7391         (usr_store_inferior_registers): Likewise.
7392         (usr_fetch_inferior_registers): New macro.
7393         (usr_store_inferior_registers): Likewise.
7394         (linux_fetch_registers): Handle mixed regset/non-regset targets.
7395         (linux_store_registers): Likewise.
7396         * linux-mips-low.c (init_registers_mips_dsp_linux): New
7397         prototype.
7398         (init_registers_mips64_dsp_linux): Likewise.
7399         (init_registers_mips_linux): New macro.
7400         (init_registers_mips_dsp_linux): Likewise.
7401         (mips_dsp_num_regs): Likewise.
7402         (DSP_BASE, DSP_CONTROL): New fallback macros.
7403         (mips_base_regs): New macro.
7404         (mips_regmap): Use it.  Fix the size.
7405         (mips_dsp_regmap): New variable.
7406         (mips_dsp_regset_bitmap): Likewise.
7407         (mips_arch_setup): New function.
7408         (mips_cannot_fetch_register): Use the_low_target.regmap rather
7409         than mips_regmap.
7410         (mips_cannot_store_register): Likewise.
7411         (the_low_target): Update .arch_setup, .num_regs and .regmap
7412         initializers.  Add .regset_bitmap initializer.
7413         * linux-arm-low.c (the_low_target): Add .regset_bitmap
7414         initializer.
7415         * linux-bfin-low.c (the_low_target): Likewise.
7416         * linux-cris-low.c (the_low_target): Likewise.
7417         * linux-crisv32-low.c (the_low_target): Likewise.
7418         * linux-ia64-low.c (the_low_target): Likewise.
7419         * linux-m32r-low.c (the_low_target): Likewise.
7420         * linux-m68k-low.c (the_low_target): Likewise.
7421         * linux-ppc-low.c (the_low_target): Likewise.
7422         * linux-s390-low.c (the_low_target): Likewise.
7423         * linux-sh-low.c (the_low_target): Likewise.
7424         * linux-sparc-low.c (the_low_target): Likewise.
7425         * linux-tic6x-low.c (the_low_target): Likewise.
7426         * linux-x86-low.c (the_low_target): Likewise.
7427         * linux-xtensa-low.c (the_low_target): Likewise.
7428         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7429         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
7430         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7431         srv_xmlfiles.
7432         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7433         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7434
7435 2012-02-29  Yao Qi  <yao@codesourcery.com>
7436             Pedro Alves  <palves@redhat.com>
7437
7438         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7439         `step_over_finished' is true.
7440
7441 2012-02-27  Pedro Alves  <palves@redhat.com>
7442
7443         * linux-low.c (pid_is_stopped): Delete, moved to common/.
7444         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7445
7446 2012-02-27  Pedro Alves  <palves@redhat.com>
7447
7448         PR server/9684
7449         * linux-low.c (pid_is_stopped): New.
7450         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7451
7452 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
7453
7454         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7455         of conditions.
7456
7457 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
7458
7459         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7460
7461 2012-02-24  Luis Machado  <lgustavo@codesourcery>
7462
7463         * server.c (handle_query): Advertise support for target-side
7464         breakpoint condition evaluation.
7465         (process_point_options): New function.
7466         (process_serial_event): When inserting a breakpoint, check for
7467         a target-side condition that should be evaluated.
7468
7469         * mem-break.c: Include regcache.h and ax.h.
7470         (point_cond_list_t): New data structure.
7471         (breakpoint) <cond_list>: New field.
7472         (find_gdb_breakpoint_at): Make non-static.
7473         (delete_gdb_breakpoint_at): Clear any target-side
7474         conditions.
7475         (clear_gdb_breakpoint_conditions): New function.
7476         (add_condition_to_breakpoint): Likewise.
7477         (add_breakpoint_condition): Likewise.
7478         (gdb_condition_true_at_breakpoint): Likewise.
7479         (gdb_breakpoint_here): Return result directly instead
7480         of going through a local variable.
7481
7482         * mem-break.h (find_gdb_breakpoint_at): New prototype.
7483         (clear_gdb_breakpoint_conditions): Likewise.
7484         (add_breakpoint_condition): Likewise.
7485         (gdb_condition_true_at_breakpoint): Likewise.
7486
7487         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7488         (need_step_over_p): Take target-side breakpoint condition into
7489         consideration.
7490
7491 2012-02-24  Luis Machado  <lgustavo@codesourcery>
7492
7493         * server.h: Include tracepoint.h.
7494         (agent_mem_read, agent_get_trace_state_variable_value,
7495         agent_set_trace_state_variable_value,
7496         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7497         get_set_tsv_func_addr): New prototypes.
7498
7499         * ax.h: New include file.
7500         * ax.c: New source file.
7501
7502         * tracepoint.c: Include ax.h.
7503         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7504         agent_expr, eval_result_type): Move to ax.h.
7505         (parse_agent_expr): Rename to ...
7506         (gdb_parse_agent_expr): ... this, make it non-static and move
7507         to ax.h.
7508         (unparse_agent_expr) Rename to ...
7509         (gdb_unparse_agent_expr): ... this, make it non-static and move
7510         to ax.h.
7511         (eval_agent_expr): Rename to ...
7512         (eval_tracepoint_agent_expr): ... this.
7513         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7514         forward declarations.
7515         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7516         (agent_get_trace_state_variable_value): New function.
7517         (agent_set_trace_state_variable_value): New function.
7518         (cmd_qtdp): Call gdb_parse_agent_expr (...).
7519         (response_tracepoint): Call gdb_unparse_agent_expr (...).
7520         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7521         (condition_true_at_tracepoint): Likewise.
7522         (parse_agent_expr): Rename to ...
7523         (gdb_parse_agent_expr): ... this and move to ax.c.
7524         (unparse_agent_expr): Rename to ...
7525         (gdb_unparse_agent_expr): ... this and move to ax.c.
7526         (gdb_agent_op_name): Move to ax.c.
7527         (eval_agent_expr): Rename to ...
7528         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7529         and move to ax.c.
7530         (eval_tracepoint_agent_expr): New function.
7531         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
7532         non-static.
7533         (current_insn_ptr, emit_error, struct bytecode_address): Move to
7534         ax.c.
7535         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7536         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7537         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7538         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7539         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7540         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7541         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7542         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7543         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7544         (compile_bytecodes): Remove forward declaration.
7545         (is_goto_target): Move to ax.c.
7546         (compile_bytecodes): Move to ax.c and call
7547         agent_get_trace_state_variable_value (...) and
7548         agent_set_trace_state_variable_value (...).
7549
7550         * Makefile.in: Update ax.c and IPA dependencies.
7551
7552 2012-02-24  Pedro Alves  <palves@redhat.com>
7553
7554         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7555         (cmd_bigqtbuffer_circular): ... this.  Only handle
7556         'QTBuffer:circular:'.
7557         (handle_tracepoint_general_set): Adjust.
7558
7559 2012-02-16  Yao Qi  <yao@codesourcery.com>
7560
7561         * inferiors.c: Move code to ...
7562         * dll.c: .... here.  New.
7563         * server.h: Declare clear_dlls.
7564         * Makefile.in (SFILES): Add dll.c.
7565         (OBS): Add dll.o
7566         (dll.o): New rule.
7567
7568 2012-02-11  Yao Qi  <yao@codesourcery.com>
7569
7570         * server.c: (handle_monitor_command): Add a new parameter
7571         `own_buf'.
7572         (handle_query): Update caller.
7573
7574 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
7575
7576         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7577         * configure, config.in: Regenerate.
7578         * hostio.c: Provide an alternate implementation if HAVE_READLINK
7579         is not defined.
7580
7581 2012-02-02  Pedro Alves  <palves@redhat.com>
7582
7583         Try SIGKILL first, then PTRACE_KILL.
7584         * linux-low.c (linux_kill_one_lwp): New.
7585         (linux_kill_one_lwp): Rename to ...
7586         (kill_one_lwp_callback): ... this.  Use the new
7587         linux_kill_one_lwp.
7588
7589 2012-02-02  Pedro Alves  <palves@redhat.com>
7590
7591         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7592         inferior.
7593
7594 2012-01-27  Pedro Alves  <palves@redhat.com>
7595
7596         * linux-low.c (linux_child_pid_to_exec_file): Delete.
7597         (elf_64_file_p): Make static.
7598         (linux_pid_exe_is_elf_64_file): New.
7599         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7600         Delete declarations.
7601         (linux_pid_exe_is_elf_64_file): Declare.
7602         * linux-x86-low.c (x86_arch_setup): Use
7603         linux_pid_exe_is_elf_64_file.
7604
7605 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
7606
7607         * linux-low.c (linux_wait_for_event_1): Rename to ...
7608         (linux_wait_for_event): ... here and merge it with former
7609         linux_wait_for_event - new variable wait_ptid, use it.
7610         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7611
7612 2012-01-23  Pedro Alves  <palves@redhat.com>
7613
7614         * server.c (main): Avoid yet another case of infinite loop while
7615         detaching/killing after a longjmp.
7616
7617 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7618
7619         Code cleanup.
7620         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7621
7622 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
7623
7624         * hostio.c (handle_readlink): New function.
7625         (handle_vFile): Call it to handle "vFile:readlink" packets.
7626
7627 2012-01-20  Pedro Alves  <palves@redhat.com>
7628             Ulrich Weigand  <ulrich.weigand@linaro.org>
7629
7630         * server.c (handle_v_requests): Only support vAttach and vRun to
7631         start multiple processes when in extended protocol mode.
7632
7633 2012-01-17  Pedro Alves  <palves@redhat.com>
7634
7635         * tracepoint.c (initialize_tracepoint): Use mmap instead of
7636         memalign plus mprotect to allocate the scratch buffer.
7637
7638 2012-01-13  Pedro Alves  <palves@redhat.com>
7639
7640         * server.c (attach_inferior): Clear `cont_thread'.
7641
7642 2012-01-13  Pedro Alves  <palves@redhat.com>
7643
7644         * server.c (main): Avoid infinite loop while detaching/killing
7645         after a longjmp.
7646
7647 2012-01-09  Doug Evans  <dje@google.com>
7648
7649         * server.c (start_inferior): Set last_ptid in --wrapper case.
7650
7651 2012-01-06  Yao Qi  <yao@codesourcery.com>
7652
7653         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7654         defined.
7655         [IN_PROCESS_AGENT] (debug_agent): New global variable.
7656
7657 2012-01-04  Yao Qi  <yao@codesourcery.com>
7658
7659         * tracepoint.c (cmd_qtdp): Print debug message
7660         for static tracepoint.
7661
7662 2012-01-04  Yao Qi  <yao@codesourcery.com>
7663
7664         * tracepoint.c (trace_vdebug): Differentiate debug message
7665         between gdbserver and IPA.
7666
7667 2012-01-03  Yao Qi  <yao@codesourcery.com>
7668
7669         * tracepoint.c (tracepoint_was_hit): Don't collect for
7670         static tracepoint.
7671
7672 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
7673
7674         * terminal.h: Reformat copyright header.
7675
7676 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
7677
7678         * server.c (gdbserver_version): Update copyright year.
7679         * gdbreplay.c (gdbreplay_version): Likewise.
7680
7681 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
7682
7683         * linux-low.c (linux_create_inferior): Put empty if clause for write.
7684
7685         Revert:
7686         2011-12-18  Hui Zhu  <teawater@gmail.com>
7687         * linux-low.c (linux_create_inferior): Save return value to ret.
7688
7689 2011-12-18  Hui Zhu  <teawater@gmail.com>
7690
7691         * linux-low.c (linux_create_inferior): Save return value to ret.
7692
7693 2011-12-16  Doug Evans  <dje@google.com>
7694
7695         * linux-low.c (linux_create_inferior): If stdio connection,
7696         redirect stdin from /dev/null, stdout to stderr.
7697         * remote-utils.c (remote_is_stdio): New static global.
7698         (remote_connection_is_stdio): New function.
7699         (remote_prepare): Handle stdio connection.
7700         (remote_open): Ditto.
7701         (remote_close): Don't close stdin for stdio connections.
7702         (read_prim,write_prim): New functions.  Replace all calls to
7703         read/write to these.
7704         * server.c (main): Watch for "-" argument.  Move call to
7705         remote_prepare before start_inferior.
7706         * server.h (STDIO_CONNECTION_NAME): New macro.
7707         (remote_connection_is_stdio): Declare.
7708
7709         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7710         in debugging output.
7711
7712 2011-12-15  Yao Qi  <yao@codesourcery.com>
7713
7714         * tracepoint.c: Include sys/syscall.h.
7715         (gdb_ust_thread): Remove preprocessor conditional.
7716
7717 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
7718
7719         * linux-low.c (linux_detach_one_lwp): Call
7720         the_low_target.prepare_to_resume before detaching.
7721
7722 2011-12-14  Yao Qi  <yao@codesourcery.com>
7723
7724         * tracepoint.c (gdb_ust_thread): Don't ignore return value
7725         of write.
7726
7727 2011-12-14  Yao Qi  <yao@codesourcery.com>
7728
7729         * i386-low.c (i386_low_stopped_data_address): Initialize local
7730         variable `control'.
7731
7732 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
7733
7734         PR remote/13492
7735
7736         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7737         DR_CONTROL unless necessary.  Extend comments.
7738         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7739         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
7740
7741 2011-12-13  Yao Qi  <yao@codesourcery.com>
7742
7743         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7744         macros.
7745         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7746
7747 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
7748
7749         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7750         Print new debug message for such case.
7751
7752 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
7753
7754         Fix overlapping memcpy.
7755         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
7756         the read_inferior_memory transfer.
7757         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
7758         write_inferior_memory transfer.
7759         (set_fast_tracepoint_jump): New variable buf.  Use it for the
7760         read_inferior_memory and write_inferior_memory transfers.
7761         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7762         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7763         Use it for the write_inferior_memory transfer.
7764         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7765         buffers.
7766
7767 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
7768
7769         * linux-low.c (fetch_register, store_register): Make code
7770         consistent, fix formatting.
7771
7772 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
7773
7774         * linux-low.c (usr_store_inferior_registers): Factor out code
7775         to handle individual registers into...
7776         (store_register): ... this new function.
7777
7778 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
7779
7780         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7781         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7782         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7783         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7784         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7785         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7786         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7787         (srv_xmlfiles): Add new XML files.
7788
7789         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7790         and <sys/uio.h>.
7791         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7792         (init_registers_s390_linux32v1): Add prototype.
7793         (init_registers_s390_linux32v2): Likewise.
7794         (init_registers_s390_linux64v1): Likewise.
7795         (init_registers_s390_linux64v2): Likewise.
7796         (init_registers_s390x_linux64v1): Likewise.
7797         (init_registers_s390x_linux64v2): Likewise.
7798         (s390_num_regs): Increment to 52.
7799         (s390_regmap): Add orig_r2 register.
7800         (s390_num_regs_3264): Increment to 68.
7801         (s390_regmap_3264): Add orig_r2 register.
7802         (s390_collect_ptrace_register): Handle orig_r2 register.
7803         (s390_supply_ptrace_register): Likewise.
7804         (s390_fill_last_break): New function.
7805         (s390_store_last_break): Likewise.
7806         (s390_fill_system_call): New function.
7807         (s390_store_system_call): Likewise.
7808         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7809         register sets.
7810         (s390_check_regset): New function.
7811         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7812         NT_S390_SYSTEM_CALL regsets and use appropriate description.
7813         Update target_regsets for available register sets.
7814
7815 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
7816             Jan Kratochvil  <jan.kratochvil@redhat.com>
7817
7818         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7819         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7820         New.
7821         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7822         * linux-low.h (struct process_info_private): New member r_debug.
7823         * server.c (handle_qxfer_libraries): Call
7824         the_target->qxfer_libraries_svr4.
7825         (handle_qxfer_libraries_svr4): New function.
7826         (qxfer_packets): New entry "libraries-svr4".
7827         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7828         * target.h (struct target_ops): New member qxfer_libraries_svr4.
7829         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7830         PACKET_qXfer_libraries_svr4.
7831
7832 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
7833
7834         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7835         PSW address/mask between 8-byte and 16-byte formats.
7836         (s390_supply_ptrace_register): Likewise.
7837         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7838         basic addressing mode bit.
7839
7840 2011-11-24  Stan Shebs  <stan@codesourcery.com>
7841
7842         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7843
7844 2011-11-17  Stan Shebs  <stan@codesourcery.com>
7845
7846         * tracepoint.c (struct tracepoint): New field traceframe_usage.
7847         (tracing_start_time): New global.
7848         (tracing_stop_time): New global.
7849         (tracing_user_name): New global.
7850         (tracing_notes): New global.
7851         (tracing_stop_note): New global.
7852         (cmd_qtstart): Set traceframe_usage, start_time.
7853         (stop_tracing): Set stop_time.
7854         (cmd_qtstatus): Report additional status.
7855         (cmd_qtp): New function.
7856         (handle_tracepoint_query): Call it.
7857         (cmd_qtnotes): New function.
7858         (handle_tracepoint_general_set): Call it.
7859         (get_timestamp): Rename from tsv_get_timestamp.
7860
7861 2011-11-14  Stan Shebs  <stan@codesourcery.com>
7862             Kwok Cheung Yeung  <kcy@codesourcery.com>
7863
7864         * linux-x86-low.c (small_jump_insn): New.
7865         (i386_install_fast_tracepoint_jump_pad): Add arguments for
7866         trampoline and error message, build a trampoline and issue a small
7867         jump instruction to it.
7868         (x86_install_fast_tracepoint_jump_pad): Add arguments for
7869         trampoline and error message.
7870         (x86_get_min_fast_tracepoint_insn_len): New.
7871         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7872         * linux-low.h (struct linux_target_ops): Add arguments to
7873         install_fast_tracepoint_jump_pad operation, add new operation.
7874         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7875         arguments.
7876         (linux_get_min_fast_tracepoint_insn_len): New function.
7877         (linux_target_op): Add new operation.
7878         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7879         (gdb_trampoline_buffer_end): Ditto.
7880         (gdb_trampoline_buffer_error): Ditto.
7881         (struct ipa_sym_addresses): Add fields for new IPA variables.
7882         (symbol_list): Add entries for new IPA variables.
7883         (struct tracepoint): Add fields to hold the address range of the
7884         trampoline used by the tracepoint.
7885         (trampoline_buffer_head): New static variable.
7886         (trampoline_buffer_tail): Ditto.
7887         (claim_trampoline_space): New function.
7888         (have_fast_tracepoint_trampoline_buffer): New function.
7889         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7890         structure.
7891         (install_fast_tracepoint): Ditto, also add error buffer argument.
7892         (cmd_qtminftpilen): New function.
7893         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7894         (fast_tracepoint_from_trampoline_address): New function.
7895         (fast_tracepoint_collecting): Handle trampoline as part of jump
7896         pad space.
7897         (set_trampoline_buffer_space): New function.
7898         (initialize_tracepoint): Initialize new IPA variables.
7899         * target.h (struct target_ops): Add arguments to
7900         install_fast_tracepoint_jump_pad operation, add new
7901         get_min_fast_tracepoint_insn_len operation.
7902         (target_get_min_fast_tracepoint_insn_len): New.
7903         (install_fast_tracepoint_jump_pad): Add arguments.
7904         * server.h (IPA_BUFSIZ): Define.
7905         * linux-i386-ipa.c: Include extra header files.
7906         (initialize_fast_tracepoint_trampoline_buffer): New function.
7907         (initialize_low_tracepoint): Call it.
7908         * server.h (set_trampoline_buffer_space): Declare.
7909         (claim_trampoline_space): Ditto.
7910         (have_fast_tracepoint_trampoline_buffer): Ditto.
7911
7912 2011-11-14  Yao Qi  <yao@codesourcery.com>
7913
7914         * server.c (handle_query): Handle InstallInTrace for qSupported.
7915         * tracepoint.c (add_tracepoint): Sort list.
7916         (install_tracepoint, download_tracepoint): New.
7917         (cmd_qtdp): Call them to install and download tracepoints.
7918         (sort_tracepoints): Removed.
7919         (cmd_qtstart): Update.
7920
7921 2011-11-14  Yao Qi  <yao@codesourcery.com>
7922
7923         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7924         * mem-break.h: Declare.
7925         * tracepoint.c (cmd_qtstart): Move some code to ...
7926         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7927         New.
7928         (download_tracepoints): Move some code to ...
7929         (download_tracepoint_1): ... here.  New.
7930
7931 2011-11-08  Yao Qi  <yao@codesourcery.com>
7932
7933         * remote-utils.c (relocate_instruction): A comment fix.
7934
7935 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
7936
7937         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7938         (i386_dr_low_get_control, i386_dr_low_get_status): Use
7939         dr_status_mirror and dr_control_mirror from debug_reg_state.
7940         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7941         (i386_initial_stuff): Remove use of deleted globals.
7942         (i386_get_thread_context, i386_set_thread_context,
7943         i386_thread_added): Use dr_status_mirror and dr_control_mirror
7944         from debug_reg_state.
7945
7946 2011-11-05  Yao Qi  <yao@codesourcery.com>
7947
7948         * tracepoint.c (gdb_collect): Loop over tracepoints of same
7949         address as TPOINT's.
7950
7951 2011-11-02  Stan Shebs  <stan@codesourcery.com>
7952
7953         * tracepoint.c (agent_mem_read_string): New function.
7954         (eval_agent_expr): Call it for tracenz.
7955         * server.c (handle_query): Report support for tracenz.
7956
7957 2011-11-02  Yao Qi  <yao@codesourcery.com>
7958
7959         * tracepoint.c (cmd_qtstart): Remove unused local variables.
7960
7961 2011-11-02  Yao Qi  <yao@codesourcery.com>
7962
7963         * target.h: Fix a typo in comment.
7964
7965 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
7966
7967         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
7968         clobber the breakpoints' shadows with fast tracepoint jumps.
7969         * mem-break.h (check_mem_write): Add `myaddr' parameter.
7970         * target.c (write_inferior_memory): Also pass MYADDR down to
7971         check_mem_write.
7972
7973 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
7974
7975         * configure.ac: Check support for personality routine.
7976         * configure: Regenerate.
7977         * config.in: Likewise.
7978         * linux-low.c: Include <sys/personality.h>.
7979         Define ADDR_NO_RANDOMIZE if necessary.
7980         (linux_create_inferior): Disable address space randomization when
7981         forking inferior, if requested.
7982         (linux_supports_disable_randomization): New function.
7983         (linux_target_ops): Install it.
7984         * server.h (disable_randomization): Declare.
7985         * server.c (disable_randomization): New global variable.
7986         (handle_general_set): Handle QDisableRandomization.
7987         (handle_query): Likewise for qSupported.
7988         (main): Support --disable-randomization and --no-disable-randomization
7989         command line arguments.
7990         * target.h (struct target_ops): Add supports_disable_randomization.
7991         (target_supports_disable_randomization): New macro.
7992
7993 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
7994
7995         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7996         ifdef check.
7997         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7998         [!PT_GETDSBT] (target_loadmap): New definition.
7999         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8000         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8001         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8002         and PT_GETDSBT to LINUX_LOADMAP.
8003         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8004         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8005
8006 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
8007
8008         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8009         (arm_linux_hwbp_cap): New static variable.
8010         (arm_linux_get_hwbp_cap): Replace by ...
8011         (arm_linux_init_hwbp_cap): ... this new function.
8012         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8013         (arm_linux_get_hw_watchpoint_count): Likewise.
8014         (arm_linux_get_hw_watchpoint_max_length): Likewise.
8015         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8016         (arm_prepare_to_resume): Use perror_with_name instead of error.
8017
8018 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
8019
8020         * linux-arm-low.c: Include <signal.h>.
8021         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8022         (struct arm_linux_hwbp_cap): New data type.
8023         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8024         (struct arm_linux_hw_breakpoint): New data type.
8025         (MAX_BPTS, MAX_WPTS): Define.
8026         (struct arch_process_info, struct arch_lwp_info): New data types.
8027         (arm_linux_get_hwbp_cap): New function.
8028         (arm_linux_get_hw_breakpoint_count): Likewise.
8029         (arm_linux_get_hw_watchpoint_count): Likewise.
8030         (arm_linux_get_hw_watchpoint_max_length): Likewise.
8031         (arm_hwbp_control_initialize): Likewise.
8032         (arm_hwbp_control_is_enabled): Likewise.
8033         (arm_hwbp_control_is_initialized): Likewise.
8034         (arm_hwbp_control_disable): Likewise.
8035         (arm_linux_hw_breakpoint_equal): Likewise.
8036         (arm_linux_hw_point_initialize): Likewise.
8037         (struct update_registers_data): New data structure.
8038         (update_registers_callback: New function.
8039         (arm_insert_point): Likewise.
8040         (arm_remove_point): Likewise.
8041         (arm_stopped_by_watchpoint): Likewise.
8042         (arm_stopped_data_address): Likewise.
8043         (arm_new_process): Likewise.
8044         (arm_new_thread): Likewise.
8045         (arm_prepare_to_resume): Likewise.
8046         (the_low_target): Register arm_insert_point, arm_remove_point,
8047         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8048         arm_new_thread, and arm_prepare_to_resume.
8049
8050 2011-09-15  Stan Shebs  <stan@codesourcery.com>
8051
8052         * server.h (struct emit_ops): Add compare-goto fields.
8053         * tracepoint.c (gdb_agent_op_sizes): New table.
8054         (emit_eq_goto): New function.
8055         (emit_ne_goto): New function.
8056         (emit_lt_goto): New function.
8057         (emit_le_goto): New function.
8058         (emit_gt_goto): New function.
8059         (emit_ge_goto): New function.
8060         (is_goto_target): New function.
8061         (compile_bytecodes): Recognize special cases of compare-goto
8062         combinations and call specialized emitters for them.
8063         * linux-x86-low.c (amd64_emit_eq_goto): New function.
8064         (amd64_emit_ne_goto): New function.
8065         (amd64_emit_lt_goto): New function.
8066         (amd64_emit_le_goto): New function.
8067         (amd64_emit_gt_goto): New function.
8068         (amd64_emit_ge_goto): New function.
8069         (amd64_emit_ops): Add the new functions.
8070         (i386_emit_eq_goto): New function.
8071         (i386_emit_ne_goto): New function.
8072         (i386_emit_lt_goto): New function.
8073         (i386_emit_le_goto): New function.
8074         (i386_emit_gt_goto): New function.
8075         (i386_emit_ge_goto): New function.
8076         (i386_emit_ops): Add the new functions.
8077
8078 2011-09-08  Stan Shebs  <stan@codesourcery.com>
8079
8080         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8081         (i386_emit_epilogue): Restore %ebx.
8082
8083 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
8084
8085         * server.c (step_thread): Remove definition.
8086         (process_serial_event): Don't handle Hs.
8087         * server.h (step_thread): Remove declaration.
8088         * target.c (set_desired_inferior): Remove use of step_thread.
8089
8090 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
8091
8092         * linux-low.c: Include linux-procfs.h.
8093         (linux_attach_lwp_1): Update comments.
8094         (linux_attach): Scan for existing threads when attaching to a
8095         process that is the tgid.
8096         * Makefile.in: Update dependencies.
8097
8098 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
8099
8100         * configure.srv: Add linux-procfs.o dependencies.
8101
8102 2011-08-14  Yao Qi  <yao@codesourcery.com>
8103
8104         * target.h (struct target_ops): Fix indent.
8105         * win32-low.c (win32_target_ops): Fix comment.
8106
8107 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
8108             Yao Qi  <yao@codesourcery.com>
8109
8110         * Makefile.in (clean): Remove tic6x-*.c files.
8111         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8112         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8113         (tic6x-c64xp-linux.c): Likewise.
8114         * configure.srv: Add support for tic6x-*-uclinux.
8115         * linux-tic6x-low.c: New.
8116         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8117
8118 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
8119             Yao Qi  <yao@codesourcery.com>
8120
8121         * target.h (struct target_ops): Add read_loadmap.
8122         * linux-low.c (struct target_loadseg): New type.
8123         (struct target_loadmap): New type.
8124         (linux_read_loadmap): New function.
8125         (linux_target_ops): Add linux_read_loadmap.
8126         * server.c (handle_query): Support qXfer:fdpic:read packet.
8127         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8128         to NULL.
8129
8130 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
8131
8132         * win32-low.c: Include <stdint.h>.
8133
8134 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
8135
8136         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8137         to the inferior here.
8138         (i386_remove_aligned_watchpoint): Ditto.
8139         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8140         fit part of the watchpoint in the debug registers.
8141         (i386_update_inferior_debug_regs): New.
8142         (i386_low_insert_watchpoint): Work on a local mirror of the debug
8143         registers, and only update the inferior on success.
8144         (i386_low_remove_watchpoint): Ditto.
8145
8146 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
8147
8148         * linux-low.c (compare_ints, unique, list_threads, show_process,
8149         linux_core_of_thread): Delete.
8150         (linux_target_ops): Change linux_core_of_thread to
8151         linux_common_core_of_thread.
8152         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8153         * utils.c (malloc_failure): Change type of argument.
8154         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8155         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8156         common/linux-osdata.c, common/ptid.c and common/buffer.c.
8157         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8158         (IPA_OBJS): Add common-utils-ipa.o.
8159         (ptid_h, linux_osdata_h): New macros.
8160         (server_h): Add common/common-utils.h, common/xml-utils.h,
8161         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8162         common/ptid.h.
8163         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8164         ptid.o, buffer.o): New rules.
8165         (linux-low.o): Add common/linux-osdata.h as a dependency.
8166         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8167         * configure.ac: Add AC_HEADER_DIRENT check.
8168         * config.in: Regenerate.
8169         * configure: Regenerate.
8170         * remote-utils.c (xml_escape_text): Delete.
8171         (buffer_grow, buffer_free, buffer_init, buffer_finish,
8172         buffer_xml_printf): Move to common/buffer.c.
8173         * server.c (main): Remove call to initialize_inferiors.
8174         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8175         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8176         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8177         internal_error, gdb_assert, gdb_assert_fail): Delete.
8178         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8179         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8180         common/buffer.h.
8181         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8182         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8183         initialize_inferiors): Delete.
8184
8185 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
8186
8187         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8188         symbol error.
8189
8190 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
8191
8192         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8193         assertion.
8194         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8195
8196 2011-05-26  Yao Qi  <yao@codesourcery.com>
8197
8198         * Makefile.in (thread-db.o): Track dependence to
8199         common/gdb_thread_db.h.
8200         * thread-db.c: include gdb_thread_db.h from right place.
8201
8202 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
8203
8204         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8205         __FILE__ and __LINE__ to internal_error.
8206
8207 2011-05-13  Doug Evans  <dje@google.com>
8208
8209         * thread-db.c (try_thread_db_load_from_sdir): New function.
8210         (try_thread_db_load_from_dir): New function.
8211         (thread_db_load_search): Handle $sdir, ignore $pdir.
8212         Remove trying of system directories if search of
8213         libthread-db-search-path fails, that is now done via $sdir.
8214
8215 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
8216
8217         * server.c (handle_query): Add EnableDisableTracepoints to the list
8218         of supported features.
8219         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
8220         tracepoints.
8221         (cmd_qtenable_disable): New.
8222         (cmd_qtstart): Install tracepoints even if disabled.
8223         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8224         receiving a QTEnable or QTDisable packet.
8225         (gdb_collect): Skip data collection if fast tracepoint is disabled.
8226         (ust_marker_to_static_tracepoint): Do not ignore disabled static
8227         tracepoints.
8228         (gdb_probe): Skip data collection if static tracepoint is disabled.
8229
8230 2011-05-10  Doug Evans  <dje@google.com>
8231
8232         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8233
8234 2011-05-04  Doug Evans  <dje@google.com>
8235
8236         * linux-low.c (linux_join): Skip process lookup.
8237         * spu-low.c (spu_join): Ditto.
8238         * server.c (join_inferiors_callback): Delete.
8239         (process_serial_event): For 'D' packet (detach) call join_inferior
8240         directly.
8241
8242 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
8243
8244         * README: Don't mention xscale*-*-linux*.
8245         * configure.srv (xscale*-*-linux*): Don't handle target.
8246
8247 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
8248
8249         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8250         casting pointers.
8251         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8252         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8253         (i386_emit_void_call_2): Likewise.
8254
8255 2011-04-26  Yao Qi  <yao@codesourcery.com>
8256
8257         * linux-low.c: Move common macros to linux-ptrace.h.
8258         Include linux-ptrace.h.
8259         * Makefile.in (linux_ptrace_h): New.
8260         (linux-low.o): Depends on linux-ptrace.h.
8261
8262 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8263
8264         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8265         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
8266         (remote_prepare): New function with most of the TCP code from ...
8267         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
8268         setting transport_is_reliable.
8269         * server.c (run_once): New variable.
8270         (gdbserver_usage): Document it.
8271         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
8272         the first run if RUN_ONCE.
8273         * server.h (run_once, remote_prepare): New declarations.
8274
8275 2011-04-19  Tom Tromey  <tromey@redhat.com>
8276
8277         * win32-low.c (handle_load_dll): Remove duplicate "the".
8278
8279 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
8280
8281         Remove support for old Cygwin 1.5 versions.
8282         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8283         function to avoid warning.
8284         (win32_add_one_solib): Use cygwin_conv_path function to avoid
8285         warning.
8286
8287 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
8288
8289         * gdbserver/server.h (Macro _): Define it if not available.
8290
8291 2011-03-14  Michael Snyder  <msnyder@vmware.com>
8292
8293         * hostio.c (handle_close): Remove unnecessary null test.
8294
8295 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
8296
8297         * Makefile.in (maintainer-clean realclean distclean): Remove
8298         "make ...  subdir_do" command.
8299
8300 2011-03-10  Michael Snyder  <msnyder@vmware.com>
8301
8302         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8303
8304         * server.c (handle_v_run): Free alloced buffer on early return.
8305
8306 2011-03-09  Yao Qi  <yao@codesourcery.com>
8307
8308         Revert:
8309         2011-03-04  Yao Qi  <yao@codesourcery.com>
8310
8311         * Makefile.in: Remove GNU make feature --directory.
8312
8313         2011-03-05  Yao Qi  <yao@codesourcery.com>
8314
8315         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8316         (subdir_do): New make target.  Copied from gdb/Makefile.
8317         (maintainer-clean, realclean, distclean, clean): Call corresponding
8318         make targets in common/Makefile.
8319
8320         2011-02-11  Yao Qi  <yao@codesourcery.com>
8321
8322         * configure.ac: Call AC_PROG_RANLIB.
8323         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
8324         * configure: Regenerate.
8325
8326 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
8327
8328         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8329
8330 2011-03-06  Yao Qi  <yao@codesourcery.com>
8331
8332         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8333
8334 2011-03-05  Yao Qi  <yao@codesourcery.com>
8335
8336         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8337         (subdir_do): New make target.  Copied from gdb/Makefile.
8338         (maintainer-clean, realclean, distclean, clean): Call corresponding
8339         make targets in common/Makefile.
8340
8341 2011-03-04  Yao Qi  <yao@codesourcery.com>
8342
8343         * Makefile.in: Remove GNU make feature --directory.
8344
8345 2011-03-04  Michael Snyder  <msnyder@vmware.com>
8346
8347         * server.c (queue_stop_reply): Call xmalloc not malloc.
8348
8349 2011-03-02  Michael Snyder  <msnyder@vmware.com>
8350
8351         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8352
8353 2011-02-28  Michael Snyder  <msnyder@vmware.com>
8354
8355         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8356         (cmd_qtframe): Ditto.
8357         (cmd_qtbuffer): Ditto.
8358         (cmd_bigqtbuffer): Ditto.
8359
8360         * utils.c (decimal2str): Initialize 'width' to nine, then
8361         don't mess with it.
8362
8363 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
8364
8365         * hostio.c (require_data): Free *data, not data.
8366
8367 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8368
8369         * hostio.c (require_data): Use free, not xfree.
8370
8371 2011-02-27  Michael Snyder  <msnyder@vmware.com>
8372
8373         * server.c (handle_query): Discard unused value.
8374
8375         * hostio.c (require_data): Free malloc memory before returning
8376         error.
8377
8378 2011-02-26  Michael Snyder  <msnyder@vmware.com>
8379
8380         * linux-low.c (list_threads): Call closedir for dirent.
8381
8382 2011-02-27  Michael Snyder  <msnyder@vmware.com>
8383
8384         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8385         a case statement falls through.
8386
8387         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8388
8389         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8390         in comparison.
8391
8392 2011-02-26  Michael Snyder  <msnyder@vmware.com>
8393
8394         * utils.c (decimal2str): Eliminate dead code and dead param.
8395         (pulongest): Drop dead param from call to decimal2str.
8396         (plongest): Ditto.
8397
8398 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
8399
8400         Revert the following patch (not approved yet):
8401         2011-02-21  Hui Zhu  <teawater@gmail.com>
8402         * tracepoint.c (tp_printf): New function.
8403         (eval_agent_expr): Handle gdb_agent_op_printf.
8404
8405 2011-02-21  Hui Zhu  <teawater@gmail.com>
8406
8407         * tracepoint.c (tp_printf): New function.
8408         (eval_agent_expr): Handle gdb_agent_op_printf.
8409
8410 2011-02-18  Tom Tromey  <tromey@redhat.com>
8411
8412         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8413         (tracepoint.o): Likewise.
8414         * tracepoint.c (enum gdb_agent_op): Use ax.def.
8415         (gdb_agent_op_names): Likewise.
8416
8417 2011-02-18  Tom Tromey  <tromey@redhat.com>
8418
8419         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8420         gdb_agent_op_rot>: New constants.
8421         (gdb_agent_op_names): Add pick and roll.
8422         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8423         cases.
8424
8425 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
8426
8427         * aclocal.m4: Regenerated with aclocal-1.11.1.
8428
8429 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
8430
8431         * server.c (handle_qxfer_traceframe_info): New.
8432         (qxfer_packets): Register "traceframe-info".
8433         (handle_query): Report support for qXfer:traceframe-info:read+.
8434         * tracepoint.c (match_blocktype): New.
8435         (traceframe_find_block_type): Rename to ...
8436         (traceframe_walk_blocks): ... this.  Add callback filter argument,
8437         and use it.
8438         (traceframe_find_block_type): New, reimplemented on top of
8439         traceframe_walk_blocks.
8440         (build_traceframe_info_xml): New.
8441         (traceframe_read_info): New.
8442         * server.h (traceframe_read_info): Declare.
8443
8444 2011-02-11  Yao Qi  <yao@codesourcery.com>
8445
8446         * configure.ac: Call AC_PROG_RANLIB.
8447         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
8448         * configure: Regenerate.
8449
8450 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
8451
8452         * server.c (gdb_read_memory): Change return semantics to allow
8453         partial transfers.
8454         (handle_search_memory_1): Adjust.
8455         (process_serial_event) <'m' packet>: Handle partial transfers.
8456         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8457
8458 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
8459
8460         * regcache.c (init_register_cache): Initialize
8461         regcache->register_status.
8462         (free_register_cache): Release regcache->register_status.
8463         (regcache_cpy): Copy register_status.
8464         (registers_to_string): Print 'x's for unavailable registers.
8465         (supply_register): Mark the register's status valid or
8466         unavailable, depending on whether a buffer was passed in or not.
8467         (supply_register_zeroed): New.
8468         (supply_regblock): Mark the registers' status valid or
8469         unavailable, depending on whether a buffer was passed in or not.
8470         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8471         (struct regcache): New `register_status' field.
8472         (supply_register_zeroed): Declare.
8473         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8474         supply_register_zeroed, rather than passing a NULL buffer to
8475         supply_register.
8476         * tracepoint.c (fetch_traceframe_registers): Update comment.
8477
8478 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
8479
8480         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8481         buffer explicit.
8482
8483 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
8484
8485         * server.h (decode_xfer_write): Change prototype.
8486         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8487         and don't extract the annex here.
8488         * server.c (decode_xfer_read): Remove `annex' parameter,
8489         and don't extract the annex here.
8490         (decode_xfer): New.
8491         (struct qxfer): New.
8492         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8493         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8494         (handle_qxfer_statictrace): New functions, abstracted out from
8495         handle_query, and made to use the struct qxfer interface.
8496         (handle_threads_qxfer_proper): Rename to ...
8497         (handle_qxfer_threads_proper): ... this.
8498         (handle_threads_qxfer): Rename to ...
8499         (handle_qxfer_threads): ... this.  Adjust.
8500         (qxfer_packets): New array.
8501         (handle_qxfer): New function.
8502         (handle_query): Use handle_qxfer.
8503
8504 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
8505
8506         * gdbreplay.c: Shorten lines of >= 80 columns.
8507         * linux-low.c: Ditto.
8508         * linux-ppc-low.c: Ditto.
8509         * linux-s390-low.c: Ditto.
8510         * linux-sparc-low.c: Ditto.
8511         * linux-x86-low.c: Ditto.
8512         * linux-xtensa-low.c: Ditto.
8513         * mem-break.c: Ditto.
8514         * nto-low.c: Ditto.
8515         * regcache.h: Ditto.
8516         * remote-utils.c: Ditto.
8517         * server.c: Ditto.
8518         * server.h: Ditto.
8519         * thread-db.c: Ditto.
8520         * tracepoint.c: Ditto.
8521         * utils.c: Ditto.
8522         * win32-low.h: Ditto.
8523
8524 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
8525
8526         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8527         update.
8528
8529 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
8530
8531         * server.c (gdbserver_version): Update copyright year in version
8532         output.
8533         * gdbreplay.c (gdbreplay_version): Ditto.
8534
8535 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
8536
8537         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8538         * linux-bfin-low.c: New file.
8539         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8540         PT_DATA_ADDR for BFIN targets.
8541         * Makefile.in (SFILES): Add linux-bfin-low.c.
8542         (clean): Remove reg-bfin.c.
8543         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8544         * README: Mention supported Blackfin targets.
8545
8546 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
8547
8548         * .gitignore: New file.
8549
8550 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
8551
8552         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8553
8554 2010-10-22  Jie Zhang  <jie@codesourcery.com>
8555
8556         * Makefile.in: Add FLAGS_TO_PASS variable.
8557         (install): Remove dependency of install-only and recursively
8558         invoke make for install-only.
8559
8560 2010-10-04  Doug Evans  <dje@google.com>
8561
8562         * Makefile.in (uninstall): Use $(DESTDIR).
8563
8564 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
8565
8566         PR gdb/11842
8567
8568         * linux-x86-low.c (compat_siginfo_from_siginfo)
8569         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8570         si_code is < 0.  Check for si_code == SI_TIMER before checking for
8571         si_code < 0.
8572
8573 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
8574
8575         * lynx-i386-low.c: New file.
8576         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8577
8578 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
8579
8580         * lynx-low.c (ptrace_request_to_str): Remove handling for
8581         request values that have been removed in LynxOS 5.x.
8582
8583 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
8584
8585         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8586         <ptrace.h>
8587
8588 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
8589
8590         * configure.ac: Add --enable-inprocess-agent option.
8591         * configure: Rebuilt.
8592
8593 2010-09-06  Yao Qi  <yao@codesourcery.com>
8594
8595         * linux-low.c (linux_kill): Remove unused variable.
8596         (linux_stabilize_threads): Likewise.
8597         * server.c (start_inferior): Likewise.
8598         (queue_stop_reply_callback): Likewise.
8599         * tracepoint.c (do_action_at_tracepoint): Likewise.
8600
8601 2010-09-06  Yao Qi  <yao@codesourcery.com>
8602
8603         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8604         on return.
8605
8606 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
8607
8608         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8609
8610 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
8611
8612         * Makefile.in (install-only): Replace $IPA_DEPFILES with
8613         "$(IPA_DEPFILES)".
8614
8615 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8616
8617         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8618         gdbserver/lynx-ppc-low.c: New files.
8619         * Makefile.in (lynx_low_h): New variable.
8620         (lynx-low.o, lynx-ppc-low.o): New rules.
8621         * configure.ac: On LynxOS, link with -lnetinet.
8622         * configure.srv: Add handling of powerpc-*-lynxos* targets.
8623         * configure: regenerate.
8624
8625 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8626
8627         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8628         * configure.ac: Add check for vasprintf and vsnprintf.
8629         * configure, config.in: Regenerate.
8630         * server.h (vasprintf, vsnprintf): Add conditional declarations.
8631
8632 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8633
8634         * gdbreplay.c: Move include of alloca.h up, next to include of
8635         malloc.h.
8636         * server.h: Add include of malloc.h.
8637         * mem-break.c: Remove include of malloc.h.
8638         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8639
8640 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8641
8642         * Makefile.in (memmem.o): Build with -Wno-error.
8643
8644 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8645
8646         * utils.c (xsnprintf): Make non-static.
8647         * server.h: Add xsnprintf declaration.
8648         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8649         replace calls to snprintf by calls to xsnprintf throughout.
8650
8651 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8652
8653         * configure.ac: Add configure check for alloca.
8654         * configure, config.in: Regenerate.
8655         * server.h: Include alloca.h if it exists.
8656         * gdbreplay.c: Include alloca.h if it exists.
8657
8658 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
8659
8660         * linux-low.c (__SIGRTMIN): Define if not already defined.
8661         (linux_create_inferior): Check for __ANDROID__ rather than
8662         __SIGRTMIN.
8663         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8664         are already deferred.
8665         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8666         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8667         stopped and already has a pending signal to report.
8668         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8669         a pending signal to report or is moving out of a jump pad.
8670         (linux_init_signals): Check for __ANDROID__ rather than
8671         __SIGRTMIN.
8672
8673 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
8674
8675         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8676         debug_threads check.  Avoid a linear search when not doing debug
8677         output.
8678
8679 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
8680
8681         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8682         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8683         (struct file_handler) <fd>: Change type to gdb_fildes_t.
8684         (process_event): Change local fd's type to gdb_fildes_t.
8685         (create_file_handler): Adjust prototype.
8686         (delete_file_handler): Adjust prototype.
8687         (handle_file_event): Adjust prototype.  Use pfildes.
8688         (create_file_event): Adjsut prototype.
8689         * remote-utils.c (remote_desc, listen_desc): Change type to
8690         gdb_fildes_t.
8691         * server.h: New gdb_fildes_t typedef.
8692         [USE_WIN32API]: Include winsock2.h.
8693         (delete_file_handler, add_file_handler): Adjust prototypes.
8694         (pfildes): Declare.
8695         * utils.c (pfildes): New.
8696
8697 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
8698
8699         * configure.ac (build_warnings): Add -Wno-char-subscripts.
8700         * configure: Regenerate.
8701
8702 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
8703
8704         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8705         (linux_done_accessing_memory): ... this.
8706         (linux_target_ops): Adjust.
8707         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8708         * nto-low.c (nto_target_ops): Adjust comment.
8709         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8710         * spu-low.c (spu_target_ops): Adjust comment.
8711         * target.h (target_ops): Rename unprepare_to_access_memory field
8712         to done_accessing_memory.
8713         (unprepare_to_access_memory): Rename to ...
8714         (done_accessing_memory): ... this.
8715
8716 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8717
8718         * linux-low.c (linux_prepare_to_access_memory): New.
8719         (linux_unprepare_to_access_memory): New.
8720         (linux_target_ops): Install them.
8721         * server.c (read_memory): Rename to ...
8722         (gdb_read_memory): ... this.  Use
8723         prepare_to_access_memory/prepare_to_access_memory.
8724         (write_memory): Rename to ...
8725         (gdb_write_memory): ... this.  Use
8726         prepare_to_access_memory/prepare_to_access_memory.
8727         (handle_search_memory_1): Adjust.
8728         (process_serial_event): Adjust.
8729         * target.h (struct target_ops): New fields
8730         prepare_to_access_memory and unprepare_to_access_memory.
8731         (prepare_to_access_memory, unprepare_to_access_memory): New.
8732         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8733         prepare_to_access_memory/prepare_to_access_memory.
8734         * nto-low.c (nto_target_ops): Adjust.
8735         * spu-low.c (spu_target_ops): Adjust.
8736         * win32-low.c (win32_target_ops): Adjust.
8737
8738 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8739
8740         * Makefile.in (WARN_CFLAGS): Get it from configure.
8741         (WERROR_CFLAGS): New.
8742         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8743         * configure.ac: Introduce --enable-werror, which adds -Werror to
8744         the compiler command line.  Enabled by default.  Disable with
8745         --disable-werror.  Add -Wdeclaration-after-statement
8746         Wpointer-arith and -Wformat-nonliteral to warning flags.
8747         * configure: Regenerate.
8748
8749 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8750
8751         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8752
8753 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8754
8755         * gdbreplay.c (remote_error): New.
8756         (gdbchar): New.
8757         (expect): Use gdbchar.  Check for error reading from GDB.
8758         Clarify sync error output.
8759         (play): Check for errors writing to GDB.
8760         * linux-low.c (sigchld_handler): Really ignore `write' errors.
8761         * remote-utils.c (getpkt): Check for errors writing to the remote
8762         descriptor.
8763
8764 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8765
8766         * linux-low.c (linux_wait_1): Move non-debugging code out of
8767         `debug_threads' control.
8768
8769 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8770
8771         * linux-low.c (linux_wait_1): Don't set last_status here.
8772         * server.c (push_event, queue_stop_reply_callback): Assert we're
8773         not pushing a TARGET_WAITKIND_IGNORE event.
8774         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8775         (myresume, handle_target_event): Set the thread's last_resume_kind
8776         and last_status from the target returned status.
8777
8778 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8779
8780         PR threads/10729
8781
8782         * linux-x86-low.c (update_debug_registers_callback): New.
8783         (i386_dr_low_set_addr): Use it.
8784         (i386_dr_low_get_addr): New.
8785         (i386_dr_low_set_control): Use update_debug_registers_callback.
8786         (i386_dr_low_get_control): New.
8787         (i386_dr_low_get_status): Adjust.
8788         * linux-low.c (linux_stop_lwp): New.
8789         * linux-low.h (linux_stop_lwp): Declare.
8790
8791         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8792         argument instead of a i386_debug_reg_state.
8793         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8794         a i386_debug_reg_state.
8795         (i386_insert_aligned_watchpoint): Adjust.
8796         (i386_remove_aligned_watchpoint): Adjust.
8797         (i386_low_stopped_data_address): Read the debug registers from the
8798         inferior instead of from the mirrors.
8799         * i386-low.h (struct i386_debug_reg_state): Extend comment.
8800         (i386_dr_low_get_addr): Declare.
8801         (i386_dr_low_get_control): Declare.
8802         (i386_dr_low_get_status): Change prototype.
8803
8804         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8805         (i386_dr_low_get_addr): New.
8806         (i386_dr_low_get_control): New.
8807         (i386_dr_low_get_status): Adjust prototype.  Return
8808         dr_status_mirror.
8809         (i386_initial_stuff): Clear dr_status_mirror and
8810         dr_control_mirror.
8811         (i386_get_thread_context): Adjust.
8812         (i386_set_thread_context): Adjust.
8813         (i386_thread_added): Adjust.
8814
8815 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
8816
8817         * linux-low.h (linux_thread_area): Delete declaration.
8818
8819 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
8820
8821         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8822         after its termination.
8823
8824 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
8825
8826         * linux-low.c (gdb_wants_lwp_stopped): Delete.
8827         (gdb_wants_all_stopped): Delete.
8828         (linux_wait_1): Don't call them.
8829         * server.c (handle_v_cont): Tag all threads as want-stopped.
8830         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
8831         stopped as "client-wants-stopped".
8832
8833 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
8834
8835         * Makefile.in (signals_h): New.
8836         (server_h): Depend on it.
8837         (server.o): Don't depend on $(signals_def).
8838         (signals.o): Depend on $(signals_def).
8839
8840 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
8841
8842         * Makefile.in (signals_def): New.
8843         (server_h): Append include/gdb/signals.h and signals_def.
8844         (server.o): Append signals_def.
8845
8846 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
8847
8848         * server.c (handle_target_event): Use target_signal_to_host for
8849         resume_info.sig initialization.
8850         * target.h (struct thread_resume) <sig>: New comment.
8851
8852 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
8853
8854         * server.c (handle_query): strcpy() the returned string from paddress()
8855         instead of sprintf().
8856         * utils.c (paddress): Return phex_nz().
8857
8858 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
8859
8860         * server.c (handle_v_cont): Call mourn_inferior if process
8861         just exited.
8862         (myresume): Likewise.
8863
8864 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
8865
8866         Static tracepoints, and integration with UST.
8867
8868         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
8869         * mem-break.c (uninsert_all_breakpoints)
8870         (reinsert_all_breakpoints): New.
8871         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8872         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8873         (gdb_agent_ust_loaded, helper_thread_id)
8874         (gdb_agent_helper_thread_id): New macros.
8875         (struct ipa_sym_addresses): Add addr_ust_loaded,
8876         addr_helper_thread_id, addr_cmd_buf.
8877         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8878         (in_process_agent_loaded_ust): New.
8879         (write_e_ust_not_loaded): New.
8880         (maybe_write_ipa_ust_not_loaded): New.
8881         (struct collect_static_trace_data_action): New.
8882         (enum tracepoint_type) <static_tracepoint>: New.
8883         (struct tracepoint) <handle>: Mention static tracepoints.
8884         (struct static_tracepoint_ctx): New.
8885         (CMD_BUF_SIZE): New.
8886         (add_tracepoint_action): Handle static tracepoint actions.
8887         (unprobe_marker_at): New.
8888         (clear_installed_tracepoints): Handle static tracepoints.
8889         (cmd_qtdp): Handle static tracepoints.
8890         (probe_marker_at): New.
8891         (cmd_qtstart): Handle static tracepoints.
8892         (response_tracepoint): Handle static tracepoints.
8893         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8894         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8895         (get_context_regcache): Handle static tracepoints.
8896         (do_action_at_tracepoint): Handle static tracepoint actions.
8897         (traceframe_find_block_type): Handle static trace data blocks.
8898         (traceframe_read_sdata): New.
8899         (download_tracepoints): Download static tracepoint actions.
8900         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8901         (GDB_PROBE_NAME): New.
8902         (ust_ops): New.
8903         (GET_UST_SYM): New.
8904         (USTF): New.
8905         (dlsym_ust): New.
8906         (ust_marker_to_static_tracepoint): New.
8907         (gdb_probe): New.
8908         (collect_ust_data_at_tracepoint): New.
8909         (gdb_ust_probe): New.
8910         (UNIX_PATH_MAX, SOCK_DIR): New.
8911         (gdb_ust_connect_sync_socket): New.
8912         (resume_thread, stop_thread): New.
8913         (run_inferior_command): New.
8914         (init_named_socket): New.
8915         (gdb_ust_socket_init): New.
8916         (cstr_to_hexstr): New.
8917         (next_st): New.
8918         (first_marker, next_marker): New.
8919         (response_ust_marker): New.
8920         (cmd_qtfstm, cmd_qtsstm): New.
8921         (unprobe_marker_at, probe_marker_at): New.
8922         (cmd_qtstmat, gdb_ust_thread): New.
8923         (gdb_ust_init): New.
8924         (initialize_tracepoint_ftlib): Call gdb_ust_init.
8925         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8926         (ST_REGENTRY): New.
8927         (x86_64_st_collect_regmap): New.
8928         (X86_64_NUM_ST_COLLECT_GREGS): New.
8929         (AMD64_RIP_REGNUM): New.
8930         (supply_static_tracepoint_registers): New.
8931         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8932         (ST_REGENTRY): New.
8933         (i386_st_collect_regmap): New.
8934         (i386_NUM_ST_COLLECT_GREGS): New.
8935         (supply_static_tracepoint_registers): New.
8936         * server.c (handle_query): Handle qXfer:statictrace:read.
8937         <qSupported>: Report support for StaticTracepoints, and
8938         qXfer:statictrace:read features.
8939         * server.h (traceframe_read_sdata)
8940         (supply_static_tracepoint_registers): Declare.
8941         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8942         (unpack_varlen_hex): Include in IPA build.
8943         * Makefile.in (ustlibs, ustinc): New.
8944         (IPA_OBJS): Add remote-utils-ipa.o.
8945         ($(IPA_LIB)): Link -ldl and -lpthread.
8946         (UST_CFLAGS): New.
8947         (IPAGENT_CFLAGS): Add UST_CFLAGS.
8948         * config.in, configure: Regenerate.
8949
8950 2010-06-20  Ian Lance Taylor  <iant@google.com>
8951             Pedro Alves  <pedro@codesourcery.com>
8952
8953         * linux-x86-low.c (always_true): Delete.
8954         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8955         trying to fool the compiler with always_true.
8956
8957 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
8958
8959         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8960         conditions in gdbserver.
8961
8962 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
8963
8964         * spu-low.c (spu_read_memory): Wrap around local store limit.
8965         (spu_write_memory): Likewise.
8966
8967 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
8968
8969         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8970         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8971         LONGEST uses.
8972         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8973         uses.
8974         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8975         uses with LONGEST uses.
8976
8977 2010-06-14  Stan Shebs  <stan@codesourcery.com>
8978             Pedro Alves  <pedro@codesourcery.com>
8979
8980         Bytecode compiler.
8981
8982         * linux-x86-low.c: Include limits.h.
8983         (add_insns): New.
8984         (always_true): New.
8985         (EMIT_ASM): New.
8986         (EMIT_ASM32): New.
8987         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8988         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8989         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8990         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8991         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8992         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8993         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8994         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8995         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8996         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8997         (amd64_emit_void_call_2): New.
8998         (amd64_emit_ops): New.
8999         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9000         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9001         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9002         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9003         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9004         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9005         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9006         (i386_emit_call, i386_emit_reg, i386_emit_pop)
9007         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9008         (i386_emit_stack_adjust, i386_emit_int_call_1)
9009         (i386_emit_void_call_2): New.
9010         (i386_emit_ops): New.
9011         (x86_emit_ops): New.
9012         (the_low_target): Install x86_emit_ops.
9013         * server.h (struct emit_ops): New.
9014         (get_raw_reg_func_addr): Declare.
9015         (current_insn_ptr, emit_error): Declare.
9016         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9017         (set_trace_state_variable_value): New defines.
9018         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9019         addr_get_trace_state_variable_value and
9020         addr_set_trace_state_variable_value.
9021         (symbol_list): New fields for get_raw_reg,
9022         get_trace_state_variable_value and set_trace_state_variable_value.
9023         (condfn): New typedef.
9024         (struct tracepoint): New field `compiled_cond'.
9025         (do_action_at_tracepoint): Clear compiled_cond.
9026         (get_trace_state_variable_value, set_trace_state_variable_value):
9027         Export in the IPA.
9028         (condition_true_at_tracepoint): If there's a compiled condition,
9029         run that.
9030         (current_insn_ptr, emit_error): New globals.
9031         (struct bytecode_address): New.
9032         (get_raw_reg_func_addr): New.
9033         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9034         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9035         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9036         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9037         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9038         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9039         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9040         (compile_tracepoint_condition, compile_bytecodes): New.
9041         * target.h (emit_ops): Forward declare.
9042         (struct target_ops): New field emit_ops.
9043         (target_emit_ops): New.
9044         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9045         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9046         * linux-low.c (linux_emit_ops): New.
9047         (linux_target_ops): Install it.
9048         * linux-low.h (struct linux_target_ops): New field emit_ops.
9049
9050 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
9051
9052         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9053         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9054
9055 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
9056             Stan Shebs  <stan@codesourcery.com>
9057
9058         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9059         (all): Depend on $(extra_libraries).
9060         (install-only): Install the IPA.
9061         (IPA_OBJS, IPA_LIB): New.
9062         (clean): Remove the IPA lib.
9063         (IPAGENT_CFLAGS): New.
9064         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9065         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9066         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9067         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9068         * configure.ac: Check for atomic builtins support in the compiler.
9069         (IPA_DEPFILES, extra_libraries): Define.
9070         * configure.srv (ipa_obj): Add description.
9071         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9072         (i[34567]86-*-linux*): Set ipa_obj.
9073         (x86_64-*-linux*): Set ipa_obj.
9074         * linux-low.c (stabilizing_threads): New.
9075         (supports_fast_tracepoints): New.
9076         (linux_detach): Stabilize threads before detaching.
9077         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
9078         the lwp is either not stabilizing, or is moving out of a jump pad.
9079         (linux_fast_tracepoint_collecting): New.
9080         (maybe_move_out_of_jump_pad): New.
9081         (enqueue_one_deferred_signal): New.
9082         (dequeue_one_deferred_signal): New.
9083         (linux_wait_for_event_1): If moving out of a jump pad, defer
9084         pending signals to later.
9085         (linux_stabilize_threads): New.
9086         (linux_wait_1): Check if threads need moving out of jump pads, and
9087         do it if so.
9088         (stuck_in_jump_pad_callback): New.
9089         (move_out_of_jump_pad_callback): New.
9090         (lwp_running): New.
9091         (linux_resume_one_lwp): Handle moving out of jump pads.
9092         (linux_set_resume_request): Dequeue deferred signals.
9093         (need_step_over_p): Also step over fast tracepoint jumps.
9094         (start_step_over): Also uninsert fast tracepoint jumps.
9095         (finish_step_over): Also reinsert fast tracepoint jumps.
9096         (linux_install_fast_tracepoint_jump): New.
9097         (linux_target_ops): Install linux_stabilize_threads and
9098         linux_install_fast_tracepoint_jump_pad.
9099         * linux-low.h (linux_target_ops) <get_thread_area,
9100         install_fast_tracepoint_jump_pad>: New fields.
9101         (struct lwp_info) <collecting_fast_tracepoint,
9102         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9103         (linux_get_thread_area): Declare.
9104         * linux-x86-low.c (jump_insn): New.
9105         (x86_get_thread_area): New.
9106         (append_insns): New.
9107         (push_opcode): New.
9108         (amd64_install_fast_tracepoint_jump_pad): New.
9109         (i386_install_fast_tracepoint_jump_pad): New.
9110         (x86_install_fast_tracepoint_jump_pad): New.
9111         (the_low_target): Install x86_get_thread_area and
9112         x86_install_fast_tracepoint_jump_pad.
9113         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9114         (struct fast_tracepoint_jump): New.
9115         (fast_tracepoint_jump_insn): New.
9116         (fast_tracepoint_jump_shadow): New.
9117         (find_fast_tracepoint_jump_at): New.
9118         (fast_tracepoint_jump_here): New.
9119         (delete_fast_tracepoint_jump): New.
9120         (set_fast_tracepoint_jump): New.
9121         (uninsert_fast_tracepoint_jumps_at): New.
9122         (reinsert_fast_tracepoint_jumps_at): New.
9123         (set_breakpoint_at): Use write_inferior_memory.
9124         (uninsert_raw_breakpoint): Use write_inferior_memory.
9125         (check_mem_read): Mask out fast tracepoint jumps.
9126         (check_mem_write): Mask out fast tracepoint jumps.
9127         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9128         (set_fast_tracepoint_jump): Declare.
9129         (delete_fast_tracepoint_jump)
9130         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9131         (reinsert_fast_tracepoint_jumps_at): Declare.
9132         * regcache.c: Don't compile many functions when building the
9133         in-process agent library.
9134         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9135         the register buffer in the heap.
9136         (free_register_cache): If the register buffer isn't owned by the
9137         regcache, don't free it.
9138         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9139         pre-existing register caches.
9140         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9141         type.
9142         (convert_ascii_to_int): : Constify `from' parameter type.
9143         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9144         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
9145         the needed buffer in-place.
9146         (relocate_instruction): New.
9147         * server.c (handle_query) <qSymbols>: If the target supports
9148         tracepoints, give it a chance of looking up symbols.  Report
9149         support for fast tracepoints.
9150         (handle_status): Stabilize threads.
9151         (process_serial_event): Adjust.
9152         * server.h (struct fast_tracepoint_jump): Forward declare.
9153         (struct process_info) <fast_tracepoint_jumps>: New field.
9154         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9155         (decode_X_packet, decode_M_packet): Adjust.
9156         (relocate_instruction): Declare.
9157         (in_process_agent_loaded): Declare.
9158         (tracepoint_look_up_symbols): Declare.
9159         (struct fast_tpoint_collect_status): Declare.
9160         (fast_tracepoint_collecting): Declare.
9161         (force_unlock_trace_buffer): Declare.
9162         (handle_tracepoint_bkpts): Declare.
9163         (initialize_low_tracepoint)
9164         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9165         * target.h (struct target_ops) <stabilize_threads,
9166         install_fast_tracepoint_jump_pad>: New fields.
9167         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9168         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9169         [HAVE_STDINT_H]: Include stdint.h.
9170         (trace_debug_1): Rename to ...
9171         (trace_vdebug): ... this.
9172         (trace_debug): Rename to ...
9173         (trace_debug_1): ... this.  Add `level' parameter.
9174         (trace_debug): New.
9175         (ATTR_USED, ATTR_NOINLINE): New.
9176         (IP_AGENT_EXPORT): New.
9177         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9178         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9179         (about_to_request_buffer_space, trace_buffer_is_full)
9180         (stopping_tracepoint, expr_eval_result, error_tracepoint)
9181         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9182         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9183         (traceframe_write_count, traceframes_created)
9184         (trace_state_variables)
9185         New renaming defines.
9186         (struct ipa_sym_addresses): New.
9187         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9188         (symbol_list): New.
9189         (ipa_sym_addrs): New.
9190         (all_tracepoint_symbols_looked_up): New.
9191         (in_process_agent_loaded): New.
9192         (write_e_ipa_not_loaded): New.
9193         (maybe_write_ipa_not_loaded): New.
9194         (tracepoint_look_up_symbols): New.
9195         (debug_threads) [IN_PROCESS_AGENT]: New.
9196         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9197         (UNKNOWN_SIDE_EFFECTS): New.
9198         (stop_tracing): New.
9199         (flush_trace_buffer): New.
9200         (stop_tracing_bkpt): New.
9201         (flush_trace_buffer_bkpt): New.
9202         (read_inferior_integer): New.
9203         (read_inferior_uinteger): New.
9204         (read_inferior_data_pointer): New.
9205         (write_inferior_data_pointer): New.
9206         (write_inferior_integer): New.
9207         (write_inferior_uinteger): New.
9208         (struct collect_static_trace_data_action): Delete.
9209         (enum tracepoint_type): New.
9210         (struct tracepoint) <type>: New field `type'.
9211         <actions_str, step_actions, step_actions_str>: Only include in
9212         GDBserver.
9213         <orig_size, obj_addr_on_target, adjusted_insn_addr>
9214         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9215         (tracepoints): Use IP_AGENT_EXPORT.
9216         (last_tracepoint): Don't include in the IPA.
9217         (stopping_tracepoint): Use IP_AGENT_EXPORT.
9218         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9219         (alloced_trace_state_variables): New.
9220         (trace_state_variables): Use IP_AGENT_EXPORT.
9221         (traceframe_t): Delete unused variable.
9222         (circular_trace_buffer): Don't include in the IPA.
9223         (trace_buffer_start): Delete.
9224         (struct trace_buffer_control): New.
9225         (trace_buffer_free): Delete.
9226         (struct ipa_trace_buffer_control): New.
9227         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9228         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9229         New.
9230         (trace_buffer_ctrl): New.
9231         (TRACE_BUFFER_CTRL_CURR): New.
9232         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9233         Reimplement as macros.
9234         (trace_buffer_wrap): Delete.
9235         (traceframe_write_count, traceframe_read_count)
9236         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9237         (struct tracepoint_hit_ctx) <type>: New field.
9238         (struct fast_tracepoint_ctx): New.
9239         (memory_barrier): New.
9240         (cmpxchg): New.
9241         (record_tracepoint_error): Update atomically in the IPA.
9242         (clear_inferior_trace_buffer): New.
9243         (about_to_request_buffer_space): New.
9244         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9245         updating the same buffer.
9246         (add_tracepoint): Default the tracepoint's type to trap
9247         tracepoint, and orig_size to -1.
9248         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9249         internal variables.
9250         (create_trace_state_variable): New parameter `gdb'.  Handle it.
9251         (clear_installed_tracepoints): Clear fast tracepoint jumps.
9252         (cmd_qtdp): Handle fast tracepoints.
9253         (cmd_qtdv): Adjust.
9254         (max_jump_pad_size): New.
9255         (gdb_jump_pad_head): New.
9256         (get_jump_space_head): New.
9257         (claim_jump_space): New.
9258         (sort_tracepoints): New.
9259         (MAX_JUMP_SIZE): New.
9260         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
9261         IPA.
9262         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9263         support.  Upload fast traceframes, and delete internal IPA
9264         breakpoints.
9265         (stop_tracing_handler): New.
9266         (flush_trace_buffer_handler): New.
9267         (cmd_qtstop): Upload fast tracepoints.
9268         (response_tracepoint): Handle fast tracepoints.
9269         (tracepoint_finished_step): Upload fast traceframes.  Set the
9270         tracepoint hit context's tracepoint type.
9271         (handle_tracepoint_bkpts): New.
9272         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9273         type.  Add comment about fast tracepoints.
9274         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9275         non-existing action_str field.
9276         (get_context_regcache): Handle fast tracepoints.
9277         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9278         to the regcache.
9279         (fast_tracepoint_from_jump_pad_address): New.
9280         (fast_tracepoint_from_ipa_tpoint_address): New.
9281         (collecting_t): New.
9282         (force_unlock_trace_buffer): New.
9283         (fast_tracepoint_collecting): New.
9284         (collecting): New.
9285         (gdb_collect): New.
9286         (write_inferior_data_ptr): New.
9287         (target_tp_heap): New.
9288         (target_malloc): New.
9289         (download_agent_expr): New.
9290         (UALIGN): New.
9291         (download_tracepoints): New.
9292         (download_trace_state_variables): New.
9293         (upload_fast_traceframes): New.
9294         (IPA_FIRST_TRACEFRAME): New.
9295         (IPA_NEXT_TRACEFRAME_1): New.
9296         (IPA_NEXT_TRACEFRAME): New.
9297         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9298         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9299         (gdb_jump_pad_buffer_end): New.
9300         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9301         (initialize_tracepoint): Adjust.
9302         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9303         buffer.  Initialize the low module.
9304         * utils.c (PREFIX, TOOLNAME): New.
9305         (malloc_failure): Use PREFIX.
9306         (error): In the IPA, an error causes an exit.
9307         (fatal, warning): Use PREFIX.
9308         (internal_error): Use TOOLNAME.
9309         (NUMCELLS): Increase to 10.
9310         * configure, config.in: Regenerate.
9311
9312 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
9313
9314         * server.c (handle_query) <qSupported>: Do two passes over the
9315         qSupported string to avoid nesting strtok.
9316
9317 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
9318
9319         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9320         (CDEPS): New.
9321         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
9322         -Wl,--dynamic-list.
9323         * configure: Regenerate.
9324         * proc-service.list: New.
9325
9326 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
9327
9328         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9329         New comment.
9330
9331 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
9332
9333         * gdbreplay.c (remote_open): Check error return from socket() call by
9334         its equality to -1 not by it being negative.
9335         * remote-utils.c (remote_open): Likewise.
9336
9337 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
9338
9339         * config.h: Regenerate.
9340
9341 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
9342
9343         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9344         doesn't provide PTRACE_GET_THREAD_AREA.
9345
9346 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
9347
9348         * linux-m68k-low.c: Include <asm/ptrace.h>
9349         (ps_get_thread_area): Implement.
9350
9351 2010-05-03  Doug Evans  <dje@google.com>
9352
9353         * event-loop.c (struct callback_event): New struct.
9354         (callback_list): New global.
9355         (append_callback_event, delete_callback_event): New functions.
9356         (process_callback): New function.
9357         (start_event_loop): Call it.
9358         * remote-utils.c (NOT_SCHEDULED): Define.
9359         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9360         moved out of readchar.
9361         (readchar): Rewrite.  Call reschedule before returning.
9362         (reset_readchar): New function.
9363         (remote_close): Call it.
9364         (process_remaining, reschedule): New functions.
9365         * server.h (callback_handler_func): New typedef.
9366         (append_callback_event, delete_callback_event): Declare.
9367
9368 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
9369
9370         * proc-service.c (ps_pglobal_lookup): Use
9371         thread_db_look_up_one_symbol.
9372         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9373         parameter.  Use it instead of all_symbols_looked_up.
9374         * server.h (struct process_info) <all_symbols_looked_up>: Delete
9375         field.
9376         (all_symbols_looked_up): Don't declare.
9377         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9378         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9379         field.
9380         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9381         Set all_symbols_looked_up here.
9382         (thread_db_look_up_one_symbol): New.
9383         (thread_db_get_tls_address): Adjust.
9384         (thread_db_load_search, try_thread_db_load_1): Always allocate the
9385         thread_db object on the heap, and tentatively set it in the
9386         process structure.
9387         (thread_db_init): Don't set all_symbols_looked_up here.
9388         * linux-low.h (thread_db_look_up_one_symbol): Declare.
9389
9390 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
9391
9392         * linux-low.c (linux_kill, linux_detach): Adjust.
9393         (status_pending_p_callback): Remove redundant statement.  Check
9394         for !TARGET_WAITIKIND_IGNORE, instead of
9395         TARGET_WAITKIND_STOPPED.
9396         (handle_tracepoints): Make sure LWP is locked.  Adjust.
9397         (linux_wait_for_event_1): Adjust.
9398         (linux_cancel_breakpoints): New.
9399         (unsuspend_one_lwp): New.
9400         (unsuspend_all_lwps): New.
9401         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9402         (send_sigstop_callback): Change return type to int, add new
9403         `except' parameter and handle it.
9404         (suspend_and_send_sigstop_callback): New.
9405         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9406         pass them down.  If SUSPEND, also increment the lwp's suspend
9407         count.
9408         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9409         (need_step_over_p): Don't consider suspended LWPs.
9410         (start_step_over): Adjust.
9411         (proceed_one_lwp): Change return type to int, add new `except'
9412         parameter and handle it.
9413         (unsuspend_and_proceed_one_lwp): New.
9414         (proceed_all_lwps): Use find_inferior instead of
9415         for_each_inferior.
9416         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
9417         also decrement the suspend count of LWPs.  Pass `except' down,
9418         instead of hacking its suspend count.
9419         (linux_pause_all): Add `freeze' parameter.  Adjust.
9420         (linux_unpause_all): New.
9421         (linux_target_ops): Install linux_unpause_all.
9422         * server.c (handle_status): Adjust.
9423         * target.h (struct target_ops): New fields `unpause_all' and
9424         `cancel_breakpoints'.  Add new parameter to `pause_all'.
9425         (pause_all): Add new `freeze' parameter.
9426         (unpause_all): New.
9427         (cancel_breakpoints): New.
9428         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9429         cancel breakpoints.
9430         (cmd_qtstart): Pause threads.
9431         (stop_tracing): Pause threads, and cancel breakpoints.
9432         * win32-low.c (win32_target_ops): Adjust.
9433
9434 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
9435
9436         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9437         the inferior right away from here...
9438         (linux_wait_1): ... to here, and adjust to check the thread's
9439         last_resume_kind instead of the lwp's step or stop_expected flags.
9440
9441 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
9442
9443         * README: Use consistent `GDB' and `GDBserver' spellings.
9444
9445 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
9446
9447         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9448         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
9449         (linux_detach_one_lwp): Assume the lwp is stopped.
9450         (any_thread_of): Delete.
9451         (linux_detach): Stop all lwps here.  Don't blindly delete all
9452         breakpoints.
9453         (delete_lwp_callback): New.
9454         (linux_mourn): Delete all lwps of the process that is gone.
9455         (linux_wait_1): Don't delete the last lwp of the process here.
9456         * mem-break.h (mark_breakpoints_out): Declare.
9457         * mem-break.c (mark_breakpoints_out): New.
9458         (free_all_breakpoints): Use it.
9459         * server.c (handle_target_event): If the process is gone, mark
9460         breakpoints out.
9461         * thread-db.c (struct thread_db) <create_bp>: New field.
9462         (thread_db_enable_reporting): Fix prototype.  Store a thread event
9463         breakpoint reference in the thread_db struct.
9464         (thread_db_load_search): Clear the thread_db object.
9465         (try_thread_db_load_1): Ditto.
9466         (switch_to_process): New.
9467         (disable_thread_event_reporting): Use it.
9468         (remove_thread_event_breakpoints): New.
9469         (thread_db_detach, thread_db_mourn): Use it.
9470
9471 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
9472
9473         * linux-low.c (linux_enable_event_reporting): New.
9474         (linux_wait_for_event_1, handle_extended_wait): Use it.
9475
9476 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
9477
9478         * linux-low.c (linux_kill_one_lwp, linux_kill)
9479         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9480         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
9481         SIGSTOP even if the LWP is stopped.
9482         (send_sigstop_callback): New.
9483         (stop_all_lwps): Use send_sigstop_callback instead.
9484         (linux_resume_one_thread): Adjust.
9485         (proceed_one_lwp): Still proceed an LWP that the client has
9486         requested to stop, if we haven't reported it as stopped yet.  Make
9487         sure that LWPs the client want stopped, have a pending SIGSTOP.
9488
9489 2010-04-26  Doug Evans  <dje@google.com>
9490
9491         * server.c (handle_general_set): Make static.
9492
9493         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9494         Print received char after testing for error/eof instead of before.
9495         (input_interrupt): Tweak comment.
9496
9497 2010-04-23  Doug Evans  <dje@google.com>
9498
9499         * server.c (start_inferior): Print inferior argv if --debug.
9500
9501 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
9502
9503         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9504         * nto-x86-low.c: Include server.h
9505
9506 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
9507
9508         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9509         be consistent with other sources of this directory.
9510         (init_registers_amd64): Correct name of source file of this function
9511         in the comment.
9512
9513 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
9514
9515         * configure.srv (x86_64-*-mingw*): New configuration for Windows
9516         64-bit executables.
9517
9518 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
9519
9520         * win32-i386-low.c: Add 64-bit support.
9521         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9522         (init_registers_amd64): Declare.
9523         (mappings): Add 64-bit version of array.
9524         (init_windows_x86): New function.
9525         (the_low_target): Change init_arch field to init_windows_x86.
9526
9527 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
9528
9529         * win32-low.c: Adapt to support also 64-bit architecture.
9530         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9531         (get_image_name): Use SIZE_T type for local variable `done'.
9532         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9533         (toolhelp_get_dll_name): Idem.
9534         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9535         Use uintptr_t typecast to avoid warning.
9536         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9537         (handle_exception): Use phex_nz to avoid warning.
9538         (win32_wait): Remove unused local variable `process'.
9539
9540 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
9541
9542         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9543         `amd64-avx.o'.
9544
9545 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
9546
9547         * configure.ac: Use `ws2_32' library for srv_mingw.
9548         * configure: Regenerate.
9549         * gdbreplay.c: Include winsock2.h instead of winsock.h.
9550         * remote-utils.c: Likewise.
9551
9552 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
9553
9554         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9555         if __x86_64__ is defined.
9556
9557 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
9558
9559         * configure: Regenerate.
9560
9561 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
9562
9563         * server.c (handle_query): Handle 'qGetTIBAddr' query.
9564         * target.h (target_ops): New get_tib_address field.
9565         * win32-low.h (win32_thread_info): Add thread_local_base field.
9566         * win32-low.c (child_add_thread): Add tlb argument.
9567         Set thread_local_base field to TLB.
9568         (get_child_debug_event): Adapt to child_add_thread change.
9569         (win32_get_tib_address): New function.
9570         (win32_target_ops): Set get_tib_address field to
9571         win32_get_tib_address.
9572         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9573
9574 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
9575
9576         * linux-low.c (linux_mourn): Also remove the process.
9577         * server.c (handle_target_event): Don't remove the process here.
9578         * nto-low.c (nto_mourn): New.
9579         (nto_target_ops): Install it.
9580         * spu-low.c (spu_mourn): New.
9581         (spu_target_ops): Install it.
9582         * win32-low.c (win32_mourn): New.
9583         (win32_target_ops): Install it.
9584
9585 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
9586
9587         * server.h (buffer_xml_printf): Remove redundant `;'.
9588
9589 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
9590
9591         * regcache.c (set_register_cache): Invalidate regcaches before
9592         changing the register cache layout.
9593         (regcache_invalidate_one): Allow a NULL regcache.
9594         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9595         regcaches before changing the register cache layout or the target
9596         regsets.
9597
9598 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
9599
9600         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9601         variable warning on Linux/x86-64.
9602
9603 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
9604
9605         GDBserver disconnected tracing support.
9606
9607         * linux-low.c (linux_remove_process): Delete.
9608         (add_lwp): Don't set last_resume_kind here.
9609         (linux_kill): Use `mourn'.
9610         (linux_detach): Use `thread_db_detach', and `mourn'.
9611         (linux_mourn): New.
9612         (linux_attach_lwp_1): Adjust comment.
9613         (linux_attach): last_resume_kind moved the thread_info; adjust.
9614         (status_pending_p_callback): Adjust.
9615         (linux_wait_for_event_1): Adjust.
9616         (count_events_callback, select_singlestep_lwp_callback)
9617         (select_event_lwp_callback, cancel_breakpoints_callback)
9618         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9619         (proceed_one_lwp): Adjust.
9620         (linux_async): Add debug output.
9621         (linux_thread_stopped): New.
9622         (linux_pause_all): New.
9623         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9624         linux_pause_all.
9625         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9626         (thread_db_free): Delete declaration.
9627         (thread_db_detach, thread_db_mourn): Declare.
9628         * thread-db.c (thread_db_init): Use thread_db_mourn.
9629         (thread_db_free): Delete, split in two.
9630         (disable_thread_event_reporting): New.
9631         (thread_db_detach): New.
9632         (thread_db_mourn): New.
9633
9634         * server.h (struct thread_info) <last_resume_kind>: New field.
9635         <attached>: Add comment.
9636         <gdb_detached>: New field.
9637         (handler_func): Change return type to int.
9638         (handle_serial_event, handle_target_event): Ditto.
9639         (gdb_connected): Declare.
9640         (tracing): Delete.
9641         (disconnected_tracing): Declare.
9642         (stop_tracing): Declare.
9643
9644         * server.c (handle_query) <qSupported>: Report support for
9645         disconnected tracing.
9646         (queue_stop_reply_callback): Account for running threads.
9647         (gdb_wants_thread_stopped): New.
9648         (gdb_wants_all_threads_stopped): New.
9649         (gdb_reattached_process): New.
9650         (handle_status): Clear the `gdb_detached' flag of all processes.
9651         In all-stop, stop all threads.
9652         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
9653         (process_serial_event): If the remote connection breaks, or if an
9654         exit was forced with "monitor exit", force an event loop exit.
9655         Handle disconnected tracing on detach.
9656         (handle_serial_event): Adjust.
9657         (handle_target_event): If GDB isn't connected, forward events back
9658         to the inferior, unless the last process exited, in which case,
9659         exit gdbserver.  Adjust interface.
9660
9661         * remote-utils.c (remote_open): Don't block in accept.  Instead
9662         register an event loop source on the listen socket file
9663         descriptor.  Refactor bits into ...
9664         (listen_desc): ... this new global.
9665         (gdb_connected): ... this new function.
9666         (enable_async_notification): ... this new function.
9667         (handle_accept_event): ... this new function.
9668         (remote_close): Clear remote_desc.
9669
9670         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9671
9672         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9673         New fields.
9674         (mourn_inferior): Define.
9675         (target_process_qsupported): Avoid the dangling else problem.
9676         (thread_stopped): Define.
9677         (pause_all): Define.
9678         (target_waitstatus_to_string): Declare.
9679         * target.c (target_waitstatus_to_string): New.
9680
9681         * tracepoint.c (tracing): Make extern.
9682         (disconnected_tracing): New.
9683         (stop_tracing): Make extern.  Handle tracing stops due to GDB
9684         disconnecting.
9685         (cmd_qtdisconnected): New.
9686         (cmd_qtstatus): Report disconnected tracing status in trace reply.
9687         (handle_tracepoint_general_set): Handle QTDisconnected.
9688
9689         * event-loop.c (event_handler_func): Change return type to int.
9690         (process_event): Bail out if the event handler wants the event
9691         loop to stop.
9692         (handle_file_event): Ditto.
9693         (start_event_loop): Bail out if the event handler wants the event
9694         loop to stop.
9695
9696         * nto-low.c (nto_target_ops): Adjust.
9697         * spu-low.c (spu_wait): Don't remove the process here.
9698         (spu_target_ops): Adjust.
9699         * win32-low.c (win32_wait): Don't remove the process here.
9700         (win32_target_ops): Adjust.
9701
9702 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
9703
9704         * regcache.c (realloc_register_cache): Invalidate inferior's
9705         regcache before recreating it.
9706
9707 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
9708
9709         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9710
9711 2010-04-09  Stan Shebs  <stan@codesourcery.com>
9712             Pedro Alves  <pedro@codesourcery.com>
9713
9714         * server.h (LONGEST): New.
9715         (struct thread_info) <while_stepping>: New field.
9716         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9717         Declare.
9718         (initialize_tracepoint, handle_tracepoint_general_set)
9719         (handle_tracepoint_query, tracepoint_finished_step)
9720         (tracepoint_was_hit, release_while_stepping_state_list):
9721         (current_traceframe): Declare.
9722         * server.c (handle_general_set): Handle tracepoint packets.
9723         (read_memory): New.
9724         (write_memory): New.
9725         (handle_search_memory_1): Use read_memory.
9726         (handle_query): Report support for conditional tracepoints, trace
9727         state variables, and tracepoint sources.  Handle tracepoint
9728         queries.
9729         (main): Initialize the tracepoints module.
9730         (process_serial_event): Handle traceframe reads/writes.
9731
9732         * linux-low.c (handle_tracepoints): New.
9733         (linux_wait_1): Call it.
9734         (linux_resume_one_lwp): Handle while-stepping.
9735         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9736         (linux_target_ops): Install them.
9737         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9738         New field.
9739         * linux-x86-low.c (x86_supports_tracepoints): New.
9740         (the_low_target). Install it.
9741
9742         * mem-break.h (delete_breakpoint): Declare.
9743         * mem-break.c (delete_breakpoint): Make external.
9744
9745         * target.h (struct target_ops): Add `supports_tracepoints',
9746         `read_pc', and `write_pc' fields.
9747         (target_supports_tracepoints): Define.
9748         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9749         (phex_nz): New.
9750
9751         * regcache.h (struct regcache) <registers_owned>: New field.
9752         (init_register_cache, regcache_cpy): Declare.
9753         (regcache_read_pc, regcache_write_pc): Declare.
9754         (register_cache_size): Declare.
9755         (supply_regblock): Declare.
9756         * regcache.c (init_register_cache): New.
9757         (new_register_cache): Use it.
9758         (regcache_cpy): New.
9759         (register_cache_size): New.
9760         (supply_regblock): New.
9761         (regcache_read_pc, regcache_write_pc): New.
9762
9763         * tracepoint.c: New.
9764
9765         * Makefile.in (OBS): Add tracepoint.o.
9766         (tracepoint.o): New rule.
9767
9768 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
9769
9770         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9771         (i386-mmx.o): New.
9772         (i386-mmx.c): Likewise.
9773         (i386-mmx-linux.o): Likewise.
9774         (i386-mmx-linux.c): Likewise.
9775
9776         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9777         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9778         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9779         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9780
9781         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9782         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9783         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9784
9785 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
9786
9787         * Makefile.in (clean): Updated.
9788         (i386-avx.o): New.
9789         (i386-avx.c): Likewise.
9790         (i386-avx-linux.o): Likewise.
9791         (i386-avx-linux.c): Likewise.
9792         (amd64-avx.o): Likewise.
9793         (amd64-avx.c): Likewise.
9794         (amd64-avx-linux.o): Likewise.
9795         (amd64-avx-linux.c): Likewise.
9796
9797         * configure.srv (srv_i386_regobj): Add i386-avx.o.
9798         (srv_i386_linux_regobj): Add i386-avx-linux.o.
9799         (srv_amd64_regobj): Add amd64-avx.o.
9800         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9801         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9802         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9803         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9804         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9805         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9806         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9807
9808         * i387-fp.c: Include "i386-xstate.h".
9809         (i387_xsave): New.
9810         (i387_cache_to_xsave): Likewise.
9811         (i387_xsave_to_cache): Likewise.
9812         (x86_xcr0): Likewise.
9813
9814         * i387-fp.h (i387_cache_to_xsave): Likewise.
9815         (i387_xsave_to_cache): Likewise.
9816         (x86_xcr0): Likewise.
9817
9818         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9819         * linux-crisv32-low.c (target_regsets): Likewise.
9820         * linux-m68k-low.c (target_regsets): Likewise.
9821         * linux-mips-low.c (target_regsets): Likewise.
9822         * linux-ppc-low.c (target_regsets): Likewise.
9823         * linux-s390-low.c (target_regsets): Likewise.
9824         * linux-sh-low.c (target_regsets): Likewise.
9825         * linux-sparc-low.c (target_regsets): Likewise.
9826         * linux-xtensa-low.c (target_regsets): Likewise.
9827
9828         * linux-low.c: Include <sys/uio.h>.
9829         (regsets_fetch_inferior_registers): Support nt_type.
9830         (regsets_store_inferior_registers): Likewise.
9831         (linux_process_qsupported): New.
9832         (linux_target_ops): Add linux_process_qsupported.
9833
9834         * linux-low.h (regset_info): Add nt_type.
9835         (linux_target_ops): Add process_qsupported.
9836
9837         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9838         and <sys/uio.h>.
9839         (init_registers_i386_avx_linux): New.
9840         (init_registers_amd64_avx_linux): Likewise.
9841         (xmltarget_i386_linux_no_xml): Likewise.
9842         (xmltarget_amd64_linux_no_xml): Likewise.
9843         (PTRACE_GETREGSET): Likewise.
9844         (PTRACE_SETREGSET): Likewise.
9845         (x86_fill_xstateregset): Likewise.
9846         (x86_store_xstateregset): Likewise.
9847         (use_xml): Likewise.
9848         (x86_linux_update_xmltarget): Likewise.
9849         (x86_linux_process_qsupported): Likewise.
9850         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9851         (x86_arch_setup): Don't call init_registers_amd64_linux nor
9852         init_registers_i386_linux here.  Call
9853         x86_linux_update_xmltarget.
9854         (the_low_target): Add x86_linux_process_qsupported.
9855
9856         * server.c (handle_query): Call target_process_qsupported.
9857
9858         * target.h (target_ops): Add process_qsupported.
9859         (target_process_qsupported): New.
9860
9861 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
9862
9863         * inferiors.c (add_thread): Set last_status kind to
9864         TARGET_WAITKIND_IGNORE.
9865         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9866         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
9867         (linux_wait_1): Move `thread' local definition to block that uses
9868         it.  Don't NULL initialize `event_child'.
9869         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9870         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9871         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9872
9873 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9874
9875         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9876         an extended waitstatus, or by a watchpoint.
9877         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9878         thread was stepping or has been stopped by a watchpoint.
9879
9880 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9881
9882         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9883         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9884         of another, then delete the previous, and validate all
9885         breakpoints.
9886         (validate_inserted_breakpoint): New.
9887         (delete_disabled_breakpoints): New.
9888         (validate_breakpoints): New.
9889         (check_mem_read): Validate breakpoints before trusting their
9890         shadow.  Delete disabled breakpoints.
9891         (check_mem_write): Validate breakpoints before trusting they
9892         should be inserted.  Delete disabled breakpoints.
9893         * mem-break.h (validate_breakpoints):
9894         * server.c (handle_query): Validate breakpoints when we see a
9895         qSymbol query.
9896
9897 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9898
9899         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9900         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
9901         if we could tell there's a GDB breakpoint at stop_pc.
9902         (need_step_over_p): Don't do a step over if we find a GDB
9903         breakpoint at the resume PC.
9904
9905         * mem-break.c (struct raw_breakpoint): New.
9906         (enum bkpt_type): New type `gdb_breakpoint'.
9907         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9908         fields.  New field `raw'.
9909         (find_raw_breakpoint_at): New.
9910         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
9911         breakpoint instead.
9912         (set_breakpoint_at): Adjust.
9913         (delete_raw_breakpoint): New.
9914         (release_breakpoint): New.
9915         (delete_breakpoint): Rename to...
9916         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
9917         release_breakpoint.  Return ENOENT.
9918         (delete_breakpoint): Reimplement.
9919         (find_breakpoint_at): Delete.
9920         (find_gdb_breakpoint_at): New.
9921         (delete_breakpoint_at): Delete.
9922         (set_gdb_breakpoint_at): New.
9923         (delete_gdb_breakpoint_at): New.
9924         (gdb_breakpoint_here): New.
9925         (set_reinsert_breakpoint): Use release_breakpoint.
9926         (uninsert_breakpoint): Rename to ...
9927         (uninsert_raw_breakpoint): ... this.
9928         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9929         (reinsert_raw_breakpoint): Change parameter type to
9930         raw_breakpoint.
9931         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9932         instead.
9933         (check_breakpoints): Adjust.  Use release_breakpoint.
9934         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9935         (breakpoint_inserted_here): Ditto.
9936         (check_mem_read): Adjust to iterate over raw breakpoints instead.
9937         Don't trust the breakpoint's shadow if it is not inserted.
9938         (check_mem_write): Adjust to iterate over raw breakpoints instead.
9939         (delete_all_breakpoints): Adjust.
9940         (free_all_breakpoints): Mark all breakpoints as uninserted, and
9941         use delete_breakpoint_1.
9942
9943         * mem-break.h (breakpoints_supported): Delete declaration.
9944         (set_gdb_breakpoint_at): Declare.
9945         (gdb_breakpoint_here): Declare.
9946         (delete_breakpoint_at): Delete.
9947         (delete_gdb_breakpoint_at): Declare.
9948
9949         * server.h (struct raw_breakpoint): Forward declare.
9950         (struct process_info): New field `raw_breakpoints'.
9951
9952         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9953         breakpoints.
9954
9955 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9956
9957         * linux-low.c (status_pending_p_callback): Fix comment.
9958         (linux_wait_for_event_1): Move most of the internal breakpoint
9959         handling from here...
9960         (linux_wait_1): ... to here.
9961         (count_events_callback): New.
9962         (select_singlestep_lwp_callback): New.
9963         (select_event_lwp_callback): New.
9964         (cancel_breakpoints_callback): New.
9965         (select_event_lwp): New.
9966         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
9967         priority to all LWPs that have had events that should be reported
9968         to the client.  Cancel breakpoints when about to reporting the
9969         event to the client, not while stopping lwps.  No longer cancel
9970         finished single-steps here.
9971         (cancel_finished_single_step): Delete.
9972         (cancel_finished_single_steps): Delete.
9973
9974 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9975
9976         * mem-break.c (enum bkpt_type): New.
9977         (struct breakpoint): New field `type'.
9978         (set_breakpoint_at): Change return type to struct breakpoint
9979         pointer.  Set type to `other_breakpoint' by default.
9980         (delete_breakpoint): Rewrite, supporting more than one breakpoint
9981         in the breakpoint list.
9982         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9983         (reinsert_breakpoint): Rename to ...
9984         (reinsert_raw_breakpoint): ... this.
9985         (reinsert_breakpoints_at): Adjust.
9986         * mem-break.h (struct breakpoint): Declare.
9987         (set_breakpoint_at): Change return type to struct breakpoint
9988         pointer.
9989
9990 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9991
9992         * server.c (handle_query): Assign, not compare.
9993
9994 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9995
9996         Teach linux gdbserver to step-over-breakpoints.
9997
9998         * linux-low.c (can_hardware_single_step): New.
9999         (supports_breakpoints): New.
10000         (handle_extended_wait): If stopping threads, read the stop pc of
10001         the new cloned LWP.
10002         (get_pc): New.
10003         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
10004         low target doesn't support retrieving the PC.
10005         (add_lwp): Set last_resume_kind to resume_continue.
10006         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
10007         (linux_attach): Don't clear stop_expected.  Set the lwp's
10008         last_resume_kind to resume_stop.
10009         (linux_detach_one_lwp): Don't check for removed breakpoints.
10010         (check_removed_breakpoint): Delete.
10011         (status_pending_p): Rename to ...
10012         (status_pending_p_callback): ... this.  Don't check for removed
10013         breakpoints.  Don't consider threads that are stopped from GDB's
10014         perspective.
10015         (linux_wait_for_lwp): Always read the stop_pc here.
10016         (cancel_breakpoint): New.
10017         (step_over_bkpt): New global.
10018         (linux_wait_for_event_1): Implement stepping over breakpoints.
10019         (gdb_wants_lwp_stopped): New.
10020         (gdb_wants_all_stopped): New.
10021         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
10022         single-step traps here.  Store the thread's last reported target
10023         wait status.
10024         (send_sigstop): Don't clear stop_expected.  Always set it,
10025         instead.
10026         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10027         (cancel_finished_single_step): New.
10028         (cancel_finished_single_steps): New.
10029         (wait_for_sigstop): Don't cancel finished single-step traps here.
10030         (linux_resume_one_lwp): Don't check for removed breakpoints.
10031         Don't set `step' on non-hardware step archs.
10032         (linux_set_resume_request): Ignore resume_stop requests if already
10033         stopping or stopped.  Set the lwp's last_resume_kind.
10034         (resume_status_pending_p): Don't check for removed breakpoints.
10035         (need_step_over_p): New.
10036         (start_step_over): New.
10037         (finish_step_over): New.
10038         (linux_resume_one_thread): Always queue a sigstop for resume_stop
10039         requests.  Clear the thread's last reported target waitstatus.
10040         Don't use the `suspended' flag.  Don't consider pending breakpoints.
10041         (linux_resume): Start a step-over if necessary.
10042         (proceed_one_lwp): New.
10043         (proceed_all_lwps): New.
10044         (unstop_all_lwps): New.
10045         * linux-low.h (struct lwp_info): Rewrite comment for the
10046         `suspended' flag.  Add the `stop_pc' field.  Delete the
10047         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
10048         Add `'last_resume_kind' and `need_step_over' fields.
10049         * inferiors.c (struct thread_info): Delete, moved elsewhere.
10050         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10051         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
10052         (set_raw_breakpoint_at): New.
10053         (set_breakpoint_at): Rewrite to use it.
10054         (reinsert_breakpoint_handler): Delete.
10055         (set_reinsert_breakpoint): New.
10056         (reinsert_breakpoint_by_bp): Delete.
10057         (delete_reinsert_breakpoints): New.
10058         (uninsert_breakpoint): Rewrite.
10059         (uninsert_breakpoints_at): New.
10060         (reinsert_breakpoint): Rewrite.
10061         (reinsert_breakpoints_at): New.
10062         (check_breakpoints): Rewrite.
10063         (breakpoint_here): New.
10064         (breakpoint_inserted_here): New.
10065         (check_mem_read): Adjust.
10066         * mem-break.h (breakpoints_supported, breakpoint_here)
10067         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10068         (reinsert_breakpoint_by_bp): Delete declaration.
10069         (delete_reinsert_breakpoints): Declare.
10070         (reinsert_breakpoint): Delete declaration.
10071         (reinsert_breakpoints_at): Declare.
10072         (uninsert_breakpoint): Delete declaration.
10073         (uninsert_breakpoints_at): Declare.
10074         (check_breakpoints): Adjust prototype.
10075         * server.h: Adjust include order.
10076         (struct thread_info): Declare here.  Add a `last_status' field.
10077
10078 2010-03-23  Michael Snyder  <msnyder@vmware.com>
10079
10080         * server.c (crc32): New function.
10081         (handle_query): Add handling for 'qCRC:' request.
10082
10083 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
10084
10085         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10086         lwp had been stopped by a watchpoint.
10087
10088 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
10089
10090         * server.h (internal_error): Declare.
10091         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10092         * utils.c (internal_error): New function.
10093
10094 2010-03-15  Andreas Schwab  <schwab@redhat.com>
10095
10096         * configure.srv: Fix typo setting srv_regobj.
10097
10098 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
10099
10100         * linux-low.c (fetch_register): Avoid passing a non string literal
10101         format to `error'.
10102         (usr_store_inferior_registers): Ditto.
10103
10104 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
10105
10106         * linux-low.c (linux_write_memory): Bail out early if peeking
10107         memory failed.
10108
10109 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
10110
10111         * linux-low.h (struct lwp_info): New fields
10112         `stopped_by_watchpoint' and `stopped_data_address'.
10113         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10114         here, and cache them in the lwp object.
10115         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10116         directly.
10117         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10118         field.
10119         (linux_stopped_by_watchpoint): Rewrite.
10120         (linux_stopped_data_address): Rewrite.
10121
10122 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
10123
10124         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10125         switching the current inferior, not before.
10126
10127 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
10128
10129         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10130         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10131         i386-linux.c and amd64-linux.c.
10132         (reg-i386.o): Removed.
10133         (reg-i386.c): Likewise.
10134         (reg-i386-linux.o): Likewise.
10135         (reg-i386-linux.c): Likewise.
10136         (reg-x86-64.o): Likewise.
10137         (reg-x86-64.c): Likewise.
10138         (reg-x86-64-linux.o): Likewise.
10139         (reg-x86-64-linux.c): Likewise.
10140         (i386.o): New.
10141         (i386.c): Likewise.
10142         (i386-linux.o): Likewise.
10143         (i386-linux.c): Likewise.
10144         (amd64.o): Likewise.
10145         (amd64.c): Likewise.
10146         (amd64-linux.o): Likewise.
10147         (amd64-linux.c): Likewise.
10148
10149         * configure.srv (srv_i386_regobj): New.
10150         (srv_i386_linux_regobj): Likewise.
10151         (srv_amd64_regobj): Likewise.
10152         (srv_amd64_linux_regobj): Likewise.
10153         (srv_i386_32bit_xmlfiles): Likewise.
10154         (srv_i386_64bit_xmlfiles): Likewise.
10155         (srv_i386_xmlfiles): Likewise.
10156         (srv_amd64_xmlfiles): Likewise.
10157         (srv_i386_linux_xmlfiles): Likewise.
10158         (srv_amd64_linux_xmlfiles): Likewise.
10159         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
10160         srv_xmlfiles to $srv_i386_xmlfiles.
10161         (i[34567]86-*-mingw32ce*): Likewise.
10162         (i[34567]86-*-mingw*): Likewise.
10163         (i[34567]86-*-nto*): Likewise.
10164         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10165         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
10166         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10167         (x86_64-*-linux*): Likewise.
10168
10169         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10170         (init_registers_amd64_linux): New.
10171         (x86_arch_setup): Replace init_registers_x86_64_linux with
10172         init_registers_amd64_linux.
10173
10174 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
10175
10176         * configure.ac: Check for libdl.  If it is not available link against
10177         static libthread_db.
10178         * configure: Regenerate.
10179
10180 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
10181
10182         PR9605
10183
10184         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10185         handing a read watchpoint.
10186         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10187
10188 2010-02-12  Doug Evans  <dje@google.com>
10189
10190         * linux-low.c (linux_supports_tracefork_flag): Document.
10191         (linux_look_up_symbols): Add comment.
10192
10193 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
10194
10195         * regcache.c (supply_register): Clear regcache if buf is NULL.
10196
10197 2010-02-02  Nicolas Roche  <roche@sourceware.org>
10198             Joel Brobecker  <brobecker@adacore.com>
10199
10200         * inferiors.c (find_inferior): Add function documentation.
10201         (unloaded_dll): Handle the case where the unloaded dll has not
10202         been previously registered in the dll list.
10203
10204 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
10205
10206         * linux-arm-low.c (thumb_breakpoint_len): Delete.
10207         (thumb2_breakpoint): New.
10208         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10209
10210 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
10211
10212         * linux-low.c (get_stop_pc): Check for SIGTRAP.
10213         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10214         breakpoints.
10215
10216 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
10217
10218         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10219
10220 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10221
10222         * linux-s390-low.c (s390_collect_ptrace_register)
10223         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10224
10225 2010-01-21  Doug Evans  <dje@google.com>
10226
10227         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10228         (PTRACE_ARG4_TYPE): New macro.
10229         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10230         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10231         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10232         (usr_store_inferior_registers): Ditto.
10233         (linux_read_memory, linux_write_memory): Ditto.
10234         (linux_test_for_tracefork): Ditto.
10235
10236         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10237         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10238
10239 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
10240
10241         * proc-service.c (ps_lgetregs): Don't refetch registers from the
10242         target.
10243
10244 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
10245
10246         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10247         prototype to take a regcache.  Adjust.
10248
10249 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
10250
10251         * regcache.h (struct thread_info): Forward declare.
10252         (struct regcache): New.
10253         (new_register_cache): Adjust prototype.
10254         (get_thread_regcache): Declare.
10255         (free_register_cache): Adjust prototype.
10256         (registers_to_string, registers_from_string): Ditto.
10257         (supply_register, supply_register_by_name, collect_register)
10258         (collect_register_as_string, collect_register_by_name): Ditto.
10259         * regcache.c (struct inferior_regcache_data): Delete.
10260         (get_regcache): Rename to ...
10261         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
10262         fetching registers.
10263         (regcache_invalidate_one): Adjust.
10264         (regcache_invalidate): Fix prototype.
10265         (new_register_cache): Return the new register cache.
10266         (free_register_cache): Change prototype.
10267         (realloc_register_cache): Adjust.
10268         (registers_to_string): Change prototype to take a regcache.  Adjust.
10269         (registers_from_string): Ditto.
10270         (register_data): Ditto.
10271         (supply_register): Ditto.
10272         (supply_register_by_name): Ditto.
10273         (collect_register): Ditto.
10274         (collect_register_as_string): Ditto.
10275         (collect_register_by_name): Ditto.
10276         * server.c (process_serial_event): Adjust.
10277         * linux-low.h (regset_fill_func, regset_store_func): Change
10278         prototype.
10279         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10280         Change prototype.
10281         * linux-low.c (get_stop_pc): Adjust.
10282         (check_removed_breakpoint): Adjust.
10283         (linux_wait_for_event): Adjust.
10284         (linux_resume_one_lwp): Adjust.
10285         (fetch_register): Add regcache parameter.  Adjust.
10286         (usr_store_inferior_registers): Ditto.
10287         (regsets_fetch_inferior_registers): Ditto.
10288         (regsets_store_inferior_registers): Ditto.
10289         (linux_fetch_registers, linux_store_registers): Ditto.
10290         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10291         regcache.  Adjust.
10292         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10293         Ditto.
10294         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10295         prototype to take a regcache.
10296         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10297         * remote-utils.c (convert_ascii_to_int, outreg)
10298         (prepare_resume_reply): Change prototype to take a regcache.
10299         Adjust.
10300         * target.h (struct target_ops) <fetch_registers, store_registers>:
10301         Change prototype to take a regcache.
10302         (fetch_inferior_registers, store_inferior_registers): Change
10303         prototype to take a regcache.  Adjust.
10304         * proc-service.c (ps_lgetregs): Adjust.
10305         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10306         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10307         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10308         take a regcache.  Adjust.
10309         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10310         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10311         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10312         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
10313         * linux-cris-low.c (cris_get_pc, cris_set_pc)
10314         (cris_cannot_fetch_register):
10315         (cris_breakpoint_at): Change prototype to take a regcache.
10316         Adjust.
10317         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10318         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10319         to take a regcache.  Adjust.
10320         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10321         Adjust.
10322         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10323         take a regcache.  Adjust.
10324         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10325         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10326         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
10327         * linux-mips-low.c (mips_get_pc):
10328         (mips_set_pc): Change prototype to take a regcache.  Adjust.
10329         (mips_reinsert_addr): Adjust.
10330         (mips_collect_register): Change prototype to take a regcache.
10331         Adjust.
10332         (mips_supply_register):
10333         (mips_collect_register_32bit, mips_supply_register_32bit)
10334         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10335         (mips_store_fpregset): Ditto.
10336         * linux-ppc-low.c (ppc_supply_ptrace_register)
10337         (ppc_supply_ptrace_register): Ditto.
10338         (parse_spufs_run): Adjust.
10339         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10340         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10341         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10342         take a regcache.  Adjust.
10343         * linux-s390-low.c (s390_collect_ptrace_register)
10344         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10345         (s390_set_pc): Change prototype to take a regcache.  Adjust.
10346         (s390_arch_setup): Adjust.
10347         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10348         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
10349         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10350         (sparc_fill_gregset, sparc_store_gregset_from_stack)
10351         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10352         regcache.  Adjust.
10353         (sparc_breakpoint_at): Adjust.
10354         * linux-xtensa-low.c (xtensa_fill_gregset):
10355         (xtensa_store_gregset):
10356         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10357         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
10358         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10359         prototype to take a regcache.  Adjust.
10360         * win32-arm-low.c (arm_fetch_inferior_register)
10361         (arm_store_inferior_register): Change prototype to take a
10362         regcache.  Adjust.
10363         * win32-i386-low.c (i386_fetch_inferior_register)
10364         (i386_store_inferior_register): Change prototype to take a
10365         regcache.  Adjust.
10366         * win32-low.c (child_fetch_inferior_registers)
10367         (child_store_inferior_registers): Change prototype to take a
10368         regcache.  Adjust.
10369         (win32_wait): Adjust.
10370         (win32_fetch_inferior_registers): Change prototype to take a
10371         regcache.  Adjust.
10372         (win32_store_inferior_registers): Adjust.
10373         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10374         store_inferior_register>: Change prototype to take a regcache.
10375
10376 2010-01-20  Doug Evans  <dje@google.com>
10377
10378         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10379         #ifdef.
10380         (linux_wait_for_event1, linux_init_signals): Ditto.
10381         (W_STOPCODE): Provide definition if missing.
10382
10383 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
10384
10385         * linux-low.c (linux_core_of_thread): New.
10386         (compare_ints, show_process, list_threads): New.
10387         (linux_qxfer_osdata): Report threads and cores.
10388         (linux_target_op): Register linux_core_of_thread.
10389         * remote-utils.c (prepare_resume_reply): Report the core.
10390         (buffer_xml_printf): Support %d specifier.
10391         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10392         New.
10393         (handle_query): Handle qXfer:threads.  Announce availability
10394         thereof.
10395         * target.h (struct target_ops): New field core_of_thread.
10396
10397 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
10398
10399         * Makefile.in (clean): Remove new generated files.
10400         (reg-s390.o, reg-s390.c): Remove rules.
10401         (reg-s390x.o, reg-s390x.c): Likewise.
10402         (s390-linux32.o, s390-linux32.c): Add rules.
10403         (s390-linux64.o, s390-linux64.c): Likewise.
10404         (s390x-linux64.o, s390x-linux64.c): Likewise.
10405         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10406         * linux-s390-low.c: Include <elf.h>.
10407         (HWCAP_S390_HIGH_GPRS): Define if undefined.
10408         (init_registers_s390): Remove prototype.
10409         (init_registers_s390x): Likewise.
10410         (init_registers_s390_linux32): Add prototype.
10411         (init_registers_s390_linux64): Likewise.
10412         (init_registers_s390x_linux64): Likewise.
10413         (s390_num_regs_3264): New define.
10414         (s390_regmap_3264): New global variable.
10415         (s390_cannot_fetch_register): Remove obsolete check.
10416         (s390_cannot_store_register): Likewise.
10417         (s390_collect_ptrace_register): Handle upper/lower register halves.
10418         (s390_supply_ptrace_register): Likewise.
10419         (s390_fill_gregset): Update to register number changes.
10420         (s390_get_hwcap): New routine.
10421         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10422         Install appropriate regmap and register set.
10423
10424 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
10425
10426         * server.c (gdbserver_version): Update copyright year to 2010.
10427         * gdbreplay.c (gdbreplay_version): Likewise.
10428
10429 2009-12-28  Doug Evans  <dje@google.com>
10430
10431         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10432         elf/external.h.  Include <elf.h> instead but only if necessary.
10433
10434 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
10435
10436         * linux-low.c (linux_remove_process): Remove `detaching'
10437         parameter.  Don't release/detach from thread_db here.
10438         (linux_kill): Release/detach from thread_db here, ...
10439         (linux_detach): ... and here, before actually detaching.
10440         (linux_wait_1): ... and here, when a process exits.
10441         * thread-db.c (any_thread_of): New.
10442         (thread_db_free): Switch the current inferior to a thread of the
10443         passed in process.
10444
10445 2009-12-21  Doug Evans  <dje@google.com>
10446
10447         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10448
10449         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10450         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10451         warning ifndef __NR_tkill.  Move setting of errno there too.
10452         Delete unnecessary resetting of errno after syscall.
10453         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10454
10455         * configure.ac: Check for dladdr.
10456         * config.in: Regenerate.
10457         * configure: Regenerate.
10458         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10459         (try_thread_db_load): Update.
10460
10461         * linux-low.c (my_waitpid): Delete unnecessary prototype.
10462
10463 2009-12-18  Doug Evans  <dje@google.com>
10464
10465         * event-loop.c: Include unistd.h if it exists.
10466
10467         * linux-low.c (my_waitpid): Move definition away from being in
10468         between linux_tracefork_child/linux_test_for_tracefork.
10469
10470         * gdb_proc_service.h (psaddr_t): Fix type.
10471         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10472         signature to match glibc.
10473
10474 2009-12-16  Doug Evans  <dje@google.com>
10475
10476         * linux-low.c (linux_read_memory): Fix argument to read.
10477
10478 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
10479
10480         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10481         events, don't leave current_inferior pointing at null.
10482
10483 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
10484
10485         * win32-low.c (LOG): Delete.
10486         (OUTMSG): Output to stderr.
10487         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10488         on compile time LOG macro.
10489         (win32_wait): Fix debug output.
10490
10491 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
10492
10493         * win32-low.c (win32_add_one_solib): If the dll name is
10494         "ntdll.dll", prepend the system directory to the dll path.
10495
10496 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
10497
10498         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10499
10500 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
10501             Vladimir Prus  <vladimir@codesourcery.com>
10502
10503         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10504         * configure.ac: Check for __mcoldfire__ and set
10505         gdb_cv_m68k_is_coldfire.
10506         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10507         reg-cf.o and reg-m68k.o.
10508         * configure: Regenerated.
10509
10510 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
10511
10512         * linux-low.c (linux_remove_process): Add `detaching' parameter.
10513         Pass it to thread_db_free.
10514         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10515         proper `detaching' argument to linux_remove_process.
10516         * linux-low.h (thread_db_free): Add `detaching' parameter.
10517         * thread-db.c (thread_db_init): Pass false as `detaching' argument
10518         to thread_db_free.
10519         (thread_db_free): Add `detaching' parameter.  Only
10520         call td_ta_clear_event if detaching from process.
10521
10522 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
10523
10524         * thread-db.c (thread_db_free): Fix typo.
10525
10526 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
10527
10528         PR gdb/10838
10529         * thread-db.c (thread_db_free): Call td_ta_clear_event.
10530
10531 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
10532
10533         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10534         with an i686 compiler.
10535         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10536         needed.
10537         * configure: Rebuilt.
10538
10539 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
10540
10541         PR gdb/10783
10542
10543         * server.c (handle_search_memory_1): Correct read_addr initialization
10544         in loop for searching subsequent chunks.
10545
10546 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
10547
10548         * configure.ac: New --with-libthread-db option.
10549         * thread-db.c: Allow direct dependence on libthread_db.
10550         (thread_db_free): Adjust.
10551         * config.in: Regenerate.
10552         * configure: Likewise.
10553
10554 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
10555
10556         PR gdb/10757
10557         * thread-db.c (attach_thread): New function.
10558         (maybe_attach_thread): Return success/failure.
10559         (find_new_threads_callback): Adjust.
10560         (thread_db_find_new_threads): Loop until no new threads.
10561
10562 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
10563
10564         * proc-service.c (ps_lgetregs): Formatting.
10565
10566 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
10567
10568         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10569         * configure.ac: Adjust.
10570         * linux-low.h (struct process_info_private): Move members to struct
10571         thread_db.
10572         (thread_db_free, thread_db_handle_monitor_command): New prototype.
10573         * linux-low.c (linux_remove_process): Adjust.
10574         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10575         * server.c (handle_query): Move code ...
10576         (handle_monitor_command): ... here. New function.
10577         * target.h (struct target_ops): New member.
10578         * thread-db.c (struct thread_db): New.
10579         (libthread_db_search_path): New variable.
10580         (thread_db_create_event, thread_db_enable_reporting)
10581         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10582         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10583         (try_thread_db_load_1, dladdr_to_soname): New functions.
10584         (try_thread_db_load, thread_db_load_search): New functions.
10585         (thread_db_init): Search for libthread_db.
10586         (thread_db_free): New function.
10587         (thread_db_handle_monitor_command): Likewise.
10588         * config.in: Regenerate.
10589         * configure: Regenerate.
10590
10591 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
10592
10593         * spu-low.c (spu_kill): Wait for inferior to terminate.
10594         Call clear_inferiors.
10595         (spu_detach): Call clear_inferiors.
10596
10597 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10598
10599         * aclocal.m4: Regenerate.
10600         * config.in: Likewise.
10601         * configure: Likewise.
10602
10603 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
10604
10605         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10606         (parse_spufs_run): New function.
10607         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10608         (ppc_breakpoint_at): Handle SPU breakpoints.
10609
10610 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
10611
10612         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10613         (SPUFS_MAGIC): Define.
10614         (spu_enumerate_spu_ids): New function.
10615         (linux_qxfer_spu): New function.
10616         (linux_target_ops): Install linux_qxfer_spu.
10617
10618 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
10619
10620         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10621         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
10622         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10623         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10624         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10625         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10626         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10627         (init_registers_powerpc_cell32l): Add prototype.
10628         (init_registers_powerpc_cell64l): Likewise.
10629         (ppc_arch_setup): Detect Cell/B.E. architecture.
10630
10631 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10632
10633         * Makefile.in (datarootdir): New variable.
10634
10635 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
10636
10637         * linux-low.c (linux_write_memory): Update debugging output.
10638         * Makefile.in (clean): Add new descriptions.
10639         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10640         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10641         * configure.srv: Add new files for arm*-*-linux*.
10642         * linux-arm-low.c: Add new declarations.
10643         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10644         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10645         (HWCAP_VFPv3D16): New.
10646         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10647         instead of __IWMMXT__.
10648         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10649         (arm_arch_setup): New.
10650         (target_regsets): Remove #ifdef.  Add VFP regset.
10651         (the_low_target): Use arm_arch_setup.
10652
10653 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
10654
10655         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10656         the main thread again.
10657
10658 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
10659
10660         Adding Neutrino gdbserver.
10661         * configure: Regenerated.
10662         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10663         * configure.srv (i[34567]86-*-nto*): New target.
10664         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10665         * remote-utils.c [__QNX__]: Include sys/iomgr.h
10666         (nto_comctrl) [__QNX__]: New function.
10667         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10668
10669 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
10670
10671         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10672         srv_tgtobj.
10673
10674 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
10675             Pedro Alves  <pedro@codesourcery.com>
10676
10677         * win32-i386-low.c (i386_get_thread_context): Handle systems that
10678         don't support CONTEXT_EXTENDED_REGISTERS.
10679         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10680         (the_low_target): Install them.
10681         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10682         failing with ERROR_PIPE_NOT_CONNECTED.
10683
10684 2009-06-30  Doug Evans  <dje@google.com>
10685             Pierre Muller  <muller@ics.u-strasbg.fr>
10686
10687         Add h/w watchpoint support to x86-linux, win32-i386.
10688         * Makefile.in (SFILES): Add i386-low.c
10689         (i386_low_h): Define.
10690         (i386-low.o): Add dependencies.
10691         (linux-x86-low.o): Add i386-low.h dependency.
10692         (win32-i386-low.o): Ditto.
10693         * i386-low.c: New file.
10694         * i386-low.h: New file.
10695         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10696         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10697         * linux-low.c (linux_add_process): Initialize arch_private.
10698         (linux_remove_process): Free arch_private.
10699         (add_lwp): Initialize arch_private.
10700         (delete_lwp): Free arch_private.
10701         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10702         provided.
10703         * linux-low.h (process_info_private): New member arch_private.
10704         (lwp_info): New member arch_private.
10705         (linux_target_ops): New members new_process, new_thread,
10706         prepare_to_resume.
10707         (ptid_of): New macro.
10708         * linux-x86-low.c: Include stddef.h, i386-low.h.
10709         (arch_process_info): New struct.
10710         (arch_lwp_info): New struct.
10711         (x86_linux_dr_get, x86_linux_dr_set): New functions.
10712         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10713         (i386_dr_low_get_status): New function.
10714         (x86_insert_point, x86_remove_point): New functions.
10715         (x86_stopped_by_watchpoint): New function.
10716         (x86_stopped_data_address): New function.
10717         (x86_linux_new_process, x86_linux_new_thread): New functions.
10718         (x86_linux_prepare_to_resume): New function.
10719         (the_low_target): Add entries for insert_point, remove_point,
10720         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10721         prepare_to_resume.
10722         * server.c (debug_hw_points): New global.
10723         (monitor_show_help): Document set debug-hw-points.
10724         (handle_query): Process "set debug-hw-points".
10725         * server.h (debug_hw_points): Declare.
10726         (paddress): Declare.
10727         * utils.c (NUMCELLS, CELLSIZE): New macros.
10728         (get_sell, xsnprintf, paddress): New functions.
10729         * win32-arm-low.c (the_low_target): Add entries for insert_point,
10730         remove_point, stopped_by_watchpoint, stopped_data_address.
10731         * win32-i386-low.c: Include i386-low.h.
10732         (debug_reg_state): Replaces dr.
10733         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10734         (i386_dr_low_get_status): New function.
10735         (i386_insert_point, i386_remove_point): New functions.
10736         (i386_stopped_by_watchpoint): New function.
10737         (i386_stopped_data_address): New function.
10738         (i386_initial_stuff): Update.
10739         (get_thread_context,set_thread_context,i386_thread_added): Update.
10740         (the_low_target): Add entries for insert_point,
10741         remove_point, stopped_by_watchpoint, stopped_data_address.
10742         * win32-low.c (win32_insert_watchpoint): New function.
10743         (win32_remove_watchpoint): New function.
10744         (win32_stopped_by_watchpoint): New function.
10745         (win32_stopped_data_address): New function.
10746         (win32_target_ops): Add entries for insert_watchpoint,
10747         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10748         * win32-low.h (win32_target_ops): New members insert_point,
10749         remove_point, stopped_by_watchpoint, stopped_data_address.
10750
10751 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
10752
10753         * server.c (process_serial_event): Re-return unsupported, not
10754         error, if the type isn't recognized.  Re-allow supporting only
10755         insert or remove packets.  Also call require_running for
10756         breakpoints.  Add missing break statement to default case.  Tidy.
10757         * target.h (struct target_ops): Rename insert_watchpoint to
10758         insert_point, and remove_watchpoint to remove_point.
10759
10760         * linux-low.h (struct linux_target_ops): Likewise.
10761         * linux-low.c (linux_insert_watchpoint): Rename to ...
10762         (linux_insert_point): ... this.  Adjust.
10763         (linux_remove_watchpoint): Rename to ...
10764         (linux_remove_point): ... this.  Adjust.
10765         (linux_target_ops): Adjust.
10766         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10767         (cris_insert_point): ... this.
10768         (cris_remove_watchpoint): Rename to ...
10769         (cris_remove_point): ... this.
10770         (the_low_target): Adjust.
10771
10772 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
10773
10774         * server.c (handle_v_kill): Pass signal_pid to
10775         kill_inferior if multi_process is zero.
10776
10777 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
10778
10779         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10780         * target.h (target_ops): Comment for *_watchpoint to make it clear
10781         the functions can get types '0' and '1'.
10782
10783 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
10784
10785         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10786         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10787         * regcache.c (get_regcache): Likewise.
10788         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10789         * win32-low.c (child_fetch_inferior_registers): Remove check for
10790         regno 0.
10791
10792 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
10793             Pedro Alves <pedro@codesourcery.com>
10794
10795         * target.h (struct target_ops) <supports_multi_process>: New
10796         callback.
10797         (target_supports_multi_process): New.
10798         * server.c (handle_query): Even if GDB reports support, only
10799         enable multi-process if the target also supports it.  Report
10800         multi-process support only if the target backend supports it.
10801         * linux-low.c (linux_supports_multi_process): New function.
10802         (linux_target_ops): Install it as target_supports_multi_process
10803         callback.
10804
10805 2009-05-24  Doug Evans  <dje@google.com>
10806
10807         Global renaming of find_thread_pid to find_thread_ptid.
10808         * server.h (find_thread_ptid): Renamed from find_thread_pid.
10809         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10810         All callers updated.
10811
10812         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10813         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10814         directly.
10815
10816         * linux-low.c (get_stop_pc): Print pc if debug_threads.
10817         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10818         (linux_resume_one_lwp): Ditto.
10819
10820 2009-05-23  Doug Evans  <dje@google.com>
10821
10822         * linux-low.c (linux_resume_one_lwp): Change type of first arg
10823         from struct inferior_list_entry * to struct lwp_info *.
10824         All callers updated.
10825
10826 2009-05-13  Doug Evans  <dje@google.com>
10827
10828         * linux-x86-low.c: Don't include assert.h.
10829         (x86_siginfo_fixup): Use fatal, not assert.
10830         (x86_arch_setup): Fix comment.
10831
10832 2009-05-12  Doug Evans  <dje@google.com>
10833
10834         Biarch support for i386/amd64 gdbserver.
10835         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10836         Add linux-x86-low.c.
10837         (linux-i386-low.o, linux-x86-64-low.o): Delete.
10838         (linux-x86-low.o): Add.
10839         * linux-x86-64-low.c: Delete.
10840         * linux-i386-low.c: Delete.
10841         * linux-x86-low.c: New file.
10842         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10843         linux-x86-low.o.
10844         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10845         linux-x86-low.o.
10846         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10847         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10848         (linux_child_pid_to_exec_file): New function.
10849         (elf_64_header_p, elf_64_file_p): New functions.
10850         (siginfo_fixup): New function.
10851         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
10852         give target a chance to convert layout.
10853         * linux-low.h (linux_target_ops): New member siginfo_fixup.
10854         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10855
10856 2009-05-07  Doug Evans  <dje@google.com>
10857
10858         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10859         (regsets_store_inferior_registers): Ditto.
10860
10861 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
10862
10863         PR server/10048
10864
10865         * linux-low.c (must_set_ptrace_flags): Delete.
10866         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10867         of the global.
10868         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
10869         `lwp->must_set_ptrace_flags' instead.
10870         (linux_wait_for_event_1): Set ptrace options here.
10871         (linux_wait_1): ... not here.
10872
10873 2009-04-30  Doug Evans  <dje@google.com>
10874
10875         * inferiors.c (started_inferior_callback): New function.
10876         (attached_inferior_callback): New function.
10877         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10878         * server.c (print_started_pid, print_attached_pid): New functions.
10879         (detach_or_kill_for_exit): New function.
10880         (main): Call it instead of for_each_inferior (kill_inferior_callback).
10881         * server.h (have_started_inferiors_p): Declare.
10882         (have_attached_inferiors_p): Declare.
10883
10884         * inferiors.c (remove_process): Fix memory leak, free process.
10885         * linux-low.c (linux_remove_process): New function.
10886         (linux_kill): Call it instead of remove_process.
10887         (linux_detach, linux_wait_1): Ditto.
10888
10889 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
10890
10891         * configure.srv: Add x86 Windows CE target.
10892
10893 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10894
10895         * inferiors.c (get_thread_process): Make global.
10896         * server.h (get_thread_process): Add prototype.
10897         * thread-db.c (find_one_thread): Use get_thread_process
10898         instead of current_process.
10899         (thread_db_get_tls_address): Do not crash if called when
10900         thread layer is not yet initialized.
10901
10902 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10903
10904         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10905         * spu-low.c (current_tid): Rename to ...
10906         (current_ptid): ... this.
10907         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10908         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10909         ptid_get_lwp (current_ptid) instead of current_tid.
10910         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10911         instead of current_tid.  Use find_process_pid to verify pid
10912         argument is valid.  Pass proper argument to remove_process.
10913         (spu_thread_alive): Compare current_ptid instead of current_tid.
10914         (spu_resume): Likewise.
10915
10916 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
10917
10918         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10919         variable.
10920
10921 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10922
10923         Implement the multiprocess extensions, and add linux multiprocess
10924         support.
10925
10926         * server.h (ULONGEST): Declare.
10927         (struct ptid, ptid_t): New.
10928         (minus_one_ptid, null_ptid): Declare.
10929         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10930         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10931         (struct inferior_list_entry): Change `id' type from unsigned from
10932         to ptid_t.
10933         (struct sym_cache, struct breakpoint, struct
10934         process_info_private): Forward declare.
10935         (struct process_info): Declare.
10936         (current_process): Declare.
10937         (all_processes): Declare.
10938         (initialize_inferiors): Declare.
10939         (add_thread): Adjust to use ptid_t.
10940         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10941         (add_process, remove_process, find_thread_pid): Declare.
10942         (find_inferior_id): Adjust to use ptid_t.
10943         (cont_thread, general_thread, step_thread): Change type to ptid_t.
10944         (multi_process): Declare.
10945         (push_event): Adjust to use ptid_t.
10946         (read_ptid, write_ptid): Declare.
10947         (prepare_resume_reply): Adjust to use ptid_t.
10948         (clear_symbol_cache): Declare.
10949         * inferiors.c (all_processes): New.
10950         (null_ptid, minus_one_ptid): New.
10951         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10952         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10953         (add_thread): Change unsigned long to ptid.  Remove gdb_id
10954         parameter.  Adjust.
10955         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10956         (gdb_id_to_thread): Rename to ...
10957         (find_thread_pid): ... this.  Change unsigned long to ptid.
10958         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10959         (loaded_dll, pull_pid_from_list): Adjust.
10960         (add_process, remove_process, find_process_pid)
10961         (get_thread_process, current_process, initialize_inferiors): New.
10962         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10963         (struct target_waitstatus) <related_pid>: Ditto.
10964         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
10965         return type to int.
10966         (struct target_ops) <join>: Add `pid' argument.
10967         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10968         (struct target_ops) <wait>: Add `ptid' field.  Change return type
10969         to ptid.
10970         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10971         (mywait): Add `ptid' argument.  Change return type to ptid_t.
10972         (target_pid_to_str): Declare.
10973         * target.c (set_desired_inferior): Adjust to use ptids.
10974         (mywait): Add new `ptid' argument.  Adjust.
10975         (target_pid_to_str): New.
10976         * mem-break.h (free_all_breakpoints): Declare.
10977         * mem-break.c (breakpoints): Delelete.
10978         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10979         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10980         to use per-process breakpoint list.
10981         (free_all_breakpoints): New.
10982         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10983         (symbol_cache, all_symbols_looked_up): Delete.
10984         (hexchars): New.
10985         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10986         read_ptid): New.
10987         (prepare_resume_reply): Change ptid argument's type from unsigned
10988         long to ptid_t.  Adjust.  Implement W;process and X;process.
10989         (free_sym_cache, clear_symbol_cache): New.
10990         (look_up_one_symbol): Adjust to per-process symbol cache.  *
10991         * server.c (cont_thread, general_thread, step_thread): Change type
10992         to ptid_t.
10993         (attached): Delete.
10994         (multi_process): New.
10995         (last_ptid): Change type to ptid_t.
10996         (struct vstop_notif) <ptid>: Change type to ptid_t.
10997         (queue_stop_reply, push_event): Change `ptid' argument's type to
10998         ptid_t.
10999         (discard_queued_stop_replies): Add `pid' argument.
11000         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
11001         changes.  Don't reference the `attached' global.
11002         (attach_inferior): Adjust to mywait interface changes.
11003         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
11004         features.  Handle and report "multiprocess+".  Handle
11005         "qAttached:PID".
11006         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
11007         changes.
11008         (handle_v_kill): New.
11009         (handle_v_stopped): Adjust to use target_pid_to_str.
11010         (handle_v_requests): Allow multiple attaches and runs when
11011         multiprocess extensions are in effect.  Handle "vKill".
11012         (myresume): Adjust to use ptids.
11013         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
11014         (handle_status): Adjust to discard_queued_stop_replies interface
11015         change.
11016         (first_thread_of, kill_inferior_callback)
11017         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11018         (main): Call initialize_inferiors.  Adjust to use ptids, killing
11019         and detaching from all inferiors.  Handle multiprocess packet
11020         variants.
11021         * linux-low.h: Include gdb_proc_service.h.
11022         (struct process_info_private): New.
11023         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11024         <lwpid_of>: Use ptid_get_lwp.
11025         (get_lwp_thread): Adjust.
11026         (struct lwp_info): Add `dead' member.
11027         (find_lwp_pid): Declare.
11028         * linux-low.c (thread_db_active): Delete.
11029         (new_inferior): Adjust comment.
11030         (inferior_pid): Delete.
11031         (linux_add_process): New.
11032         (handle_extended_wait): Adjust.
11033         (add_lwp): Change unsigned long to ptid.
11034         (linux_create_inferior): Add process to processes table.  Adjust
11035         to use ptids.  Don't set new_inferior here.
11036         (linux_attach_lwp): Rename to ...
11037         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
11038         it.  Adjust to use ptids.
11039         (linux_attach_lwp): New.
11040         (linux_attach): Add process to processes table.  Don't set
11041         new_inferior here.
11042         (struct counter): New.
11043         (second_thread_of_pid_p, last_thread_of_process_p): New.
11044         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
11045         multiple processes.
11046         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
11047         processes.  Remove process from process table.
11048         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
11049         to multiple processes.
11050         (any_thread_of): New.
11051         (linux_detach): Add `pid' argument, and handle it.  Remove process
11052         from processes table.
11053         (linux_join): Add `pid' argument.  Handle it.
11054         (linux_thread_alive): Change unsighed long argument to ptid_t.
11055         Consider dead lwps as not being alive.
11056         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
11057         threads we're not interested in.
11058         (same_lwp, find_lwp_pid): New.
11059         (linux_wait_for_lwp): Change `pid' argument's type from int to
11060         ptid_t.  Adjust.
11061         (linux_wait_for_event): Rename to ...
11062         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
11063         from int to ptid_t.  Adjust.
11064         (linux_wait_for_event): New.
11065         (linux_wait_1): Add `ptid' argument.  Change return type to
11066         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
11067         that exit from the process table.
11068         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
11069         Adjust.
11070         (mark_lwp_dead): New.
11071         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
11072         stopping all threads, mark its main lwp as dead.
11073         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11074         ptids.
11075         (fetch_register, usr_store_inferior_registers)
11076         (regsets_fetch_inferior_registers)
11077         (regsets_store_inferior_registers, linux_read_memory)
11078         (linux_write_memory): Inline `inferior_pid'.
11079         (linux_look_up_symbols): Adjust to use per-process
11080         `thread_db_active'.
11081         (linux_request_interrupt): Adjust to use ptids.
11082         (linux_read_auxv): Inline `inferior_pid'.
11083         (initialize_low): Don't reference thread_db_active.
11084         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11085         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11086         (ps_getpid): Return the pid of the current inferior.
11087         * thread-db.c (proc_handle, thread_agent): Delete.
11088         (thread_db_create_event, thread_db_enable_reporting): Adjust to
11089         per-process data.
11090         (find_one_thread): Change argument type to ptid_t.  Adjust to
11091         per-process data.
11092         (maybe_attach_thread): Adjust to per-process data and ptids.
11093         (thread_db_find_new_threads): Ditto.
11094         (thread_db_init): Ditto.
11095         * spu-low.c (spu_create_inferior, spu_attach): Add process to
11096         processes table.  Adjust to use ptids.
11097         (spu_kill, spu_detach): Adjust interface.  Remove process from
11098         processes table.
11099         (spu_join, spu_thread_alive): Adjust interface.
11100         (spu_wait): Adjust interface.  Remove process from processes
11101         table.  Adjust to use ptids.
11102         * win32-low.c (current_inferior_tid): Delete.
11103         (current_inferior_ptid): New.
11104         (debug_event_ptid): New.
11105         (thread_rec): Take a ptid.  Adjust.
11106         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
11107         (child_delete_thread): Ditto.
11108         (do_initial_child_stuff): Add `attached' argument.  Add process to
11109         processes table.
11110         (child_fetch_inferior_registers, child_store_inferior_registers):
11111         Adjust.
11112         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11113         (win32_attach): Pass 1 to do_initial_child_stuff.
11114         (win32_kill): Adjust interface.  Remove process from processes
11115         table.
11116         (win32_detach): Ditto.
11117         (win32_join): Adjust interface.
11118         (win32_thread_alive): Take a ptid.
11119         (win32_resume): Adjust to use ptids.
11120         (get_child_debug_event): Ditto.
11121         (win32_wait): Adjust interface.  Remove exiting process from
11122         processes table.
11123
11124 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
11125
11126         Non-stop mode support.
11127
11128         * server.h (non_stop): Declare.
11129         (gdb_client_data, handler_func): Declare.
11130         (delete_file_handler, add_file_handler, start_event_loop):
11131         Declare.
11132         (handle_serial_event, handle_target_event, push_event)
11133         (putpkt_notif): Declare.
11134         * target.h (enum resume_kind): New.
11135         (struct thread_resume): Replace `step' field by `kind' field.
11136         (TARGET_WNOHANG): Define.
11137         (struct target_ops) <wait>: Add `options' argument.
11138         <supports_non_stop, async, start_non_stop>: New fields.
11139         (target_supports_non_stop, target_async): New.
11140         (start_non_stop): Declare.
11141         (mywait): Add `options' argument.
11142         * target.c (mywait): Add `options' argument.  Print child exit
11143         notifications here.
11144         (start_non_stop): New.
11145         * server.c (non_stop, own_buf, mem_buf): New globals.
11146         (struct vstop_notif): New.
11147         (notif_queue): New global.
11148         (queue_stop_reply, push_event, discard_queued_stop_replies)
11149         (send_next_stop_reply): New.
11150         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
11151         interface changes.
11152         (attach_inferior): In non-stop mode, don't wait for the target
11153         here.
11154         (handle_general_set): Handle QNonStop.
11155         (handle_query): When handling qC, return the current general
11156         thread, instead of the first thread of the list.
11157         (handle_query): If the backend supports non-stop mode, include
11158         QNonStop+ in the qSupported query response.
11159         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
11160         and non-stop mode.
11161         (handle_v_attach, handle_v_run): Handle non-stop mode.
11162         (handle_v_stopped): New.
11163         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
11164         (myresume): Adjust to use resume_kind.  Handle non-stop.
11165         (queue_stop_reply_callback): New.
11166         (handle_status): Handle non-stop mode.
11167         (main): Clear non_stop flag on reconnection.  Use the event-loop.
11168         Refactor serial protocol handling from here ...
11169         (process_serial_event): ... to this new function.  When GDB
11170         selects any thread, select one here.  In non-stop mode, wait until
11171         GDB acks all pending events before exiting.
11172         (handle_serial_event, handle_target_event): New.
11173         * remote-utils.c (remote_open): Install remote_desc in the event
11174         loop.
11175         (remote_close): Remove remote_desc from the event loop.
11176         (putpkt_binary): Rename to...
11177         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
11178         (putpkt_binary): New as wrapper around putpkt_binary_1.
11179         (putpkt_notif): New.
11180         (prepare_resume_reply): In non-stop mode, don't change the
11181         general_thread.
11182         * event-loop.c: New.
11183         * Makefile.in (OBJ): Add event-loop.o.
11184         (event-loop.o): New rule.
11185
11186         * linux-low.h (pid_of): Moved here.
11187         (lwpid_of): New.
11188         (get_lwp_thread): Use lwpid_of.
11189         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
11190         * linux-low.c (pid_of): Delete.
11191         (inferior_pid): Use lwpid_of.
11192         (linux_event_pipe): New.
11193         (target_is_async_p): New.
11194         (delete_lwp): New.
11195         (handle_extended_wait): Use lwpid_of.
11196         (add_lwp): Don't set lwpid field.
11197         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
11198         (linux_kill_one_lwp): If killing a running lwp, stop it first.
11199         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
11200         (linux_detach_one_lwp): If detaching from a running lwp, stop it
11201         first.  Adjust to linux_wait_for_event interface changes.  Use
11202         lwpid_of.
11203         (linux_detach): Don't delete the main lwp here.
11204         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
11205         (status_pending_p): Don't consider explicitly suspended lwps.
11206         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11207         pointer.  Add OPTIONS argument.  Change return type to int.  Use
11208         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
11209         (linux_wait_for_event): Take an integer pid instead of a lwp_info
11210         pointer.  Add status pointer argument.  Return a pid instead of a
11211         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
11212         changes.  In non-stop mode, don't switch to a random thread.
11213         (linux_wait): Rename to...
11214         (linux_wait_1): ... this.  Add target_options argument, and handle
11215         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
11216         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
11217         clean exit and signal exit code.  Don't stop all threads in
11218         non-stop mode.  In all-stop mode, only stop all threads when
11219         reporting a stop to GDB.  Handle explicit thread stop requests.
11220         (async_file_flush, async_file_mark): New.
11221         (linux_wait): New.
11222         (send_sigstop): Use lwpid_of.
11223         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
11224         interface changes.  In non-stop mode, don't switch to a random
11225         thread.
11226         (linux_resume_one_lwp): Use lwpid_of.
11227         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11228         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
11229         non-stop mode, don't look for pending flag in all threads.
11230         (resume_status_pending_p): Don't consider explicitly suspended
11231         threads.
11232         (my_waitpid): Reimplement.  Emulate __WALL.
11233         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11234         Use lwpid_of.
11235         (sigchld_handler, linux_supports_non_stop, linux_async)
11236         (linux_start_non_stop): New.
11237         (linux_target_ops): Register linux_supports_non_stop, linux_async
11238         and linux_start_non_stop.
11239         (initialize_low): Install SIGCHLD handler.
11240         * thread-db.c (thread_db_create_event, find_one_thread)
11241         (thread_db_get_tls_address): Use lwpid_of.
11242         * win32-low.c (win32_detach): Adjust to use resume_kind.
11243         (win32_wait): Add `options' argument.
11244         * spu-low.c (spu_resume): Adjust to use resume_kind.
11245         (spu_wait): Add `options' argument.
11246
11247 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
11248
11249         Decouple target code from remote protocol.
11250
11251         * target.h (enum target_waitkind): New.
11252         (struct target_waitstatus): New.
11253         (struct target_ops) <wait>: Return an unsigned long.  Take a
11254         target_waitstatus pointer instead of a char pointer.
11255         (mywait): Likewise.
11256         * target.c (mywait): Change prototype to return an unsigned long.
11257         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
11258         * server.h (thread_from_wait, old_thread_from_wait): Delete
11259         declarations.
11260         (prepare_resume_reply): Change prototype to take a
11261         target_waitstatus.
11262         * server.c (thread_from_wait, old_thread_from_wait): Delete.
11263         (last_status, last_ptid): New.
11264         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
11265         pid instead of a signal.
11266         (attach_inferior): Remove "status" and "signal" parameters.
11267         Adjust.
11268         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11269         not as an address.
11270         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11271         (handle_v_requests, myresume): Remove "status" and "signal"
11272         parameters.  Adjust.
11273         (handle_status): New.
11274         (main): Delete local `status'.  Adjust.
11275         * remote-utils.c: Include target.h.
11276         (prepare_resume_reply): Change prototype to take a
11277         target_waitstatus.  Adjust.
11278
11279         * linux-low.c (linux_wait): Adjust to new target_ops->wait
11280         interface.
11281         * spu-low.c (spu_wait): Adjust.
11282         * win32-low.c (enum target_waitkind, struct target_waitstatus):
11283         Delete.
11284         (win32_wait): Adjust.
11285
11286 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
11287
11288         * target.h (struct thread_resume): Delete leave_stopped member.
11289         (struct target_ops): Add a `n' argument to the `resume' callback.
11290         * server.c (start_inferior): Adjust.
11291         (handle_v_cont, myresume): Adjust.
11292         * linux-low.c (check_removed_breakpoint): Adjust to resume
11293         interface change, and to removed leave_stopped field.
11294         (resume_ptr): Delete.
11295         (struct thread_resume_array): New.
11296         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
11297         resume interface change.
11298         (linux_continue_one_thread, linux_queue_one_thread)
11299         (resume_status_pending_p): Check if the resume field is NULL
11300         instead of checking the leave_stopped member.
11301         (linux_resume): Adjust to the target resume interface change.
11302         * spu-low.c (spu_resume): Adjust to the target resume interface
11303         change.
11304         * win32-low.c (win32_detach, win32_resume): Ditto.
11305
11306 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
11307
11308         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11309         flag.
11310         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11311         pending.
11312         (linux_continue_one_thread): Only preserve the stepping flag if
11313         there's a pending breakpoint.
11314
11315 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
11316
11317         * server.c (main): After the inferior having exited, call
11318         remote_close before exiting gdbserver.
11319
11320 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
11321
11322         Fix size of FPSCR in Power 7 processors.
11323         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11324         (PPC_FEATURE_HAS_DFP): New #define.
11325         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11326         size of the FPSCR.
11327
11328 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
11329
11330         * server.c (handle_query) Whitespace and formatting.
11331
11332 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
11333
11334         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11335         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11336         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11337         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11338         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11339         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11340         Makefile.in, configure.ac: Fix whitespace throughout.
11341         * configure: Regenerate.
11342
11343 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
11344
11345         * inferiors.c (find_inferior): Make it safe for the callback
11346         function to delete the currently iterated inferior.
11347
11348 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
11349
11350         * Makefile.in (linuw_low_h): Move higher.
11351         (thread-db.o): Depend on $(linux_low_h).
11352
11353 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
11354
11355         Rename "process" to "lwp" throughout.
11356
11357         * linux-low.c (all_processes): Rename to...
11358         (all_lwps): ... this.
11359         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11360         (add_process): Rename to ...
11361         (add_lwp): ... this.  Adjust.
11362         (linux_create_inferior): Adjust.
11363         (linux_attach_lwp): Adjust.
11364         (linux_attach): Adjust.
11365         (linux_kill_one_process): Rename to ...
11366         (linux_kill_one_lwp): ... this.  Adjust.
11367         (linux_kill): Adjust.
11368         (linux_detach_one_process): Rename to ...
11369         (linux_detach_one_lwp): ... this.  Adjust.
11370         (linux_detach): Adjust.
11371         (check_removed_breakpoint): Adjust.
11372         (status_pending_p): Adjust.
11373         (linux_wait_for_process): Rename to ...
11374         (linux_wait_for_lwp): ... this.  Adjust.
11375         (linux_wait_for_event): Adjust.
11376         (send_sigstop): Adjust.
11377         (wait_for_sigstop): Adjust.
11378         (stop_all_processes): Rename to ...
11379         (stop_all_lwps): ... this.
11380         (linux_resume_one_process): Rename to ...
11381         (linux_resume_one_lwp): ... this.  Adjust.
11382         (linux_set_resume_request, linux_continue_one_thread)
11383         (linux_queue_one_thread, resume_status_pending_p)
11384         (usr_store_inferior_registers, regsets_store_inferior_registers)
11385         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11386         Adjust.
11387         * linux-low.h (get_process): Rename to ...
11388         (get_lwp): ... this.  Adjust.
11389         (get_thread_process): Rename to ...
11390         (get_thread_lwp): ... this.  Adjust.
11391         (get_process_thread): Rename to ...
11392         (get_lwp_thread): ... this.  Adjust.
11393         (struct process_info): Rename to ...
11394         (struct lwp_info): ... this.
11395         (all_processes): Rename to ...
11396         (all_lwps): ... this.
11397         * proc-service.c (ps_lgetregs): Adjust.
11398         * thread-db.c (thread_db_create_event, find_one_thread)
11399         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11400
11401 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
11402
11403         * server.c (handle_query): Handle "qAttached".
11404
11405 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
11406
11407         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11408         GPLv3, update license URL.
11409
11410 2009-03-01  Doug Evans  <dje@google.com>
11411
11412         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
11413         (server_h): Add gdb_signals.h.
11414         (signals.o): Update.
11415         * server.h (target_signal_from_host,target_signal_to_host_p)
11416         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11417
11418 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
11419
11420         * remote-utils.c (getpkt): Also generate remote-debug
11421         information if noack_mode is set.
11422
11423 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
11424
11425         * server.c (handle_query): Report qXfer:siginfo:read and
11426         qXfer:siginfo:write as supported and handle them.
11427         * target.h (struct target_ops) <qxfer_siginfo>: New field.
11428         * linux-low.c (linux_xfer_siginfo): New.
11429         (linux_target_ops): Set it.
11430
11431 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
11432
11433         * server.c (gdbserver_usage): Mention --remote-debug.
11434         (main): Accept '--remote-debug' switch.
11435
11436 2009-01-18  Doug Evans  <dje@google.com>
11437
11438         * regcache.c (new_register_cache): No need to check result of xcalloc.
11439         * server.c (handle_search_memory): Back out calls to xmalloc,
11440         result is checked and error is returned to user upon failure.
11441         (handle_query): Ditto.  Add more checks for result of malloc.
11442         (handle_v_cont): Check result of malloc, report error back to
11443         user upon failure.
11444         (handle_v_run): Ditto.  Call freeargv.
11445         * server.h (freeargv): Declare.
11446         * utils.c (freeargv): New fn.
11447
11448 2009-01-15  Doug Evans  <dje@google.com>
11449
11450         * gdbreplay.c (perror_with_name): Make arg const char *.
11451         * server.h (target_signal_to_name): Make return type const char *.
11452         * thread-db.c (thread_db_err_str): Make return type const char *.
11453         * utils.c (perror_with_name): Make arg const char *.
11454
11455 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
11456
11457         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11458         when handling a EXIT_PROCESS_DEBUG_EVENT.
11459
11460 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
11461
11462         * gdbreplay.c (gdbreplay_version): Update copyright year.
11463         * server.c (gdbserver_version): Likewise.
11464
11465 2009-01-05  Doug Evans  <dje@google.com>
11466
11467         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
11468         (handle_extended_wait): Improve comment.
11469
11470 2008-12-13  Doug Evans  <dje@google.com>
11471
11472         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11473         * server.h (ATTR_MALLOC): New macro.
11474         (xmalloc,xcalloc,xstrdup): Declare.
11475         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11476         * inferiors.c: Ditto.
11477         * linux-low.c: Ditto.
11478         * mem-break.c: Ditto.
11479         * regcache.c: Ditto.
11480         * remote-utils.c: Ditto.
11481         * server.c: Ditto.
11482         * target.c: Ditto.
11483         * win32-low.c: Ditto.
11484
11485 2008-12-12  Doug Evans  <dje@google.com>
11486
11487         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11488         in debugging printf.
11489
11490         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11491
11492 2008-12-09  Doug Evans  <dje@google.com>
11493
11494         * linux-low.h (struct process_info): Delete member tid, unused.
11495         * thread-db.c (find_one_thread): Update.
11496         (maybe_attach_thread): Update.
11497
11498 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
11499
11500         * target.h (struct target_ops): Add qxfer_osdata member.
11501         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11502         and dirent.h.
11503         (linux_qxfer_osdata): New functions.
11504         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11505         callback.
11506         * server.c (handle_query): Handle "qXfer:osdata:read:".
11507         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11508         (buffer_xml_printf): New functions.
11509         * server.h (struct buffer): New.
11510         (buffer_grow_str, buffer_grow_str0): New macros.
11511         (buffer_grow, buffer_free, buffer_init, buffer_finish)
11512         (buffer_xml_printf): Declare.
11513
11514 2008-11-24  Doug Evans  <dje@google.com>
11515
11516         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11517
11518 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
11519
11520         * server.c (handle_v_run): Always use the supplied argument list.
11521
11522 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
11523
11524         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11525         (xtensa_regmap_table): Add entry for scompare1.
11526
11527 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
11528
11529         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11530         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11531         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11532         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11533         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11534         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11535         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11536         XML target descriptions.
11537         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11538         when inferior is running on an ISA 2.05 or later processor.  Add
11539         special case to return offset for full 64-bit slot of FPSCR when
11540         in 32-bits.
11541
11542 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
11543
11544         * Makefile.in (SFILES, clean): Added sparc64 files.
11545         (reg-sparc64.o, reg-sparc64.c): New.
11546         * configure.srv (sparc*-*-linux*): New configuration.
11547         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11548         syscall arguments for SPARC.
11549         (regsets_store_inferior_registers): Likewise.
11550         * linux-sparc-low.c: New file.
11551
11552 2008-10-21  Doug Evans  <dje@google.com>
11553
11554         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11555         (READLINE_DIR,READLINE_DEP): Delete.
11556         (INTERNAL_CFLAGS): Update.
11557         (LINTFLAGS): Update.
11558
11559 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
11560
11561         * server.c (handle_v_run): If GDB didn't specify an argv, use the
11562         whole argv from the last run, not just argv[0].
11563
11564 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
11565
11566         * regcache.c (new_register_cache): Return NULL if the register
11567         cache size isn't known yet.
11568         (free_register_cache): Avoid dereferencing a NULL regcache.
11569
11570 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
11571
11572         * configure.srv: Merge MIPS and MIPS64.
11573
11574 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
11575
11576         * Makefile.in (uninstall): Apply $(EXEEXT) too.
11577
11578 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
11579
11580         * Makefile.in: Add required vsx dependencies.
11581
11582         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11583         Declare init_registers_powerpc_vsx32l.
11584         Declare init_registers_powerpc_vsx64l.
11585         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11586         (ppc_arch_setup): Check for VSX in hwcap.
11587         (ppc_fill_vsxregset): New function.
11588         (ppc_store_vsxregset): New function.
11589         Add new VSX entry in regset_info target_regsets.
11590
11591         * configure.srv: Add new VSX dependencies.
11592
11593 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
11594
11595         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11596         (remote_open): Set or clear transport_is_reliable.
11597         (putpkt_binary): Don't expect acks in noack mode.
11598         (getpkt): Don't send ack/nac in noack mode.
11599         * server.c (handle_general_set): Handle QStartNoAckMode.
11600         (handle_query): If connected by tcp pass QStartNoAckMode+ in
11601         qSupported.
11602         (main): Reset noack_mode on every connection.
11603         * server.h (noack_mode): Declare.
11604
11605 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11606
11607         * Makefile.in (GDBREPLAY_OBS): New variable.
11608         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11609
11610 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
11611             Daniel Jacobowitz  <dan@codesourcery.com>
11612
11613         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11614         (usr_store_inferior_registers): Likewise.
11615         (regsets_store_inferior_registers): Likewise.
11616
11617 2008-07-31  Rolf Jansen  <rj@surtec.com>
11618             Pedro Alves  <pedro@codesourcery.com>
11619
11620         * configure.ac: Check for memmem declaration.
11621         * server.c [HAVE_MALLOC_H]: Include malloc.h.
11622         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11623         (disable_packet_qfThreadInfo): Unconditionally compile.
11624         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11625         * configure, config.in: Regenerate.
11626
11627 2008-07-28  Doug Kwan  <dougkwan@google.com>
11628
11629         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11630         (linux_write_memory): Remove declaration of errno.
11631
11632 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
11633
11634         * linux-low.c (handle_extended_wait): Do not use "status"
11635         variable uninitialized.
11636
11637 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
11638
11639         * server.c (handle_v_attach): Inhibit reporting dll changes.
11640
11641 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
11642
11643         * remote-utils.c (prepare_resume_reply): If requested, don't
11644         output "thread:TID" in the T stop reply.
11645
11646         * server.c (disable_packet_vCont, disable_packet_Tthread)
11647         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11648         (handle_query): If requested, disable support for qC, qfThreadInfo
11649         and qsThreadInfo.
11650         (handle_v_requests): If requested, disable support for vCont.
11651         (gdbserver_show_disableable): New.
11652         (main): Handle --disable-packet and --disable-packet=LIST.
11653
11654         * server.h (disable_packet_vCont, disable_packet_Tthread)
11655         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11656
11657 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
11658
11659         * server.c (gdbserver_usage): Mention --version.
11660
11661 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
11662
11663         * Makefile.in (gdbreplay.o): New rule.
11664
11665 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
11666
11667         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11668         message, not gdbserver.
11669
11670 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
11671             Nathan Sidwell  <nathan@codesourcery.com>
11672             Joseph Myers  <joseph@codesourcery.com>
11673
11674         * acinclude.m4: Include ../../config/acx.m4.
11675         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11676         * configure, config.in: Regenerate.
11677         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11678         * server.c (gdbserver_version): Print PKGVERSION.
11679         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
11680         (main): Adjust gdbserver_usage calls.
11681         * gdbreplay.c (version, host_name): Add declarations.
11682         (gdbreplay_version, gdbreplay_usage): New.
11683         (main): Accept --version and --help options.
11684
11685 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
11686
11687         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11688         (arm_breakpoint_at): Handle Thumb.
11689         (the_low_target): Add comment.
11690
11691 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
11692
11693         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11694
11695 2008-05-09  Doug Evans  <dje@google.com>
11696
11697         * server.h (decode_search_memory_packet): Declare.
11698         * remote-utils.c (decode_search_memory_packet): New fn.
11699         * server.c (handle_search_memory_1): New fn.
11700         (handle_search_memory): New fn.
11701         (handle_query): Process qSearch:memory packets.
11702
11703 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
11704
11705         * regcache.c (registers_length): Remove.
11706         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11707         full register packet.
11708         * regcache.h (registers_length): Remove prototype.
11709         * server.h (PBUFSIZ): Define to 16384.
11710
11711 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
11712
11713         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11714         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11715         powerpc-64l.o, and powerpc-altivec64l.o.
11716         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11717         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11718         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11719         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11720         rs6000/power-linux.xml, and rs6000/power64-linux.xml
11721         to srv_xmlfiles.
11722
11723         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11724         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11725         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11726         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11727         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11728         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11729         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11730         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11731         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11732         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11733         (clean): Update.
11734
11735         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11736         (init_registers_powerpc_32l): ... this new prototype.
11737         (init_registers_powerpc_32): Remove, replace by ...
11738         (init_registers_powerpc_altivec32l): ... this new prototype.
11739         (init_registers_powerpc_e500): Remove, replace by ...
11740         (init_registers_powerpc_e500l): ... this new prototype.
11741         (init_registers_ppc64): Remove, replace by ...
11742         (init_registers_powerpc_64l): ... this new prototype.
11743         (init_registers_powerpc_64): Remove, replace by ...
11744         (init_registers_powerpc_altivec64l): ... this new prototype.
11745         (ppc_num_regs): Set to 73.
11746         (PT_ORIG_R3, PT_TRAP): Define if necessary.
11747         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11748         (ppc_cannot_store_register): Handle orig_r3 and trap.
11749         (ppc_arch_setup): Update init_registers_... calls.
11750         (ppc_fill_gregset): Handle orig_r3 and trap.
11751
11752         * inferiors.c (clear_inferiors): Reset current_inferior.
11753
11754 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
11755
11756         * acinclude.m4: Add override.m4.
11757         * configure: Regenerate.
11758
11759 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
11760
11761         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11762         initial call to init_register_ppc64.
11763
11764 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
11765
11766         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11767         single powerpc*-*-linux* case.
11768         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11769
11770 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
11771
11772         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11773         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11774         from reg_xmlfiles.
11775         * linux-ppc-low.c: Include <elf.h>.
11776         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11777         (ppc_hwcap): New global variable.
11778         (ppc_regmap): Remove __SPE__ #ifdef sections.
11779         (ppc_regmap_e500): New global variable.
11780         (ppc_cannot_store_register): Update __SPE__ special case.
11781         (ppc_get_hwcap): New function.
11782         (ppc_arch_setup): Use it to determine whether inferior supports
11783         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
11784         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11785         Do not access registers if target does not support AltiVec.
11786         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11787         Do not access registers if target does not support SPE.
11788         (target_regsets): Unconditionally include AltiVec and SPE regsets.
11789
11790 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
11791
11792         * linux-low.c (disabled_regsets, num_regsets): New.
11793         (use_regsets_p): Delete.
11794         (linux_wait_for_process): Clear disabled_regsets.
11795         (regsets_fetch_inferior_registers): Check and set it.
11796         (regsets_store_inferior_registers): Likewise.
11797         (linux_fetch_registers, linux_store_registers): Do not use
11798         use_regsets_p.
11799         (initialize_low): Allocate disabled_regsets.
11800
11801 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
11802
11803         * Makefile.in (LIBOBJS): New.
11804         (OBS): Use LIBOBJS.
11805         (memmem.o): New rule.
11806         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11807         * configure: Regenerated.
11808
11809 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
11810
11811         * server.c (handle_query): Never return "unsupported" for
11812         qXfer:features:read queries.
11813
11814 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
11815
11816         * server.c (get_features_xml): Fix inverted condition.
11817         (handle_query): Always support qXfer:feature:read.
11818
11819 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
11820
11821         * server.c (wrapper_argv): New.
11822         (start_inferior): Handle wrapper_argv.  If set, expect an extra
11823         trap.
11824         (gdbserver_usage): Document --wrapper.
11825         (main): Parse --wrapper.
11826
11827 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11828
11829         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11830         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11831         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11832         (ppc_set_pc): Likewise.
11833         (ppc_arch_setup): New function.
11834         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11835         of collect_register.
11836         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11837
11838 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11839
11840         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11841         instead of linux-ppc64-low.o.
11842         * linux-ppc64-low.c: Remove file.
11843         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11844         (linux-ppc64-low.o): Remove rule.
11845
11846         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11847         (init_registers_powerpc_64): Likewise.
11848         (ppc_regmap): Conditionally define depending on __powerpc64__.
11849         (ppc_cannot_store_register): Do not special-case "fpscr" when
11850         compiled on __powerpc64__.
11851         (ppc_collect_ptrace_register): New function.
11852         (ppc_supply_ptrace_register): New function.
11853         (ppc_breakpoint): Change type to "unsigned int".
11854         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11855         (the_low_target): Conditionally provide initializers for the
11856         arch_setup member depending on __powerpc64__.  Install
11857         collect_ptrace_register and supply_ptrace_register members.
11858
11859 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11860
11861         * regcache.h (gdbserver_xmltarget): Add extern declaration.
11862         * server.c (gdbserver_xmltarget): Define.
11863         (get_features_xml): Use it to replace "target.xml" and arch_string.
11864
11865         * configure.srv: Remove srv_xmltarget.  Add XML files that were
11866         mentioned there to srv_xmlfiles instead.  Remove conditional tests
11867         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11868         srv_xmlfiles and srv_regobj to include all possible choices.
11869         * configure.ac (srv_xmltarget): Remove.
11870         (srv_xmlfiles): Do not add "target.xml".
11871         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11872         checks for supplementary target information.
11873         * configure: Regenerate.
11874         * Makefile.in (XML_TARGET): Remove.
11875         (target.xml): Remove rule.
11876         (clean): Do not clean up target.xml.
11877         (.PRECIOUS): Do not mention target.xml.
11878
11879         * target.h (struct target_ops): Remove arch_string member.
11880         * linux-low.c (linux_arch_string): Remove.
11881         (linux_target_ops): Remove arch_string initializer.
11882         * linux-low.h (struct linux_target_ops): Remove arch_string member.
11883         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11884         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11885         * spu-low.c (spu_arch_string): Remove.
11886         (spu_target_ops): Remove arch_string initializer.
11887         * win32-low.c (win32_arch_string): Remove.
11888         (win32_target_ops): Remove arch_string initializer.
11889         * win32-low.h (struct win32_target_ops): Remove arch_string member.
11890         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11891         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11892
11893 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11894
11895         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11896         by collect_ptrace_register and supply_ptrace_register hooks.
11897         * linux-low.c (fetch_register): Use supply_ptrace_register callback
11898         instead of checking for the_low_target.left_pad_xfer.
11899         (usr_store_inferior_registers): Use collect_ptrace_register callback
11900         instead of checking for the_low_target.left_pad_xfer.
11901
11902         * linux-s390-low.c (s390_collect_ptrace_register): New function.
11903         (s390_supply_ptrace_register): Likewise.
11904         (s390_fill_gregset): Call s390_collect_ptrace_register.
11905         (the_low_target): Update.
11906
11907         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11908         (ppc_supply_ptrace_register): Likewise.
11909         (the_low_target): Update.
11910
11911         * linux-i386-low.c (the_low_target): Update.
11912         * linux-x86-64-low.c (the_low_target): Update.
11913
11914 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11915
11916         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11917         reg-s390.o and reg-s390x.o.
11918
11919         * linux-low.c (new_inferior): New global variable.
11920         (linux_create_inferior, linux_attach): Set it.
11921         (linux_wait_for_process): Call the_low_target.arch_setup after the
11922         target has stopped for the first time.
11923         (initialize_low): Do not call the_low_target.arch_setup.
11924
11925         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11926         (s390_set_pc): Likewise.
11927         (s390_arch_setup): New function.
11928         (the_low_target): Use s390_arch_setup as arch_setup routine.
11929
11930         * regcache.c (realloc_register_cache): New function.
11931         (set_register_cache): Call it for each existing regcache.
11932
11933 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11934
11935         * server.h (init_registers): Remove prototype.
11936
11937         * linux-low.h (struct linux_target_ops): Add arch_setup field.
11938         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11939         instead of init_registers ().
11940         * linux-arm-low.c (init_registers_arm): Add prototype.
11941         (init_registers_arm_with_iwmmxt): Likewise.
11942         (the_low_target): Add initializer for arch_setup field.
11943         * linux-cris-low.c (init_registers_cris): Add prototype.
11944         (the_low_target): Add initializer for arch_setup field.
11945         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11946         (the_low_target): Add initializer for arch_setup field.
11947         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11948         (the_low_target): Add initializer for arch_setup field.
11949         * linux-ia64-low.c (init_registers_ia64): Add prototype.
11950         (the_low_target): Add initializer for arch_setup field.
11951         * linux-m32r-low.c (init_registers_m32r): Add prototype.
11952         (the_low_target): Add initializer for arch_setup field.
11953         * linux-m68k-low.c (init_registers_m68k): Add prototype.
11954         (the_low_target): Add initializer for arch_setup field.
11955         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11956         (init_registers_mips64_linux): Likewise.
11957         (the_low_target): Add initializer for arch_setup field.
11958         * linux-ppc-low.c (init_registers_ppc): Add prototype.
11959         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11960         (the_low_target): Add initializer for arch_setup field.
11961         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11962         (init_registers_powerpc_64): Likewise.
11963         (the_low_target): Add initializer for arch_setup field.
11964         * linux-s390-low.c (init_registers_s390): Add prototype.
11965         (init_registers_s390x): Likewise.
11966         (the_low_target): Add initializer for arch_setup field.
11967         * linux-sh-low.c (init_registers_sh): Add prototype.
11968         (the_low_target): Add initializer for arch_setup field.
11969         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11970         (the_low_target): Add initializer for arch_setup field.
11971         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11972         (the_low_target): Add initializer for arch_setup field.
11973
11974         * win32-low.h (struct win32_target_ops): Add arch_setup field.
11975         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11976         instead of init_registers ().
11977         * win32-arm-low.c (init_registers_arm): Add prototype.
11978         (the_low_target): Add initializer for arch_setup field.
11979         * win32-i386-low.c (init_registers_i386): Add prototype.
11980         (the_low_target): Add initializer for arch_setup field.
11981
11982         * spu-low.c (init_registers_spu): Add prototype.
11983         (initialize_low): Call initialie_registers_spu () instead of
11984         initialize_registers ().
11985
11986 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
11987
11988         * server.c (handle_v_requests): When handling the vRun and vAttach
11989         packets, if already debugging a process, don't kill it.  Return an
11990         error instead.
11991
11992 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
11993
11994         * server.c (handle_query): Correct length check.
11995
11996 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
11997
11998         * win32-low.c (do_initial_child_stuff): Add process handle
11999         parameter.  Set current_process_handle and current_process_id from the
12000         parameters. Clear globals.
12001         (win32_create_inferior): Don't set current_process_handle and
12002         current_process_id here.  Instead pass them on the call to
12003         do_initial_child_stuff.
12004         (win32_attach): Likewise.
12005         (win32_clear_inferiors): New.
12006         (win32_kill): Don't close the current process handle or the
12007         current thread handle here.  Instead call win32_clear_inferiors.
12008         (win32_detach): Don't open a new handle to the process.  Call
12009         win32_clear_inferiors.
12010         (win32_join): Don't rely on current_process_handle; open a new
12011         handle using the process id.
12012         (win32_wait): Call win32_clear_inferiors when the inferior process
12013         has exited.
12014
12015 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
12016
12017         * server.c (monitor_show_help): Add "exit".
12018
12019 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
12020
12021         * Makefile.in (SFILES): Add linux-xtensa-low.c.
12022         (clean): Add reg-xtensa.c.
12023         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12024         * configure.srv (xtensa*-*-linux*) New target.
12025         * linux-xtensa-low.c: New.
12026         * xtensa-xtregs.c: New.
12027
12028 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
12029
12030         * hostio.c: Don't include errno.h.
12031         (errno_to_fileio_errno): Move to hostio-errno.
12032         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
12033         error number outputting to the target->hostio_last_error callback.
12034         (hostio_packet_error): Use FILEIO_EINVAL directly.
12035         (handle_open, handle_pread, hostio_error, handle_unlink): Update
12036         calls to hostio_error.
12037         * hostio-errno.c: New.
12038         * server.h (hostio_last_error_from_errno): Declare.
12039         * target.h (target_ops): Add hostio_last_error member.
12040         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12041         as hostio_last_error handler.
12042         * spu-low.c (spu_target_ops): Likewise.
12043         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12044         (wince_hostio_last_error): New functions.
12045         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12046         as hostio_last_error handler.
12047         (win32_target_ops) [!_WIN32_WCE]: Register
12048         hostio_last_error_from_errno as hostio_last_error handler.
12049         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12050         (hostio-errno.o): New rule.
12051         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12052         * configure.srv (srv_hostio_err_objs): New variable.  Default to
12053         hostio-errno.o.
12054         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12055         * configure: Regenerate.
12056
12057 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
12058
12059         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12060         (linux_kill, linux_detach): Clean up the process list.
12061         * remote-utils.c (remote_open): Improve port number parsing.
12062         (putpkt_binary, input_interrupt): Only send interrupts if the target
12063         is running.
12064         * server.c (extended_protocol): Make static.
12065         (attached): Define earlier.
12066         (exit_requested, response_needed, program_argv): New variables.
12067         (target_running): New.
12068         (start_inferior): Clear attached here.
12069         (attach_inferior): Set attached here.
12070         (require_running): Define.
12071         (handle_query): Use require_running and target_running.  Implement
12072         "monitor exit".
12073         (handle_v_attach, handle_v_run): New.
12074         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
12075         (gdbserver_usage): Update.
12076         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
12077         --attach along with other options or after the port.  Save
12078         program_argv.  Support no initial program.  Resynchronize
12079         communication with GDB after an error.  Handle "monitor exit".
12080         Use require_running and target_running.  Always allow the extended
12081         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
12082         restart in extended mode.
12083         * README: Refer to the GDB manual.  Update --attach usage.
12084
12085 2007-12-20  Andreas Schwab  <schwab@suse.de>
12086
12087         * linux-low.c (STACK_SIZE): Define.
12088         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
12089         (linux_test_for_tracefork): Likewise.
12090
12091 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
12092
12093         * linux-low.c (linux_wait_for_event): Update messages.  Do not
12094         reinsert auto-delete breakpoints.
12095         * mem-break.c (struct breakpoint): Change return type of handler to
12096         int.
12097         (set_breakpoint_at): Update handler type.
12098         (reinsert_breakpoint_handler): Return 1 instead of calling
12099         delete_breakpoint.
12100         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12101         setting a new one.
12102         (check_breakpoints): Delete auto-delete breakpoints and return 2.
12103         * mem-break.h (set_breakpoint_at): Update handler type.
12104         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12105         * win32-low.c (auto_delete_breakpoint): New.
12106         (get_child_debug_event): Use it.
12107
12108 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
12109
12110         * configure.ac: Check for pread and pwrite.
12111         * hostio.c (handle_pread): Fall back to lseek and read.
12112         (handle_pwrite): Fall back to lseek and write.
12113         * config.in, configure: Regenerated.
12114
12115 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
12116
12117         * server.c (myresume): Add own_buf argument.
12118         (main): Update calls.
12119
12120 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
12121
12122         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12123         * remote-utils.c (remote_open): Do not call disable_async_io.
12124         (block_async_io): Delete.
12125         (unblock_async_io): Make static.
12126         (initialize_async_io): New.
12127         * server.c (handle_v_cont): Handle async I/O here.
12128         (myresume): Likewise.  Move other common resume tasks here...
12129         (main): ... from here.  Call initialize_async_io.  Disable async
12130         I/O before the main loop.
12131         * server.h (initialize_async_io): Declare.
12132         (block_async_io, unblock_async_io): Delete prototypes.
12133         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12134
12135 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
12136
12137         * remote-utils.c (readchar): Allow binary data in received messages.
12138
12139 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
12140
12141         * win32-low.c (attaching): New global.
12142         (win32_create_inferior): Clear the `attaching' global.
12143         (win32_attach): Set the `attaching' global.
12144         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12145         attaching.  Only set a breakpoint at the entry point if not
12146         attaching.
12147
12148 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
12149
12150         * server.c (main): Don't report dll events on the initial
12151         connection on attaches.
12152
12153 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
12154
12155         * server.c (main): Relax numerical bases supported for the pid of
12156         the --attach command line argument.
12157
12158 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
12159
12160         * win32-low.c (win32_attach): Call OpenProcess before
12161         DebugActiveProcess, not after.  Add last error output to error
12162         call.
12163
12164 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
12165
12166         * win32-low.c (win32_get_thread_context)
12167         (win32_set_thread_context): New functions.
12168         (thread_rec): Use win32_get_thread_context.
12169         (continue_one_thread, win32_resume): Use win32_set_thread_context.
12170         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12171         field.
12172
12173 2007-12-03  Leo Zayas
12174             Pedro Alves  <pedro_alves@portugalmail.pt>
12175
12176         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12177         global variables.
12178         (child_add_thread): Minor cleanup.
12179         (child_continue): Resume artificially suspended threads before
12180         calling ContinueDebugEvent.
12181         (suspend_one_thread): New.
12182         (fake_breakpoint_event): New.
12183         (get_child_debug_event): Change return type to int.  Check here if
12184         gdb sent an interrupt request.  If a soft interrupt was requested,
12185         fake a breakpoint event.  Return 0 if there is no event to handle,
12186         and 1 otherwise.
12187         (win32_wait): Don't check here if gdb sent an interrupt request.
12188         Ensure there is a valid event to handle.
12189         (win32_request_interrupt): Add soft interruption method as last
12190         resort.
12191
12192 2007-12-03  Leo Zayas
12193             Pedro Alves  <pedro_alves@portugalmail.pt>
12194
12195         * win32-low.h (win32_thread_info): Add descriptions to the
12196         structure members.  Replace `suspend_count' counter by a
12197         `suspended' flag.
12198         * win32-low.c (thread_rec): Update condition of when to get the
12199         context from the inferior.  Rely on ContextFlags being set if it
12200         has already been retrieved.  Only suspend the inferior thread if
12201         we haven't already.  Warn if that fails.
12202         (continue_one_thread): s/suspend_count/suspended/.  Only call
12203         ResumeThread once.  Warn if that fails.
12204
12205 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
12206
12207         * win32-low.c (win32_wait): Don't read from the inferior when it
12208         has already exited.
12209
12210 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
12211
12212         * Makefile.in (win32_low_h): New variable.
12213         (win32-low.o): Add dependency on $(win32_low_h).
12214         (win32-arm-low.o, win32-i386-low.o): New rules.
12215
12216 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
12217
12218         * hostio.c: Correct copyright year.
12219
12220 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
12221
12222         * Makefile.in (OBS): Add hostio.o.
12223         (hostio.o): New rule.
12224         * server.h (handle_vFile): Declare.
12225         * hostio.c: New file.
12226         * server.c (handle_v_requests): Take packet_len and new_packet_len
12227         for binary packets.  Call handle_vFile.
12228         (main): Update call to handle_v_requests.
12229
12230 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
12231
12232         * linux-low.c: Include <sched.h>.
12233
12234 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
12235
12236         * linux-low.c (linux_tracefork_grandchild): New.
12237         (linux_tracefork_child): Use clone.
12238         (linux_test_for_tracefork): Use clone; allocate and free a stack.
12239
12240 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
12241
12242         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12243
12244 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
12245
12246         * linux-low.c (handle_extended_wait): Handle unexpected signals.
12247
12248 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
12249
12250         * inferiors.c (change_inferior_id): Delete.
12251         (add_pid_to_list, pull_pid_from_list): New.
12252         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12253         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12254         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12255         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12256         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12257         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12258         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12259         (using_threads): Always set to 1.
12260         (handle_extended_wait): New.
12261         (add_process): Do not set TID.
12262         (linux_create_inferior): Set must_set_ptrace_flags.
12263         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
12264         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
12265         (linux_thread_alive): Rename TID argument to LWPID.
12266         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
12267         (linux_wait_for_event): Do not use TID or check using_threads.  Update
12268         call to dead_thread_notify.  Call handle_extended_wait.
12269         (linux_create_inferior): Use PTRACE_SETOPTIONS.
12270         (send_sigstop): Delete sigstop_sent.
12271         (wait_for_sigstop): Avoid TID.
12272         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12273         (linux_test_for_tracefork): New.
12274         (linux_lookup_signals): Use thread_db_active and
12275         linux_supports_tracefork_flag.
12276         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12277         * linux-low.h (get_process_thread): Avoid TID.
12278         (struct process_ifo): Move thread_known and tid to the end.  Remove
12279         sigstop_sent.
12280         (linux_attach_lwp, thread_db_init): Update prototypes.
12281         * server.h (change_inferior_id): Delete prototype.
12282         (add_pid_to_list, pull_pid_from_list): New prototypes.
12283         * thread-db.c (thread_db_use_events): New.
12284         (find_first_thread): Rename to...
12285         (find_one_thread): ...this.  Update callers and messages.  Do not
12286         call fatal.  Check thread_db_use_events.  Do not call
12287         change_inferior_id or new_thread_notify.
12288         (maybe_attach_thread): Update.  Do not call new_thread_notify.
12289         (thread_db_init): Set thread_db_use_events.  Check use_events.
12290         * utils.c (fatal, warning): Correct message prefix.
12291
12292 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
12293
12294         * Makefile.in (clean): Remove new files.
12295         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12296         (powerpc-64.o, powerpc-64.c): New rules.
12297         * configure.srv: Use alternate register sets for powerpc64-*-linux*
12298         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12299         with SPE.
12300         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12301         SPE targets.
12302         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12303         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12304         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12305         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12306         (target_regsets): Add AltiVec and SPE register sets.
12307         * configure.ac: Check for AltiVec and SPE.
12308         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12309         (ppc_fill_vrregset, ppc_store_vrregset): New.
12310         (target_regsets): Add AltiVec register set.
12311         * configure: Regenerated.
12312
12313 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
12314
12315         * linux-low.c (O_LARGEFILE): Define.
12316         (linux_read_memory): Use /proc/PID/mem.
12317         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
12318         * configure, config.in: Regenerated.
12319
12320 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
12321
12322         * linux-low.c (linux_wait_for_event): Do not pass signals while
12323         single-stepping.
12324
12325 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
12326
12327         * win32-low.c (create_process): New.
12328         (win32_create_inferior): Use create_process instead of
12329         CreateProcess.  If create_process failed retry appending an ".exe"
12330         suffix.  Store the GetLastError result immediatelly after
12331         create_process calls and use it on the call to error.
12332
12333 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
12334
12335         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12336
12337 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
12338
12339         * configure.ac: Switch license to GPLv3.
12340
12341 2007-08-01  Michael Snyder  <msnyder@access-company.com>
12342
12343         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12344
12345 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
12346
12347         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12348         typedef.
12349         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12350         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
12351         CloseToolhelp32Snapshot.
12352         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12353         CloseToolhelp32Snapshot.
12354
12355 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
12356
12357         * server.c (main): Check for inferior exit before main loop.
12358
12359 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
12360
12361         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12362         instead of on tmp_desc.
12363
12364 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
12365             Daniel Jacobowitz  <dan@codesourcery.com>
12366
12367         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12368         (add_thread): Minor cleanups.
12369         (clear_inferiors): Move lower in the file.  Clear the DLL
12370         list.
12371         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12372         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12373         (xml_escape_text): New.
12374         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
12375         for qSupported.
12376         (handle_v_cont): Report errors.
12377         (gdbserver_version): Update.
12378         (main): Correct size of own_buf.  Do not report initial DLL events.
12379         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12380         (unloaded_dll, xml_escape_text): New.
12381         * win32-low.c (enum target_waitkind): Update comments.
12382         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12383         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12384         (win32_EnumProcessModules, win32_GetModuleInformation)
12385         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12386         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12387         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12388         (win32_Module32First, win32_Module32Next, load_toolhelp)
12389         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12390         (get_child_debug_event): Handle DLL events.
12391         (win32_wait): Likewise.
12392
12393 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
12394
12395         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12396         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12397
12398 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
12399
12400         * win32-low.c (handle_output_debug_string): Ignore event if not
12401         waiting.
12402
12403 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
12404
12405         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12406
12407 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
12408
12409         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12410
12411 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
12412
12413         * inferiors.c (change_inferior_id): Add comment.
12414         * linux-low.c (check_removed_breakpoint): Add an early
12415         prototype.  Improve debug output.
12416         (linux_attach): Doc update.
12417         (linux_detach_one_process, linux_detach): Clean up before releasing
12418         each process.
12419         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12420         * linux-low.h (struct process_info): Doc improvement.
12421         * mem-break.c (delete_all_breakpoints): New.
12422         * mem-break.h (delete_all_breakpoints): New prototype.
12423         * thread-db.c (find_first_thread): New.
12424         (thread_db_create_event): Call it instead of
12425         thread_db_find_new_threads.  Clean up unused variables.
12426         (maybe_attach_thread): Remove first thread handling.
12427         (thread_db_find_new_threads): Use find_first_thread.
12428         (thread_db_get_tls_address): Likewise.
12429
12430 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
12431
12432         * thread-db.c (thread_db_find_new_threads): Add prototype.
12433         (thread_db_create_event): Check for the main thread before adding
12434         a new thread.
12435         (maybe_attach_thread): Only enable event reporting if TID == 0.
12436         (thread_db_get_tls_address): Check for new threads.
12437
12438 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
12439
12440         * linux-low.c (linux_create_inferior): Try execv before execvp.
12441         * spu-low.c (spu_create_inferior): Likewise.
12442
12443 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
12444
12445         * linux-low.c (linux_create_inferior): Change execv to execvp.
12446         * spu-low.c (spu_create_inferior): Likewies.
12447
12448 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
12449
12450         * Makefile.in (clean): Clean new files instead of deleted ones.
12451         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12452         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12453         rules.
12454         * configure.srv: Specify XML files and new regformats for MIPS and
12455         MIPS64 GNU/Linux.
12456         * linux-mips-low.c (mips_num_regs): Set to only used registers.
12457         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
12458         an entry for the restart register.
12459         (mips_cannot_fetch_register, mips_cannot_store_register)
12460         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12461         register names to match the XML descriptions.
12462         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
12463         restart register instead of $0.
12464
12465 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
12466             Markus Deuling  <deuling@de.ibm.com>
12467
12468         * remote-utils.c (decode_xfer_write): New function.
12469         * server.h (decode_xfer_write): Add prototype.
12470         * server.c (handle_query): Add PACKET_LEN argument.  Support
12471         qXfer:spu:read and qXfer:spu:write packets.
12472         (main): Pass packet_len to handle_query.
12473         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12474         * target.h (target_ops): Add qxfer_spu.
12475
12476 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
12477
12478         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12479         accessing non-seekable spufs files.
12480
12481 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
12482
12483         * server.c (handle_query): Add reply for qC packet.
12484
12485 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12486             Leo Zayas  <lerele@champenstudios@com>
12487
12488         * server.h (check_remote_input_interrupt_request): New function.
12489         * remote_utils.c (INVALID_DESCRIPTOR): New define.
12490         (remote_desc): Initialize with INVALID_DESCRIPTOR.
12491         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
12492         (check_remote_input_interrupt_request): New function.
12493         * server.h (check_remote_input_interrupt_request): Declare.
12494         * win32-low.c (winapi_DebugBreakProcess,
12495         winapi_GenerateConsoleCtrlEvent): New typedefs.
12496         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12497         to 250 ms.
12498         (win32_wait): Check for remote interrupt request
12499         with check_remote_input_interrupt_request.
12500         (win32_request_interrupt): New function.
12501         (win32_target_op): Set request_interrupt to win32_request_interrupt.
12502
12503 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12504
12505         * win32-low.c (debug_registers_changed,
12506         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12507         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12508         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12509         (thread_rec): Get context using the low target.
12510         (child_add_thread): Call thread_added on the low target,
12511         which does the same thing.
12512         (regptr): Delete.
12513         (do_initial_child_stuff): Remove debug registers references.
12514         Set context using the low target.  Resume threads after
12515         setting the contexts.
12516         (child_continue): Remove dead variable.  Remove debug
12517         registers references.
12518         (child_fetch_inferior_registers): Go through the low target.
12519         (do_child_store_inferior_registers): Remove.
12520         (child_store_inferior_registers): Go through the low target.
12521         (win32_resume): Remove debug registers references.
12522         Set context using the low target.
12523         (handle_exception): Change return type to void.  Don't record
12524         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
12525         first chance exception.
12526         (get_child_debug_event): Change return type to void.  Remove
12527         goto loop.  Always return after waiting for debug event.
12528         (win32_wait): Convert to switch statement.  Handle spurious
12529         events.
12530
12531         * win32-i386-low.c (debug_registers_changed,
12532         debug_registers_used): New.
12533         (initial_stuff): Rename to ...
12534         (i386_initial_stuff): ... this.  Clear debug registers
12535         state variables.
12536         (store_debug_registers): Delete.
12537         (i386_get_thread_context): New.
12538         (load_debug_registers): Delete.
12539         (i386_set_thread_context): New.
12540         (i386_thread_added): New.
12541         (single_step): Rename to ...
12542         (i386_single_step): ... this.
12543         (do_fetch_inferior_registers): Rename to ...
12544         (i386_fetch_inferior_register): ... this.
12545         (i386_store_inferior_register): New.
12546         (the_low_target): Adapt to new interface.
12547
12548         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12549         (arm_get_thread_context): New.
12550         (arm_set_thread_context): New.
12551         (regptr): New.
12552         (do_fetch_inferior_registers): Rename to ...
12553         (arm_fetch_inferior_register): ... this.
12554         (arm_store_inferior_register): New.
12555         (arm_wince_breakpoint): Reimplement as unsigned long.
12556         (arm_wince_breakpoint_len): Define.
12557         (the_low_target): Adapt to new interface.
12558
12559         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12560         load_debug_registers.  Add get_thread_context, set_thread_context,
12561         thread_added and store_inferior_register.  Rename
12562         fetch_inferior_registers to fetch_inferior_register.
12563         (regptr): Remove declaration.
12564
12565 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12566
12567         * linux-low.c (linux_detach): Change return type to int.  Return 0.
12568         * spu-low.c (spu_detach): Likewise.
12569
12570 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12571
12572         * target.h (target_ops): Change return type of detach to int.
12573         Add join.
12574         (join_inferior): New.
12575         * server.c (main): Don't skip detach support on mingw32.
12576         If the inferior doesn't support detaching return error.
12577         Call join_inferior instead of using waitpid.
12578         * linux-low.c (linux_join): New.
12579         (linux_target_op): Add linux_join.
12580         * spu-low.c (spu_join): New.
12581         (spu_target_ops): Add spu_join.
12582         * win32-low.c (win32_detach): Adapt to new interface.
12583         Reopen current_process_handle before detaching.  Issue a child
12584         resume before detaching.
12585         (win32_join): New.
12586         (win32_target_op): Add win32_join.
12587
12588 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12589
12590         * win32-low.c (win32-attach): Fix return value.
12591         * target.h (target_ops): Describe ATTACH return values.
12592
12593 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12594
12595         * win32-low.c (GETPROCADDRESS): Define.
12596         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
12597         (winapi_DebugSetProcessKillOnExit): Likewise.
12598         (win32_create_inferior): Force usage of ansi CreateProcessA.
12599         (win32_attach): Use GETPROCADDRESS.
12600         (win32_detach): Likewise.
12601
12602 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12603
12604         * win32-low.c (win32_wait): Don't use WSTOPSIG.
12605
12606 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
12607
12608         * win32-low.c: Commit leftover changes from 2007-03-29.
12609
12610 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
12611
12612         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12613         fields short instead of int.  Add explicit padding.
12614         (i387_cache_to_fsave): Remove unnecessary casts.
12615         (i387_fsave_to_cache): Doc fix.
12616         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12617
12618 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
12619
12620         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12621         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12622
12623 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
12624
12625         * configure.srv (arm*-*-mingw32ce*): Move near the other
12626         arm targets.
12627
12628 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
12629
12630         * configure.ac: Add errno checking.
12631         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12632         sys/file.h and malloc.h.
12633         (AC_CHECK_DECLS): Add perror.
12634         (srv_mingwce): Handle.
12635         * configure.srv (i[34567]86-*-cygwin*): Add
12636         win32-i386-low.o to srv_tgtobj.
12637         (i[34567]86-*-mingw*): Likewise.
12638         (arm*-*-mingw32ce*): Add case.
12639         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12640         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12641         [__MINGW32CE__] (strerror): New function.
12642         [__MINGW32CE__] (errno): Define to GetLastError.
12643         [__MINGW32CE__] (COUNTOF): New macro.
12644         (remote_open): Remove extra close call.
12645         * mem-break.c (delete_breakpoint_at): New function.
12646         * mem-break.h (delete_breakpoint_at): Declare.
12647         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12648         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12649         [USE_WIN32API] (read, write): Add char* casts.
12650         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12651         * server.h: Include wincecompat.h on Windows CE.
12652         [HAVE_ERRNO_H]: Check.
12653         (perror): Declare if not declared.
12654         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12655         (perror_with_name): Remove errno declaration.
12656         * wincecompat.h: New.
12657         * wincecompat.c: New.
12658         * win32-low.h: New.
12659         * win32-arm-low.c: New.
12660         * win32-i386-low.c: New.
12661         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12662         (OUTMSG2): Make it safe.
12663         (_T): New macro.
12664         (COUNTOF): New macro.
12665         (NUM_REGS): Get it from the low target.
12666         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12667         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12668         (thread_rec): Let low target handle debug registers.
12669         (child_add_thread): Likewise.
12670         (child_init_thread_list): Likewise.
12671         (continue_one_thread): Likewise.
12672         (regptr): New.
12673         (do_child_fetch_inferior_registers): Move to ...
12674         * win32-i386-low.c: ... here, and rename to ...
12675         (do_fetch_inferior_registers): ... this.
12676         * win32-low.c (child_fetch_inferior_registers):
12677         Go through the low target.
12678         (do_child_store_inferior_registers): Use regptr.
12679         (strwinerror): New function.
12680         (win32_create_inferior): Handle Windows CE.
12681         Use strwinerror instead of strerror on Windows error
12682         codes.  Add program to the error output.
12683         Don't close the main thread handle on Windows CE.
12684         (win32_attach): Use coredll.dll on Windows CE.
12685         (win32_kill): Close current process and current
12686         thread handles.
12687         (win32_detach): Use coredll.dll on Windows CE.
12688         (win32_resume): Let low target handle debug registers, and
12689         step request.
12690         (handle_exception): Add/Remove initial breakpoint.  Avoid
12691         non-existant WSTOPSIG on Windows CE.
12692         (win32_read_inferior_memory): Cast to remove warning.
12693         (win32_arch_string): Go through the low target.
12694         (initialize_low): Call set_breakpoint_data with the low
12695         target's breakpoint.
12696         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12697         FOP_REGNUM, mappings): Move to ...
12698         * win32-i386-low.c: ... here.
12699         * win32-low.c (win32_thread_info): Move to ...
12700         * win32-low.h: ... here.
12701         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12702         win32-arm-low.c and wincecompat.c.
12703         (all:): Add $EXEEXT.
12704         (install-only:): Likewise.
12705         (gdbserver:): Likewise.
12706         (gdbreplay:): Likewise.
12707         * config.in: Regenerate.
12708         * configure: Regenerate.
12709
12710 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
12711
12712         * win32-low.c: Rename typedef thread_info to
12713         win32_thread_info throughout.
12714
12715 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
12716
12717         * win32-i386-low.c: Rename to ...
12718         * win32-low.c: ... this.
12719         * configure.srv: Replace win32-i386-low.o with win32-low.o.
12720         * Makefile.in: Likewise.
12721
12722 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
12723
12724         * remote-utils.c (monitor_output): Constify msg parameter.
12725         * server.h (monitor_output): Likewise.
12726         * win32-i386-low.c (handle_output_debug_string): New.
12727         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12728         handle_output_debug_string.
12729         (get_child_debug_event): Likewise.
12730
12731 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
12732
12733         * server.c (main): Correct strtoul check.
12734
12735 2007-03-27  Jon Ringle  <jon@ringle.org>
12736
12737         * linux-low.c: Check __ARCH_HAS_MMU__ also.
12738
12739 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
12740
12741         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12742
12743 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
12744
12745         * terminal.h: Check HAVE_SGTTY_H.
12746
12747 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
12748
12749         * remote-utils.c (remote_open): Print out the assigned port number.
12750
12751 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
12752
12753         * remote-utils.c (monitor_output): New function.
12754         * server.c (debug_threads): Define here.
12755         (monitor_show_help): New function.
12756         (handle_query): Handle qRcmd.
12757         (main): Do not handle 'd' packet.
12758         * server.h (debug_threads, remote_debug, monitor_output): Declare.
12759         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12760         of debug_threads.
12761
12762 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12763
12764         * Makefile.in (EXEEXT): New.
12765         (clean): Use $(EXEEXT).
12766
12767 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12768
12769         * target.h (target_ops): Rename send_signal to request_interrupt,
12770         and remove enum target_signal parameter.
12771         * linux-low.c (linux_request_interrupt): Rename from
12772         linux_send_signal, and always send SIGINT.
12773         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12774         and always send SIGINT.
12775         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12776         of send_signal.
12777         (input_interrupt): Likewise.
12778
12779 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12780
12781         * server.c (get_features_xml): Check if target implemented
12782         arch_string.
12783         * win32-i386-low.c (win32_arch_string): New.
12784         (win32_target_ops): Add win32_arch_string as arch_string member.
12785
12786 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
12787
12788         * spu-low.c (spu_arch_string): New.
12789         (spu_target_ops): Add spu_arch_string.
12790
12791 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
12792
12793         * remote-utils.c: Remove HAVE_TERMINAL_H check.
12794         * configure.ac: Do not check for terminal.h.
12795         * configure, config.in: Regenerated.
12796
12797 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
12798
12799         * Makefile.in (OBS): Add $(XML_BUILTIN).
12800         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12801         (clean): Update.
12802         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12803         (arm-with-iwmmxt.c): New.
12804         * config.in, configure: Regenerate.
12805         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
12806         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
12807         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12808         (arm*-*-linux*): Add iWMMXt and regset support.
12809         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12810         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12811         (arm_store_wmmxregset, target_regsets): New.
12812         * server.c (get_features_xml): Take annex argument.  Check builtin
12813         XML documents.
12814         (handle_query): Handle multiple annexes.
12815
12816 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
12817
12818         * remote-utils.c [USE_WIN32API] (read, write): Define.
12819         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12820         write.
12821
12822 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
12823
12824         * linux-i386-low.c (the_low_target): Set arch_string.
12825         * linux-x86-64-low.c (the_low_target): Likewise.
12826         * linux-low.c (linux_arch_string): New.
12827         (linux_target_ops): Add it.
12828         * linux-low.h (struct linux_target_ops): Add arch_string.
12829         * server.c (write_qxfer_response): Use const void * for DATA.
12830         (get_features_xml): New.
12831         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
12832         * target.h (struct target_ops): Add arch_string method.
12833
12834 2007-01-03  Denis Pilat  <denis.pilat@st.com>
12835             Daniel Jacobowitz  <dan@codesourcery.com>
12836
12837         * linux-low.c (linux_kill): Handle being called with no threads.
12838         * win32-i386-low.c (win32_kill): Likewise.
12839         (get_child_debug_event): Clear current_process_handle.
12840
12841 2006-12-30  Denis PILAT  <denis.pilat@st.com>
12842             Daniel Jacobowitz  <dan@codesourcery.com>
12843
12844         * remote-utils.c (remote_open): Check the type of specified
12845         serial port devices before opening them.
12846         * server.c (main): Kill the inferior if an error occurs during
12847         the first remote_open.
12848
12849 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
12850
12851         * README: Update supported targets.
12852
12853 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
12854
12855         * Makefile.in (clean): Remove reg-mips64.c.
12856         (reg-mips64.c, reg-mips64.o): New rules.
12857         * configure.srv: Handle mips64.  Include regset support for mips.
12858         * linux-mips-low.c (union mips_register): New.
12859         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12860         (mips_breakpoint, mips_breakpoint_at): Use int.
12861         (mips_collect_register, mips_supply_register)
12862         (mips_collect_register_32bit, mips_supply_register_32bit)
12863         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12864         (mips_store_fpregset, target_regsets): New.
12865         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12866
12867 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
12868
12869         * configure.srv: Add target "spu*-*-*".
12870         * Makefile.in (clean): Remove reg-spu.c.
12871         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12872         * spu-low.c: New file.
12873
12874 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
12875
12876         * configure.ac: Correct td_thr_tls_get_addr test.
12877         * configure: Regenerated.
12878
12879 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
12880
12881         * linux-low.c (linux_wait_for_event): Reformat.  Use the
12882         pass_signals array.
12883         * remote-utils.c (decode_address_to_semicolon): New.
12884         * server.c (pass_signals, handle_general_set): New.
12885         (handle_query): Mention QPassSignals for qSupported.
12886         (main): Call handle_general_set.
12887         * server.h (pass_signals, decode_address_to_semicolon): New.
12888
12889 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
12890
12891         * server.c (handle_query): Correct error handling for read_auxv.
12892
12893 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
12894
12895         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12896         and srv_linux_thread_db to yes.
12897         * linux-s390-low.c (s390_fill_gregset): New function.
12898         (target_regsets): Define data structure.
12899
12900 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
12901
12902         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12903         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
12904         * config.in, configure: Regenerated.
12905         * inferiors.c (gdb_id_to_thread): New function.
12906         (gdb_id_to_thread_id): Use it.
12907         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12908         * linux-low.h (struct process_info): Add th member.
12909         (thread_db_get_tls_address): New prototype.
12910         * remote-utils.c (decode_address): Make non-static.
12911         * server.c (handle_query): Handle qGetTLSAddr.
12912         * server.h (gdb_id_to_thread, decode_address): New prototypes.
12913         * target.h (struct target_ops): Add get_tls_address.
12914         * thread-db.c (maybe_attach_thread): Save the thread handle.
12915         (thread_db_get_tls_address): New.
12916
12917 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
12918
12919         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12920         (linux_resume_one_process): Take a siginfo_t *.  Update all
12921         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
12922         (struct pending_signals): Add a siginfo_t.
12923         (linux_wait_for_process): Always set last_status.
12924         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12925         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12926         * linux-low.h (struct process_info): Add last_status.
12927
12928 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
12929
12930         * remote-utils.c (try_rle): New function.
12931         (putpkt_binary): Use it.
12932
12933 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
12934
12935         * Makefile.in (clean): Clean reg-x86-64-linux.c.
12936         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12937         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12938         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12939         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12940         point registers.
12941
12942 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
12943
12944         * server.c (terminal_fd): New variable.
12945         (old_foreground_pgrp): Likewise.
12946         (restore_old_foreground_pgrp): New function.
12947         (start_inferior): Record the terminal file descriptor in terminal_fd
12948         and its original foreground group in old_foreground_pgrp.  Register
12949         restore_old_foreground_pgrp with atexit().
12950
12951 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
12952
12953         * server.c (handle_query): Correct qPart to qXfer.
12954
12955 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
12956
12957         * configure.ac: Check for more headers which are missing on
12958         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
12959         * configure.srv: Add Cygwin and mingw32.
12960         * remote-utils.c: Don't include headers unconditionally which
12961         are missing on mingw32.  Include <winsock.h> for mingw32.
12962         (remote_open): Adjust for mingw32 support.  Flush
12963         standard error after writing to it.
12964         (remote_close, putpkt_binary, input_interrupt, block_async_io)
12965         (unblock_async_io, enable_async_io, disable_async_io)
12966         (readchar, getpkt): Update for Winsock support.
12967         (prepare_resume_reply): Expect a protocol signal number.
12968         * server.c: Disable <sys/wait.h> on mingw32.
12969         (start_inferior): Adjust for mingw32 support.  Flush
12970         standard error after writing to it.
12971         (attach_inferior): Likewise.  Use protocol signal
12972         numbers.
12973         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
12974         and names.
12975         * win32-i386-low.c: New file.
12976         * Makefile.in (XM_CLIBS): Set.
12977         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12978         (win32-i386-low.o): New dependency rule.
12979         * linux-low.c (linux_wait): Use target signal numbers.
12980         * target.h (struct target_ops): Doc fix.
12981         * server.h (target_signal_to_name): New prototype.
12982         * gdbreplay.c: Don't include headers unconditionally which
12983         are missing on mingw32.  Include <winsock.h> for mingw32.
12984         (remote_close, remote_open): Adjust for Winsock support.
12985         * configure, config.in: Regenerated.
12986
12987 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
12988
12989         * server.c (decode_xfer_read, write_qxfer_response): New.
12990         (handle_query): Take a packet length argument.  Handle
12991         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
12992         the qSupported response.
12993         (main): Update call to handle_query.
12994
12995 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
12996
12997         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12998         (putpkt_binary): Renamed from putpkt and adjusted for binary
12999         data.
13000         (putpkt): New wrapper for putpkt_binary.
13001         (readchar): Don't mask off the high bit.
13002         (decode_X_packet): New function.
13003         * server.c (main): Call putpkt_binary if a handler sets the packet
13004         length.  Save the length of the incoming packet.  Handle 'X'.
13005         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13006
13007 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
13008
13009         * server.c (handle_query): Handle qSupported.
13010
13011 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
13012
13013         * remote-utils.c (all_symbols_looked_up): New variable.
13014         (look_up_one_symbol): Check it.
13015         * server.h (look_up_one_symbol): New declaration.
13016         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13017
13018 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
13019
13020         * Makefile.in (linux-arm-low.o): Update dependencies.
13021         * linux-arm-low.c: Include "gdb_proc_service.h".
13022         (PTRACE_GET_THREAD_AREA): Define.
13023         (ps_get_thread_area): New function.
13024
13025 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
13026
13027         * configure.srv (m68k*-*-uclinux*): New target.
13028         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13029         (linux_resume_one_process): Remove extraneous cast.
13030         (linux_read_offsets): New.
13031         (linux_target_op): Add linux_read_offsets on mmuless systems.
13032         * server.c (handle_query): Add qOffsets logic.
13033         * target.h (struct target_ops): Add read_offsets.
13034
13035 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
13036
13037         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13038         (PTRACE_GET_THREAD_AREA): Define.
13039         (ps_get_thread_area): New function.
13040         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13041         (linux-x86-64-low.o): Update.
13042
13043 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
13044
13045         * configure.ac: Remove checks for prfpregset_t.
13046         * gdb_proc_service.h: New file.
13047         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13048         new "gdb_proc_service.h".
13049         * proc-service.c: Likewise.
13050         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13051         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13052         * Makefile.in (gdb_proc_service_h): Updated.
13053         * configure, config.in: Regenerated.
13054
13055 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
13056
13057         * remote-utils.c (prepare_resume_reply): Move declaration
13058         of gdb_id_from_wait to the top of the block.
13059
13060 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
13061
13062         * linux-low.c (regsets_store_inferior_registers): Read the regset
13063         from the target before filling it.
13064
13065 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
13066
13067         * server.c (attach_inferior): Return SIGTRAP for a successful
13068         attach.
13069
13070 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
13071
13072         * Makefile.in (OBS): Add version.o.
13073         (STAGESTUFF): Delete.
13074         (version.o): Add dependencies.
13075         (version.c): Replace rule.
13076         (clean): Remove version.c.
13077         * server.c (gdbserver_version): New.
13078         (gdbserver_usage): Use printf.
13079         (main): Handle --version and --help.
13080         * server.h (version, host_name): Add declarations.
13081
13082 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
13083
13084         * linux-arm-low.c:
13085         * linux-arm-low.c:
13086         * inferiors.c:
13087         * i387-fp.h:
13088         * i387-fp.c:
13089         * gdbreplay.c:
13090         * regcache.c:
13091         * proc-service.c:
13092         * mem-break.h:
13093         * mem-break.c:
13094         * linux-x86-64-low.c:
13095         * linux-sh-low.c:
13096         * linux-s390-low.c:
13097         * linux-ppc64-low.c:
13098         * linux-ppc-low.c:
13099         * linux-mips-low.c:
13100         * linux-m68k-low.c:
13101         * linux-m32r-low.c:
13102         * linux-low.h:
13103         * linux-low.c:
13104         * linux-ia64-low.c:
13105         * linux-i386-low.c:
13106         * linux-crisv32-low.c:
13107         * thread-db.c:
13108         * terminal.h:
13109         * target.h:
13110         * target.c:
13111         * server.h:
13112         * server.c:
13113         * remote-utils.c:
13114         * regcache.h:
13115         * utils.c:
13116         * Makefile.in:
13117         * configure.ac:
13118         * gdbserver.1: Add (C) after Copyright.  Update the FSF
13119         address.
13120
13121 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
13122
13123         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13124         (arm_breakpoint_at): Recognize both breakpoints.
13125         (the_low_target): Use the correct breakpoint instruction.
13126
13127 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
13128
13129         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13130         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13131         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13132         (the_low_target): Update.
13133
13134 2005-10-25  Andreas Schwab  <schwab@suse.de>
13135
13136         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13137
13138         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13139         (ia64_num_regs): Reduce to 462.
13140
13141 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
13142
13143         * acinclude.m4: Correct quoting.
13144         * aclocal.m4: Regenerated.
13145
13146         Suggested by SZOKOVACS Robert <szo@ies.hu>:
13147         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13148         (thread_db_init): Call thread_db_err_str.
13149         * configure.ac: Check for TD_VERSION.
13150         * config.in, configure: Regenerated.
13151
13152 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13153
13154         * server.h (error, fatal, warning): Add ATTR_FORMAT.
13155
13156 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
13157
13158         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13159         is not available.  Define HAVE_PTRACE_GETREGS if it is.
13160         * config.in, configure: Regenerated.
13161         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13162         * linux-i386-low.c, linux-m68k-low.c: Update to use
13163         HAVE_PTRACE_GETREGS.
13164         * linux-low.c (regsets_fetch_inferior_registers)
13165         (regsets_store_inferior_registers): Only return 0 if we processed
13166         GENERAL_REGS.
13167         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13168         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13169
13170 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
13171
13172         * inferiors.c (struct thread_info): Add gdb_id.
13173         (add_thread): Add gdb_id argument.
13174         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13175         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13176         calls to add_thread.
13177         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13178         * server.c (handle_query): Use thread_to_gdb_id.
13179         (handle_v_cont, main): Use gdb_id_to_thread_id.
13180         * server.h (add_thread): Update prototype.
13181         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13182         prototypes.
13183
13184 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
13185
13186         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13187         left-padded registers.
13188         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13189         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13190
13191 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
13192
13193         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13194         * configure: Regenerate.
13195         * config.in: Regenerate.
13196         * server.h (NEED_DECLARATION_STRERROR):
13197         Replace with !HAVE_DECL_STRERROR.
13198
13199 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
13200
13201         * linux-low.c (linux_wait, linux_send_signal): Don't test
13202         an unsigned long variable for > 0 if it could be MAX_ULONG.
13203         * server.c (myresume): Likewise.
13204         * target.c (set_desired_inferior): Likewise.
13205
13206 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
13207
13208         * configure.ac: Simplify and improve check for socklen_t.
13209         * configure, config.in: Regenerate.
13210
13211 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
13212
13213         * acconfig.h: Remove.
13214         * configure.ac: Add a test for socklen_t.  Use three-argument
13215         AC_DEFINE throughout.
13216         * config.in: Regenerated using autoheader 2.59.
13217         * configure: Regenerated.
13218
13219         * gdbreplay.c (socklen_t): Provide a default.
13220         (remote_open): Use socklen_t.
13221         * remote-utils.c (socklen_t): Provide a default.
13222         (remote_open): Use socklen_t.
13223         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13224         unsigned char.
13225
13226         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13227         char for buffers.
13228         * linux-low.c (linux_read_memory, linux_write_memory)
13229         (linux_read_auxv): Likewise.
13230         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13231         (check_mem_write): Likewise.
13232         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13233         Likewise.
13234         * regcache.c (struct inferior_rgcache_data, registers_to_string)
13235         (registers_from_string, register_data): Likewise.
13236         * server.c (handle_query, main): Likewise.
13237         * server.h (convert_ascii_to_int, convert_int_to_ascii)
13238         (decode_M_packet): Likewise.
13239         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13240         * target.h (struct target_ops): Update read_memory, write_memory,
13241         and read_auxv.
13242         (read_inferior_memory, write_inferior_memory): Update.
13243         * linux-low.h (struct linux_target_ops): Change type of breakpoint
13244         to unsigned char *.
13245         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13246         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13247         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13248         linux-s390-low.c, linux-sh-low.c: Update for changes in
13249         read_inferior_memory and the_low_target->breakpoint.
13250
13251 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
13252
13253         * Makefile.in (SFILES): Add linux-ppc64-low.c.
13254         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13255         * configure.srv: Add powerpc64-*-linux*.
13256         * linux-ppc64-low.c: New file.
13257
13258 2005-05-23  Orjan Friberg  <orjanf@axis.com>
13259
13260         * linux-cris-low.c: New file with support for CRIS.
13261         * linux-crisv32-low.c: Ditto for CRISv32.
13262         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13263         (clean): Add reg-cris.c and reg-crisv32.c.
13264         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
13265         reg-crisv32.o, and reg-crisv32.c to make rules.
13266         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13267         recognized targets.
13268
13269 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
13270
13271         * linux-low.c (fetch_register): Ensure buffer size is a multiple
13272         of sizeof (PTRACE_XFER_TYPE).
13273         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
13274
13275 2005-05-12  Orjan Friberg  <orjanf@axis.com>
13276
13277         * target.h (struct target_ops): Add insert_watchpoint,
13278         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13279         pointers for hardware watchpoint support.
13280         * linux-low.h (struct linux_target_ops): Ditto.
13281         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13282         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
13283         to linux_target_ops.
13284         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13285         reply packet.
13286         * server.c (main): Recognize 'Z' and 'z' packets.
13287
13288 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
13289
13290         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13291         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13292         (the_low_target): Add new members.
13293
13294 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
13295
13296         * proc-service.c (ps_lgetregs): Search all_processes instead of
13297         all_threads.
13298
13299 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
13300
13301         * server.c (start_inferior): Change return type to int.
13302         (attach_inferior): Change sigptr to int *.
13303         (handle_v_cont, handle_v_requests): Change signal to int *.
13304         (main): Change signal to int.
13305
13306 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
13307
13308         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13309         * configure.srv: Add m32r*-*-linux*.
13310         * linux-m32r-low.c: New file.
13311
13312 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
13313
13314         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13315
13316 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
13317
13318         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13319         Take unsigned long arguments for PIDs.
13320         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13321         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13322         (wait_for_sigstop, linux_resume_one_process)
13323         (regsets_fetch_inferior_registers, linux_send_signal)
13324         (linux_read_auxv): Likewise.  Update the types of variables holding
13325         PIDs.  Update format string specifiers.
13326         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13327         * remote-utils.c (prepare_resume_reply): Likewise.
13328         * server.c (cont_thread, general_thread, step_thread)
13329         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13330         unsigned long.
13331         (handle_query): Update format specifiers.
13332         (handle_v_cont, main): Use strtoul for thread IDs.
13333         * server.h (struct inferior_list_entry): Use unsigned long for ID.
13334         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13335         (general_thread, step_thread, thread_from_wait)
13336         (old_thread_from_wait): Update.
13337         * target.h (struct thread_resume): Use unsigned long for THREAD.
13338         (struct target_ops): Use unsigned long for arguments to attach and
13339         thread_alive.
13340
13341 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
13342
13343         * acinclude.m4: Include bfd/bfd.m4 directly.
13344         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
13345         <agriffis@toolchain.org>.
13346         * aclocal.m4, configure: Regenerated.
13347
13348 2005-01-07  Andrew Cagney  <cagney@gnu.org>
13349
13350         * configure.ac: Rename configure.in, require autoconf 2.59.
13351         * configure: Re-generate.
13352
13353 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
13354
13355         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
13356         LIBS when finished.
13357         * aclocal.m4: Regenerated.
13358         * configure: Regenerated.
13359
13360 2004-11-21  Andreas Schwab  <schwab@suse.de>
13361
13362         * linux-m68k-low.c (m68k_num_gregs): Define.
13363         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13364         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13365         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13366         (m68k_breakpoint_at): New.  Add to the_low_target.
13367
13368         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13369         srv_linux_thread_db to yes.
13370
13371 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
13372
13373         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13374         (ARCH_SET_FS): Likewise.
13375         (ARCH_GET_FS): Likewise.
13376         (ARCH_GET_GS): Likewise.
13377
13378 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
13379
13380         * linux-i386-low.c (ps_get_thread_area): New.
13381         * linux-x86-64-low.c (ps_get_thread_area): New.
13382         * linux-low.c: Include <sys/syscall.h>.
13383         (linux_kill_one_process): Don't kill the first thread here.
13384         (linux_kill): Kill the first thread here.
13385         (kill_lwp): New function.
13386         (send_sigstop, linux_send_signal): Use it.
13387         * proc-service.c: Clean up #ifdefs.
13388         (fpregset_info): Delete.
13389         (ps_lgetregs): Update and enable implementation.
13390         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13391         implementations.
13392         * remote-utils.c (struct sym_cache, symbol_cache): New.
13393         (input_interrupt): Print a clearer message.
13394         (async_io_enabled): New variable.
13395         (enable_async_io, disable_async_io): Use it.  Update comments.
13396         (look_up_one_symbol): Use the symbol cache.
13397         * thread-db.c (thread_db_look_up_symbols): New function.
13398         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
13399
13400 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
13401
13402         * configure.in: Test for -rdynamic.
13403         * configure: Regenerated.
13404         * Makefile (INTERNAL_LDFLAGS): New.
13405         (gdbserver, gdbreplay): Use it.
13406
13407 2004-09-02  Andrew Cagney  <cagney@gnu.org>
13408
13409         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13410
13411 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
13412
13413         * linux-low.c (linux_wait): Clear all_processes list also.
13414
13415 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
13416
13417         * linux-low.c: Include <errno.h>.  Remove extern declaration of
13418         errno.
13419
13420 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
13421
13422         * gdbreplay.c, server.h, utils.c: Update copyright years.
13423
13424 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
13425
13426         * server.c (main): Print child status or termination signal from
13427         variable 'signal', not 'sig'.
13428
13429 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
13430
13431         * linux-low.c (linux_read_memory): Change return type to
13432         int.  Check for and return error from ptrace().
13433         * target.c (read_inferior_memory): Change return type to int.  Pass
13434         back return status from the_target->read_memory().
13435         * target.h (struct target_ops): Adapt *read_memory() prototype.
13436         Update comment.
13437         (read_inferior_memory): Adapt prototype.
13438         * server.c (main): Return an error packet if
13439         read_inferior_memory() returns an error.
13440
13441 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
13442
13443         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13444         Unify with other clean targets.
13445
13446 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13447
13448         * server.c (handle_v_cont): Call set_desired_inferior.
13449
13450 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13451
13452         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13453
13454 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13455
13456         * linux-low.c (linux_wait): Unblock async I/O.
13457         (linux_resume): Block and enable async I/O.
13458         * remote-utils.c (block_async_io, unblock_async_io): New functions.
13459         * server.h (block_async_io, unblock_async_io): Add prototypes.
13460
13461 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13462
13463         * remote-utils.c (remote_open): Print a status notice after
13464         opening a TCP port.
13465         * server.c (attach_inferior): Print a status notice after
13466         attaching.
13467
13468 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13469
13470         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13471
13472 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
13473
13474         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13475         error packet.
13476         * server.c, target.h: Update copyright years.
13477
13478 2004-02-25  Roland McGrath  <roland@redhat.com>
13479
13480         * target.h (struct target_ops): New member `read_auxv'.
13481         * server.c (handle_query): Handle qPart:auxv:read: query using that.
13482         * linux-low.c (linux_read_auxv): New function.
13483         (linux_target_ops): Initialize `read_auxv' member to that.
13484
13485 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13486
13487         Committed by Jim Blandy  <jimb@redhat.com>.
13488
13489         * linux-s390-low.c (s390_num_regs): Update.
13490         (s390_regmap): Remove control registers.  Use __s390x__ predefine
13491         instead of GPR_SIZE to distiguish s390 and s390x targets.
13492
13493 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
13494
13495         * linux-low.c: Update copyright year.
13496         (check_removed_breakpoint): Clear pending_is_breakpoint.
13497         (linux_set_resume_request, linux_queue_one_thread)
13498         (resume_status_pending_p): New functions.
13499         (linux_continue_one_thread): Use process->resume.
13500         (linux_resume): Only resume threads if there are no pending events.
13501         * linux-low.h (struct process_info): Add resume request
13502         pointer.
13503
13504 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
13505
13506         * regcache.c (new_register_cache): Clear the allocated register
13507         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13508
13509 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
13510
13511         * linux-low.c (linux_resume): Take a struct thread_resume *
13512         argument.
13513         (linux_wait): Update call.
13514         (resume_ptr): New static variable.
13515         (linux_continue_one_thread): Renamed from
13516         linux_continue_one_process.  Use resume_ptr.
13517         (linux_resume): Use linux_continue_one_thread.
13518         * server.c (handle_v_cont, handle_v_requests): New functions.
13519         (myresume): New function.
13520         (main): Handle 'v' case.
13521         * target.h (struct thread_resume): New type.
13522         (struct target_ops): Change argument of "resume" to struct
13523         thread_resume *.
13524         (myresume): Delete macro.
13525
13526 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
13527
13528         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13529         (uninstall): Support DESTDIR.
13530
13531 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
13532
13533         * configure.srv: Add xscale*linux copy of arm*linux entry.
13534
13535 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
13536
13537         * linux-arm-low.c (arm_reinsert_addr): New function.
13538         (the_low_target): Add arm_reinsert_addr.
13539
13540 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
13541
13542         * mem-break.c: Remove whitespace at end of file.
13543
13544 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
13545
13546         * configure.in: Check whether we need to prototype strerror.
13547         * server.h: Optionally prototype strerror.
13548         * gdbreplay.c (perror_with_name): Use strerror.
13549         * linux-low.c (linux_attach_lwp): Use strerror.
13550         * utils.c (perror_with_name): Use strerror.
13551         * config.in, configure: Regenerated.
13552
13553 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
13554
13555         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13556         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13557
13558 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
13559
13560         * Makefile.in (SFILES): Update.
13561         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13562         low-sun3.c: Remove files.
13563
13564 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
13565
13566         * linux-low.c: Move comment to linux_thread_alive where it belonged.
13567         (linux_detach_one_process, linux_detach): New functions.
13568         (linux_target_ops): Add linux_detach.
13569         * server.c (main): Handle 'D' packet.
13570         * target.h (struct target_ops): Add "detach" member.
13571         (detach_inferior): Define.
13572
13573 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
13574
13575         From Kelley Cook  <kelleycook@wideopenwest.com>:
13576         * configure.srv: Accept i[34567]86 variants.
13577
13578 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
13579
13580         * linux-low.c (linux_wait_for_event): Correct comment typos.
13581         (linux_resume_one_process): Call check_removed_breakpoint.
13582         (linux_send_signal): New function.
13583         (linux_target_ops): Add linux_send_signal.
13584         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13585         of kill.
13586         * target.h (struct target_ops): Add send_signal.
13587
13588 2003-05-29  Jim Blandy  <jimb@redhat.com>
13589
13590         * linux-low.c (usr_store_inferior_registers): Transfer buf in
13591         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
13592         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13593         away part of the register's value.
13594
13595 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
13596
13597         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13598         (linux_wait_for_event, linux_init_signals): Likewise.
13599
13600 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
13601
13602         * configure.in: Check for stdlib.h.
13603         * configure: Regenerated.
13604         * config.in: Regenerated.
13605
13606 2003-01-04  Andreas Schwab  <schwab@suse.de>
13607
13608         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13609
13610 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
13611
13612         * Makefile.in: Remove obsolete code.
13613
13614 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
13615
13616         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13617         defined(PT_FPR0_HI).
13618
13619 2002-11-17  Stuart Hughes  <seh@zee2.com>
13620
13621         * linux-arm-low.c (arm_num_regs): Increase.
13622         (arm_regmap): Include status register.
13623
13624 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
13625
13626         * linux-low.c (register_addr): Remove incorrect -1 check.
13627
13628 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
13629
13630         * linux-low.c (linux_create_inferior): Call setpgid.  Return
13631         the new PID.
13632         (unstopped_p, linux_signal_pid): Remove.
13633         (linux_target_ops): Remove linux_signal_pid.
13634         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13635         global instead of target method.
13636         * target.h (struct target_ops): Remove signal_pid.  Update comment
13637         for create_inferior.
13638         * server.c (signal_pid): New variable.
13639         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
13640         gdbserver.  Set the child to be the foreground process group.
13641         (attach_inferior): Set signal_pid.
13642
13643 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
13644
13645         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13646
13647 2002-08-20  Jim Blandy  <jimb@redhat.com>
13648
13649         * Makefile.in (LDFLAGS): Allow the configure script to establish a
13650         default for this.
13651
13652 2002-08-01  Andrew Cagney  <cagney@redhat.com>
13653
13654         * Makefile.in: Make chill references obsolete.
13655
13656 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
13657
13658         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13659         * configure: Regenerate.
13660         * config.in: Regenerate.
13661
13662 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
13663
13664         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13665         (perror_with_name, remote_close, remote_open, expect, play): Static.
13666
13667 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
13668
13669         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
13670         byte offsets instead of an array of indexes.
13671         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13672
13673 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
13674
13675         * regcache.c: Add comment.
13676
13677 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
13678
13679         * thread-db.c: New file.
13680         * proc-service.c: New file.
13681         * acinclude.m4: New file.
13682         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13683         proc-service.o, and thread-db.o.
13684         (linux-low.o): Add USE_THREAD_DB.
13685         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13686         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13687         * aclocal.m4: Regenerated.
13688         * config.in: Regenerated.
13689         * configure: Regenerated.
13690         * configure.in: Check for proc_service.h, sys/procfs.h,
13691         thread_db.h, and linux/elf.h headrs.
13692         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13693         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
13694         Check for -lthread_db and thread support.
13695         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13696         PowerPC, and SuperH.
13697         * i387-fp.c: Constify arguments.
13698         * i387-fp.h: Likewise.
13699         * inferiors.c: (struct thread_info): Renamed from
13700         `struct inferior_info'.  Remove PID member.  Use generic inferior
13701         list header.  All uses updated.
13702         (inferiors, signal_pid): Removed.
13703         (all_threads): New variable.
13704         (get_thread): Define.
13705         (add_inferior_to_list): New function.
13706         (for_each_inferior): New function.
13707         (change_inferior_id): New function.
13708         (add_inferior): Removed.
13709         (remove_inferior): New function.
13710         (add_thread): New function.
13711         (free_one_thread): New function.
13712         (remove_thread): New function.
13713         (clear_inferiors): Use for_each_inferior and free_one_thread.
13714         (find_inferior): New function.
13715         (find_inferior_id): New function.
13716         (inferior_target_data): Update argument type.
13717         (set_inferior_target_data): Likewise.
13718         (inferior_regcache_data): Likewise.
13719         (set_inferior_regcache_data): Likewise.
13720         * linux-low.c (linux_bp_reinsert): Remove.
13721         (all_processes, stopping_threads, using_thrads)
13722         (struct pending_signals, debug_threads, pid_of): New.
13723         (inferior_pid): Replace with macro.
13724         (struct inferior_linux_data): Remove.
13725         (get_stop_pc, add_process): New functions.
13726         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13727         Use add_process and add_thread.
13728         (linux_attach_lwp): New function, based on old linux_attach.  Use
13729         add_process and add_thread.  Set stop_expected for new threads.
13730         (linux_attach): New function.
13731         (linux_kill_one_process): New function.
13732         (linux_kill): Kill all LWPs.
13733         (linux_thread_alive): Use find_inferior_id.
13734         (check_removed_breakpoints, status_pending_p): New functions.
13735         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13736         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
13737         struct for the found process.
13738         (linux_wait_for_event): New function.
13739         (linux_wait): Use it.  Support LWPs.
13740         (send_sigstop, wait_for_sigstop, stop_all_processes)
13741         (linux_resume_one_process, linux_continue_one_process): New functions.
13742         (linux_resume): Support LWPs.
13743         (REGISTER_RAW_SIZE): Remove.
13744         (fetch_register): Use register_size instead.  Call supply_register.
13745         (usr_store_inferior_registers): Likewise.  Call collect_register.
13746         Fix recursive case.
13747         (regsets_fetch_inferior_registers): Improve error message.
13748         (regsets_store_inferior_registers): Add debugging.
13749         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13750         (unstopped_p, linux_signal_pid): New functions.
13751         (linux_target_ops): Add linux_signal_pid.
13752         (linux_init_signals): New function.
13753         (initialize_low): Call it.  Initialize using_threads.
13754         * regcache.c (inferior_regcache_data): Add valid
13755         flag.
13756         (get_regcache): Fetch registers lazily.  Add fetch argument
13757         and update all callers.
13758         (regcache_invalidate_one, regcache_invalidate): New
13759         functions.
13760         (new_register_cache): Renamed from create_register_cache.
13761         Return the new regcache.
13762         (free_register_cache): Change argument to a void *.
13763         (registers_to_string, registers_from_string): Call get_regcache
13764         with fetch flag set.
13765         (register_data): Make static.  Pass fetch flag to get_regcache.
13766         (supply_register): Call get_regcache with fetch flag clear.
13767         (collect_register): Call get_regcache with fetch flag set.
13768         (collect_register_as_string): New function.
13769         * regcache.h: Update.
13770         * remote-utils.c (putpkt): Flush after debug output and use
13771         stderr.
13772         Handle input interrupts while waiting for an ACK.
13773         (input_interrupt): Use signal_pid method.
13774         (getpkt): Flush after debug output and use stderr.
13775         (outreg): Use collect_register_as_string.
13776         (new_thread_notify, dead_thread_notify): New functions.
13777         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
13778         and general_thread.
13779         (look_up_one_symbol): Flush after debug output.
13780         * server.c (step_thread, server_waiting): New variables.
13781         (start_inferior): Don't use signal_pid.  Update call to mywait.
13782         (attach_inferior): Update call to mywait.
13783         (handle_query): Handle qfThreadInfo and qsThreadInfo.
13784         (main): Don't fetch/store registers explicitly.  Use
13785         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
13786         calls to mywait.
13787         * server.h: Update.
13788         (struct inferior_list, struct_inferior_list_entry): New.
13789         * target.c (set_desired_inferior): New.
13790         (write_inferior_memory): Constify.
13791         (mywait): New function.
13792         * target.h: Update.
13793         (struct target_ops): New signal_pid method.
13794         (mywait): Removed macro, added prototype.
13795
13796         * linux-low.h (regset_func): Removed.
13797         (regset_fill_func, regset_store_func): New.
13798         (enum regset_type): New.
13799         (struct regset_info): Add type field.  Use new operation types.
13800         (struct linux_target_ops): stop_pc renamed to get_pc.
13801         Add decr_pc_after_break and breakpoint_at.
13802         (get_process, get_thread_proess, get_process_thread)
13803         (strut process_info, all_processes, linux_attach_lwp)
13804         (thread_db_init): New.
13805
13806         * linux-arm-low.c (arm_get_pc, arm_set_pc,
13807         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13808         (the_low_target): Add new members.
13809         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13810         (i386_store_fpxregset): Constify.
13811         (target_regsets): Add new kind identifier.
13812         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
13813         (i386_set_pc): Add debugging.
13814         (i386_breakpoint_at): New function.
13815         (the_low_target): Add new members.
13816         * linux-mips-low.c (mips_get_pc, mips_set_pc)
13817         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13818         (mips_breakpoint_at): New.
13819         (the_low_target): Add new members.
13820         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13821         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13822         (the_low_target): Add new members.
13823         * linux-sh-low.c (sh_get_pc, sh_set_pc)
13824         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13825         (the_low_target): Add new members.
13826         * linux-x86-64-low.c (target_regsets): Add new kind
13827         identifier.
13828
13829 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
13830
13831         From Martin Pool <mbp@samba.org>:
13832         * server.c (gdbserver_usage): New function.
13833         (main): Call it.
13834
13835 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
13836
13837         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13838         stop_at -> stop_pc.
13839
13840 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
13841
13842         * Makefile.in: Remove obsolete code.
13843
13844 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
13845
13846         * linux-low.c (regsets_fetch_inferior_registers),
13847         (regsets_store_inferior_registers): Removed cast to int from
13848         ptrace() calls.
13849         * regcache.h: Added declaration of struct inferior_info.
13850
13851 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
13852
13853         * inferiors.c (struct inferior_info): Add regcache_data.
13854         (add_inferior): Call create_register_cache.
13855         (clear_inferiors): Call free_register_cache.
13856         (inferior_regcache_data, set_inferior_regcache_data): New functions.
13857         * regcache.c (struct inferior_regcache_data): New.
13858         (registers): Remove.
13859         (get_regcache): New function.
13860         (create_register_cache, free_register_cache): New functions.
13861         (set_register_cache): Don't initialize the register cache here.
13862         (registers_to_string, registers_from_string, register_data): Call
13863         get_regcache.
13864         * regcache.h: Add prototypes.
13865         * server.h: Likewise.
13866
13867 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
13868
13869         * mem-break.c: New file.
13870         * mem-break.h: New file.
13871         * Makefile.in: Add mem-break.o rule; update server.h
13872         dependencies.
13873         * inferiors.c (struct inferior_info): Add target_data
13874         member.
13875         (clear_inferiors): Free target_data member if set.
13876         (inferior_target_data, set_inferior_target_data): New functions.
13877         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13878         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
13879         * linux-low.c (linux_bp_reinsert): New variable.
13880         (struct inferior_linux_data): New.
13881         (linux_create_inferior): Use set_inferior_target_data.
13882         (linux_attach): Likewise.  Call add_inferior.
13883         (linux_wait_for_one_inferior): New function.
13884         (linux_wait): Call it.
13885         (linux_write_memory): Add const.
13886         (initialize_low): Call set_breakpoint_data.
13887         * linux-low.h (struct linux_target_ops): Add breakpoint
13888         handling members.
13889         * server.c (attach_inferior): Remove extra add_inferior
13890         call.
13891         * server.h: Include mem-break.h.  Update inferior.c
13892         prototypes.
13893         * target.c (read_inferior_memory)
13894         (write_inferior_memory): New functions.
13895         * target.h (read_inferior_memory)
13896         (write_inferior_memory): Change macros to prototypes.
13897         (struct target_ops): Update comments.  Add const to write_memory
13898         definition.
13899
13900 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
13901
13902         * linux-low.c (usr_store_inferior_registers): Support
13903         registers which are allowed to fail to store.
13904         * linux-low.h (linux_target_ops): Likewise.
13905         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13906         (ppc_cannot_store_register): FPSCR may not be storable.
13907
13908 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13909
13910         * server.h: Include <string.h> if HAVE_STRING_H.
13911         * ChangeLog: Correct paths in last ChangeLog entry.
13912
13913 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13914
13915         * linux-low.h: Remove obsolete prototypes.
13916         (struct linux_target_ops): New.
13917         (extern the_low_target): New.
13918         * linux-low.c (num_regs, regmap): Remove declarations.
13919         (register_addr): Use the_low_target explicitly.
13920         (fetch_register): Likewise.
13921         (usr_fetch_inferior_registers): Likewise.
13922         (usr_store_inferior_registers): Likewise.
13923         * linux-arm-low.c (num_regs): Remove.
13924         (arm_num_regs): Define.
13925         (arm_regmap): Renamed from regmap, made static.
13926         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13927         made static.
13928         (arm_cannot_store_register): Renamed from cannot_store_register,
13929         made static.
13930         (the_low_target): New.
13931         * linux-i386-low.c (num_regs): Remove.
13932         (i386_num_regs): Define.
13933         (i386_regmap): Renamed from regmap, made static.
13934         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13935         made static.
13936         (i386_cannot_store_register): Renamed from cannot_store_register,
13937         made static.
13938         (the_low_target): New.
13939         * linux-ia64-low.c (num_regs): Remove.
13940         (ia64_num_regs): Define.
13941         (ia64_regmap): Renamed from regmap, made static.
13942         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13943         made static.
13944         (ia64_cannot_store_register): Renamed from cannot_store_register,
13945         made static.
13946         (the_low_target): New.
13947         * linux-m68k-low.c (num_regs): Remove.
13948         (m68k_num_regs): Define.
13949         (m68k_regmap): Renamed from regmap, made static.
13950         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13951         made static.
13952         (m68k_cannot_store_register): Renamed from cannot_store_register,
13953         made static.
13954         (the_low_target): New.
13955         * linux-mips-low.c (num_regs): Remove.
13956         (mips_num_regs): Define.
13957         (mips_regmap): Renamed from regmap, made static.
13958         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13959         made static.
13960         (mips_cannot_store_register): Renamed from cannot_store_register,
13961         made static.
13962         (the_low_target): New.
13963         * linux-ppc-low.c (num_regs): Remove.
13964         (ppc_num_regs): Define.
13965         (ppc_regmap): Renamed from regmap, made static.
13966         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13967         made static.
13968         (ppc_cannot_store_register): Renamed from cannot_store_register,
13969         made static.
13970         (the_low_target): New.
13971         * linux-s390-low.c (num_regs): Remove.
13972         (s390_num_regs): Define.
13973         (s390_regmap): Renamed from regmap, made static.
13974         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13975         made static.
13976         (s390_cannot_store_register): Renamed from cannot_store_register,
13977         made static.
13978         (the_low_target): New.
13979         * linux-sh-low.c (num_regs): Remove.
13980         (sh_num_regs): Define.
13981         (sh_regmap): Renamed from regmap, made static.
13982         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13983         made static.
13984         (sh_cannot_store_register): Renamed from cannot_store_register,
13985         made static.
13986         (the_low_target): New.
13987         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13988         (the_low_target): New.
13989
13990 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13991
13992         * Makefile.in: Add stamp-h target.
13993         * configure.in: Create stamp-h.
13994         * configure: Regenerated.
13995
13996 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13997
13998         * inferiors.c: New file.
13999         * target.c: New file.
14000         * target.h: New file.
14001         * Makefile.in:  Add target.o and inferiors.o.  Update
14002         dependencies.
14003         * linux-low.c (inferior_pid): New static variable,
14004         moved from server.c.
14005         (linux_create_inferior): Renamed from create_inferior.
14006         Call add_inferior.  Return 0 on success instead of a PID.
14007         (linux_attach): Renamed from myattach.
14008         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
14009         (linux_thread_alive): Renamed from mythread_alive.
14010         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
14011         child dies.
14012         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
14013         (regsets_store_inferior_registers): Correct error message.
14014         Add missing ``return 0''.
14015         (linux_fetch_registers): Renamed from fetch_inferior_registers.
14016         (linux_store_registers): Renamed from store_inferior_registers.
14017         (linux_read_memory): Renamed from read_inferior_memory.
14018         (linux_write_memory): Renamed from write_inferior_memory.
14019         (linux_target_ops): New structure.
14020         (initialize_low): Call set_target_ops ().
14021         * remote-utils.c (unhexify): New function.
14022         (hexify): New function.
14023         (input_interrupt): Send signals to ``signal_pid''.
14024         * server.c (inferior_pid): Remove.
14025         (start_inferior): Update create_inferior call.
14026         (attach_inferior): Call add_inferior.
14027         (handle_query): New function.
14028         (main): Call handle_query for `q' packets.
14029         * server.h: Include "target.h".  Remove obsolete prototypes.
14030         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14031
14032 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
14033
14034         * Makefile.in: Add WARN_CFLAGS.  Update configury
14035         dependencies.
14036         * configure.in: Check for <string.h>
14037         * configure: Regenerate.
14038         * config.in: Regenerate.
14039         * gdbreplay.c: Include needed system headers.
14040         (remote_open): Remove strchr prototype.
14041         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14042         * regcache.c (supply_register): Change buf argument to const void *.
14043         (supply_register_by_name): Likewise.
14044         (collect_register): Change buf argument to void *.
14045         (collect_register_by_name): Likewise.
14046         * regcache.h: Add missing prototypes.
14047         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14048         * server.c (handle_query): New function.
14049         (attached): New static variable, moved out of main.
14050         (main): Quiet longjmp clobber warnings.
14051         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
14052         * utils.c (error): Remove NORETURN.
14053         (fatal): Likewise.